zoem-21-341/0000755000207600020760000000000014154762473007577 500000000000000zoem-21-341/DESIGN0000644000207600020760000000404114115654477010413 00000000000000 Varargs Scopes may be separated by whitespace; any other character is treated as end-of-vararg. For some unknown reason, the occurrence of such hickup-characters is not yet treated as an error. XML syntactic sugar \{stuff} is *different*, because of immediate digest and delay until output time. In fact, \{\!{\PI}} will work because of extra digest in evalXtag2. I am not yet aware of an example where the inserted delay scope throws a surprise. Segment continuation, so to speak In case of error, ops should always use yamSegPush(seg, txt) so that partial content is treated correctly. Use mcxTingEmpty if necessary, or just pass partial content, or use yamSegPushEmpty(seg) yamSegPush(NULL, ..) should only be issued by yamStackPush in segment.c, nowhere else. This is not yet enforced/checked; stuff needs to be reglued a bit for this. yamSegPush never returns NULL, but may set SEGMENT_ERROR or SEGMENT_THROWN, which should be checked. yamExpandKey and yamDoKey may return NULL, these must be checked. yamStackPush / yamStackFree are not symmetric. the freeing is usualy done from a higher level (in case of error) or implicitly by totally rewinding and using yamSegFree. yamStackPushTmp / yamStackFreeTmp *must* be symmetric. This is not yet checked (e.g. one might erroneously use yamSegFree to free the stack obtained by yamStackPushTmp). One way would be to set a special flag that is checked e.g. by yamSegNew, but alas apply2 issues yamSegNew after yamStackPushTmp. yamDigest returns 2 statuses, FAIL and OK. yamOutput returns 3 statuses, BOUNCE, FAIL, and OK. (yamDigest writes info in baseseg [what happens when baseseg == NULL?]) this is either not entirely satisfactory or needs to have clear exposition. Tracing Tracing should mainly serve the zoem user, not the developer. So don't put too many debugging-type tracing levels in. Allocation errors memalloc errors are not caught. Zoem should be compiled to exit on error. zoem-21-341/INSTALL0000644000207600020760000002203014115654477010546 00000000000000Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. zoem-21-341/examples/0000755000207600020760000000000014154762473011415 500000000000000zoem-21-341/examples/power-of-2.azm0000644000207600020760000000142414134243760013733 00000000000000 \: zoem -i power-of-2 --allow=ls -s level=10 \: zoem -i power-of-2 --allow=ls -s level=11 \: This creates big files, by succesively doubling a string. \: It then writes the file characteristics to STDOUT, \: Use this to compute powers of two (you'll need to pipe it through \: tail and/or cut though). \formatted{ \if{\defined{key}{level}} {} {\def{level}{10}} \inform{Using\`{ }level=\level} \def{double#1}{ \switch{\level}{ {0}{} {1}{\1} { \setx{level}{\let{\level-1} } \write{stderr}{device}{[\level]}\double{\1\1} } } } } \double{* } \write{stderr}{device}{\@{\N}} \setx{cluefile}{\__fnout__} \writeto{-} \if{\cmp{ne}{\cluefile}{-}}{\@{\w}\system{ls}{{-l}{\cluefile}}\@{\W}}{} zoem-21-341/examples/reverse.ozm0000644000207600020760000000012614115654477013537 00000000000000before: {1}{2}{3}{\reverse{{a}{b}{c}}}{4}{5}{6} after : {6}{5}{4}{{c}{b}{a}}{3}{2}{1} zoem-21-341/examples/scope.ozm0000644000207600020760000000013214115654477013172 00000000000000num is 9 num is 8 num is 7 num is 6 num is 5 num is 4 num is 3 num is 2 num is 1 num is 0 zoem-21-341/examples/Makefile.in0000644000207600020760000003506014154762464013406 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.15 2005/06/30 16:23:25 flux Exp $ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docexamplesdir)" DATA = $(docexamples_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_cv_use_includepath = @ac_cv_use_includepath@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/$(PACKAGE) dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ docexamplesdir = $(docdir)/examples docexamples_DATA = \ README \ 8q.azm 8q.ozm \ 8q2.azm 8q2.ozm \ power-of-2.azm power-of-2.ozm \ catch.azm catch.ozm \ fib.azm \ loop.azm loop.ozm \ meta.azm meta.ozm \ nest.azm nest.ozm \ reverse.azm reverse.ozm \ scope.azm scope.ozm \ special.azm special.ozm \ stress.azm stress.reg \ stress2.azm stress2.reg \ tr.azm tr.ozm \ txt-table.azm txt-table.ozm \ xml.azm xml.ozm EXTRA_DIST = README Makefile $(docexamples_DATA) SUFFIXES = .azm .ozm all: all-am .SUFFIXES: .SUFFIXES: .azm .ozm $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-docexamplesDATA: $(docexamples_DATA) @$(NORMAL_INSTALL) @list='$(docexamples_DATA)'; test -n "$(docexamplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docexamplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docexamplesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docexamplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docexamplesdir)" || exit $$?; \ done uninstall-docexamplesDATA: @$(NORMAL_UNINSTALL) @list='$(docexamples_DATA)'; test -n "$(docexamplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docexamplesdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(docexamplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docexamplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docexamplesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-docexamplesDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-docexamplesDATA .PRECIOUS: Makefile .azm.ozm: ../src/zoem -i $< -o $@ # fib.azm is for demonstration of interactive behaviour. fib.ozm: fib.azm true stress.ozm: stress.azm ../src/zoem -i stress --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress.ozm stress2.ozm: stress2.azm ../src/zoem -i stress2 --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress2.ozm power-of-2.ozm: power-of-2.azm ../src/zoem -i power-of-2 --allow=ls xml.ozm: xml.azm ../src/zoem -i xml -tl 3 sys1: zoem -i system -o - --allow=date sys2: zoem -i system -o system.ozm --allow=date sys3: zoem -i system -o - --allow=date > system.ozm # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zoem-21-341/examples/stress2.azm0000644000207600020760000000470414115654477013461 00000000000000\if{\defined{key}{get_it_on}}{}{ \write{-}{device}{Process this file with ../src/zoem -i stress2 --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress2.ozm\@{\N} } \done } \set{__device__}{zut} \apply{_#2{\@{\P} @@@ \1 [\!protect{\2}] \@{\N} \!catch{error}{\2 ***} }}{\!{ {eval}{\eval{\!{\foo}}} {$#2}{\${zut}{\foo}} {<>#1}{\<\foo>} {<>#2}{\{\bar}} {<>#2}{\<\foo>{bar}} {alpha#1}{\alpha{\foo}} {apply#2}{\apply{}{}} {apply#2}{\apply{}{{\foo}}} {apply#2}{\appy{\foo#2}{}} {begin#2}{\begin{\foo}{}} {begin#2}{\begin{foo}{{\foo}{}}} {begin#2}{\begin{void}{{\foo}{}}} {begin#2}{\begin{void}{{foo}{\foo}}} {branch#1}{\branch{{\foo}{}}} {FALL THROUGH CLAUSE branch#1}{\branch{{}{\foo}}} {catch#2}{\catch{foo}{}} {catch#2}{\catch{error}{zut,bar,\foo,tim}} {catch#2}{\catch{error}{\eval{zut,bar,\foo,tim}}} {catch#2}{\catch{}{\foo}} {cmp#3}{\cmp{foo}{}{}} {cmp#3}{\cmp{eq}{\foo}{}} {def#2}{\def{&foo}{}} {defx#2}{\defx{foo}{\foo}} {defined#2}{\defined{foo}{}} {defined#2}{\defined{key}{\foo}} {defined#2}{\defined{key}{&foo}} {dofile#2}{\dofile{\foo}{!+}} {dofile#2}{\dofile{foo}{!}} {dowhile#2}{\dowhile{\foo}{0}} {FEATURE ?- note no stars dowhile#2}{\dowhile{0}{\foo}} {end#1}{\end{foo}} {end#1}{\end{\foo}} {eqt#3}{\eqt{foo}{}{}} {eqt#3}{\eqt{eq}{\foo}{}} {eval#1}{\eval{\foo}} {f#1}{\f{foo}} {f#1}{\f{\foo}} {finsert#1}{\finsert{\foo}} {format#2}{\format{foo}{{}}} {format#2}{\format{}{{\foo}}} {formatted#1}{\formatted{\foo}} {fv#2}{\fv{foo}{{}}} {fv#2}{\fv{sum}{{\foo}}} {if#3}{\if{\foo}{}{}} {if#3}{\if{1}{\foo}{}} {inspect#4}{\inspect{}{}{}{}} {length#1}{\length{\foo}} {let#1}{\let{\foo}} {pop#1}{\pop{foo}} {pop#1}{\pop{\foo}} {push#1}{\push{\foo}} {ref#2}{\ref{foo}{n}} {ref#2}{\ref{misc}{\foo}} {ALWAYS WORKS refload#5}{\refload{\foo&!}{}{}{}{}{}} {roman#1}{\roman{\foo}} {NO CHECKS YET ON KEYS special#1}{\special{{foo}{}}} {special#1}{\special{10}{{\foo}}} {switch#2}{\switch{\foo}{{}{}}} {switch#2}{\switch{foo}{{\foo}{}}} {ERROR MSGS GO INTO LOST PIPE system#3}{\system{ls}{{-!}}} {table#5}{\table{\foo}{\foo}{\foo}{\foo}{\foo}} {throw#2}{\throw{foo}{}} {throw#2}{\throw{error}{\foo ka-ching}} {tr#4}{\tr{}{}{}{\foo}} {tr#4}{\tr{\foo}} {OF COURSE try#1}{\try{\foo}} {ucase#1}{\ucase{\foo}} {undef#1}{\undef{foof}} {undef#1}{\undef{\foo}} {vanish#1}{\vanish{\foo}} {while#2}{\while{\foo}{}} {while#2}{\while{1}{\foo}} {write#3}{\write{\foo}{}{}} {write#3}{\write{/etc/foobar}{}{}} {write#3}{\write{/dev/null}{copy}{\foo}} {writeto#1}{\writeto{\foo}} }} zoem-21-341/examples/Makefile0000644000207600020760000003510214154762470012773 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # examples/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # $Id: Makefile.am,v 1.15 2005/06/30 16:23:25 flux Exp $ VPATH = ../../../examples am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/zoem pkgincludedir = $(includedir)/zoem pkglibdir = $(libdir)/zoem pkglibexecdir = $(libexecdir)/zoem am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docexamplesdir)" DATA = $(docexamples_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = aclocal-1.16 AMTAR = $${TAR-tar} AM_DEFAULT_VERBOSITY = 1 AUTOCONF = autoconf AUTOHEADER = autoheader AUTOMAKE = automake-1.16 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -I/home/micans/local/include CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = GREP = /usr/bin/grep INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LDFLAGS = -L/home/micans/local/lib LIBOBJS = LIBS = LN_S = ln -s LTLIBOBJS = MAINT = # MAKEINFO = makeinfo MKDIR_P = /usr/bin/mkdir -p OBJEXT = o PACKAGE = zoem PACKAGE_BUGREPORT = PACKAGE_NAME = zoem PACKAGE_STRING = zoem 21-341 PACKAGE_TARNAME = zoem PACKAGE_URL = PACKAGE_VERSION = 21-341 PATH_SEPARATOR = : RANLIB = ranlib SET_MAKE = SHELL = /bin/bash STRIP = VERSION = 21-341 abs_builddir = /home/micans/git/micans/zoem/slate/rel-21-341/examples abs_srcdir = /home/micans/git/micans/zoem/slate/rel-21-341/../../examples abs_top_builddir = /home/micans/git/micans/zoem/slate/rel-21-341 abs_top_srcdir = /home/micans/git/micans/zoem/slate/rel-21-341/../.. ac_ct_CC = gcc ac_cv_use_includepath = /home/micans/local/share/aephea am__include = include am__leading_dot = . am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin build_alias = builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = $(datadir)/doc/$(PACKAGE) dvidir = ${docdir} exec_prefix = ${prefix} host_alias = htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /home/micans/git/micans/zoem/autofoo/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} prefix = /home/micans/local program_transform_name = s,x,x, psdir = ${docdir} runstatedir = ${localstatedir}/run sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = ../../../examples sysconfdir = ${prefix}/etc target_alias = top_build_prefix = ../ top_builddir = .. top_srcdir = ../../.. docexamplesdir = $(docdir)/examples docexamples_DATA = \ README \ 8q.azm 8q.ozm \ 8q2.azm 8q2.ozm \ power-of-2.azm power-of-2.ozm \ catch.azm catch.ozm \ fib.azm \ loop.azm loop.ozm \ meta.azm meta.ozm \ nest.azm nest.ozm \ reverse.azm reverse.ozm \ scope.azm scope.ozm \ special.azm special.ozm \ stress.azm stress.reg \ stress2.azm stress2.reg \ tr.azm tr.ozm \ txt-table.azm txt-table.ozm \ xml.azm xml.ozm EXTRA_DIST = README Makefile $(docexamples_DATA) SUFFIXES = .azm .ozm all: all-am .SUFFIXES: .SUFFIXES: .azm .ozm $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-docexamplesDATA: $(docexamples_DATA) @$(NORMAL_INSTALL) @list='$(docexamples_DATA)'; test -n "$(docexamplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docexamplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docexamplesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docexamplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docexamplesdir)" || exit $$?; \ done uninstall-docexamplesDATA: @$(NORMAL_UNINSTALL) @list='$(docexamples_DATA)'; test -n "$(docexamplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docexamplesdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(docexamplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docexamplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docexamplesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-docexamplesDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-docexamplesDATA .PRECIOUS: Makefile .azm.ozm: ../src/zoem -i $< -o $@ # fib.azm is for demonstration of interactive behaviour. fib.ozm: fib.azm true stress.ozm: stress.azm ../src/zoem -i stress --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress.ozm stress2.ozm: stress2.azm ../src/zoem -i stress2 --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress2.ozm power-of-2.ozm: power-of-2.azm ../src/zoem -i power-of-2 --allow=ls xml.ozm: xml.azm ../src/zoem -i xml -tl 3 sys1: zoem -i system -o - --allow=date sys2: zoem -i system -o system.ozm --allow=date sys3: zoem -i system -o - --allow=date > system.ozm # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zoem-21-341/examples/xml.ozm0000644000207600020760000000032214115654477012662 00000000000000 asdlfj daklfj adskfjladj dsfjaldsfjkl the quick brown etc hum ha ho the quick brown etc bleech zoem-21-341/examples/stress.azm0000644000207600020760000002133714115654477013400 00000000000000 \: This file checks whether various kinds of errors escalate correctly. \: It also checks for every primitive whether errors are pushed correctly \: so that catch can catch them. If a primitive has different error \: paths, all of them should be represented here. \: Process this file with \: zoem -i stress --system-honor --unsafe-silent --err-out -o - > stress.ozm . \: With valgrind, it should be memory and error clean. \: One should try to find cases where primitives (should) accept some kind \: of sublanguage, and test them with misfits. \: \begin{label}{{!}{a}} is/was a good example. \if{\defined{key}{get_it_on}}{}{ \write{-}{device}{Process this file with ../src/zoem -i stress --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress.ozm\@{\N} } \done } \set{defs}{\!{ \set{recurse_segment}{\recurse_segment} \set{recurse_stack}{\eval{\recurse_stack}} \set{overflow_user}{\push{user}\overflow_user} \set{underflow_user}{\pop{user}\underflow_user} \set{foo}{foo_start\@{ foo_at }foo_end} \set{__device__}{stress} \set{one}{1} \set{zero}{0} \set{abc}{abc} \set{def}{def} \set{ct}{0} \env{myenv}{myenv_start}{myenv_end} \env{myenv2}{myenv2_start}{myenv2_end} \begin{myenv} \begin{myenv2} }} \write{\__fnout__}{device}{DEFINITIONS USED:\apply{protect#1}{{\defs}}} \eval{\defs} \@{\P} \apply{_#2{ \!write{-}{device}{||| \1:\@{\N}} \!write{-}{device}{||| \!protect{\2}\@{\N}} \!catch{error}{\!abc[\2]\!def}\@{\P} \!setx{ct}{\!let{\!ct+1}} }}{ \!{ {undef in plain scope} {\nsk} {undef in at scope} {\@{\nsk}} {undef at deeper level} {\eval{\textmap{{word}{ucase}{number}{roman}}{\nsk}}} {undef in and scope} \: error at output time {\write{\__fnout__}{device}{\@{\&{\nsk}}}} {recurse segment} {\recurse_segment} {recurse stack} {\recurse_stack} {overflow user dictionary stack} {\overflow_user} {underflow user dictionary stack (requires nuser>nsegment)} {\underflow_user} {inserting spurious left curly} {\eval{\!""\__lc__}} {and scope in plain scope} {\&{\foo}} {at scope in and scope} {\@{\&{\foo}}} {incorrect anonymous key} {\_#1{\1}{bar}{foo}} {and scope in plain scope} {\&{\foo}} {incorrect anonymous key} {\_#1{\1}{bar}{foo}} \: xml sugar \: syntactig sugar happens at output time, not digest time. \: catch cannot catch this, write can. {some broken XML syntactic sugar} {\write{\__fnout__}{device}{\\\\}} {\@{\C}XML syntactic sugar underflow} {\write{\__fnout__}{device}{\\\<>\<>\<>}} {XML content syntax error} {\{\nsk}} \: \$#2 {error in $#2} {\${stress}{\nsk}} \: \%#1 \: grape keys \: !absence is not (yet) an error {absent grape node, fetched} {\%{nsg}} {absent grape node, freed} {\%free{nsg}} {absent grape node, dumped} {\%dump{nsg}} \: \apply#2 {no such key} {\apply{nsk#2}{{a}{b}}} {wrong anonymous key} {\apply{_#a{\1}}{{a}{b}}} {trailing arguments} {\apply{_#2{[\1\2]}}{{a}}} {argument does not parse} {\apply{_#2{[\1\2]}}{{a}{b}{c}{\nsk}}} \: \begin#2 {label does not exist} {\begin{nsl}} {argument does not parse} {\begin{myenv}{{\nsk}{\nsk}}} \: \branch#1 {parse error} {\branch{{\let{0<}}{}}} \: \catch#2 {uncaught catch} {\catch{towel}{\nsk}} {uncaught (delayed) error} {\catch{error}{\!{\nsk}}} {catch towel at 6} { \set{foo}{0} \catch{towel}{\while{\let{\foo<10}}{ foo \foo bar\@{\N} \if{\let{\foo==6}}{\throw{towel}}{} \setx{foo}{\let{\foo+1}} } } } \: \cmp#3 {argument does not parse} {\cmp{eq}{\nsk}{foo}} {no such mode} {\cmp{__}{bar}{foo}} \: \constant#1 {parse error (not fatal, trailing element)} {\constant{{(c)} boo {}}} \: \def#2 {wrong key signature} {\def{^zut}{foo}} \: \defined#2 {wrong mode} {\defined{__}{__}} \: \defx#2 {wrong key signature} {\defx{^zut}{foo}} {parse error} {\defx{zut}{\nsk}} \: \dofile#2 {no such file} {\dofile{no-such-file}{!+}} \: \dowhile#2 {parse error} {\dowhile{\nsk}{1}} {parse error} {\dowhile{1}{\nsk}} \: \end#1 {no such env} {\end{nse}} {cannot close myenv} {\end{myenv}} {can close myenv2} {\end{myenv2}} \: \env#3 {cannot define env while in environment} {\env{myenv3}{foo}{bar}} \: \eqt#3 {argument does not parse} {\eqt{eq}{\nsk}{1}} {no such mode} {\eqt{__}{1}{1}} {argument not numeric I} {\eqt{eq}{aap}{\one}} {argument not numeric II} {\eqt{eq}{aap}{\zero}} \: \eval#1 {parse error} {\eval{\nsk}} \: \f#2 {no such mode} {\f{nsm}{2.5}} {overflow I ?} {\f{sign}{111111111111111111111111111111}} {overflow II ?} {\f{sign}{3e100000}} {parse error} {\f{sign}{\nsk}} \: \finsert#1 {parse error} {\finsert{\nsk}} \: \format#1 \: todo: more format torturing. \: \formatted#2 \: hum, not very exciting. \: \fv#2 {no such mode} {\fv{nsm}{{1}{2}{3}}} {parse error} {\fv{sum}{{\zero}{\one}{\nsk}}} {this should work} {\fv{max}{{\zero}{\one}{2}}} \: \if#3 {parse error condition} {\if{\nsk}{}{}} {parse error if} {\if{1}{\nsk}{}} {parse error else} {\if{0}{}{\nsk}} \: \inspect#4 \: leave this until after inspect#4 rewrite. \: \f#3 {arithmetic exception in f} {\f{div}{1}{0}} \: let {syntax error in let} {\let{1+}} {another syntax error in let} {\let{1+sin(1,)}} {callback error in let} {\let{\nsk}} {nested callback error in let} {\let{\let{\nsk}}} {arithmetic exception in let} {\let{1/0}} {overflow in let} {\let{300**300}} {complicated and correct let expression, including redundant callbacks} {\let{\let{sin(\let{\one})}**2+\let{cos(\let{\one})}**2}} {complicated and failing let expression} {\let{\let{sin(\let{\one})}**2+\let{cos(\let{1/0})}**2}} \: \length#1 {parse error} {\length{\nsk}} \: \pop#1 \: under/overflow tested elsewhere. {no such dictionary stack} {\pop{nsds}} \: \protect#1 \: what could be problematic here ? \: \push#1 {no such dictionary stack} {\push{nsds}} \: \roman#1 {parse error} {\roman{\nsk}} {convert error} {\roman{abc}} \: \set#2 \: \setx#2 \: system {absent system call} {\system{#}} {failing system call} {\system{ls}{{-#}}} {finally a systemcall that should succeed} {\system{true}} {should close myenv} {\end{myenv}} \: \special#1 \: it'll mostly work. \: \switch#2 {parse error in pivot} {\switch{\nsk}{{}{}}} {parse error in clause} {\switch{foo}{{\nsk}{A}{b}{B}}} {parse error in case} {\switch{foo}{{foo}{\nsk}{b}{B}}} \: \table#5 \: not motivated; it is a sitting duck anyway. \: \tr#2 {this should work} {\tr{{from}{a-z}{to}{A-Z}{squash}{A-Z}}{squash the bookkeeper}} \: \trace#1 {parse error} {\trace{\nsk}} \: \try#1 \: todotodo \: \ucase#1 {parse error} {\textmap{{word}{ucase}}{\nsk}} \: \undef#1 {wrong signature} {\undef{!}} \: \vanish#1 {parse error} {\vanish{\nsk}} \: \while#2 {parse error condition} {\while{\nsk}{}} {parse error body} {\while{1}{\nsk}} \: \write#3 {open error} {\write{/no/such/file}{copy}{foo}} {no such filter} {\write{/dev/null}{nsf}{foo}} {parse error} {\write{/dev/null}{copy}{\nsk}} {throw} {\write{/dev/null}{copy}{\throw{towel}}} \: \writeto#1 \: {open error} \: {\writeto{/no/such/file}} \: \: this is in fact fatal, currently. too much stress. \: \zinsert#1 {inline file should work} {\zinsert{monkey}} {parse error} {\zinsert{\nsk}} {inline file with parse error} {\eval{\zinsert{fox}}} \: delay scope {delay parse error} {\write{\__fnout__}{device}{\!{\nsk}}} \: \: if not wrapped in write it is only seen by output, \: not by digest, so uncatchable. } } Done with \ct error tests. \={monkey}= \zero \one monkey see monkey do \== \={fox}= \zero \one \nsk \== zoem-21-341/examples/special.ozm0000644000207600020760000000002414115654477013501 00000000000000b a d c d a d c b a zoem-21-341/examples/catch.ozm0000644000207600020760000000071314115654477013150 00000000000000a b c Skipping the rest! At the bottom 1 * i = 0 BEFORE throw 1 before throw 2 i = 1 and j = 1 end of body 2 before throw 2 i = 1 and j = 2 end of body 2 before throw 2 i = 1 and j = 3 end of body 2 before throw 2 END of body 1 * i = 1 BEFORE throw 1 before throw 2 i = 2 and j = 1 end of body 2 before throw 2 i = 2 and j = 2 end of body 2 before throw 2 i = 2 and j = 3 end of body 2 before throw 2 END of body 1 * i = 2 BEFORE throw 1 At the bottom again zoem-21-341/examples/8q2.ozm0000644000207600020760000003003714146222477012475 00000000000000W - . - . - . - - . - . W . - . . - . - . - . W - . - . - W - . . - W - . - . - - . - . - . W . . W . - . - . - - . - W - . - . (1) W - . - . - . - - . - . - W - . . - . - . - . W - . W . - . - . . - . - . - W - - . - W - . - . . W . - . - . - - . - . W . - . (2) W - . - . - . - - . - . - . W . . - . W . - . - - . - . - W - . . - . - . - . W - W - . - . - . . - . - W - . - - . W . - . - . (3) W - . - . - . - - . - . - . W . . - . - W - . - - . - . - . - W . W . - . - . - - . - W - . - . . - . - . W . - - . W . - . - . (4) . W . - . - . - - . - W - . - . . - . - . W . - - . - . - . - W . - W - . - . - W . - . - . - . . - . - . - W - - . - . W . - . (5) . W . - . - . - - . - . W . - . . - . - . - W - W . - . - . - . . - W - . - . - - . - . - . - W . - . - . W . - - . - W - . - . (6) . W . - . - . - - . - . W . - . . - . - . - W - - . - W - . - . W - . - . - . - - . - . - . - W . - . - . W . - - . W . - . - . (7) . W . - . - . - - . - . - W - . W - . - . - . - - . - . - . W . . - . W . - . - - . - . - . - W . - W - . - . - - . - . W . - . (8) . W . - . - . - - . - . - W - . . - . - . - . W - . W . - . - . W - . - . - . - - . - W - . - . . - . - . - W - - . - . W . - . (9) . W . - . - . - - . - . - . W . . - W - . - . - - . - . - W - . . - . - . - . W - . - . W . - . W - . - . - . - - . - W - . - . (10) . W . - . - . - - . - . - . W . . - . - W - . - - . - . - . - W W - . - . - . - - . - W - . - . . - . - . W . - - . W . - . - . (11) . W . - . - . - - . - . - . - W . - . - . W . - W . - . - . - . . - W - . - . - - . - . W . - . . - . - . - W - - . - W - . - . (12) . - W - . - . - W . - . - . - . . - . - . - W - - . - . W . - . . - . - . - . W - W - . - . - . . - . W . - . - - . - . - W - . (13) . - W - . - . - - . - . W . - . . W . - . - . - - . - . - . - W W - . - . - . - - . - . - . W . . - . W . - . - - . - . - W - . (14) . - W - . - . - - . - . W . - . . W . - . - . - - . - . - . - W . - . - . W . - - . - W - . - . . - . - . - W - W . - . - . - . (15) . - W - . - . - - . - . W . - . . - . - . - W - W . - . - . - . . - . W . - . - - W - . - . - . . - . - . - . W - . - . - W - . (16) . - W - . - . - - . - . W . - . . - . - . - . W - . - W - . - . W - . - . - . - - . - . - . W . . W . - . - . - - . - . - W - . (17) . - W - . - . - - . - . - W - . . W . - . - . - - . - . W . - . . - . - . - . W W . - . - . - . . - . - . - W - - . - W - . - . (18) . - W - . - . - - . - . - W - . . W . - . - . - - . - . - . W . W - . - . - . - - . - W - . - . . - . - . - . W - . - . W . - . (19) . - W - . - . - - . - . - W - . . W . - . - . - - . - . - . W . . - . - W - . - W . - . - . - . . - . - . - . W - . - W - . - . (20) . - W - . - . - - . - . - W - . . - . W . - . - W . - . - . - . . - . - . - . W - . - . W . - . . - . - . - W - - W - . - . - . (21) . - W - . - . - - . - . - W - . . - . W . - . - - W - . - . - . . - . - . - . W - . - . W . - . . - . - . - W - W . - . - . - . (22) . - W - . - . - - . - . - W - . . - . - . - . W W . - . - . - . . - . W . - . - - . - . - . W . . - . - W - . - - W - . - . - . (23) . - W - . - . - - . - . - W - . . - . - . - . W W . - . - . - . . - . - W - . - - . - . - . W . . W . - . - . - - . - W - . - . (24) . - W - . - . - - . - . - W - . . - . - . - . W - W - . - . - . . - . W . - . - W . - . - . - . . - . - . - W - - . - . W . - . (25) . - W - . - . - - . - . - . W . . W . - . - . - - . - . - . - W . - . - W - . - W . - . - . - . . - . W . - . - - . - . - W - . (26) . - W - . - . - - . - . - . W . . W . - . - . - - . - . - . - W . - . - . W . - - . - W - . - . W - . - . - . - - . - . W . - . (27) . - W - . - . - - . - . - . - W . - . W . - . - - . - . - . W . W - . - . - . - - . - . - W - . . W . - . - . - - . - . W . - . (28) . - . W . - . - W . - . - . - . . - . - W - . - - . - . - . - W . W . - . - . - - . - . - . W . . - W - . - . - - . - . - W - . (29) . - . W . - . - W . - . - . - . . - . - W - . - - . - . - . - W . - . - . W . - - . W . - . - . . - . - . - W - - W - . - . - . (30) . - . W . - . - - W - . - . - . . - . - W - . - - . - . - . - W . - . - . W . - W . - . - . - . . - W - . - . - - . - . - . W . (31) . - . W . - . - - W - . - . - . . - . - . - W - - . W . - . - . . - . - . W . - - . - . - . - W W - . - . - . - - . - . W . - . (32) . - . W . - . - - W - . - . - . . - . - . - W - - . W . - . - . . - . - . W . - - . - . - . - W . - . - W - . - W . - . - . - . (33) . - . W . - . - - W - . - . - . . - . - . - W - - . - . W . - . W - . - . - . - - . - . - . - W . - . - . W . - - . W . - . - . (34) . - . W . - . - - W - . - . - . . - . - . - . W - . - . W . - . . - . - . - W - W . - . - . - . . - W - . - . - - . - . - W - . (35) . - . W . - . - - W - . - . - . . - . - . - . W - . - . - W - . W - . - . - . - - . W . - . - . . - . - W - . - - . - . - . W . (36) . - . W . - . - - . - . - W - . W - . - . - . - - . - . W . - . . W . - . - . - - . - . - . - W . - W - . - . - - . - . - . W . (37) . - . W . - . - - . - . - W - . . - . - . - . W - W - . - . - . . - . - . - W - W . - . - . - . . - W - . - . - - . - . W . - . (38) . - . W . - . - - . - . - W - . . - . - . - . W - . W . - . - . W - . - . - . - - . - . - . W . . - . - W - . - - W - . - . - . (39) . - . W . - . - - . - . - . W . W - . - . - . - - . - . - . - W . - . - W - . - - W - . - . - . . - . - . W . - - . W . - . - . (40) . - . W . - . - - . - . - . W . . - W - . - . - - . - . - . - W . W . - . - . - - . - . W . - . W - . - . - . - - . - . - W - . (41) . - . W . - . - - . - . - . W . . - . - W - . - - W - . - . - . . - . - . W . - W . - . - . - . . - W - . - . - - . - . - . - W (42) . - . W . - . - - . - . - . W . . - . - W - . - - . W . - . - . W - . - . - . - - . - . - W - . . - . - . - . W - W - . - . - . (43) . - . W . - . - - . - . - . - W W - . - . - . - - . W . - . - . . - . - . W . - - W - . - . - . . - . - . - W - - . - . W . - . (44) . - . W . - . - - . - . - . - W W - . - . - . - - . - . W . - . . - . - . - W - - W - . - . - . . - . - . W . - - . W . - . - . (45) . - . W . - . - - . - . - . - W . - . - W - . - - . W . - . - . W - . - . - . - - . - . - . W . . W . - . - . - - . - . - W - . (46) . - . - W - . - W . - . - . - . . - . W . - . - - . - . - W - . . - . - . - . W - W - . - . - . . - . - . - W - - . W . - . - . (47) . - . - W - . - W . - . - . - . . - . - . - . W - . - W - . - . . W . - . - . - - . - . - . W . . - W - . - . - - . - . - W - . (48) . - . - W - . - W . - . - . - . . - . - . - . W - . - . - W - . . - W - . - . - - . - . - . W . . W . - . - . - - . - W - . - . (49) . - . - W - . - - W - . - . - . . - . W . - . - - . - . - W - . . - . - . - . W - . W . - . - . W - . - . - . - - . - . - . W . (50) . - . - W - . - - W - . - . - . . - . W . - . - - . - . - . W . . - W - . - . - - . - . - . - W . - . - . W . - W . - . - . - . (51) . - . - W - . - - W - . - . - . . - . - . W . - W . - . - . - . . - . - . - W - - . - W - . - . . - . - . - . W - . W . - . - . (52) . - . - W - . - - W - . - . - . . - . - . - . W W . - . - . - . . - . W . - . - - . - . - . W . . - W - . - . - - . - . - W - . (53) . - . - W - . - - . W . - . - . W - . - . - . - - . - . - W - . . - . - . - . W - W - . - . - . . - . W . - . - - . - . - . W . (54) . - . - W - . - - . W . - . - . W - . - . - . - - . - . - . W . . W . - . - . - - . - . - . - W . - . - . W . - - . - W - . - . (55) . - . - W - . - - . W . - . - . . - . - . - . W - . - W - . - . . - . - . - W - W . - . - . - . . - . - . W . - - W - . - . - . (56) . - . - W - . - - . - . - . W . W - . - . - . - - . W . - . - . . - . - . - . W - . - . - W - . . - . W . - . - - W - . - . - . (57) . - . - W - . - - . - . - . W . W - . - . - . - - . - W - . - . . W . - . - . - - . - . - . - W . - . - . W . - - . W . - . - . (58) . - . - W - . - - . - . - . W . . W . - . - . - - . - W - . - . . - . - . - . W W . - . - . - . . - W - . - . - - . - . - W - . (59) . - . - W - . - - . - . - . W . . W . - . - . - - . - . - W - . . - W - . - . - W . - . - . - . . - . W . - . - - . - . - . - W (60) . - . - W - . - - . - . - . W . . W . - . - . - - . - . - W - . . - W - . - . - W . - . - . - . . - . - . - . W - . - W - . - . (61) . - . - W - . - - . - . - . W . . - . W . - . - W . - . - . - . . - W - . - . - - . - . - . - W . - . - . W . - - W - . - . - . (62) . - . - W - . - - . - . - . - W . - . W . - . - W . - . - . - . . - W - . - . - - . - . - W - . . W . - . - . - - . - . - . W . (63) . - . - W - . - - . - . - . - W . - . W . - . - W . - . - . - . . - . - . - W - - W - . - . - . . - . - . W . - - . W . - . - . (64) . - . - . W . - W . - . - . - . . - . - W - . - - W - . - . - . . - . - . - . W - . W . - . - . . - . - . - W - - . - W - . - . (65) . - . - . W . - - W - . - . - . . - . - . - W - W . - . - . - . . - W - . - . - - . - . W . - . . - . - . - . W - . - W - . - . (66) . - . - . W . - - W - . - . - . . - . - . - W - W . - . - . - . . - . W . - . - - . - . - . - W . - . - W - . - - . W . - . - . (67) . - . - . W . - - . W . - . - . W - . - . - . - - . - . - . W . . - . - W - . - - . - . - . - W . W . - . - . - - . - W - . - . (68) . - . - . W . - - . W . - . - . W - . - . - . - - . - . - . - W . - . W . - . - - W - . - . - . . - . - . - W - - . - . W . - . (69) . - . - . W . - - . W . - . - . W - . - . - . - - . - . - . - W . - . - W - . - - W - . - . - . . - . W . - . - - . - . - . W . (70) . - . - . W . - - . W . - . - . . - . - W - . - - . - . - . W . W - . - . - . - - . - W - . - . . W . - . - . - - . - . - . - W (71) . - . - . W . - - . W . - . - . . - . - W - . - - . - . - . - W W - . - . - . - - . - W - . - . . W . - . - . - - . - . - . W . (72) . - . - . W . - - . W . - . - . . - . - . - W - - W - . - . - . . - . W . - . - - . - . - . - W W - . - . - . - - . - . W . - . (73) . - . - . W . - - . W . - . - . . - . - . - W - - W - . - . - . . - . - . - . W - . - . W . - . W - . - . - . - - . - W - . - . (74) . - . - . W . - - . W . - . - . . - . - . - W - - . - W - . - . W - . - . - . - - . - . - . - W . W . - . - . - - . - . W . - . (75) . - . - . W . - - . - W - . - . W - . - . - . - - . - . W . - . . - . - . - . W - W - . - . - . . - . - . - W - - . W . - . - . (76) . - . - . W . - - . - W - . - . . W . - . - . - - . - . - . - W . - . - W - . - - . - . - . W . W - . - . - . - - . W . - . - . (77) . - . - . W . - - . - W - . - . . - . - . - W - W . - . - . - . . - W - . - . - - . - . W . - . . W . - . - . - - . - . - . - W (78) . - . - . W . - - . - W - . - . . - . - . - W - W . - . - . - . . - . - . - . W - W - . - . - . . - . - W - . - - . W . - . - . (79) . - . - . W . - - . - . - . - W . W . - . - . - - . - W - . - . W - . - . - . - - . - . - . W . . - . - W - . - - . W . - . - . (80) . - . - . - W - W . - . - . - . . - W - . - . - - . - . - . - W . - . - . W . - - . - W - . - . . W . - . - . - - . - . W . - . (81) . - . - . - W - - W - . - . - . . - . W . - . - W . - . - . - . . - . - . - . W - . - . W . - . . - W - . - . - - . - . - W - . (82) . - . - . - W - - W - . - . - . . - . - . W . - - . W . - . - . W - . - . - . - - . - W - . - . . - . - . - . W - . - . W . - . (83) . - . - . - W - - . W . - . - . W - . - . - . - - . - . - W - . . - . - . - . W - . - . W . - . . W . - . - . - - . - W - . - . (84) . - . - . - W - - . W . - . - . . - . - . - . W - W - . - . - . . - . - W - . - W . - . - . - . . - . - . W . - - . - W - . - . (85) . - . - . - W - - . - W - . - . . W . - . - . - - . - . W . - . . - . - . - . W W . - . - . - . . - W - . - . - - . - . - W - . (86) . - . - . - W - - . - W - . - . . W . - . - . - - . - . - . - W . - . - . W . - W . - . - . - . . - W - . - . - - . - . W . - . (87) . - . - . - W - - . - . W . - . . - W - . - . - W . - . - . - . . - . - . W . - - . - . - . - W . W . - . - . - - . - W - . - . (88) . - . - . - . W - W - . - . - . . - . W . - . - W . - . - . - . . - . - . - W - - . - . W . - . . - W - . - . - - . - . - W - . (89) . - . - . - . W - W - . - . - . . - . - W - . - - . W . - . - . W - . - . - . - - . - . - . W . . - . W . - . - - . - . - W - . (90) . - . - . - . W - . W . - . - . W - . - . - . - - . - . - W - . . W . - . - . - - . - . W . - . . - . - . - W - - . - W - . - . (91) . - . - . - . W - . - W - . - . W - . - . - . - - . W . - . - . . - . - . W . - - W - . - . - . . - . - . - W - - . - . W . - . (92) zoem-21-341/examples/meta.ozm0000644000207600020760000000001514115654477013007 00000000000000bar says moo zoem-21-341/examples/stress2.reg0000644000207600020760000002747614115654477013462 00000000000000 @@@ eval [\eval{\!{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ $#2 [\${zut}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ <>#1 [\<\foo>] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ <>#2 [\{\bar}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ <>#2 [\<\foo>{bar}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ alpha#1 [\alpha{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ apply#2 [\apply{}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\apply#2] key part not ok @@@ apply#2 [\apply{}{{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ apply#2 [\appy{\foo#2}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ begin#2 [\begin{\foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\begin#2] env <\foo> does not exist @@@ begin#2 [\begin{foo}{{\foo}{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\begin#2] env does not exist @@@ begin#2 [\begin{void}{{\foo}{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\begin#2] env does not exist @@@ begin#2 [\begin{void}{{foo}{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\begin#2] env does not exist @@@ branch#1 [\branch{{\foo}{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ FALL THROUGH CLAUSE branch#1 [\branch{{}{\foo}}] *** @@@ catch#2 [\catch{foo}{}] ___ [\catch#2] cannot catch @@@ catch#2 [\catch{error}{zut,bar,\foo,tim}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key zut,bar, *** @@@ catch#2 [\catch{error}{\eval{zut,bar,\foo,tim}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key zut,bar, *** @@@ catch#2 [\catch{}{\foo}] ___ [\catch#2] cannot catch <> @@@ cmp#3 [\cmp{foo}{}{}] ___ [cmp#3] unknown mode @@@ cmp#3 [\cmp{eq}{\foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ def#2 [\def{&foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\def#2] not a valid key signature: <&foo> @@@ defx#2 [\defx{foo}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <88> in ___ last key seen is ___ [\defx#2] argument did not parse @@@ defined#2 [\defined{foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\defined#2] invalid type @@@ defined#2 [\defined{key}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <88> in ___ last key seen is ___ [\defined#2] access string does not eval @@@ defined#2 [\defined{key}{&foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\defined#2] argument is not a valid key signature @@@ dofile#2 [\dofile{\foo}{!+}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ dofile#2 [\dofile{foo}{!}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\dofile#2] Second arg not in {!?}x{+-} @@@ dowhile#2 [\dowhile{\foo}{0}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ FEATURE ?- note no stars dowhile#2 [\dowhile{0}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key 0 @@@ end#1 [\end{foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\end#2] env not found @@@ end#1 [\end{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\end#2] env <\foo> not found @@@ eqt#3 [\eqt{foo}{}{}] ___ [eqt#3] unknown mode @@@ eqt#3 [\eqt{eq}{\foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ eval#1 [\eval{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ f#1 [\f{foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ f#1 [\f{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ finsert#1 [\finsert{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ format#2 [\format{foo}{{}}] foo *** @@@ format#2 [\format{}{{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ formatted#1 [\formatted{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ fv#2 [\fv{foo}{{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\fv#2] unknown mode @@@ fv#2 [\fv{sum}{{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ if#3 [\if{\foo}{}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <88> in ___ last key seen is ___ [\if#3] condition does not parse @@@ if#3 [\if{1}{\foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ inspect#4 [\inspect{}{}{}{}] *** @@@ length#1 [\length{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ let#1 [\let{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <88> in ___ last key seen is ___ [\let#1] arithmetic error occurred @@@ pop#1 [\pop{foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [dictStackPop] cannot pop last scope! @@@ pop#1 [\pop{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [dictStackPop] cannot pop last scope! @@@ push#1 [\push{\foo}] *** @@@ ref#2 [\ref{foo}{n}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ ref#2 [\ref{misc}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ ALWAYS WORKS refload#5 [\refload{\foo&!}{}{}{}{}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ roman#1 [\roman{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ NO CHECKS YET ON KEYS special#1 [\special{{foo}{}}] *** @@@ special#1 [\special{10}{{\foo}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ switch#2 [\switch{\foo}{{}{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ switch#2 [\switch{foo}{{\foo}{}}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ ERROR MSGS GO INTO LOST PIPE system#3 [\system{ls}{{-!}}] @@@ table#5 [\table{\foo}{\foo}{\foo}{\foo}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ throw#2 [\throw{foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [throw#2] is unthrowable, throwing error instead @@@ throw#2 [\throw{error}{\foo ka-ching}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <88> in ___ last key seen is ___ [error :: ] @@@ tr#4 [\tr{}{}{}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ tr#4 [\tr{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ OF COURSE try#1 [\try{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key *** @@@ ucase#1 [\ucase{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ undef#1 [\undef{foof}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\undef#1] key not defined in target scope @@@ undef#1 [\undef{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\undef#1] not a valid key signature: <\foo> @@@ vanish#1 [\vanish{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ while#2 [\while{\foo}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ while#2 [\while{1}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ write#3 [\write{\foo}{}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\write#3] unknown filter <> @@@ write#3 [\write{/etc/foobar}{}{}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [\write#3] unknown filter <> @@@ write#3 [\write{/dev/null}{copy}{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key @@@ writeto#1 [\writeto{\foo}] ___ [zoem] error around input line <88> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error occurred ___ last key seen is ___ [dictStackFree] user dictionary <\foo> not closed in output file <-> zoem-21-341/examples/8q.azm0000644000207600020760000001053314145673642012377 00000000000000 \: N queens problem solved in zoem. \: This solution uses recursion (naturally), maintaining dictionaries \: with push#1 and pop#1. It also uses a crude form of iteration \: using apply#2. Failure is escalated back using throw#2 and catch#2. \: This constitutes a non-trivial example of apply#2 / throw#2 / catch#2 \: used in conjunction. \: A more customary solution is to use while#2 rather than the \: latter method -- see 8q2.azm. \: This solution has caused two zoem weak spots to be addressed: \: - inability to cleanly assign a vararg to a data key. \: -> now possible with \set{{modes}{u}}{%{key}}{{a}{b}{c}{e}{t}{c}} \: - inability to effect global key updates while dictionaries are pushed. \: -> now possible with \set{''key}{..} (and \''key access). \if{\let{!\defined{key}{N} || \N < 1}}{ \write{stderr}{device}{Use e.g. zoem -i 8q -s N=9 to solve the 9-queen problem\@{\N}} \set{N}{8} }{} \setx{N}{\let{floor(\N)}} \set{n_backtrack}{0} \set{p_backtrack}{0} \: When updating these we have to be careful \: to do it in the bottom global dictionary, \: not in a higher stacked transient dictionary. \set{%{lists}{0}}{} \set{n1}{0} \set{n}{1} \: Precompute all lists that we are going to feed \: to apply#2. This is only slightly wasteful. \while{\let{\n<=\N}}{ \: This uses recently introduced primitive set#3. \: The u modifier indicates the value argument \: should not be parsed as a key-value list. \set{{modes}{xu}}{%{lists}{\n}}{\%{lists}{\n1} {\n1}} \set{%{positions}{\n}}{} \setx{n1}{\n} \setx{n}{\let{\n+1}} } \: for shorter print statement \def{pp#1}{\%{positions}{\1}} \: \: \: 5 | . . . . . . \: 4 | . . * . . . \: 3 | . . . . ? . \: 2 | . * . . . . \: 1 | . . . * . . \: 0 | * . . . . . \: |________________________ \: col: | 4 5 6 7 \: c: 0 1 2 3 \: for c in 0..col-1 get the position and see whether it \: is compatible with col,row \formatted{ \def{testcompat#1}{ \setx{c}{\1} \if{\let{ \%{positions}{\c}==\row || abs(\%{positions}{\c}-\row) == abs(\col-\c) } }{\setx{''n_backtrack}{\let{\''n_backtrack+1}} \throw{towel}{} }{} } \: Try whether row would fit col. \def{testrow#1}{ \push{testrow} \setx{row}{\1} \catch{towel}{ \apply{testcompat#1}{\%{lists}{\col}} } \: Alternative is to use \while rather than apply+catch \: still, timing seems to be OK for this approach. \if{\cmp{eq}{\__zoemstat__}{done}}{ \setx{%{positions}{\col}}{\row} \if{\let{\col<\N-1}}{ \extendcol{\let{\col+1}} }{ \write{\__fnout__}{device}{\@{\N}\pp{0}} \set{t}{1} \while{\let{\t<\N}}{ \write{\__fnout__}{device}{\`{s}\pp{\t}} \setx{t}{\let{\t+1}} } \setx{d_bt}{\let{\''n_backtrack-\''p_backtrack}} \write{\__fnout__}{device}{\ifdef{key}{trace}{\`{s}(\''n_backtrack, \d_bt)}\@{\n}} \setx{''p_backtrack}{\''n_backtrack} } }{} \pop{testrow} } \: 0..col-1 columns are OK \: Try to extend to column col. \def{extendcol#1}{ \push{extendcol} \setx{col}{\1} \apply{testrow#1}{\%{lists}{\N}} \pop{extendcol} } } \: vanish#1 omits the filter/output stage in an attempt \: to gain some speed -- it only results in side effects (yay!) \: such as the \write#2 invocation above. \: However, because we used formatted#1 we really don't \: gain anything as all result strings have length zero \: anyway. \vanish{\extendcol{0}} \write{stderr}{device}{Backtracked \''n_backtrack times\@{\n}} zoem-21-341/examples/catch.azm0000644000207600020760000000151114115654477013127 00000000000000 \: zoem -i catch -tl 3 \: (to see nested while structure back in output) \catch{towel}{ \apply{_#1\!{{\if{\cmp{eq}{\1}{d}}{Skipping the rest!\@{\N}\throw{towel}foo}{\1}\@{\N}}}}{ {a}{b}{c}{d}{e}{f} } } At the bottom 1 \@{\P} \catch{towel}{ \set{i}{0} \while{1}{ * i = \i BEFORE throw 1 \@{\I} \if{\eqt{eq}{\i}{2}}{\throw{towel}}{} \setx{i}{\let{\i+1}} \catch{towel}{ \set{j}{0} \while{1}{ before throw 2 \if{\eqt{eq}{\j}{3}}{\throw{towel}}{} \setx{j}{\let{\j+1}} i = \i and j = \j\@{\N} end of body 2 } } \: \if{\cmp{ne}{\__zoemstat__}{error}}{\__zoemput__}{} \@{\J} END of body 1 } } \@{\J} \: \if{\cmp{ne}{\__zoemstat__}{error}}{ \__zoemput__ }{} At the bottom again zoem-21-341/examples/special.azm0000644000207600020760000000026314115654477013470 00000000000000\special{ {97}{h} {97}{e} {97}{l} {97}{o} {97}{ } {97}{w} {97}{r} {97}{d} } \@{\+{1}}a\@{\+{2}}a\@{\+{3}}aa\@{\+{4}}a\@{\+{5}}a\@{\+{6}}a\@{\+{4}}a\@{\+{7}}a\@{\+{3}}a\@{\+{8}}a zoem-21-341/examples/stress.reg0000644000207600020760000004246314115654477013371 00000000000000DEFINITIONS USED: \set{recurse_segment}{\recurse_segment} \set{recurse_stack}{\eval{\recurse_stack}} \set{overflow_user}{\push{user}\overflow_user} \set{underflow_user}{\pop{user}\underflow_user} \set{foo}{foo_start\@{ foo_at }foo_end} \set{__device__}{stress} \set{one}{1} \set{zero}{0} \set{abc}{abc} \set{def}{def} \set{ct}{0} \env{myenv}{myenv_start}{myenv_end} \env{myenv2}{myenv2_start}{myenv2_end} \begin{myenv} \begin{myenv2} myenv_start myenv2_start ||| undef in plain scope: ||| \nsk ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| undef in at scope: ||| \@{\nsk} abc[ sk]def ||| undef at deeper level: ||| \eval{\textmap{{word}{ucase}{number}{roman}}{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| undef in and scope: ||| \write{\__fnout__}{device}{\@{\&{\nsk}}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [filterAt] AND scope did not parse abc[]def ||| recurse segment: ||| \recurse_segment ___ [zoem] error around input line <474> in ___ last key seen is ___ [yamSegPush] exceeding maximum segment depth <200> abc[ ||| recurse stack: ||| \recurse_stack ___ [zoem] error around input line <474> in ___ last key seen is ___ [yamStackPush] exceeding maximum stack depth <100> abc[ ||| overflow user dictionary stack: ||| \overflow_user ___ [zoem] error around input line <474> in ___ last key seen is ___ [dictStackPush] no more than <100> dicts allowed in stack abc[ ||| underflow user dictionary stack (requires nuser>nsegment): ||| \underflow_user ___ [zoem] error around input line <474> in ___ last key seen is ___ [dictStackPop] cannot pop last scope! abc[ ||| inserting spurious left curly: ||| \eval{\!""\__lc__} ___ [zoem] error around input line <474> in ___ last key seen is <""> ___ [yamParseKey] no closing scope abc[ ||| and scope in plain scope: ||| \&{\foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [yamFindKey] illegal escape sequence <\&> abc ||| at scope in and scope: ||| \@{\&{\foo}} abc[foo_start___ [zoem] error around input line <474> in ___ last key seen is ___ [filterAt] unknown escape <@> { foo_at }foo_end]def ||| incorrect anonymous key: ||| \_#1{\1}{bar}{foo} ___ [zoem] error around input line <474> in ___ last key seen is <_> ___ [yamParseKey] found anon _#1{\1} with 2 arguments abc[ ||| and scope in plain scope: ||| \&{\foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [yamFindKey] illegal escape sequence <\&> abc ||| incorrect anonymous key: ||| \_#1{\1}{bar}{foo} ___ [zoem] error around input line <474> in ___ last key seen is <_> ___ [yamParseKey] found anon _#1{\1} with 2 arguments abc[ ||| some broken XML syntactic sugar: ||| \write{\__fnout__}{device}{\\\\} ___ [zoem] error around input line <474> in ___ last key seen is <<>#1> ___ [\<>#1] tag closes abc[ ||| XML syntactic sugar underflow: ||| \write{\__fnout__}{device}{\\\<>\<>\<>} ___ [zoem] error around input line <474> in ___ last key seen is <<>#1> ___ [\<>#1] XML syntactic sugar stack underflow at file <-> tag abc[ ||| XML content syntax error: ||| \{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| error in $#2: ||| \${stress}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| absent grape node, fetched: ||| \%{nsg} ___ [zoem] error around input line <474> in ___ last key seen is <%#1> ___ [\%#1] no value associated with <{nsg}> abc[]def ||| absent grape node, freed: ||| \%free{nsg} ___ [zoem] error around input line <474> in ___ last key seen is <%free#1> ___ [\free#1] no value associated with <{nsg}> abc[]def ||| absent grape node, dumped: ||| \%dump{nsg} # printing node ___ [zoem] error around input line <474> in ___ last key seen is <%dump#1> ___ [\dump#1] no value associated with <{nsg}> abc[]def ||| no such key: ||| \apply{nsk#2}{{a}{b}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\apply#2] key does not expand abc[ ||| wrong anonymous key: ||| \apply{_#a{\1}}{{a}{b}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\apply#2] key part not ok abc[ ||| trailing arguments: ||| \apply{_#2{[\1\2]}}{{a}} ___ [\apply#2] (ignoring) trailing arguments abc[]def ||| argument does not parse: ||| \apply{_#2{[\1\2]}}{{a}{b}{c}{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| label does not exist: ||| \begin{nsl} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\begin#2] env does not exist abc[ ||| argument does not parse: ||| \begin{myenv}{{\nsk}{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\begin#2] arguments in env did not parse abc[ ||| parse error: ||| \branch{{\let{0<}}{}} ___ [getatom] unexpected token ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] expression did not parse abc[ ||| uncaught catch: ||| \catch{towel}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| uncaught (delayed) error: ||| \catch{error}{\!{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| catch towel at 6: ||| \set{foo}{0} \catch{towel}{\while{\let{\foo<10}}{ foo \foo bar\@{\N} \if{\let{\foo==6}}{\throw{towel}}{} \setx{foo}{\let{\foo+1}} } } abc[ foo 0 bar foo 1 bar foo 2 bar foo 3 bar foo 4 bar foo 5 bar foo 6 bar ]def ||| argument does not parse: ||| \cmp{eq}{\nsk}{foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| no such mode: ||| \cmp{__}{bar}{foo} ___ [cmp#3] unknown mode <__> abc[ ||| parse error (not fatal, trailing element): ||| \constant{{(c)} boo {}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\constant#1] spurious element abc[]def ||| wrong key signature: ||| \def{^zut}{foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\def#2] not a valid key signature: <^zut> abc[ ||| wrong mode: ||| \defined{__}{__} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\defined#2] invalid type <__> abc[ ||| wrong key signature: ||| \defx{^zut}{foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\defx#2] not a valid key signature: <^zut> abc[ ||| parse error: ||| \defx{zut}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\defx#2] argument did not parse abc[ ||| no such file: ||| \dofile{no-such-file}{!+} ___ [\dofile#2] failed to open file abc[ ||| parse error: ||| \dowhile{\nsk}{1} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error: ||| \dowhile{1}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[1 ||| no such env: ||| \end{nse} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\end#2] env not found abc[ ||| cannot close myenv: ||| \end{myenv} abc[myenv_end]def ||| can close myenv2: ||| \end{myenv2} abc[myenv2_end]def ||| cannot define env while in environment: ||| \env{myenv3}{foo}{bar} abc[]def ||| argument does not parse: ||| \eqt{eq}{\nsk}{1} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| no such mode: ||| \eqt{__}{1}{1} ___ [eqt#3] unknown mode <__> abc[ ||| argument not numeric I: ||| \eqt{eq}{aap}{\one} abc[0]def ||| argument not numeric II: ||| \eqt{eq}{aap}{\zero} abc[1]def ||| parse error: ||| \eval{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| no such mode: ||| \f{nsm}{2.5} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\f#2] unknown mode abc[ ||| overflow I ?: ||| \f{sign}{111111111111111111111111111111} abc[1]def ||| overflow II ?: ||| \f{sign}{3e100000} abc[1]def ||| parse error: ||| \f{sign}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error: ||| \finsert{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| no such mode: ||| \fv{nsm}{{1}{2}{3}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\fv#2] unknown mode abc[ ||| parse error: ||| \fv{sum}{{\zero}{\one}{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| this should work: ||| \fv{max}{{\zero}{\one}{2}} abc[2]def ||| parse error condition: ||| \if{\nsk}{}{} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\if#3] condition does not parse abc[ ||| parse error if: ||| \if{1}{\nsk}{} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error else: ||| \if{0}{}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| arithmetic exception in f: ||| \f{div}{1}{0} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\f#3] arithmetic exception for operator
abc[0]def ||| syntax error in let: ||| \let{1+} ___ [getatom] unexpected token ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] expression did not parse abc[ ||| another syntax error in let: ||| \let{1+sin(1,)} ___ [getatom] empty group not allowed ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] expression did not parse abc[ ||| callback error in let: ||| \let{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred abc[ ||| nested callback error in let: ||| \let{\let{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred abc[ ||| arithmetic exception in let: ||| \let{1/0} ___ [flatten] arithmetic exception for op ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred abc[ ||| overflow in let: ||| \let{300**300} abc[inf]def ||| complicated and correct let expression, including redundant callbacks: ||| \let{\let{sin(\let{\one})}**2+\let{cos(\let{\one})}**2} abc[1]def ||| complicated and failing let expression: ||| \let{\let{sin(\let{\one})}**2+\let{cos(\let{1/0})}**2} ___ [flatten] arithmetic exception for op ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred ___ [zoem] error around input line <474> in ___ last key seen is ___ [\let#1] arithmetic error occurred abc[ ||| parse error: ||| \length{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| no such dictionary stack: ||| \pop{nsds} ___ [zoem] error around input line <474> in ___ last key seen is ___ [dictStackPop] cannot pop last scope! abc[ ||| no such dictionary stack: ||| \push{nsds} abc[]def ||| parse error: ||| \roman{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| convert error: ||| \roman{abc} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| absent system call: ||| \system{#} abc[ ||| failing system call: ||| \system{ls}{{-#}} abc[ ||| finally a systemcall that should succeed: ||| \system{true} abc[]def ||| should close myenv: ||| \end{myenv} abc[myenv_end]def ||| parse error in pivot: ||| \switch{\nsk}{{}{}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error in clause: ||| \switch{foo}{{\nsk}{A}{b}{B}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error in case: ||| \switch{foo}{{foo}{\nsk}{b}{B}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| this should work: ||| \tr{{from}{a-z}{to}{A-Z}{squash}{A-Z}}{squash the bookkeeper} abc[SQUASH THE BOKEPER]def ||| parse error: ||| \trace{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[] ||| parse error: ||| \textmap{{word}{ucase}}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| wrong signature: ||| \undef{!} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\undef#1] key not defined in target scope abc[ ||| parse error: ||| \vanish{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error condition: ||| \while{\nsk}{} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| parse error body: ||| \while{1}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| open error: ||| \write{/no/such/file}{copy}{foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [yamOutputNew] can not open file for writing abc[ ||| no such filter: ||| \write{/dev/null}{nsf}{foo} ___ [zoem] error around input line <474> in ___ last key seen is ___ [\write#3] unknown filter abc[ ||| parse error: ||| \write{/dev/null}{copy}{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| throw: ||| \write{/dev/null}{copy}{\throw{towel}} abc[ ||| inline file should work: ||| \zinsert{monkey} abc[0 1 monkey see monkey do ]def ||| parse error: ||| \zinsert{\nsk} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[ ||| inline file with parse error: ||| \eval{\zinsert{fox}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [expand] no definition found for key abc[0 1 ||| delay parse error: ||| \write{\__fnout__}{device}{\!{\nsk}} ___ [zoem] error around input line <474> in ___ last key seen is ___ [filterDevice] ignoring escape <\n> \nskabc[]def Done with 96 error tests. ___ [zoem] error occurred ___ last key seen is ___ [dictStackFree] user dictionary not closed in output file <-> zoem-21-341/examples/nest.ozm0000644000207600020760000000003714115654477013036 00000000000000b#a d#c f#e {b#a }{d#c }{f#e } zoem-21-341/examples/xml.azm0000644000207600020760000000036114115654477012647 00000000000000 \set{opts}{a=b c=d} \setx{tmp}{\\\} \ asdlfj daklfj adskfjladj dsfjaldsfjkl \> the quick brown etc \{hum ha ho} \ the quick brown etc \ bleech \> \ \> zoem-21-341/examples/loop.ozm0000644000207600020760000000045114115654477013036 00000000000000 nested application of apply using anonymous macros. [ (1) (4) (9) (16) (25) ] [ (16) (25) (36) ] [ (49) (64) (81) ] nested application of apply using normal macros. [ (1) (4) (9) (16) (25) ] [ (16) (25) (36) ] [ (49) (64) (81) ] reversing successive varargs {5}{4}{3}{2}{1} {6}{5}{4} {9}{8}{7} zoem-21-341/examples/txt-table.ozm0000644000207600020760000001110414115654477013766 00000000000000.--------------------.--------------------.--------------------. |()()()('(aap)'()()()| [noot] | mies | ^--------------------^--------------------^--------------------^ |()()()'(snoep)')()()| [bal] | vork | ^--------------------^--------------------^--------------------^ |()()()'(tafel)')()()| [boom] | ma | ^--------------------^--------------------^--------------------^ | 1 ........{ }The first line{ } | 2 .......{ }The second line{ } | 3 ...................{ }boo{ } .-'''-.-'''-.-'''-.-'''The first line-'''-.-'''-.-'''-.-'''-. .-'''-.-'''-.-'''-.-'''The second line'''-.-'''-.-'''-.-'''-. .-'''-.-'''-.-'''-.-'''-.-'''boo'''-.-'''-.-'''-.-'''-.-'''-. ------'12.1239'----- -----'234.23'------- -------'0.33'------- --------'.0004'----- '103482390483029.23094830' ------'foo'--------- -+H+-+H+-+H+-+big_tree ^_^ small_mouse-+H+-+H+-+H+- -+H+-+H+-+H+-long_road ^_^ short_visit-+H+-+H+-+H+- -+H+-+H+-+H+-+warm_sun ^_^ cold_beerH+-+H+-+H+-+H+- -+H+-+H+-+Hfree_speech ^_^ stay_put+H+-+H+-+H+-+H+- [ ''''''''''''') There has grown up in the minds of certain groups ('''''''''''' ] [ ''''''') in this country the notion that because a man or corporation (''''''' ] [ '''''''') has made a profit out of the public for a number of years, ('''''''' ] [ '''''''''') the government and the courts are charged with the duty (''''''''' ] [ '''''''''''''') of guaranteeing such profit in the future, even (''''''''''''' ] [ '') in the face of changing circumstances and contrary to public interest. ('' ] [ ''''') This strange doctrine is not supported by statute or common law. (''''' ] [ '''''''''''') Neither individuals nor corporations have any right (''''''''''' ] [ '''''''''''''''''''''''''''') to come into court ('''''''''''''''''''''''''''' ] [ ''''''') and ask that the clock of history be stopped, or turned back. ('''''' ] [ \ /\ /\ /\) There has grown up in the minds of certain groups (\ /\ /\ / ] [ \ /\ ) in this country the notion that because a man or corporation ( /\ / ] [ \ /\ /) has made a profit out of the public for a number of years, (\ /\ / ] [ \ /\ /\ ) the government and the courts are charged with the duty (/\ /\ / ] [ \ /\ /\ /\ ) of guaranteeing such profit in the future, even (/\ /\ /\ / ] [ \ ) in the face of changing circumstances and contrary to public interest. ( / ] [ \ /\) This strange doctrine is not supported by statute or common law. (/\ / ] [ \ /\ /\ /) Neither individuals nor corporations have any right ( /\ /\ / ] [ \ /\ /\ /\ /\ /\ /\ /) to come into court (\ /\ /\ /\ /\ /\ /\ / ] [ \ /\ ) and ask that the clock of history be stopped, or turned back. ( /\ / ] [ ) There has grown up in the minds of certain groups (/\ /\ /\ /\ /\ /\ / ] [ ) in this country the notion that because a man or corporation ( /\ /\ /\ / ] [ ) has made a profit out of the public for a number of years, (\ /\ /\ /\ / ] [ ) the government and the courts are charged with the duty ( /\ /\ /\ /\ / ] [ ) of guaranteeing such profit in the future, even ( /\ /\ /\ /\ /\ /\ / ] [ ) in the face of changing circumstances and contrary to public interest. (\ / ] [ ) This strange doctrine is not supported by statute or common law. ( /\ /\ / ] [ ) Neither individuals nor corporations have any right ( /\ /\ /\ /\ /\ / ] [ ) to come into court (\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ / ] [ ) and ask that the clock of history be stopped, or turned back. (/\ /\ /\ / ] [ \ /\ /\ /\ /\ /\ /\) There has grown up in the minds of certain groups ( ] [ \ /\ /\ /\ ) in this country the notion that because a man or corporation ( ] [ \ /\ /\ /\ /) has made a profit out of the public for a number of years, ( ] [ \ /\ /\ /\ /\ ) the government and the courts are charged with the duty ( ] [ \ /\ /\ /\ /\ /\ /\ ) of guaranteeing such profit in the future, even ( ] [ \ /) in the face of changing circumstances and contrary to public interest. ( ] [ \ /\ /\ ) This strange doctrine is not supported by statute or common law. ( ] [ \ /\ /\ /\ /\ /\ ) Neither individuals nor corporations have any right ( ] [ \ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /) to come into court ( ] [ \ /\ /\ /\) and ask that the clock of history be stopped, or turned back. ( ] ''''beauty''''''lies''''''''in'''''''the'''''''eye''''''''of'''''''the''beholder 12345678901234567890123456789012345678901234567890123456789012345678901234567890 zoem-21-341/examples/reverse.azm0000644000207600020760000000047014115654477013523 00000000000000 \formatted{ \def{reverse#1}{ \push{user} \: being paranoid. \set{_a}{} \apply{_#1{\!setx{_a}{{\!1}\!_a}}}{\1} \: apply creates _#1{\setx{_a}{{\1}\_a}} \_a \pop{user} }} \set{list}{{1}{2}{3}{\!reverse{{a}{b}{c}}}{4}{5}{6}} before: \apply{protect#1}{{\list}} after : \reverse{\eval{\list}} zoem-21-341/examples/8q2.azm0000644000207600020760000000437614115654477012473 00000000000000 \if{\let{!\defined{key}{N} || \N < 1}}{ \write{stderr}{device}{Use e.g. zoem -i 8q2 -s N=9 to solve the 9-queen problem\@{\N}} \set{N}{8} }{} \setx{N}{\let{floor(\N)}} \def{pp#1}{\%{ass}{\1}} \set{ptr}{0} \set{%{ass}{-1}}{0} \setx{row_odd}{\seq{n}{0}{\N}{\if{\let{\n%2}}{.}{-} }} \setx{row_even}{\seq{n}{0}{\N}{\if{\let{\n%2}}{-}{.} }} \set{n}{0} \while{\let{\n<=\N}}{ \set{%{ass}{\n}}{0} \setx{n}{\let{\n+1}} } \set{id}{0} \while{\let{\ptr>=0}}{ \set{i}{0} \while{\let{ \i<\ptr && \%{ass}{\i} != \%{ass}{\ptr} && \%{ass}{\i} - \%{ass}{\ptr} != \ptr - \i && \%{ass}{\i} - \%{ass}{\ptr} != \i - \ptr } }{\setx{i}{\let{\i+1}}} \branch{ {\let{\i==\N-1}} { \set{t}{0} \while{\let{\t<\N}}{ \setx{t2}{\if{\let{\t % 2}}{\row_odd}{\row_even}} \set{{start}{\let{2*\pp{\t}}}{width}{1}}{t2}{W} \write{\__fnout__}{device}{\t2\@{\n}} \setx{t}{\let{\t+1}} } \setx{id}{\let{\id+1}} \write{\__fnout__}{device}{(\id)\@{\P}} } \: below, we came all the way up to ptr without conflict. \: That means we can extend our current solution. {\let{\i==\ptr}} { \setx{ptr}{\let{\ptr+1}} \set{%{ass}{\ptr}}{-1} } } \: below, we have reached the maximal position \: at position ptr. That means we reset its position \: to zero, and any predecessor pointers in the same state. \: after that ... \while{\let{\ptr>=0 && \%{ass}{\ptr} == \N-1}}{ \set{%{ass}{\ptr}}{0} \setx{ptr}{\let{\ptr-1}} } \: ... we can increment the current pointer position. \setx{%{ass}{\ptr}}{\let{\%{ass}{\ptr}+1}} } \: \: \: 5 | . . . . . . \: 4 | . . * . . . \: 3 | . . . . ? . \: 2 | . * . . . . \: 1 | . . . * . . \: 0 | * . . . . . \: |________________________ \: col: | ptr \: c: 0 1 2 3 zoem-21-341/examples/loop.azm0000644000207600020760000000372214115654477013024 00000000000000 \: It's possible to do repeated looping using apply. Using named macros \: it is not so bad. When using anonymous macros only it's kind of \: awkard due to how and when stuff is \: a) evaluated \: b) interpolated. \: A basic problem (with nested use of anonymous macros) is how to \: achieve use of the placeholders \1, \2 etc as local variables. Right \: now, this is done by using the feature that apply evaluates its first \: argument (the key/anon macro) before use. A second-level nested \: placeholder has to be written as \!1, and during this evaluation \: it will be rewritten to \1. It needs to be enclosed by other delay \: scopes (i.e. either \!!1 or \!{..\!1 ..}) because the first-level \: apply also evaluates its first argument (of which the nested apply is \: part). \: So, one zoem implementation challenge might be to create an alternative \: way of achieving this for which the syntax is less hideous. \: A related issue is e.g. how to recurse over grape data (currently \: not possible). \@{\P} nested application of apply using anonymous macros. \apply{_#1{[ \!apply{_#1{\!{ (\!let{\!1*\!1}) }}}{\1} ]\@{\N}}}{ {{1}{2}{3}{4}{5}} {{4}{5}{6}} {{7}{8}{9}} } \: First apply evaluates its first argument. \: \: _#1{[ \!apply{_#1{\!{ (\!let{\!1*\!1}) }}}{\1} ]\@{\N}} \: \: giving \: \: _#1{[ \apply{_#1{ (\!let{\!1*\!1}) }}{\1} ]\@{\N}} \: \: This anon key is then iterated, and first presented with {{1}{2}{3}{4}{5}}. \: So we get \: \: \apply{_#1{ (\!let{\!1*\!1}) }}{{1}{2}{3}{4}{5}} \: \: This apply evaluates its first argument, giving \: \: _#1{ (\let{\1*\1}) } \: \: and the rest is easy. \@{\P} nested application of apply using normal macros. \set{do1#1}{[ \apply{do2#1}{\1} ]\@{\N}} \set{do2#1}{ (\let{\1*\1}) } \apply{do1#1}{ {{1}{2}{3}{4}{5}} {{4}{5}{6}} {{7}{8}{9}} } \import{reverse.azm} \@{\P} reversing successive varargs \apply{_#1{\!reverse{\1}\@{\N}}}{ {{1}{2}{3}{4}{5}} {{4}{5}{6}} {{7}{8}{9}} } zoem-21-341/examples/scope.azm0000644000207600020760000000027714115654477013166 00000000000000 \set{level}{10} \setx{i}{0} \while{\let{\i<\level}}{ \defx{num}{\i} \setx{i}{\let{\i+1}} \push{user} } \while{\let{\i>0}}{ \pop{user} num is \num \setx{i}{\let{\i-1}} } zoem-21-341/examples/README0000644000207600020760000000421214115654477012215 00000000000000 Each pair of files name.azm name.ozm demonstrates one or more concepts from the zoem language. Basic processing for file 'name.azm' zoem -i name results in the output file 'name.ozm'. Some files need additional processing flags, these are indicated below and can be found in the Makefile as well. The file fib.azm demonstrates how to include input interactively, so there is no matching 'fib.ozm' file. The file stress.azm contains a large set of error tests from which zoem must be able to recover fully - it should in general recover from almost any conceivable error. In stress.azm this is done via \catch{error}{.. erroneous stuf ..}. In interactive mode, zoem will recover from errors without any help. Zoem can enter interactive mode upon errors in regular file processing via the -x option. DESCRIPTION ------------------------------------------------------------------------------ catch.azm nested while{1}{...} stopped by throwing exception. fib.azm prompting and inclusion via STDIN, while{} stuff. loop.azm nested apply invocations. meta.azm zoem 'closure' mechanism of some sort. nest.azm anon/nesting/delay arithmetic, not very instructive. power-of-2.azm computing 2*k by recursion and file size. reverse.azm how to revert (nested!) lists with zoem. scope.azm basic illustration of push/pop name scopes. special.azm silly illustration of filtering capabilities. stress.azm extensive stress test suite. tr.azm some translate options, not very interesting. txt-table.azm text formatting examples. xml.azm *ML syntactic sugar examples. ADDITIONAL OPTIONS NEEDED ------------------------------------------------------------------------------ stress.azm --err-out -o - --allow=date:#:ls power-of-2.azm --allow=ls [-s level=] xml.azm -tl 3 fib.azm -o - zoem-21-341/examples/meta.azm0000644000207600020760000000020214115654477012767 00000000000000\: not really shore whether lambda is appropriate. oh well. \def{lambda#2}{\setx{\1#1}{\2 says \!1}} \lambda{foo}{bar} \foo{moo} zoem-21-341/examples/fib.azm0000644000207600020760000000066214115654477012613 00000000000000\: test with 'zoem -i fib -o -' \def{fib#1}{ \push{fibonacci} \set{a}{1} \set{b}{1} \set{c}{0} \while{\let{\a <= \1}}{ \setx{c}{\a} \setx{a}{\let{\a + \b}} \write{-}{txt}{\c\|} \setx{b}{\c} } \pop{fibonacci} } \: need to escape newlines below, lest they ruin the prompt \write{-}{device}{Enter a number please, then press , \@{\N>\s}}\ \setx{num}{\zinsert{-}}\ \fib{\num} zoem-21-341/examples/nest.azm0000644000207600020760000000051114115654477013015 00000000000000 \: Some more anon/nesting/delay arithmetic, not very exciting. \: See also loop.azm. \: Note that inspect#4 is a beta-stage primitive. \'set{data}{{a-b}{c-d}{e-f}} \'apply{ _#1{ \!{\'inspect{posix}{(.)-(.)}{_#2\!{{\2#\1\@{\N}}}}}{\1} } }{ \data } \'inspect{posix,vararg}{(.)-(.)}{_#2\!{{\2#\1\@{\N}}}}{\data} zoem-21-341/examples/tr.azm0000644000207600020760000000107614115654477012500 00000000000000\tr{{from}{abcd-g}{delete}{hij}{to}{1234-7}}{abcdefghijlmn} \tr{{from}{d-gI}{to}{4-7i}{delete}{hij}}{map D-G and remove HIJ altogether, is what I say} \tr{{delete}{hij}}{defghijklm} \tr{{squash}{^}{from}{^a-zA-Z.}{to}{[* *]}}{ *!* abolish *!* capital *!* punishment} \tr{{from}{[:lower:]}{to}{[:upper:]}}{\tr{{squash}{^}{from}{^a-zA-Z.}{to}{[* *]}}{ *!* abolish *!* capital *!* punishment}} \tr{{from}{^a-zA-Z.}{to}{[*_*]}}{ complement with neither squash nor delete } \tr{{squash}{[:alpha:]}}{squash the bookkeeper} \tr{{squash}{[:alpha:]}}{squash the bookkeeper} zoem-21-341/examples/txt-table.azm0000644000207600020760000000747114115654477013764 00000000000000 \: Primitive txt-table formatting; no line wraps possible yet. \: \: This is dense stuff. It can be made more legible by exercising \formatted#1. \: The formatted result looks better. \: The first example inputs look quite horrid, because they use apply as well. \: The main thing of the goo below is that formatting and content have \: been largely/completely separated. Note that we must specify \@{\w} \: or zoem will gobble up the carefully prepared white-space formatting. \set{lrule}{.--------------------.--------------------.--------------------.} \set{rule}{^--------------------^--------------------^--------------------^} \@{\w}\lrule \apply{_#3{\!{\format{|%{{align}{center}{padding}{{()}}{delimit}{'}{width}{20}}| %{{align}{left}{width}{18}}|%{{align}{right}{width}{18}} |}{{(\1)}{[\2]}{\3}}} \rule }}{ {aap} {noot} {mies} {snoep} {bal} {vork} {tafel} {boom} {ma} } \@{\W\P} \@{\w}\apply{_#2{\!{\format{ |%{ {align}{right} {width}{6} } %{ {align}{right} {padding}{{.}} {delimit}{{ }} {width}{30} }}{ {\1}{\2}} }}}{ {1}{The first line} {2}{The second line} {3}{boo} } \@{\W\P} \@{\w}\apply{_#1{\!{\format{%{{align}{center}{padding}{{.-'''-}}{delimit}{ }{width}{60}}.}{{\1}}} }}{ {The first line}{The second line}{boo}} \@{\W\P} \: \@{\w}\apply{_#1{\!{\format{%{{align}{center}{padding}{{-}}{delimit}{'}{alignat}{{.}{10}}{width}{20}}}{{\1}}} }}{ {12.1239} {234.23} {0.33} {.0004} {103482390483029.23094830} {foo} } \@{\W\P} \set{width}{50} \set{offset}{26} \@{\w}\apply{_#2{\!{\format{%{{align}{center}{padding}{{-+H+}}{delimit}{ }{alignat}{{^_^}{\offset}}{width}{\width}}\""-}{{\1 ^_^ \2}}} }}{ {big_tree}{small_mouse}{long_road}{short_visit}{warm_sun}{cold_beer}{free_speech}{stay_put} } \@{\W\P} \set{circumstances}{ {There has grown up in the minds of certain groups} {in this country the notion that because a man or corporation} {has made a profit out of the public for a number of years,} {the government and the courts are charged with the duty} {of guaranteeing such profit in the future, even} {in the face of changing circumstances and contrary to public interest.} {This strange doctrine is not supported by statute or common law.} {Neither individuals nor corporations have any right} {to come into court} {and ask that the clock of history be stopped, or turned back.} } \@{\w} \format{%{ {align}{center} {padding}{{'}} {delimit}{{) }{ (}} {width}{80} {reuse}{*} {border}{{[ }{ ]\@{\n}}} }}{ \circumstances } \@{\W\P} \@{\w} \format{%{ {length}{{length}} {align}{center} {padding}{{\\ /}} {delimit}{{) }{ (}} {width}{80} {reuse}{*} {border}{{[ }{ ]\@{\n}}} }}{ \circumstances } \@{\W\P} \def{mylength#2}{\length{\1}} \@{\w} \format{%{ {align}{left} {padding}{{\\ /}} {delimit}{{) }{ (}} {length}{{mylength}{boo}} {width}{80} {reuse}{*} {border}{{[ }{ ]\@{\n}}} }}{ \circumstances } \@{\W\P} \@{\w} \format{%{ {align}{right} {padding}{{\\ /}} {delimit}{{) }{ (}} {width}{80} {reuse}{*} {border}{{[ }{ ]\@{\n}}} }}{ {There has grown up in the minds of certain groups} {in this country the notion that because a man or corporation} {has made a profit out of the public for a number of years,} {the government and the courts are charged with the duty} {of guaranteeing such profit in the future, even} {in the face of changing circumstances and contrary to public interest.} {This strange doctrine is not supported by statute or common law.} {Neither individuals nor corporations have any right} {to come into court} {and ask that the clock of history be stopped, or turned back.} } \@{\W\P} \format{%{{align}{right}{width}{10}{reuse}{*}{padding}{'}}}{ {beauty}{lies}{in}{the}{eye}{of}{the}{beholder} } \textmap{{repeat}{8}}{1234567890} zoem-21-341/examples/Makefile.am0000644000207600020760000000253014115654477013372 00000000000000## Process this file with automake to produce Makefile.in # $Id: Makefile.am,v 1.15 2005/06/30 16:23:25 flux Exp $ docdir = $(datadir)/doc/$(PACKAGE) docexamplesdir = $(docdir)/examples docexamples_DATA = \ README \ 8q.azm 8q.ozm \ 8q2.azm 8q2.ozm \ power-of-2.azm power-of-2.ozm \ catch.azm catch.ozm \ fib.azm \ loop.azm loop.ozm \ meta.azm meta.ozm \ nest.azm nest.ozm \ reverse.azm reverse.ozm \ scope.azm scope.ozm \ special.azm special.ozm \ stress.azm stress.reg \ stress2.azm stress2.reg \ tr.azm tr.ozm \ txt-table.azm txt-table.ozm \ xml.azm xml.ozm EXTRA_DIST = README Makefile $(docexamples_DATA) SUFFIXES = .azm .ozm .azm.ozm: ../src/zoem -i $< -o $@ # fib.azm is for demonstration of interactive behaviour. fib.ozm: fib.azm true stress.ozm: stress.azm ../src/zoem -i stress --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress.ozm stress2.ozm: stress2.azm ../src/zoem -i stress2 --system-honor --unsafe-silent --err-out -s get_it_on=1 -o - > stress2.ozm power-of-2.ozm: power-of-2.azm ../src/zoem -i power-of-2 --allow=ls xml.ozm: xml.azm ../src/zoem -i xml -tl 3 sys1: zoem -i system -o - --allow=date sys2: zoem -i system -o system.ozm --allow=date sys3: zoem -i system -o - --allow=date > system.ozm zoem-21-341/examples/power-of-2.ozm0000644000207600020760000000200014134253512013734 00000000000000* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * zoem-21-341/examples/tr.ozm0000644000207600020760000000031514115654477012511 000000000000001234567lmn map D-G an4 r5mov5 HJ alto75t5r, s wat say defgklm abolish capital punishment ABOLISH CAPITAL PUNISHMENT __complement__with__neither__squash__nor__delete__ squash the bokeper squash the bokeper zoem-21-341/examples/8q.ozm0000644000207600020760000000270014154702377012410 000000000000000 4 7 5 2 6 1 3 0 5 7 2 6 3 1 4 0 6 3 5 7 1 4 2 0 6 4 7 1 3 5 2 1 3 5 7 2 0 6 4 1 4 6 0 2 7 5 3 1 4 6 3 0 7 5 2 1 5 0 6 3 7 2 4 1 5 7 2 0 3 6 4 1 6 2 5 7 4 0 3 1 6 4 7 0 3 5 2 1 7 5 0 2 4 6 3 2 0 6 4 7 1 3 5 2 4 1 7 0 6 3 5 2 4 1 7 5 3 6 0 2 4 6 0 3 1 7 5 2 4 7 3 0 6 1 5 2 5 1 4 7 0 6 3 2 5 1 6 0 3 7 4 2 5 1 6 4 0 7 3 2 5 3 0 7 4 6 1 2 5 3 1 7 4 6 0 2 5 7 0 3 6 4 1 2 5 7 0 4 6 1 3 2 5 7 1 3 0 6 4 2 6 1 7 4 0 3 5 2 6 1 7 5 3 0 4 2 7 3 6 0 5 1 4 3 0 4 7 1 6 2 5 3 0 4 7 5 2 6 1 3 1 4 7 5 0 2 6 3 1 6 2 5 7 0 4 3 1 6 2 5 7 4 0 3 1 6 4 0 7 5 2 3 1 7 4 6 0 2 5 3 1 7 5 0 2 4 6 3 5 0 4 1 7 2 6 3 5 7 1 6 0 2 4 3 5 7 2 0 6 4 1 3 6 0 7 4 1 5 2 3 6 2 7 1 4 0 5 3 6 4 1 5 0 2 7 3 6 4 2 0 5 7 1 3 7 0 2 5 1 6 4 3 7 0 4 6 1 5 2 3 7 4 2 0 6 1 5 4 0 3 5 7 1 6 2 4 0 7 3 1 6 2 5 4 0 7 5 2 6 1 3 4 1 3 5 7 2 0 6 4 1 3 6 2 7 5 0 4 1 5 0 6 3 7 2 4 1 7 0 3 6 2 5 4 2 0 5 7 1 3 6 4 2 0 6 1 7 5 3 4 2 7 3 6 0 5 1 4 6 0 2 7 5 3 1 4 6 0 3 1 7 5 2 4 6 1 3 7 0 2 5 4 6 1 5 2 0 3 7 4 6 1 5 2 0 7 3 4 6 3 0 2 7 5 1 4 7 3 0 2 5 1 6 4 7 3 0 6 1 5 2 5 0 4 1 7 2 6 3 5 1 6 0 2 4 7 3 5 1 6 0 3 7 4 2 5 2 0 6 4 7 1 3 5 2 0 7 3 1 6 4 5 2 0 7 4 1 3 6 5 2 4 6 0 3 1 7 5 2 4 7 0 3 1 6 5 2 6 1 3 7 0 4 5 2 6 1 7 4 0 3 5 2 6 3 0 7 1 4 5 3 0 4 7 1 6 2 5 3 1 7 4 6 0 2 5 3 6 0 2 4 1 7 5 3 6 0 7 1 4 2 5 7 1 3 0 6 4 2 6 0 2 7 5 3 1 4 6 1 3 0 7 4 2 5 6 1 5 2 0 3 7 4 6 2 0 5 7 4 1 3 6 2 7 1 4 0 5 3 6 3 1 4 7 0 2 5 6 3 1 7 5 0 2 4 6 4 2 0 5 7 1 3 7 1 3 0 6 4 2 5 7 1 4 2 0 6 3 5 7 2 0 5 1 4 6 3 7 3 0 2 5 1 6 4 zoem-21-341/ChangeLog0000644000207600020760000014132714154703262011270 00000000000000 Fri, Dec 10 2021 * zoem-21-341 released. * Zoem is still as stable as it has been for the last ten years. No development or features are planned, with changes limited to bug fixes, documentation, and potentially code triage focussed on clarification of corner cases and tightening of weird nesting patterns involving file I/O. * Zoem source is now hosted on github.com/micans/zoem . Compiling zoem now requires installation of cimfomfa, a C utility library. Cimfomfa is hosted on github.com/mican/cimfomfa . Tar releases will for the foreseeable future still be hosted on micans.org/zoem and micans.org/cimfomfa . Previously cimfomfa was imported in the zoem source tree, but this practice has stopped. The zoem source tree contains a script that will download both cimfomfa and zoem tar archives and compile both. * Fixed bug in let#1 (this is a cimfomfa bug); it would think that 'abs(2) == abs(1)' is true. The cause was a combination of two things: failure to maintain float/integer correspondence by abs and other functions, and a wrong ternary cascade that would check float (in)equality even if the integer (in)equality test was already conclusive. Wed, Jun 15 2011 * zoem-11-166 released. * The default search path was changed. The obsolete PREFIX/zoem/mac component was dropped, and PREFIX/aephea was added. Now, if zoem and aephea are both configured with the same prefix for installation (e.g. --prefix=/usr/local or --prefix=$HOME/local), then aephea include files will be found automatically by zoem. * set#3 can now splice into a variable (that is, the string refered to by a macro). This is achieved by pairing the respective keys {start} and {width} with appropriate values in the first argument to set#3. The start position is relative to an offst of zero, so \set{foo}{kaboom} \set{{start}{2}{width}{3}}{foo}{za} '\foo' yields 'kazam'. * The example zoem solution 8q2.azm to the N queens problem has been updated. It now pretty-prints asciific chess boards using the new splice mode to set#3. * Small documentation fixes. Wed, Sep 22 2010 * zoem-10-265 released. * In interactive mode zoem now utilise readline editing and history capababilities if available. This can be disabled completely at compile time or optionally at run time. * A new builtin macro seq#4 can be used as a simple type of for loop. \seq{i}{a}{b}{ ... } is equivalent to the pseudo code for (i=a;i, , and
. This is now specified in zoem as for example \<*meta>. The previously accepted syntax \ is now deprecated. The new syntax is more reasonable and makes it easier to recognize such special tags. * Zoem recognizes special classes of HTML/XML tags that do not have an associated close tag. For now these are tags that start with '!' or '?'. Previously accepted syntax such as \ is deprecated and is now simply written \. * The read routines now ignore nul bytes in files, improving zoem's robustness. It no longer yields unpredictable results on files with embedded nul bytes. Fri, Sep 5 2008 * zoem-08-248 released. * A bug manifested itself on powerpc + linux in the form of a crash, resulting from using vsnprintf repeatedly without sufficient corresponding va_start and va_end invocations. On some other platforms this bug would manifest itself as a mysterious zoem syntax error due to heap corruption. Fixed. Thanks to Philipp Benner, Tobias Quathamer, and Joost van Baal for bug reports. * Two modes for the defined#2 primitive have been renamed. "prim" has become "primitive" and "alias" has become "builtin", in line with zoem nomenclature and documentation. This change is backwards incompatible, but unlikely to affect anyone. * Option -ndollar was not working. fixed. Thu, Nov 29 2007 * zoem-07-333 released. * SYNOPSIS A bug in set#3 was removed, and two directives were added, namely batch definitions and a more legible way of appending to keys (see below). Keys local to environments (aka dollar keys) can now be defined using the same signature as when invoked, e.g. \begin{env}{{$k1}{v1}{$k2}{v2}}. This release also continues the focus on retiring what little special case syntax still exists. The format#2 specification syntax has been reworked (in an incompatible way) into a standard and extensible key-value syntax (see below). The format#2 implementation was redone and several new format#2 directives were added. xml/html syntactic sugar now stops introducing whitespace formatting when so instructed with the at directive \@{\w}. * Fixed bug in set#3 where usage of the {if} or {unless} directive corrupts state when combined with the {modes}{x} directive. * xml syntactic sugar cubes now obey the device scope \w directive. This means that xml elements, in the scope of an at directive \@{\w} no longer introduce white-space. This only affects the formatting of the XML/HTML code itself. This is for example useful when creating
 elements.

   *  The set#3 {modes} directive now accepts a v (for vararg mode)
      where a batch of key-value pairs can be defined within a single set#3
      invocation. This may improve the readability of resource files
      containing many definitions. Example:

         \set{{modes}{vw}}{}{
            {is_last}   {0}
            {ctrprev}   {0}
            {ctrnow}    {1}
         }

   *  Introduced append mode in set#3:
         \set{foo}{bar}
         \set{{modes}{a}}{foo}{bar}
      sets foo to barbar.

      append#2 is an alias for \set{{modes}{a}}{\1}{\2}
      appendx#2 is an alias for \set{{modes}{ax}}{\1}{\2}

      Hence append#2 appends to keys without expanding and appendx#2 appends
      to keys after expanding the to be appended text.
      Keys that are not defined when appended to will first be instantiated
      with an empty string.

   *  Keys local to environments (started by \begin#2) can now
      be defined using the same signature as used when invoking them, i.e.
      \begin{env}{{$foo}{bar}} as well as \begin{env}{{foo}{bar}}.

   *  Some bugs were found and removed in the format#2 implementation.

   *  format#2 has acquired a reuse mode where a format specification
      can be be reused a number of times or exhaust all arguments (see below).
      It has also acquired the 'border' directive for adding constant strings
      to the left and right of the formatted units.

   *  The tr#2 specification language is now also described in zoem(1), the manual
      page of the interpreter. The idea is that all - as few as possible -
      special purpose sub-languages will be described in there for ease of
      reference.

   *  The unwieldy format#2 specification language has been redefined to
      follow standard zoem syntax using keys and vararg value lists.  It is
      more verbose, but also more robust, compatibly extensible, powerful, and
      more easily understandable. As an example one now writes

      \format{
         %{{padding}{-=-_}
           {delimit}{ }
           {align}{left}
           {length}{length}
           {double}{{{arg}{foo}}}
           {width}{40}
          }%{
            {align}{right}
            {width}{40}
          }
      }{
         {arg1}{arg2}
      }

      rather than

      \format{%~{-=-_}{ }<40*{length}{foo}.%>40.}{
         {arg1}{arg2}
      }

      Formerly a format specifier was enclosed inbetween '%' and '.' . It
      interpreted special characters '<', '>', and '=', as well as the special
      characters '@', '*', '~' each of which had to be followed by two blocks.
      The same syntax is now obtained by a more customary key-value structure
      encoded as a zoem vararg.

      format#2 accepts new directives {border}{{left}{right}},
      {delimit}{{left}{right}}, {double}{{[{key}{value}]*}}, and
      {reuse}{|*}.

      {delimit} parameters decorate the formatted argument on the sides, and
      participate in the computations involving width, alignment and padding.
      There is no padding inbetween delimiters and the argument to be
      formatted.

      {border} parameters decorate the entire formatted product and do not
      participate in aforementioned computations. Padding is computed and
      produced before the borders are added.

      {double} can be used have the length computations performed on
      fake parameters. This can be useful when certain formatting
      elements need to be present in the true parameters.

      {reuse}{} will reuse the current specification  times,
      {reuse}{*} will reuse it until all arguments are exhausted. Thus

      \format{%{{align}{right}{width}{10}{reuse}{*}{padding}{{'}{}}}}{
         {beauty}{lies}{in}{the}{eye}{of}{the}{beholder}
      }
      \textmap{{repeat}{8}}{1234567890}

      results in

''''beauty''''''lies''''''''in'''''''the'''''''eye''''''''of'''''''the''beholder
12345678901234567890123456789012345678901234567890123456789012345678901234567890


Fri, Nov 9 2007

   *  zoem-07-313 released.

   *  \set{''foo}{bar} now works. It sets a key in the bottom (global)
      user dictionary. Same semantics as \set{{modes}{g}}{foo}{bar}.

   *  \undef#1 now checks whether its argument is a valid key signature.

   *  \undef{''foo} now works.

   *  Streamlined the error-processing part of the code.

   *  Added \textmap{{repeat}{}}{} mode. This results in 
       times repeated.  is evaluated before use.

   *  The special magic comment sequences
         \:/   delete rest of line including newline
         \:!   replace by '\' (for quoting zoem comments)

      are now deprecated (but still supported). Preferably use
         \:{/}
         \:{!}

      instead. This syntax is both more robust and more extensible.  This
      change is similar to previous changes introducing \`{}, \={} and \*{}.

Wed, Jul 25 2007

   *  zoem-07-205 released.

   *  Zoem is now licensed under the GNU General Public License version 3
      (or later).

   *  Added \set#3 that provides all the modalities of set#2, setx#2,
      def#2, defx#2 (namely optional warning, expansion), as well as
      additional modalities. It is possible to define a key conditionally (if
      not set already), and a key can be explicitly set in the global (bottom)
      user dictionary.

   *  \''foo will look up foo in the bottom user dictionary, allowing
      this dictionary to function as a global namespace.

   *  Success status, as written in the session macro \__zoemstat__ by try#1
      and catch#2 is now associated with the string "done" rather than "ok".
      The status "done" can now be explicitly thrown with \throw{done}{}.  In
      this case the unprocessed part of the current interpretation stack is
      discarded, but no error is generated.

      When not captured by try#1 or catch#2, \throw{done}{} can be captured by
      eval#1 and while#2.  If neither of these four primitives catches the
      throw, it is captured at the file processing level and results in
      end-of-processing for the current file. This is fully equivalent
      with what used to be the primitive \done. This primitive has now
      been implemented as the alias \throw{done}{}.

   *  The primitive \done is now implemented as \throw{done}{}.

   *  Introduced \`{..} syntax, equivalent with \`..` syntax. These are only
      available within the \formatted#1 primitive (where .. is a placeholder
      for valid formatted#1 directives).  This change is similar to previous
      changes introducing \={} and \*{}. The old \`..` syntax is deprecated
      and if it is used error messages are issued. The rationale for these
      changes is that the new syntax is more pleasant on the eye and will be
      extendible if needed.

   *  Added \ifdef#3 and \ifdef#4 aliases. This is the ifdef#3
      definition:

      \set{ifdef#3}{\if{\defined{\1}{\2}{\3}}}

   *  \defined{mode}{} now accepts modes 'zoem', 'prim', 'alias'.
      mode zoem accepts the combined classes of prim(itives) and
      alias.

   *  The command line option -s accepts 'key' as well as 'key=val'
      syntax. In the former case the value of key will be set to '1'.

   *  Added two solutions to the N-queen problem in the examples directory.

Wed, Dec 13 2006

   *  zoem-06-347 released.

   *  Fixed display bug in PUD -- the { itemize, long-item, html, safari }
      combination where long-item would be split over lines.

   *  Clean-ups and modifications in underlying util library (mostly
      hash-related).

Wed, Aug 23 2006

   *  zoem-06-234 released.

   *  Added beta key \__env__#1 to retrieve environment variable settings.
      \defined#2 tests for existence of a name in the environment with
      the ENV type.

   *  Added caveat in zoem(1) and Zoem User Manual documentation;
      \done will stop processing the current file only if it was read in its
      entirety, i.e. if the chunk size is sufficiently large. The default
      chunk size (1Mb) should be more than sufficient for authoring
      environments.

   *  The session key \__fnup__ is set to the file that includes
      the current file to aid in diagnostics.

   *  The underlying utility library was overhauled - it's integer
      type system was redone and a more rigorous design was put in place,
      following common practices (size_t and ssize_t wise).

Tue, Mar 22 2006

   *  zoem-06-080 released.

   *  A number of developments have settled with release. To sum up the most
      noteworthy items (C, F and H stem from this release):

         A) primitive namespace identification with \'
         B) user keys can shadow primitives
      +  C) user keys can inspect (vararg) argument structure with \nargs#1
  ABC => D) improved facilities for backward compatability
         E) PUD or portable UNIX documentation is now a separate entity
      +  F) \__line__ now yields what it promises
         G) many primitives recoded as user macros (counters and references)
      +  H) \switch#2 can group branches
         I) \register adds useful processing hook registration
         J) \whilst#2 flushes output immediately

   *  A long standing minor bug has been fixed. Comments up to and including
      the newline can be stripped with the sequence \:/.
      This used to corrupt the file line counter as seen in the session macro
      \__line__ and in error messages. No more.

   *  \switch#2 can collect several cases together using a vararg.
      In the \nargs#1 example below one might use e.g.

      \def{test#1}{
         \switch{\nargs{\1}}{
            {{-1}{-2}} { .. regular stuff .. }
            {   .. apply stuff .. }
         }
      }

      to do the same thing for both of the -1 and -2 cases.
      Different devices can easily be lumped together using the idiom

      \${ {{txt}{roff}}  { .. stuff A .. }
          {html}          { .. stuff B .. }
       }

       In this case the txt and roff devices pass through the same
       branch. \$#1 is a new alias introduced further below.

   *  Added \nargs#1 primitive which counts the number of scopes in its
      argument - WHICH IS NOT EVALUATED. This allows construction of user
      macros that can overload one or more particular arguments, i.e.  behave
      differently depending on the number of scopes in the argument.

      A likely application is an argument that either specifies a simple
      string (assuming default modes) or a vararg with strings and 
      modes specified using a key-value vararg.
      One usage is to extend a macro's functionality while retaining
      backward compatibility.

      \nargs{{abc}def}     : -2      \: neither fish nor fowl
      \nargs{abc}          : -1      \: regular argument
      \nargs{abc{def}}     : -1      \: regular argument too
      \nargs{}             :  0      \: empty vararg (not empty regular arg)
      \nargs{   }          :  0      \: empty vararg again
      \nargs{{abc}}        :  1      \: vararg with 1 argument
      \nargs{{abc}{def}}   :  2      \: vararg with 2 arguments
      \nargs{   {abc}
                {def}
      }                    :  2      \: vararg with 2 arguments
      etc.

      User macros can now use a framework such as

      \def{test#1}{
         \switch{\nargs{\1}}{
            {-2}{\inform{mixed feelings}\exit}
            {-1}{ .. regular stuff .. }
            {  \switch{\let{\nargs{\1}%2}}{
                  {0}{\apply{_#2\!{{ .. stuff with \1 and \2 .. }}}{\1}}
                  {\inform{vararg invocation requires paired arguments\exit}}
               }
            }
         }
      }

      to branch on scope presence/absence. The purpose of the -2 return value
      is to promote frameworks that spot errors early. Group -2 and -1
      as {{-2}{-1}} within switch to make them pass through the same branch.

   *  Added $#1 and $#3 aliases.
      $#1 maps to \switch{\__device__}{\1}            \: switch
      $#3 maps to \switch{\__device__}{{\1}{\2}{\3}}   \: ifelse

   *  within write#3 invocations the key \__fnwrite__ is set to the
      appropriate output file name. This allows easy branching on the file
      being written to from macros accessed within the third argument. The key
      is deleted after evaluation of the third argument has finished.  Nested
      invocations will currently overwrite this key.

   *  Spreading \foo over two lines as in
      \fo\:/
      o

      (with the 'o' at the beginning of line) will be correctly parsed
      regardless of chunk size.

Wed, 22 Feb 2006

   *  zoem-06-053 released.

   *  inspect#4 was broken since the previous release; the parse
      code responsible for firing of the callback macro had not
      been updated properly. Fixed.

   *  minor documentation improvements.

   *  The TODO was shrunk to a more reasonable size and PUD
      now has its own DOPUD.

Wed, 15 Feb 2006

   *  zoem-06-046 released.

   *  Major clean-ups in both code and documentation. Facilitated
      syntactic separation of primitives and user macros.

   *  (minor) Backward incompatible change in the PUD macro package.

      As a further clean-up of the reference framework (in which refload#2
      and friends moved to ref.zmm), publanch#2 and publref#1 have now
      moved to ref.zmm and have been renamed to reference#2 and refer#1
      for better consistency.

      ref.zmm is now documented in pud-ref(7).

   *  pud-ref(7)
      pud(7)

      were added. The first describes the reference framework, which was
      recently removed from the Zoem User Manual as it is no longer
      implemented by primitives. The second is an introduction to and an
      overview of Portable Unix Documentation.

   *  The counter primitives \ctradd#2, \ctrset#2, \ctrput#1 and the builtins
      \ctrinc#2 and \ctrdec#2 were recoded as user macros in the new macro
      package ctr.zmm .

   *  For primitives or builtins with standard alphabetic names
      and the special primitive \$#2 and the special builtins
      \"" and \""#1 the syntax

         \'standard{arg1}..
         \'${arg1}{arg2}
         \'""
         \'""{arg1}

      is now accepted. Moreover, primitive definitions can be shadowed in
      the user dictionary. Currently a warning is issued when this happens.

      The prefered way of accessing primitives is now with the new syntax.
      This makes existing zoem files compatible in case future zoem
      primitives clash with user-defined keys.

      It also makes works based on such files still extendible since the
      new primitive can be unambiguously accessed by the new syntax.

      Finally, with the new syntax zoem needs to do less hash table
      lookups, making it again slightly faster. Said tiny speed increment
      has been fully negated by the redefinition of counter primitives
      as user macros however.

   *  The number of builtin aliases has been cut back.

   *  The idiosyncratic \> (close XML-type tag) syntax has been removed.
      Use \<> or explicit \ style syntax.

   *  Cleanups and deduplication in the parsing code. Examples:
         \apply{<>#2}{{foo}{bar}}
         \apply{$#2}{{html}{yes}}
      now do something. You probably will not need it.
         \def{<>}{foo}
      now chokes.

   *  Documentation fixes and additions.

Tue, 10 Jan 2005

   *  zoem-06-010 released.

   *  Assembled the man and FAQ macros under the Portable Unix
      Documentation label.

      -  the man_zmm(7) manual page was renamed to pud-man.
      -  the faq_zmm(7) manual page was renamed to pud-faq.
      -  the generic_zmm(7) manual page was renamed to pud-base.

   *  Redid a lot of documentation. Further separated package descriptions
      from core zoem documentation.

Thu 5 Jan 2006

   *  zoem-06-005 released.

   *  Pruned the Zoem User Manual to only describe the core zoem language.
      Diatribes and mini-language excursions were removed.

   *  A missing clearerr in util/io.c caused
         ./zoem --unsafe -E '\register{END}{\system{date}}'
      to loop on EOF on at least one architecture (mac OSX). Fixed.

Thu, 24 Nov 2005

   *  zoem-05-328 released.

   *  This release contains substantial behind-the-scenes changes.
      Oddbal zoem primitives were reimplemented as macros of exisisting
      primitives or as special cases of a new more generic primitive.  Users of
      packages (man, faq, doc) should not be affected, with this exception:
       ____________________________________________________________________ 
      {                                                                    }
      {  The new zoem will choke on existing *.zmr and *.zmt auxiliary     }
      {  files. Remove these and you should be fine.                       }
      {____________________________________________________________________}

      The reason being that the primitive refload#6 is now replaced by
      the macro refload#2 provided by the new ref.zmm package.

   *  Added \register#2, use e.g. as

      \register{END}{
         \if{\ctrput{zoem::ref::misses}}{
          \write{stderr}{txt}{>>> [REF] \ctrput{zoem::ref::misses} missing references\|}
         }{}
      }

      This example is from the file ref.zmm that now implements zoem
      references.  This particular registered macro outputs a warning after all
      input has been processed if missing references were found during a run.

      Currently only END is supported. registered macros are processed in
      the order of registration.

   *  Reference handling was removed from the core zoem language.
      \refload#6 and \ref#2 were reimplemented as simple macros (\refload#2 and
      \ref#2) using the zoem data facilities and the new register#2 primitive.
      They are found in the new macro file ref.zmm.

      \refloadx#2 was added, it can be used to attach custom information to
      a reference.

   *  \ucase#1 \roman#1 and \alpha#1 are reimplemented as simple
      macros - and deprecated. They are now specific invocations
      of the new \textmap#2 primitive.

   *  \textmap#2 implements a variety of text transformations. Among them:

         {word}{ucase}
         {word}{lcase}
         {number}{roman}
         {number}{alpha}
         {caesar}{}
         {vigenere}{}
         {vigenerex}{}

      These transformations are applied sequentially, implying that

         \textmap{{number}{roman}{word}{ucase}}{\your_nice_counter}

      does what you expect it to do. Use caesar and vigerene[x] to
      encrypt your sensitive data.

   *  Added \whilst2, which sends output to the current output file
      without building up intermediate results.

   *  The tr#4 was sanitized. See further below.

   *  The zoem output implementation was thoroughly cleansed
      and is in a maintainable state now. This bears on the handling of
      multiple output sinks (altiplexing?).

      Same for environment well-formedness checks.  As part of the clean-up an
      experimental (but backwards compatible) feature was put in place; see
      immediately below.

   *  This item is important only for people that write their own
      environment definitions.  Dictionary stacks are now tied to (output)
      sinks. This implies that

      \begin{foo}
         \write{zutfut}{device}{\begin{zut}}
      \end{foo}
         \write{zutfut}{device}{\end{zut}}

      is now legal zoem, and any dollar key within a write scope is tied to the
      output stream defined by the write invocation.  Different instances of
      the same environment spread over different output sinks will thus not
      clobber one another.

      If a dollar key is not found within some write scope, it is searched
      in the default output scope.

   *  added \genoptref#1 to the generic package, for generic (html) linking to
      an option only using the option identifier string.

   *  The first argument of inspect now takes a vararg rather than
      a single string. The modifiers previously accepted as the first
      argument are now accepted as argument to the 'mods' key.
      So use e.g. \inspect{{mods}{count-matches}}{..}{..}{..}
      if counting matches is what you are after.

   *  Incompatible change in what presumably is one of the
      lesser-used primitives.

      Removed \tr#4 because its interface was broken beyond repair.
      Added \tr#2.

         \tr{  {from}{from-spec}
               {to}{to-spec}
               {delete}{delete-spec}
               {squash}{squash-spec}
            }{
               data
            }

      Data is unprotected, all specs are subject to tilde expansion.

      Specs are largely POSIX compliant except that repeats are
      denoted

         [*c*20]     \: repeat c 20 times
         [*\012*20]  \: repeat newline 20 times
         [*X*]       \: fill with X
         [*X#]       \: repeat X until class/range boundary

      The magic repeat operator # stops on boundaries. A boundary happens at
      start or end of a class or range.  Complements are denoted by a leading
      caret.

   *  \push#1 and \pop#1 semantics have changed.  \push#1 now always pushes the
      user dictionary stack. Its argument now denotes the name of dictionary
      stack that is pushed.  The matching \pop#1 should specify the same name.

   *  made -o work with -e and -E.

   *  rewrote parts of zmm_generic for the html device. It now makes
      more use of style sheets and is reworked towards better
      customizability.

   *  Included a description of the \inspect#4 and \format#2
      (mini-mini) sublanguages in the zoem(1) manual. This covers
      respectively tilde expansion for \inspect#4 and the format
      specification strings for \format#2.

   *  itemize accepts {smallertext}{1}

   *  Added fase support for centering with \format#2. With centering,
      the default now is that strings of length 1 and 2 will be layed-out
      thusly:           (even width)
         [....8...]
         [....9...]
         [...10...]
         [...11...]
      or                (odd width)
         [....8....]
         [....9....]
         [...10....]
         [...11....]
      This can be changed by using '==' as the centering specification:
         [...8....]
         [...9....]
         [...10...]
         [...11...]
      and
         [....8....]
         [....9....]
         [....10...]
         [....11...]

      This pattern applies generally to strings of length (2*k+1, 2*k+2).
      In case you need it, the fase will alternate with each equal sign
      appended to it.

   *  Zoem's \alpha#1 macro (now implemented as
      \textmap{{number}{roman}}{\1}) transforms numbers to strings by writing
      them in base 27, using _ as zero.  It's use is primarily to enable a) b)
      c) style itemization.  While experimenting with alpha#1, I found that

         \alpha{1444} = azm

     The most wonderful coincidence as azm is the zoem suffix
     and 1444 is 38 squared - 38 is one of my lucky numbers no less.

     This is a universal truth rather than a change. However, the simple act of
     perceiving a universal truth instantly creates truth ripples through the
     fabric of everything, and in doing so changes the course of the universe
     in profound ways.  I thought you might like to know this.

Fri, 3 Jun 2005

   *  zoem-05-154 released.

   *  Fixed segmentation fault occurring with -e option, introduced
      in previous release.

   *  Added a regression test suite, stress2.azm.
      stress.azm is now also called a regression test suite.

   *  Tested a large number of error paths, fixed a few
      to yield truncated output as they should.

   *  Fixed doc.zmm to produce better W3C compliant output -
      specifically compliant  anchors.

   *  Added a tilde escape mechanism to inspect#4 to prevent
      cumbersome regexes when slashes are needed (either as a
      literal or as a regex metacharacter).

   *  Sanitized the \inspect#4 implementation and interface.
         supported options:
            iter-args            (was vararg)
            iter-lines           (was lines)
            discard-nmp          (was skip)  [non-matching-part]
            discard-nil-out      (was snip)
            count-matches        (was count)
            discard-miss
            dotall
            icase

Tue, 24 May 2005

   *  zoem-05-144 released

   *  Writeto obeys the --unsafe and --unsafe-silent options (or their
      absence) when its filename contains a path separator, the forward
      slash (entirely UNIX-centric). Such a path separator is considered
      a risk in overwriting sensitive files. Zoem will prompt
      the user according to the safety settings. It will never prompt the
      user if the filename does not contain a path separator.

   *  The primitive env#3 has become env#4 and env#3 is now a macro
      expanding to \env{\1}{}{\2}{\3}.
      The second argument of env#4 is a list of key-value pairs
      in a vararg that are set as default dollar keys. This simplifies
      the definition of environments.

   *  keys set in the second (vararg) argument begin#2 can now
      be keys taking arguments. e.g.

         \begin{foo}{{bar#2}{\!2\!1}}

      defines a key that is used as

         \$bar{a}{b}

      which would result in

         ba

   *  Environments set \$__args__ and \$__xargs__ so that they can pass
      the full argument list onwards if needed.

   *  Environments will now silently overwrite local keys previously defined.
      This enables a convenient override system when one environment
      encapsulates another environment - it can append user arguments
      (using \$__args__) to default settings.

   *  Changed --allow=[:]* syntax to
      -allow [:]* syntax.

   *  Moved option parsing to structured mcxOption framework.

Mon, 21 Jun 2004

   *  zoem-04-173 released.

   *  Repeated use of \special#1 would decrease available stack space.
      Quite rare bug revealed by Tim Hughes as one of the first to use
      clmformat/zoem on a larger scale.
      This will not affect normal usage of zoem.
      Fixed.

   *  Made the code better ISO-C compliant (split long constant strings).

Wed, 16 Jun 2004

   *  zoem-04-168 released.

   *  fixed embarassing special-related bug. It *did* affect exisiting macro
      packages (see below).

Tue, 15 Jun 2004

   *  zoem-04-167 released.

   *  \special#1 now evaluates its argument. This does not affect existing
      macro packages.

   *  Updated generic_zmm documentation.

   *  Treat spaces in manual name correctly (fixed bug in man.zmm results
      spotted by Joost van Baal).

Sun, 13 Jun 2004

   *  zoem-04-165 released.

   *  fixed bug where inline files would cause zoem to crash.

   *  introduced enclosing variants for all paragraph incarnations.
      \par     ->    \par#1         (content)
      \cpar#1  ->    \cpar#2        (caption, content)
      \car     ->    \car#1         (content)
      \ccar#1  ->    \ccar#2        (caption, content)
      Separation tags (such as \par) will be phased out from the
      zoem macro packages. \item and \sec are to follow.

   *  \formatted#1 now skips \<> scope as well.

   *  Embedded newlines in *ml syntactic sugar \<..> would screw up the
      line count. Now fixed.

   *  \<> stacks are now tied to files, so that alternating output
      can never erroneously corrupt the well-formedness stack. (Do note that
      funny user-side inverse processing could and still can do that).

   *  Environment stacks (\begin and \end stuff) are now also tied to files,
      same as above.

   *  The hash module in the underlying library code was overhauled.
      hashes now maintain private storage for links and key-value pointers.

Tue, 20 Apr 2004

   *  zoem-04-111 released.

   *  small documentation fixes.


Mon, 19 Apr 2004

   *  zoem-04-110 released.

   *  the builtin alias \error#1 is gone, replaced by \inform#1.

   *  Streamlined the examples, made them more suitable for web-publishing.

   *  Fixed a bug recently introduced into the util library;
      file read from STDIN would only read a single line.

   *  (updated web index, otherwise irrelevant).

Sat, 17 Apr 2004

   *  zoem-04-108 released.

   *  Some activity at meta-zoem primitive level.
      A new exception mechanism was fully integrated with the error
      framework.

      -  Introduced \throw#2, which generalizes \quit (now removed).
      -  Removed \zoem#1. It is generalized by \catch{label}{expression}
         and \try{expression}.
      -  Reimplemented \quit as \done, specialized for clean premature
         file exit.

      This enables

         \catch{towel}{
            \while{1}{
               do stuff
               \if{ifstuff}{\throw{towel}}{}
               do stuff
            }
         }

      and
      
         \catch{error}{
            do possibly erroneous *or* towel stuff
         }

      or

         \try{ stuff }

         inspect
            \__zoemstat__ (towel|error|ok) and
            \__zoemput__  (the possibly truncated result of \try{stuff})

      \catch#2 and \try#2 can be arbitrarily nested.
         
   *  The primitive \throw#2 is used as
         \throw{towel}{msg}
         \throw{error}{msg}

      The macros
         \throw{towel}
         \throw{error}

      expand to \throw{towel}{} and \throw{error}{} and do not issue a message.

   *  The new alias \error#1 generates an error message, it expands to
      to \write{stderr}{device}{\1\@{\N}}

   *  Removed alias \ignore#1, use \""#1 instead.
      (e.g. \""{ignore
               stuff
            }
      )

   *  Fixed zum.azm, which contained bogus begin#1 description.

   *  Fixed small bug; \write#3 would erroneously set \__fnout__.
      Using \__fnout__ as in \write{\__fnout__}{filter}{stuff}
      now works as expected.

Wed, 7 Apr 2004

   *  zoem-04-098 released.

   *  fixed documentation to exclusively use/describe the begin#2 primitive.

   *  The old and ugly \begin{itemize{{foo}{bar}}} syntax now generates
      a syntax error. (use \begin{itemize}{{foo}{bar}}, introduced
      in zoem-04-072).

   *  fixed -e option related bug, changed its implementation.

   *  Introduced \*{'e} syntax, equivalent with \*'e* syntax. The new syntax
      is optionally extendible and more in line with the rest of zoem.
      This move is similar to the inline file name change \=fname= -> \={fname}
      introduced earlier.  The old \*'e* syntax will not be removed but
      if used error messages are issued.

   *  The \formatted#1 tokens \`<` and \`>` were changed to \`[` and \`]` for
      esthetic reasons.

Tue, 30 Mar 2004

   *  zoem-04-090 released.

   *  Fixed some small documentation glitches.

   *  At request of the zoem user community, the faqsec environment
      was moved to a key/value based syntax. The two positional arguments
      

7 Dec 2021    zoem 21-341

NAME

zoem — macro processor for the Zoem macro/programming language.

SYNOPSIS

zoem [-i <file name>[.azm] (entry file name)] [-I <file name> (entry file name)] [-o <file name> (output file name)] [-d <device> (set device key)]

zoem
(enter interactive mode - happens when none of -i, -I, -o is given)

zoem -i <file name>[.azm] (entry file name) -I <file name> (entry file name) [-o <file name> (output file name)] [-d <device> (set device key)] [-x (enter interactive mode on error)] [-s <key>[=<val>] (set key to val)] [-e <any> (evaluate any, exit)] [-E <any> (evaluate any, proceed)] [-chunk-size <num> (process chunks of size num)] [--trace (trace mode, default)] [--trace-all-long (long trace mode)] [--trace-all-short (short trace mode)] [--trace-regex (trace regexes)] [-trace k (trace mode, explicit)] [--stats (show symbol table stats after run)] [--split (assume \writeto usage, set \__split__)] [--stress-write (make \write#3 recover)] [--unsafe (prompt for \system#3)] [--unsafe-silent (simply allow \system#3)] [-allow cmd1[:cmdx]+ (allowable commands)] [--system-honor (require \system#3 to succeed)] [-nuser k (user dict stack size)] [-nenv k (environment dict stack size)] [-nsegment k (maximum simple nesting depth)] [-nstack k (maximum eval nesting depth)] [-buser (initial user dict capacity)] [-bzoem (initial zoem dict capacity)] [-tl k (tab length)] [-l <str> (list items)] [-h (show options)] [--apropos (show options)]

DESCRIPTION

Zoem is a macro/programming language. It is fully described in the Zoem User Manual , currently available in HTML only. This manual page documents the zoem processor, not the zoem language.

If the input file is specified using the -i option and is a regular file (i.e. not STDIN - which is specified by using a single hyphen), it must have the extension .azm. This extension can but need not be specified. The zoem key \__fnbase__ will be set to the file base name stripped of the .azm extension and any leading path components. If the input file is specified using the -I option, no extension is assumed, and \__fnbase__ is set to the file base name, period. The file base name is the file name with any leading path components stripped away.

If neither -i nor -o is specified, zoem enters interactive mode. Zoem should fully recover from any error it encounters in the input. If you find an exception to this rule, consider filing a bug report. In interactive mode, zoem start interpreting once it encounters a line containing a single dot. Zoem's input behaviour can be modified by setting the key \__parmode__. See the section SESSION MACROS for the details. In interactive mode, zoem does not preprocess the interactive input, implying that it does not accept inline files and it does not recognize comments. Both types of sequence will generate syntax errors. Finally, readline editing and history retrieval can be used in interactive mode provided that they are available on the system. This means that the input lines can be retrieved, edited, and discarded with a wide range of cursor positioning and text manipulation commands.

From within the entry file and included files it is possible to open and write to arbitrary files using the \write#3 primitive. Arbitrary files can be read in various modes using the \dofile#2 macro (providing four different modes with respect to file existence and output), \finsert#1, and \zinsert#1. Zoem will write the default output to a single file, the name of which is either specified by the -o option, or constructed as described below. Zoem can split the default output among multiple files. This is governed from within the input files by issuing \writeto#1 calls. Refer to the --split option and the Zoem User Manual.

If none of -i or -o is given, then zoem will enter interactive mode. In this mode, zoem interprets by default chunks of text that are ended by a single dot on a line of its own. This can be useful for testing or debugging. In interactive mode, zoem should recover from any failure it encounters. Interactive mode can also be accessed from within a file by issuing \zinsert{stdia}, and it can be triggered as the mode to enter should an error occur (by adding the -x option to the command line).

If -o is given and -i is not, zoem reads input from STDIN.

If -i is given and -o is not, zoem will construct an output file name as follows. If the -d option was used with argument <dev>, zoem will write to the file which results from expanding \__fnbase__.<dev>. Otherwise, zoem writes to (the expansion of) \__fnbase__.ozm.

For -i and -o, the argument - is interpreted as respectively stdin and stdout.

OPTIONS

-i <file name>[.azm] (entry file name)

Specify the entry file name. The file must have the .azm extension, but it need not be specified.

 
-I <file name>[.azm] (entry file name)

Specify the entry file name, without restrictions on the file name.

 
-o <file name> (output file name)

Specify the output file name.

 
-d <device> (set key \__device__)

Set the key \__device__ to <device>.

 
-x (enter interactive mode on error)

The afterlife option. If zoem encounters an error during regular processing, it will emit error messages as usual, and then enter interactive mode. This allows you e.g. to inspect the values of keys used or defined within the problematic area.

 
-s <key>[=<val>] (set key to val)

Set the key \key to val if present, 1 otherwise. Any type of key can be set, including keys taking arguments and keys surrounded in quotes. Beware of the shell's quote and backslash interpolation. Currently val is not evaluated, so appending or prepending to a key is not possible.

 
-e <any> (evaluate any, exit)

This causes zoem to evaluate <any>, write any result text to stdout, and exit.

 
-E <any> (evaluate any, proceed)

This causes zoem to evaluate <any>, write any result text to stdout, and proceed e.g. with the entry file or an interactive session.

 
-chunk-size <num> (process chunks of size num)

Zoem reads its input in chunks. It fully processes a chunk before moving on with the next one. This option defines the (minimum) size of the chunks. The size or count of the chunks does not at all affect zoem's output. The default minimum chunk size equals one megabyte.

Zoem will read files in their entirety before further processsing if -chunk-size 0 is specified.

Zoem does not chunk input files arbitrarily. It will append to a chunk until it is in the outermost scope (not contained within any block) and the chunk will end with a line that was fully read.

Consequently, if e.g. a file contains a block (delimited by balanced curlies) spanning the entire file then zoem is forced to read it in its entirety.

 
--trace (trace mode, default)

Trace in default mode.

 
--trace-all-long (long trace mode)

Sets on most trace options in long mode. Trace options xxx not set have their own --trace-xxx entry (see below).

 
--trace-all-short (short trace mode)

Sets on most trace options in short mode. Trace options xxx not set have their own --trace-xxx entry (see below).

 
--trace-keys (trace keys)

Trace keys.

 
--trace-regex (trace regexes)

Trace regexes (i.e. the \inspect#4 primitive).

 
-trace k (trace mode, explicit)

Set trace options by adding their representing bits.

 
--stress-write (stress test using write)

This makes \write#3 recover from errors. It is a special purpose option used for creating zoem stress test suites, such as stress.azm in the zoem distribution /examples subdirectory.

 
--unsafe (prompt for \system#3)
--unsafe-silent (simply allow \system#3)
-allow cmd1[:cmdx]+ (allowable commands)

With --unsafe system calls are allowed but the user is prompted for each invocation. The command and its arguments (if any) are shown, but the STDIN information (if any) is withheld. With --unsafe-silent system calls are allowed and the user is never prompted.

Use -allow str or --allow=str to specify a list of allowable commands, as a string in which the commands are separated by colons.

 
--system-honor (require \system#3 to succeed)

With this option any \system#3 failure (for whatever reason, including safe behaviour) is regarded as a zoem failure. By default, failing system calls are ignored under either safe mode, unsafe mode (--unsafe), or silent unsafe mode (--unsafe-silent).

 
--split (assume split output)

This assumes zoem input that allows output to multiple files (e.g. chapters). It sets the default output stream to stdout (anticipating custom output redirection with \writeto#1) and sets the session macro \__split__ to 1.

 
--stats (show symbol table stats after run)

Show symbol table chacteristics. Symbol tables are maintained as hashes.

 
-tl k (set tab length)

Set the tab length. HTML output can be indented according to nesting structure, using tabs which are expanded to simple spaces. By default, the tab length is zero, meaning that no indent is shown. The maximum value the tab length can be set to is four.

 
-nsegment k (level of macro nesting allowed)
-nstack k (stack count)
-nuser k (user dictionary stack size)
-nenv k (environment dictionary stack size)
-buser k (initial user dict capacity)
-bzoem k (initial zoem dict capacity)

Probably needed only if you have some obscure and extreme use for zoem. The segment limit applies to simple nesting of macros. The stack limit applies to nesting of macros that evaluate an argument before use. Each such evaluation creates a new stack. The user limit applies to \push{user}, the env limit applies to the nesting level of environments (started with \begin#2). The user dict capacity pertains to the initial number of buckets allocated for user and environment dictionaries, and the zoem dict capacity pertains to the dictionary containing the zoem primitives.

 
-l <str> (list items)

List items identified by <str>. It can be any of all, filter. legend, builtin, session, trace, or zoem, Multiple identifiers can be joined in a string, e.g. -l legendzoem prints a legend followed by a listing of zoem primitives.

 
-h (show options)

Show short synopsis of options.

SESSION MACROS

\__parmode__
This macro affects zoem's read behaviour in interactive mode. It can be set on the command line using the -s option. Bits that can be set:
1 chomp newlines (remove the newline character) 2 skip empty newlines 4 read paragraphs (an empty line triggers input read) 8 newlines can be escaped using a backslash 16 read large paragraphs (a single dot on a line triggers input read)
\__device__

The current output device, set by the command line option -d. The man and faq packages support html and roff as its values.

\__fnbase__

The base name of the input file name. Leading path components are stripped away. If the -i option is used the input file is required to have the .azm suffix. In that case the suffix is also stripped to obtain the base name.

\__fnentry__

The name of the entry file.

\__fnin__

The file currently being processed.

\__fnout__

The name of the default output file.

\__fnpath__

The leading component of the input file name, possibly empty.

\__fnup__

The file that included the current file, if applicable.

\__fnwrite__

This key is set by \write#3 to its first argument. It can be used by macros that are expanded during evaluation of the third argument. Possible usage is to branch on the name of the write output stream. For example a file called index.html may be treated differently from other files. The key is deleted afterwards. Nested invocations of \write#3 may corrupt the status of this key.

\__ia__

The input/output separator used in interactive mode.

\__line__

The line number in the file currently being processed. This number will be correct for any invocation outside the scope of a macro. For any invocation within a macro the result will be the line number of the closing curly of the outermost containing macro. The following

\__line__ \__line__ \__line__ \group{ \__line__ \group{\__line__} \__line__}

Results in

1 2 3 7 7 7
\__searchpath__

A vararg containing a list of paths to search when a file is to be included/imported/read/loaded. When you start zoem, this key should contain the location of the man.zmm and faq.zmm package files. It is advisable not to overwrite this key but to append to it instead.

\__zoemstat__

Set to one of ok, towel (that one is a bit lame), or error by either the interpreter, an occurrence of \catch#2, or \try#1.

\__zoemput__

Set by \try#1 to the possibly truncated result of processing its argument.

\__lc__

Expands to a left curly. It is hard to find a need for this — the zoem stress suite uses it to generate a particular syntax error at a deeper interpretation level.

\__rc__

Expands to a right curly.

THE SET MODIFIERS

The \set#3 primitive allows a {modes}{<modifiers>} directive in its first argument. Here <modifiers> can be a combination of single-letter modifiers, each described below.

a

append to the key, do not overwrite, create if not existing.

c

conditionally; only set if not already defined.

e

existing; update existing key, possibly in lower dictionary.

g

global; set in the global (bottom) user dictionary.

u

unary; do not interpret vararg in <any> as key-value list (data keys only)

v

vararg; interpret vararg in <any> as key-value list (regular keys only).

w

warn if key exists (like \def#2 and \defx#2).

x

expand argument (like \setx#2 and \defx#2).

THE INSPECT SUBLANGUAGE

The \inspect#4 primitive takes four arguments. The languages accepted by the first two arguments are described below. The third argument is a replacement string or a replacement macro accepting back-references (supplied as an anonymous macro). The fourth argument is the data to be processed.

arg 1
Is a vararg. Currently it accepts a single key mods for which the value should be a comma-separated list over the words posix, icase, dotall, iter-lines iter-args, match-once, discard-nmp, discard-nil-out, discard-miss, count-matches. Alternatively repeated use of mods is allowed.

arg 2
Is a regular expression. Tilde patterns are expanded according to all of the ZOEM, UNIX, and REGEX schemes. Refer to TILDE EXPANSION for these.

The third argument is a constant string or an anonymous key, the fourth argument is data.

THE TR SUBLANGUAGE

The \tr#2 primitive takes two arguments. The first argument contains key-value pairs. The accepted keys are from and to which must always occur together, and delete and squash. The values of these keys must be valid translation specifications. This primitive transforms the data in the second argument by successively applying translation, deletion and squashing in that order. Only the transformations that are needed need be specified.

Translation specifications are subjected to UNIX tilde expansion as described below.

The syntax accepted by translation specifications is almost fully compliant with the syntax accepted by tr(1), with three exceptions. First, repeats are introduced as [*a*20] rather than [a*20]. Second, ranges can (for now) only be entered as X-Y, not as [X-Y]. X and Y can be entered in either octal or hexadecimal notation (see further below). As an additional feature, the magic repeat operator [*a#] stops on both class and range boundaries. Character specifications can be complemented by preceding them with the caret ^.

Specifications may contain ranges of characters such as a-z and 0-9. Posix character classes are allowed. The available classes are

[:alnum:] [:alpha:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]

Characters can be specified using octal notation, e.g. \012 encodes the newline. Use \173 for the opening curly, \175 for the closing curly, \134 for the backslash, and \036 for the caret if it is the first character in a specification. DON'T use \\, \{, or \} in this case! Hexadecimal notation is written as \x7b (the left curly in this instance).

See EXAMPLES for an example of tr#2 usage.

TILDE EXPANSION

Some primitives interface with UNIX libraries that require backslash escape sequences to encode certain tokens or characters. The backslash is special in zoem too and without further measures it can become very cumbersome to encode the correct escape sequences as it is not always clear which tokens should be escaped or unprotected at what point. It is especially difficult to handle the zoem characters with special meaning, {, } and \.

The two primitives under consideration are \inspect#4 and \tr#2. Both treat the tilde as an additional escape character for certain arguments (as documented in the user manual). These arguments are subjected to tilde expansion, where the tilde and the character it proceeds are translated to a new character or character sequence. There are three different sets of tilde escapes, ZOEM, UNIX and REGEX escapes. \tr#2 only accepts UNIX escapes, \inspect#4 accepts all. Tilde expansion is always the last processing step before strings are passed on to external libraries.

The ZOEM scheme contains some convenience escapes, such as ~E to encode a double backslash.

ZOEM tilde expansion

meta sequence replacement .-----------------------------. | ~~ | ~ | | ~E | \\ | | ~e | \ | | ~I | \{ | | ~J | \} | | ~x | \x | | ~i | { | | ~j | } | `-----------------------------'

The zoem tr specification language accepts \x** as hexadecimal notation, e.g. \x0a denotes a newline in the ASCII character set

.

UNIX tilde expansion

meta sequence replacement .-----------------------------. | ~a | \a | | ~b | \b | | ~f | \f | | ~n | \n | | ~r | \r | | ~t | \t | | ~v | \v | | ~0 | \0 | | ~1 | \1 | | ~2 | \2 | | ~3 | \3 | `-----------------------------'

REGEX tilde expansion

meta sequence replacement .-----------------------------. | ~^ | \^ | | ~. | \. | | ~[ | \[ | | ~$ | \$ | | ~( | \( | | ~) | \) | | ~| | \| | | ~* | \* | | ~+ | \+ | | ~? | \? | `-----------------------------'

ENVIRONMENT

The environment variable ZOEMSEARCHPATH may contain a colon and/or whitespace separated list of paths. It will be used when searching for files included via one of the dofile aliases \input, \import, \read, and \load. Note that the zoem macro \__searchpath__ contains the location where the zoem macro files were copied at the time of installation of zoem.

DIAGNOSTICS

On error, Zoem prints a file name and a line number to which it was able to trace the error. The number reported is the same as the one stored in the session macro \__line__. For an error-trigering macro which is not nested within another macro the line number should be correct. For a macro that does occur nested within another macro the line number will be the line number of the closing curly in the outermost containing macro.

If in despair, use one of the tracing modes, --trace-keys is one of the first to come to mind. Another possibility is to supply the -x option.

BUGS

No known bugs. \inspect#4 has not received thorough stress-testing, and the more esoteric parts of its interface will probably change.

SEE ALSO

Aephea is a document authoring framework largely for HTML documents.

Portable Unix Documentation provides two mini-languages for authoring in the unix environment. These languages, pud-man and pud-faq are both written in zoem.

EXAMPLES

This is a relatively new section, aimed at assembling useful or explanatory snippets.

Create a vararg containing file names matching a pattern (png in this example).

\setx{images}{ \inspect{ {mods}{iter-lines,discard-miss} }{(.*~.png)}{_#1{{\1}}}{\system{ls}} }

Use magic boundary stops with tr#2.

\tr{ {from}{[:lower:][:upper:][:digit:][:space:][:punct:]} {to}{[*L#][*U#][*D#][*S#][*P#]}}{ !"#$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ [\\]^_` abcdefghijklmnopqrstuvwxyz \{|\}~]}

AUTHOR

Stijn van Dongen.

zoem-21-341/doc/zoem.shared0000644000207600020760000000552714115654477012440 00000000000000 \def{zarg#1}{\v{<\1>}} \set{{modes}{xv}}{}{ {"man::year"} {\'zinsert{stamp.year}} {"man::month"} {\'zinsert{stamp.month}} {"man::day"} {\'zinsert{stamp.day}} {"zum::stamp"} {\'zinsert{stamp.stamp}} {"man::year"} {\'tr{{delete}{[:space:]}}{\"man::year"}} {"man::month"} {\'tr{{delete}{[:space:]}}{\"man::month"}} {"man::day"} {\'tr{{delete}{[:space:]}}{\"man::day"}} {"zum::stamp"} {\'tr{{delete}{[:space:]}}{\"zum::stamp"}} {"man::tag"} {\"zum::stamp"} } \setx{man_share}{ {year} {\"man::year"} {month} {\"man::month"} {day} {\"man::day"} {tag} {\"zum::stamp"} {stamp} {\"zum::stamp"} } \'def{mc#1}{\v{\\\1}} \'def{sibref7#1}{\sibref{\1}{\1\'${roff}{(7)}}} \set{css}{\{CSS}} \set{xsl}{\{XSL}} \set{xml}{\{XML}} \set{html}{\{HTML}} \set{sgml}{\{SGML}} \set{ahtml}{\{A-HTML}} \set{utf8}{\{UTF-8}} \def{faq}{\{FAQ}} \def{zum}{\{ZUM}} \def{pdf}{\{PDF}} \def{mcl}{\{MCL}} \def{dtd}{\{DTD}} \def{ascii}{\{ASCII}} \def{ansi}{\{ANSI}} \def{pud}{\{PUD}} \def{posix}{\{POSIX}} \def{gnu}{\{GNU}} \def{readme}{\sc{README}} \def{unix}{\sc{UNIX}} \def{stdout}{\sc{STDOUT}} \def{stdin}{\sc{STDIN}} \def{stderr}{\sc{STDERR}} \def{tilde}{\sc{TILDE}} \def{io}{\sc{I/O}} \def{itemize_set3_modifiers}{ \begin{itemize}{{flow}{compact}} \item{a} \car{append to the key, do not overwrite, create if not existing.} \item{c} \car{conditionally; only set if not already defined.} \item{e} \car{existing; update existing key, possibly in lower dictionary.} \item{g} \car{global; set in the global (bottom) user dictionary.} \item{u} \car{unary; do not interpret vararg in \zarg{any} as key-value list (data keys only)} \item{v} \car{vararg; interpret vararg in \zarg{any} as key-value list (regular keys only).} \item{w} \car{warn if key exists (like \mc{def#2} and \mc{defx#2}).} \item{x} \car{expand argument (like \mc{setx#2} and \mc{defx#2}).} \end{itemize}} zoem-21-341/doc/Makefile.in0000644000207600020760000004010414154762464012330 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdocdir)" NROFF = nroff MANS = $(man_MANS) DATA = $(docdoc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_cv_use_includepath = @ac_cv_use_includepath@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/$(PACKAGE) dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TROFF = groff ZOEM = ../src/zoem COL = col TIDY = tidy docdocdir = $(docdir)/doc azms = zum.azm zoem.azm docdoc_DATA = zum.html zoem.html zoem.ps $(azms) man_MANS = zoem.1 EXTRA_DIST = ecosphere.azm zoem.shared $(azms) \ $(docdoc_DATA) $(man_MANS) stamp.year stamp.month stamp.day stamp.stamp SUFFIXES = .1 .7 .azm .html .ps .txt ZOEMSEARCHPATH = ../mac:${ZOEMSEARCHPATH} all: all-am .SUFFIXES: .SUFFIXES: .1 .7 .azm .html .ps .txt $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-docdocDATA: $(docdoc_DATA) @$(NORMAL_INSTALL) @list='$(docdoc_DATA)'; test -n "$(docdocdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdocdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdocdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdocdir)" || exit $$?; \ done uninstall-docdocDATA: @$(NORMAL_UNINSTALL) @list='$(docdoc_DATA)'; test -n "$(docdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdocdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docdocDATA install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docdocDATA uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-docdocDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-docdocDATA uninstall-man uninstall-man1 .PRECIOUS: Makefile .azm.1: $(ZOEM) -d roff -i $< -o $@ $(ZOEM) -d roff -i $< -o $@ .azm.7: $(ZOEM) -d roff -i $< -o $@ $(ZOEM) -d roff -i $< -o $@ .1.ps: $(TROFF) -man $< > $@ .1.txt: $(TROFF) -t -e -mandoc -Tascii $< | $(COL) -bx > $@ .7.ps: $(TROFF) -man $< > $@ .azm.html: $(ZOEM) -d html -i $< -o $@ $(ZOEM) -d html -i $< -o $@ - $(TIDY) -e $@ zum: zum.html zum.html: zum.azm ecosphere.azm $(ZOEM) --allow=date:../src/zoem: --system-honor --d=html --i=$(VPATH)/zum --o=$@ $(ZOEM) --allow=date:../src/zoem: --system-honor --d=html --i=$(VPATH)/zum --o=$@ - $(TIDY) -e $@ zoem: zoem.1 zoem.html zoem.ps index.html: webindex.azm ecosphere.azm zoem -i webindex.azm -o index.html -d html - tidy -e index.html # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zoem-21-341/doc/stamp.day0000644000207600020760000000000214154676077012103 000000000000007 zoem-21-341/doc/stamp.year0000644000207600020760000000000514154676077012271 000000000000002021 zoem-21-341/doc/zum.html0000644000207600020760000100112514154762473011765 00000000000000 Zoem User's Manual
 
December 10, 2021
zoem-21-341
Zoem User's Manual

Zoem: <Dutch> The sound made by electrical devices and flying bugs. Pronounced: zoom or zum; the vowel is short.

Zoem is a general macro/programming language with filtering capabilities. It transforms text in two stages.

In the first stage the text is scanned for macro escape sequences. The core zoem language consists of so-called primitive macros. They provide a wide spectre of functional behaviour, including data storage, arithmetic evaluation, I/O facilities, iteration and flow control, dictionary stacks, system interaction, and regular expressions. As with any macro/programming language, the real power comes from the ability to create new user-defined macros in terms of primitives and other user-defined macros. Macro expansion can be arbitrarily delayed, and inside-out evaluation is supported.

A useful feature is the combination of anonymous macros, lists, and the \apply#2 primitive, constituting a callback mechanism in zoem. Another feature is the automatic popping and pushing of dictionaries with the begin/end environment, providing shadowing and localization.

In the optional second stage, the text is filtered. Two filter scopes are distinguished. The first is called device scope and is always enclosed in a filter escape sequence. The second, plain scope, is everything else. Filtering mechanisms are provided for both. The filtering language is useful when the output is meant to be in an external format with device-specific escape sequences, such as HTML or troff. Conversions are specified in device specific filtering rules that are applied in plain scope, so that the zoem input is device agnostic. By setting up different filtering rules the same input can be used to generate different outputs.

This manual covers the whole zoem language. A large part of it is only interesting for someone writing a reusable macro package. A smaller part is still interesting for someone who is just using such a package, but might want to add some utilities and shortcuts of his own. The part where file inclusion, macro definitions, and macro expansions are explained is required reading for anyone considering or planning to use zoem.

The manual page of the zoem interpreter.

Zoem is used by Portable Unix Documentation (PUD) and Aephea. The latter is a general authoring tool for writing HTML documents and provides both useful abstractions and a framework for creating new abstractions. It uses and promotes the use of CSS. A small core of Aephea has been ported to the typesetting language troff. This core is used in PUD, which provides mini-languages for FAQ documents and UNIX manual pages. Documents written in PUD can be output to troff and html, and further to plain text, PostScript, and PDF.

Clicking on the number next to a section title (e.g. the 1.2 to the right of the title About this document of this section) will get you to the corresponding section of the table of contents.

Zoem input and zoem output are both generally shown in a typeface font, like this.

Links that point to locations within this document are shown in blueish colors. Links that point to documents originating from the same package (project) or perhaps the same site are shown in in greenish colors. Links that point to other stations on the internet or perhaps other packages on the same site are shown in in reddish colors.

Zoem supports several programming constructs, immediate and postponed expansions, stream character filtering, easy I/O facilities, integer arithmetic, and a whole lot more. Its main aims are:

Providing the building blocks for a structural and programmable approach. Section 3.1 contains an overview of the zoem primitives and their use.

Accepting a pleasant syntax that does not require much thinking, favouring simplicity and rigor over looseness and context dependent rules.

Creation from the keyboard while minimizing on key-strokes.

Few meta characters. Zoem achieves this by having a single special character and a reasonably restricted syntax.

Adding filtering capabilities so that multiple devices can be addressed.

Listed below are some features of the zoem primitives. In practice there are two kinds of zoem files. The first is a zoem macro file, which should contain macros defined in terms of lower-level macros, with zoem primitives at the lowest level. The second is a zoem document file, which should import such a macro file and only use the high-level macros defined in that macro file. Additionally, a document file can define some high-level macros of its own, in terms of low-level macros, zoem primitives, or a mixture of both.

Macros with arguments, overloading of key names allowed (i.e. different keys with the same name are distinguished by the number of arguments they take). (\def#2, \set#2, and \setx#2). Zoem primitives look like regular macros, but usually they expand their arguments before use. User macros can be equipped with this behaviour by wrapping them in \apply#2.

Support for variable number of arguments - see the vararg section.

Easy file, STDIN, STDOUT, and STDERR input/output, nested file inclusion (\dofile#2, \write#3, \finsert#1, and \zinsert#1).

Extensive support for arithmetic with the primitives \let#1, \f#2, \f#3, \fv#2, and \eqt#3.

Operators returning booleans (\defined#2, \cmp#3, \eqt#3), control operators acting on those (\while#2, \if#3).

The for-like primitives \apply#2 and \table#5.

Match and substitution capabilities using POSIX regexes (\inspect#4).

Register macros with \register#2 to be processed after regular processing (e.g. to output counters or warnings).

The switch primitive \switch#2, employing the vararg construct.

Localized expansions (\eval#1) and meta-zoem (\! and \!#1).

A user dictionary stack that can be manipulated using \push#1 and \pop#1. An environment environment for doing \begin{stuff} .. \end{stuff} stuff (see \env#4). This environment creates name scopes by pushing and popping to/from the dollar dictionary stack. Environments may take arguments, one particular useful application is that local variables (e.g. local to an itemize environment) can thus be specified by the user.

Storage of data by multiple string indexing — arbitrary data can be stored in a tree by indexing nodes with (arbitrary) strings. Refer to the Tree data section.

The ability to nicely format macros (see \formatted#1).

Syntactic sugar for writing SGML-style mark-up and having it checked.

Executing system commands, possibly sending data to STDIN and receiving data from STDOUT\system#3.

And more.

You use zoem by invoking it from the command line. The normal mode of operation is that you specify a file for zoem to chew up and spit out. This is called the entry file, and its name usually has the extension .azm. A common invocation looks as follows:

zoem -i mcl.azm

The -i flag specifies the entry file. It is not necessary to write the .azm extension, zoem will append it for you. The preceding could also have been entered as

zoem -i mcl

In either case, zoem will set the session key \__fnbase__ to the base name of the entry file, i.e. the name stripped of its .azm suffix and any leading path components. In this example, the key \__fnbase__ will get the value mcl. If you have an input file without the .azm extension, you need to use the -I option.

Zoem writes its output to a default output file which is named according to three rules. The rules are:

If the -o flag was given the value say somestr, zoem will write to the file named somestr.

If -o was not supplied but the -d flag was used with argument say zyx, zoem will write to the file named \__fnbase__.zyx. The -d flag also results in the macro \__device__ being set to xyz.

If neither -d nor -o was given, zoem will write to the file named \__fnbase__.ozm.

It is possible to change the default output file from within the document; this is achieved with the \writeto#1 primitive. Zoem can mingle default output with output to other files, use the \write#3 primitive for that.

Both the -i and -o flag accept a hyphen as argument, meaning respectively that zoem will read from STDIN and write to STDOUT.

Specifying just zoem and entering a return will cause zoem to enter interactive mode, in which it reads from STDIN and writes to STDOUT. Interactive mode currently should catch any errors occurring, so it is a good way of experimenting and testing. By default, interactive mode reads chunks that are ended by a single dot on a line by itself. This behaviour can be changed by setting the session variable \__parmode__ using the -s option. Using zoem -l parmode shows the bits that can be set in this variable. It is for example possible to make zoem read paragraphs (ended by two or more consecutive newlines).

Note There is a difference between specifying no output stream (i.e. not using the -o option) and explicitly specifying -o -. In the latter case, zoem will never enter interactive mode. Should you need to insert zoem into some pipe sequence, then you need to use -o -.

Tracing errors If your document contains erroneous input (e.g. using a macro that was never defined), zoem will by default print the approximate corresponding line number of the current input file and the last key it saw, and then exit. If that does not suffice in tracking down the error, you have a choice of options. One possibility is to use one of the various tracing modes described below and in the zoem interpreter manual. Another possibility is to specify the -x option which says to enter interactive mode should an error occur. This enables you to inspect the values of keys defined or used in the problematic area. A selection of other options is given below. For the full story, consult the manual page of the zoem interpreter.

-h

lists all flags accepted by zoem with a short description for each.

-s foo=bar

Sets key \foo to bar.

-e <any>

Zoem will evaluate <any>, writing any result text to STDOUT, and then exit.

-E <any>

Zoem will evaluate <any>, writing any result text to STDOUT, and then proceed.

-x

If an error occurs, zoem stops processing and enters interactive mode.

-l <str>

lists all entities specified by <str>. It can be any of all, filter, legend, alias, session, trace, or zoem. Repeated use is allowed. In fact, zoem will only check whether the target is present as a substring, so

zoem -l legendzoem

will print the legend and the list of zoem primitives.

--trace

This traces (prints) all keys encountered, and prints possibly truncated arguments. Zoem has several other tracing flags, use the -h flag or refer to the zoem manual page for more information.

Tracing can be set from within the document using the \trace#1 primitive. Part or whole of the data tree can be output from within the document using the \%dump primitive (refer to the Tree data section).

--stats

When zoem is done, it prints statistics about the primitive name table and about the user name table.

Zoem parses text which may contain zoem escape sequences, these are sequences that have special meaning and cause zoem to do special processing. Each and every escape sequences starts with a backslash, no exceptions. There are three kinds of sequences that are macros, which may or may not take arguments. These are zoem primitives, user keys, and dollar keys.

There are currently about sixty zoem primitives, these are listed in the The zoem language section. Sixty is quite a lot; it includes convenience sibling sets such as \set#2, \setx#2, \def#2, and \def#2, and entries covering a variety of areas such as I/O, arithmetic, testing, control, string conversions, formatting, shadowing (scopes), and all the other stuff listed in the Topic index section.

Additionally there are a number of zoem built-ins that are defined in terms of primitives. Built-ins live in the same dictionary as primitives and behave the same in all aspects. The next section has some further remarks on the differences and resemblances between primitives/built-ins on the one hand and user macros on the other hand.

User keys and dollar keys are discussed in the Macro expansion section. Arguments are shipped by delimiting them with curly braces, as in

\thiskey{takes}{\bf{two}\it{arguments}}.

No characters are allowed inbetween (the delimiting curlies of) two arguments (but take note of the handy \formatted#1 primitive). See the Macro expansion section for more information. Zoem is very strict in the syntax it accepts, but it garantuees to accept a text in which each backslash \ is escaped as \\ (i.e. a text in which all consecutive runs of backslashes have even length).

An active backslash is any backslash that is not made inactive by an active backslash immediately preceding it. The first backslash seen by zoem (proceeding sequentially through the text) is active. This is one incomprehensible way of stating the obvious, and I bet you know what I mean anyway. An active backslash must always have a meaning known to zoem. If zoem does not get it, it will complain and exit. The meaning (i.e. class) of the escape sequence introduced by an active backslash is determined by the character immediately following it. A list is given below.

Within arguments, curlies not functioning as argument delimiters must also be escaped if they are not balanced. It is best practice to escape all non-argument-delimiting curlies, but I never do so myself unless they are not balanced. An escaped curly is a curly preceded by an active backslash. An active curly is a curly that is not escaped. A pair of balanced curlies consists of an active left curly that matches an active right curly, where inbetween all escaped curlies are disregarded. A block is anything delimited by balanced curlies. The word scope is most often used to distinguish between device scope and plain scope, these are the two kinds of parse scopes. An environment scope refers to the stuff enclosed by instances of the \begin#2 and \end#1 primitives. So called name scopes are entered and exited by \push#1 and \pop#1.

Zoem distinguishes between primitives and built-ins and user macros on the other hand. Consider the following slightly contrived example.

\def{fib#1}{ \push{fibonacci} \set{a}{1} \set{b}{1} \set{c}{0} \while{\let{\a <= \1}}{ \setx{c}{\a} \setx{a}{\let{\a + \b}} \write{-}{txt}{\c\|} \setx{b}{\c} } \pop{fibonacci} }

The example is contrived in that zoem is not the most appropriate language to compute Fibonacci numbers. The reason for using it is that extracts from existing macro packages require more context and are simply more boring.

In the example, the following macros are primitives: \push#1, \pop#1, \def#2, \set#2, \while#2, \let#1, \setx#2, and \write#3. The example defines a user macro \fib#1, which can be invoked e.g. as \fib{100}. Doing this either from a file or from interactive mode should give the output below.

1 2 3 5 8 13 21 34 55 89

From the above it can be seen that a macro (primitive or user-defined) is in this text often referenced by its signature. The signature contains both the name of the macro and the number of arguments it takes, separated by the # (octothorpe) character. The octothorpe and ensuing integer are omitted if a macro does not take arguments. A new macro is defined by specifying the required signature (without the leading backslash) as the first argument of one of the definition macros. In this text a signature is usually prefixed with the backslash.

The example above also defines user macros a, b, and c. The \set#2 primitive will not warn when a previous definition exists. The \setx#2 acts similarly but will also first evaluate the value assigned to the macro. Finally, \push#1 and \pop#1 temporarily create a new dictionary in which the definitions are stored. This is one easy way to ensure that no other definitions are overwritten. This level of care is generally not required though.

The following are useful to know about primitives, built-ins and user macros.

Primitives and built-ins live in one namespace (or dictionary), user macros live in another.

A built-in is a special macro provided by zoem. It is defined in terms of one or more primitives, but its definition lives in the same dictionary as primitives do. It is called a built-in because its definition is built into the zoem interpreter. Example: begin#1 is defined as \begin{\1}{} (cf \begin#2). The full list can be obtained by issuing zoem -l alias.

Primitives and built-ins can be shadowed by user-macros, but a warning will be issued. You can test this by issuing e.g. \def{def#2}{\set{\1}{\2}}. This particular piece of code redefines \def#2 as \set#2 by shadowing the primitive \def#2 as a user macro, losing the property of \def#2 that it warns if a key already exists.

Primitives and built-ins can always be accessed by prefixing the name with a right quote, as in \'def{foo}{bar}. The prefixed primitive syntax also has the advantage that it is slightly faster, although zoem speed is likely not something one should worry about.

It is impossible to access a user macro with the quote prefix syntax.

It is probably a good idea in macro packages that export functionality to use the primitive quote prefix syntax. This protects the package from user redefinitions. At the same time, the ability to shadow zoem primitives implies that user macros (also those exported by macro packages themselves) are protected against potential clashes with zoem primitives that may be introduced in later versions of the language. The Fibonacci example looks as follows using the quote prefix syntax.

\'def{fib#1}{ \'push{fibonacci} \'set{a}{1} \'set{b}{1} \'set{c}{0} \'while{\'let{\a <= \1}}{ \'setx{c}{\a} \'setx{a}{\'let{\a + \b}} \'write{-}{txt}{\c\|} \'setx{b}{\c} } \'pop{fibonacci} }

The quote mechanism only works for zoem primitives and built-ins that follow the syntax of user macros. This includes names starting with a dollar $ or with a double quote ". The primitive \$#2 and the built-ins \"" and \""#1 are the only examples in this category. The quote mechanism does not work for special zoem primitives such as data keys (Tree data), delay keys (\!#1), or XML syntactic sugar (SGML/HTML/XML syntactic sugar cubes).

This is a list of escape sequence classes recognized by zoem, indexed by the (set of) character(s) triggering the class(es) — this assumes that the character in question is preceded by an active backslash.

$[_a-zA-Z]*

[dollar key] A sequence starting with a dollar sign possibly continued with underscores and alphanumeric characters. Introduces a dollar key. No dollar signs are allowed in the remainder, and the first non-alphanumeric non-underscore character terminates the sequence. The primary use of dollar keys is that they are set by \begin#2 and \end#1. Dollar keys live in the dollar dictionary stack, which is pushed and popped by \begin#2 and \end#1. Nested begin/end scopes can thus safely associate different values with the same key name. Refer also to the Macro expansion section, the The zoem language section, and the Dictionary stacks section.

Note: \$#2 is the only zoem primitive starting with a dollar.

[_a-zA-Z][_a-zA-Z0-9]*

[user key/zoem primitive] A sequence starting with an underscore or an alphabetic character, with only underscores and alphanumeric characters in the remainder. Introduces a user key or a zoem primitive. The first non-alphanumeric non-underscore character terminates the sequence. These keys live in the user dictionary stack, which the user can control with the \push#1 and \pop#1 primitives. Refer also to the Macro expansion, The zoem language, and Dictionary stacks sections.

A sequence consisting of a single underscore (i.e. not followed by an alphanumeric character) introduces an anonymous key.

"

[user key or zoem built-in] Starts a user key, which is only different from the user keys mentioned above in that it looks different. The sequence is terminated by a closing ". Inbetween, anything is allowed except a backslash or curly. This is used for creating mnemonic names such as

\"man::author" \"man::section" \"man::version" \"html::title" \"html::charset"

These keys live in the user dictionary stack. See the Macro expansion section and the Dictionary stacks section.

There are two zoem built-ins that take this particular form. These are \"" and \""#1. Both expand to nothing. The first can be used to temporarily separate two pieces of text, as they will be joined after expansion. The second can be used to quickly outcomment sections of text.

'

[primitive quote prefix] As seen above, primitives and user keys largely live in the same syntactic namespace. It is possible to unambiguously invoke a primitive by inserting a right quote to the left of the primitive key or built-in. Refer to section Primitives, built-ins and user macros.

The user keys live in a stack of dictionaries. Dictionaries can be pushed and popped using \push#1 and \pop#1. The default user dictionary is always present and acts as a global namespace. It is possible to retrieve a key \foo directly from the global namespace using the syntax \''foo, even if it is shadowed in stacked dictionaries. It is possible to set a key in the global namespace using \set#3.

%

[data key] A sequence starting with a percent sign. The percent sign is followed by a number of scopes. This is used to access multi-dimensional data storage. Such data is stored using the \def#2 primitive or one of its siblings. Refer also to section Tree data.

[1-9]

[positional parameter] A single (character encoding a) positive digit. The sequence backslash followed by digit is called a positional parameter. It is only interpreted in the second argument of \set#2, \setx#2, \def#2, and \defx#2, and in the definition part of an anonymous key (which can be an argument to \apply#2 and \inspect#4). In all these instances, the sequence denotes a positional parameter into which the corresponding argument will be interpolated when a key with arguments is used. It is allowed in other places though, as it is possible in zoem to create key definitions dynamically (see e.g. the \setx#2 primitive). Note during interpolation, positional parameters that are enclosed by the delay scope \!{..} will not be interpolated (see \!#1). The status of this feature is not entirely clear.

<newline>

[strip newline] The newline will be stripped during the interpretation stage. If you want the newline to be stripped during the file-read preprocessing stage use the sequence \:{/}, which is a special case of the comment sequence (see below).

:

[preprocessing sequence] There are a few preprocessing sequences, which are evaluated during file read (cf the File read section). The most important preprocessing sequence is simply the sequence \: followed by whitespace, an alphanumeric character, or a backslash. It introduces a comment up till and excluding the next newline, which is stripped.

|

[zoem glyph] Comprises a special two-character sequence that can be given a device-specific meaning. It is customarily used to encode a line break. To zoem, this sequence is more or less the same as a 'normal' character. See the \special#1 primitive.

~

[zoem glyph] It is customarily used to encode a non-breaking space. See the entry above.

-

[zoem glyph] It is customarily used to encode a long dash. See two entries back.

\

[backslash] Denotes a literal backslash.

{

[left curly] Denotes a literal left curly.

}

[right curly] Denotes a literal right curly.

*

[glyph sequence] Starts a glyph sequence or constant sequence. Refer to the Device scope section and to the \constant#1 primitive.

<

[syntactic sugar] This introduces syntactic sugar for directly writing SGML-style mark-up, such as HTML and XML (e.g. DocBook). Refer to the anchor section for that topic.

@

[at scope] Typically seen in macro package files only. Starts a special instance of device scope called at scope. The sequence \@ must immediately be followed by a pair of balanced curlies, so at scope always appears as \@{..}. Refer to the Scope dichotomy and Device scope sections for more information.

@e

[at HTML entity] \@e{ent} will expand to the HTML character entity &ent; — it is equivalent to, somewhat easier to type and minimally shorter than \@{&ent;}.

&

[and scope] Typically seen in macro package files only. May only be used within device scope, and implements a limited form of macro expansion within that scope. The sequence \& must immediately be followed by a pair of balanced curlies. so and scope always appears as \&{..}. Refer to the Scope dichotomy and Device scope sections for more information.

`

[back quote - formatting escape] Typically seen in macro package files only. Must be followed by a pair of balanced curlies enclosing a formatting sequence. This is only recognized within the \formatted#1 primitive. This primitive removes all literal whitespace it encounters in its argument; the formatting sequences are transformed to the whitespace characters encoded by them.

,

[comma - atomic separator] Typically seen in macro package files only. This is interpreted during filter time, and is always mapped to nothing. Use it for glueing things as in \foo\,1, which will result in theresultoffoo1.

!

[delay sequence] Typically seen in macro package files only. Introduces a zoem meta sequence. Such a sequence consists of a maximal run of consecutive backslashes, possibly followed by a single block. It can be used to delay interpretation during any number of interpretation stages, and is useful to delay interpretation, perhaps even in a nested fashion, for arguments in keys such as \apply#2 that expand one or more of their arguments before use. The run of exclamation marks (or 'bangs' as they are internally called) actually comprises an argument to the underlying primitive, so the two primitives (one taking a single block argument) internally have respective signatures !#1 and !#2. Externally though, they are just refered to as \! and \!#1.

=

[inline files] Rarely used feature. Starts either a sequence of the form \={fname}, which begins a so called inline file named fname, or a sequence of the form \==, which ends such an inline file. Refer to the File read section.

This leaves 0>()[]?^#/.; for future use, hopefully very few of these will ever acquire meaning. If the sequence \# acquires meaning, it will probably be for encoding Unicode scalar values.

Parsing is separated into three stages, conceptually. Zoem knows two different parse scopes, plain scope and device scope. These are mentioned below, and explained in the Scope dichotomy section. The three stages are:

File read
Macro expansion / file inclusion - only plain scope is seen.
Filtering - both plain scope and device scope are filtered. Device directives that lay hidden in device scope are interpreted during output.

A file is read in chunks, if possible. The requirement is that chunks must end on lines and be in the outermost scope. The default minimum chunk size is approximately one megabyte. Chunks are processed by recursively chunking them into smaller chunks as dictated by macro expansion. As soon as a chunk is no longer subject to macro expansion it is immediately filtered and output.

Macro expansion is done recursively. Whenever a macro is encountered, it is replaced by its expansion, and the result is again fed to the parser. Evaluatation is not necessarily lazy, that is, during macro expansion the expander may expand arguments before they are interpolated and substituted in the macro definition. This inside-out evaluation can recurse if necessary. Many zoem primitives evaluate one or more of their arguments before use. The default behaviour for user macros is lazy evaluation. This can be changed however by wrapping both the macro and its arguments in \apply#2. Expansion can be delayed using \! and \!#1, so different arguments can be treated differently.

Important is that the result from the second stage is still valid zoem input. If you re-feed it to zoem, file read and macro expansion are usually no-ops (unless some interpretation delay-magic was used), and the syntax is garantueed to be acceptable to zoem. This is because device scope is not touched during the first two stages, and device specific text (which is most likely not conforming to zoem syntax) lies always hidden in that scope. There are three kinds of escape sequences introducing device scope; these are described in the Device scope section.

This is used for example when creating a table of contents; you can write expanded but unfiltered content to a file and read it in during the following run. It is important that such content is fully expanded, because you want things like index numbers and references as they are at the time of macro invocation. It is equally important that what you read back in is still valid zoem input; this is simply achieved by witholding filtering. When the table of contents is read in, it can be subjected to filtering, and this is the right way to do toc stuff in Zoem.

File read - stripping comments, reading inline files.

Zoem searches for files included via \dofile#2 or one of its built-in aliases in a number of places if it cannot find the file in the current directory. The precise way of searching is documented in section File search path.

\:

In most cases, this sequence introduces a comment, namely where it is followed by whitespace, an alphanumeric character, or a backslash. It introduces a comment up until and excluding the next newline, which is stripped.

The sequence \:{/} introduces a comment up till and including the newline. This feature can be useful within the \protect#1 primitive, as it is the only way to delete actual newlines within the argument of that primitive.

The sequence \:{!} is replaced by a backslash. The single use currently known is to make it easy to quote zoem input containing comment sequences. This

\protect{\foo \bar \zut \:{!}: this will end up as a comment. }

will result in the following

\foo \bar \zut \: this will end up as a comment.
\={fname}

starts inline file named fname at the next line, removes remainder of line after the \={fname} sequence. When using the \dofile#2 primitive or one of its four built-in aliases, an inline file takes precedence over regular files in the file system, whether it is present (as a regular file) or not. See below. This feature can be used to ship zoem input in one piece while putting the macro parts at the end. \zinsert#1 can address inline files as well, but \finsert#1 cannot. The reason for this is that inline files have to satisfy zoem syntax, whereas \finsert#1 can be used to read arbitrary data.

The future will probably bring a zoem option that creates such a self-contained file automatically from the zoem entry file.

\==

ends inline file, removes remainder of line.

The above applies to any file read at any stage. Inline files may occur in any file included at any time, but they do not nest.

The zoem entry file is the single file that is specified on the command line. This is the main file, from which other files can be included if desired.

Zoem entry files usually have the extension .azm, which is memnonic for A ZoeM file. This is required if the -i option is used. Arbitrary entry file names can be specified using the -I option. It is not uncommon to generate sibling files with .roff, .html, .zmt (zoem table of contents), and .zmr (zoem references) extensions — however, this is all configurable in user space and not part of zoem itself. There are no restrictions on names of files that are included from the entry file. Inclusion is done recursively.

The future will probably bring a second extension that is allowed, namely .ezm for Expanded ZoeM file, which is a self-contained file in which every included file is present as an inline file.

If zoem cannot find a file in the current directory, it attempts to find the file in one of three different ways. These are, in the order in which they are attempted:

The environment variable $ZOEMSEARCHPATH is checked. It may contain a listing of paths separated by whitespace or colons.

The zoem variable \__searchpath__ is checked. It must contain a listing of paths stored as a vararg, i.e. a sequence of paths where each path is delimited by curly brackets. DO NOT overwrite this variable, but rather append or prepend to it. Most likely zoem was configured and compiled locally on your system, in which case \__searchpath__ contains the path necessary to find the macro packages man.zmm, faq.zmm, and ref.zmm.

The path of the file currently being parsed is used. Assume that file foo contains \import{/a/b/c/bar}. If file bar wants to include file zut, which is in the same /a/b/c/ directory, it need not prepend a path but can just issue \import{zut}. Should the previous search mechanisms fail to find zut, then zoem will as a last resort deduce the path from /a/b/c/bar. This feature is probably rarely needed, if ever at all.

Macro expansion consists of recursive file inclusion and macro expansion. All zoem primitives and user keys are recursively expanded until none remains. Zoem primitives and user keys take one of the following forms:

\abc_0123_

A key with alphanumerics and underscores only. Ends with any other character. All zoem primitives but one have this form.

Note: \_ denotes an anonymous key, see the Anonymous keys section.

These keys live in the user dictionary stack. Initially, there is only one dictionary. The stack can be manipulated using the \push#1 and \pop#1 primitives.

\"abc::def-ghi.jkl,mno+qrs"

A quoted key. Almost anything inbetween quotes is allowed. Always ends with a quote. No zoem primitive has this form. These keys live in the same user dictionary stack as the keys above.

\$abc_0123_

A key introduced with a dollar sign. The name may further consist of alphanumerics and underscores and it ends with any other character. These keys live in the dollar dictionary stack. A dictionary is pushed with every occurrence of \begin#2, and that dictionary is popped with the corresponding occurrence of \end#1.

Further note: \$#2 is a zoem primitive.

All three types of keys may take arguments, and overloading is allowed:

\foo \: signature foo \foo{bar} \: signature foo#1 \foo{bar}{bop} \: signature foo#2 \$foo{bar}{baz} \: signature $foo#2 \"foo::oof"{zut}{zit}{zot} \: signature "foo::oof"#3

is an ensemble of valid and unique keys, which can be defined for example by

\def{foo}{FOO} \def{foo#1}{The FOO of \1} \def{foo#2}{The FOO of \1 and \2} \def{$foo#2}{The $FOO of \1 and \2} \def{"foo::oof"#3}{\foo{\1}{\2}\foo{\2}{\3}}

Additionally, zoem allows the definition of constant keys that map directly into device space and are ignored during macro expansion. Usage of such keys looks like \*{'e} or \*{(c)} and is detailed later on.

A sequence \k where k is in 1-9 is allowed within anonymous keys (as used for example in \apply#2 and \inspect#4) and in the definition argument of the \def#2 primitive and its siblings \defx#2, \set#2, and \setx#2. It indicates the position(s) where arguments should be interpolated. Note during interpolation, positional parameters that are enclosed by the delay scope \!{..} will not be interpolated (see \!#1). The status of this feature is not entirely clear.

A feature that should only rarely be needed is that zoem allows name scopes. Refer to the Dictionary stacks section.

There is one zoem primitive which has four different uses. For each of those uses, a built-in alias exists.

\dofile#2 use alias meaning \dofile{expr}{!+} \input{expr} require file, interpret and output \dofile{expr}{!-} \import{expr} require file, interpret only \dofile{expr}{?+} \read{expr} permit absence, interpret and output \dofile{expr}{?-} \load{expr} permit absence, interpret only

The \dofile#2 primitive and its four aliases are perhaps a little funny interface-wise — better ideas are welcome. The expr argument is digested, that is, expanded until no macro's remain. It is thus possible to specify \__fnbase__.zmt and include a table of contents file that has been written to in a previous run. \dofile#2 and its aliases have the property that zoem really descends into the files, and on error will emit a message containing the approximate line number where it occurred.

Additionally, the contents of a file can be placed inline using \finsert#1 and \zinsert#1.

Note: wherever key is written, it means that something of the form \foo, \$foo, or \"foo" has to be provided, so you would use \setx#2 e.g. as \setx{foo}{\finsert{\__fnbase__.zyx}}.

The \dofile#2 primitive requires that the files to be included satisfy zoem syntax. It will descend into the files and proceed parsing them.

The \finsert#1 and \zinsert#1 primitives do not descend, but rather act as if the contents of the file specified were pasted into the place of macro invocation.

\finsert#1 will protect the contents of the inserted file, that is, all backslashes and curlies are escaped by preprending them with a backslash. \zinsert#1 will include the file unchanged, assuming that its contents satisfy zoem syntax.

The \system#3 primitive is able to pipe data to a system command's STDIN stream and retrieve data from the command's STDOUT stream. This primitive will unprotect the data it sends, and it will protect the data it receives. Note the security implications of this feature as discussed at the \system#3 entry.

Data can be explicitly protected using the \protect#1 primitive.

Protected data can (currently) never result in it being expanded again. This is because escaped backslashes are only interpreted at filter time, and never during expansion. If you only need temporary delay of expansion, use the \! primitive or the \!#1 primitive.

Zoem knows two parse scopes: plain scope and device scope. The latter is also called 'at scope' because \@{..} is one (but not the only) way of entering device scope. In plain scope, every character represents itself as a glyph, i.e. as something that should show that way in print/on screen (after the zoem output/device input is fed to the device interpreter).

For example, if you write the less than sign < in plain scope, it should show up as a readable less than glyph, like in this very sentence. In order to make this happen, zoem provides the \special#1 primitive, so that the less than sign can be automatically mapped to the html entity sequence &lt;.

In device scope, nothing is mapped except for a double backslash should it occur. If you enter this particular sequence of mixed scope: \@{<b>}<hello world>\@{</b>} as zoem input, the zoem output/device input is (provided the \special#1 primitive was correctly used for the html device): <b>&lt;hello world&gt;</b> and what you finally see on screen is: <hello world>. In device scope, every character (except for the escape sequences available in that scope) represents itself as the character that should be present in the zoem output/device input. Device scope should normally only be seen in macros and not in running zoem input.

In plain space you type characters just as you want to see them eventually — when you read the document after the zoem output was run through a device interpreter (such as a browser or printer, or postscript previewer). The only exceptions are the backslash and the two curlies, these should be entered as \}, \{, and \}, respectively. Those escape sequences are interpreted as the characters or glyphs \, {, and }. For all characters, including these three, it is checked whether they should be further mapped according to the \special#1 primitive. If a mapping is found, it is retrieved and interpreted by the device scope filter. Read on.

There are three kind of strings which are interpreted by the generic device filter, and which are said to live in device scope:

The strings embedded in \@{..} sequences.

The strings mapped to by the \special#1 primitive, including mappings of the zoem glyphs \~, \|, and \-.

The strings mapped to by the \constant#1 primitive.

In a macro package that is meant to work for multiple devices, every use of any of these constructs will typically be embedded in something that tests the value of the active device. This can be done using either \cmp#3 with \if#3, \switch#1, or \$#2, in conjuction with the pre-defined zoem key \__device__, containing the name of the active device (which can be specified on the command-line). The following are equivalent:

\if{\cmp{eq}{\__device__}{html}}{ \@{<!-- (c) foo bar -->} }{} \: is equivalent with \${html}{ \@{<!-- (c) foo bar -->} }

The \$#2 primitive is used if something needs to be done for one device only, and it may occasionally appear in documents. For example, the PUD man macros enable the creation of a table of contents (for both html and troff). My own convention is to have a table of contents only in html, and I specify this using the sequence

\${html}{\"man::maketoc"}

When zoem enters device scope, it outputs all characters literally, except that the backslash still has special meaning. It is used for encoding the backlash itself (as \\), and for encoding the two curlies { and } (as \{ and \}). This is the same as in plain scope (except that in plain scope the resulting character may again be mapped onto something else, for example, in troff the backslash also needs encoding as \\).

In device scope the sequence \" maps to a double quote. This is an additional feature to allow zoem input to be more susceptible to some editors moving features. It is not necessary though; simply using the double quote without escaping it is sufficient.

Additionally, the backslash can be followed by a single letter from a prescribed set listed below. Such a backslash+letter combination is called a device directive. By default, zoem will never print consecutive newlines, and it will never print consecutive spaces or spaces at the beginning of a line. The device directives allow this to be altered.

N

garantuee a newline

P

garantuee a paragraph skip (two consecutive newlines)

S

garantuee a space (except if next char is newline)

I

increase indent by one (indent is printed after each newline)

J

decrease indent by one

C

set indent to zero

n

print newline

s

print space

t

print tab

w

stop managing white space (squashing spaces and newlines)

W

start managing white space (use after w)

&

start and scope (see further below)

+

set the special level (see further below)

Note that the directives mainly affect the lay-out of the device text (which is zoem output), not the look of the interpreted device text. The 'N' directive is rather important when constructing troff macros, as many special troff commands are encoded by a dot as the first character on a line, i.e. a newline followed by a dot. Since troff attaches special meaning to two consecutive newlines as well (interpreting it as a paragraph break), zoem needs to be able to specify print a newline only if the previous character was not a newline. This is exactly what the N directive means. The 'W' and 'w' directives are required for enabling the construction of a verbatim environment.

The sequence \&{<almost any>} can be used to avoid overly cumbersome constructions. It is for example illegal to write

\@{<table width="\width">}

In the early days of zoem, you had to write

\@{<table width="}\width\@{">}

— ugly by most standards. Today you write

\@{<table width="\&{\width}">}

Which is not any shorter, but more pleasant to read. What happens is that the contents of and scope \&{..} is first fully expanded in plain scope, after which the result is passed back to device scope. You have to be careful though. The content of \&{..} should never expand to something containing the at sequence \@{..}, because device scope is not allowed to nest. It should also not expand to something containing the and sequence \&{..} either, as this sequence is illegal in plain scope.

The first kind of zoem escape introducing device scope is \@{..}. The second kind comprises the \special#1 mappings, including the three zoem glyphs \~, \|, and \-. Conventionally, these are used to encode a non-breaking space (&nbsp; in html), a line break (<br> in html), and a long dash (emdash, not present in html). You would for example put

\if{\cmp{eq}{\__device__}{html}}{ \special{ {38} {&amp;} \: 38 is ascii character '&' {60} {&lt;} \: 60 -> '<' {62} {&gt;} \: 62 -> '>' {-1} {&nbsp;} \: the zoem escape \~ {-2} {<br>\!N} \: the zoem escape \| {-3} {-} \: the zoem escape \- } }{ }

All \special#1 definitions are interpreted in device scope. For every character encountered in plain scope, it is checked whether a \special#1 definition exists, if so, the corresponding string is retrieved and this is filtered through the device scope filter. Note that the three zoem glyphs described here may not be used in device scope, they can only be used in plain scope. In device scope you will have to write the explicit, device-specific sequence such as <br> (in html).

The \special#1 primitive allows different levels of mappings to be defined simultaneously. Several definitions of the same character are allowed; these are placed on a stack particular to that character (cf. the \special#1 entry). When zoem encounters a character for which one or more mappings exist, it retrieves a mapping using the special level. This is an integer that has by default the value 1. Each open output stream has a unique special level associated with it. [Output streams exist for the default output file (see e.g. \writeto#1) and for each file openend by \write#3]. A mapping is retrieved using this rule: The deepest element is fetched for which the depth does not exceed the level. The most visible element (which is the element first occurring in the \special#1 invocation) has depth 1.

The presence of different levels comes in handy e.g. when the troff device is used. In some contexts, the double quote is a special character in troff (and a printable quote is then mysteriously represented by two consecutive double quotes), in most contexts it is not. This is combatted by including these two specifications in the \special#1 call preparing for troff output (note that 34 is the ASCII value representing the double quote):

\special{ ... {34}{"} {34}{""} {92}{\\e} ... }

The first pair shown simply maps the double quote onto itself, and the second pair maps it onto a double double quote. As long as the special level is 1, the second definition is not used. The backslash (with ASCII value 92) needs only one definition as it is escaped in the same way in all troff contexts.

The special level can be set using the \+ directive, which must be followed immediately by a digit in the range 0-9 enclosed by curly brackets, e.g. \@{\+{2}} will set the special level to 2. The special level can be set to 0 (zero) and this means that no character will be mapped.

Example Double quotes need to be escaped in certain troff contexts. This is achieved by the following.

\@{\+{2}"} ... funny quote context ... \@{"\+{1}}

Such a context is typically encapsulated by a macro defined in a package; its definition should never be visibile to the user of the package. Note that the double quotes embedded in at scope in the example above are not susceptible to special mapping — mapping is only applied in plain scope.

The third kind of device scope strings are those mapped to by the \constant#1 primitive. An example of (toy) usage is this:

\constant{ {'e} {&eacute;} \: Use e.g. as \*{'e}l\*{`e}ve (élève) {(c)} {&copy;} \: Use e.g. as \*{(c)} DEEDEE (© DEEDEE) {+-} {&plusmn;} \: Use e.g. as \*{+-} a few (± a few) }

This is largely convenient syntactic sugar. These constants could also have been defined as

\def{"'e"}{\@{&eacute;}} \def{"(c)"}{\@{&copy;}} \def{"+-"}{\@{&plusmn;}}

The idea is that the \*{..} namespace is used for glyph-like device-specific bindings, whereas the \".." namespace is used for semantic purposes that are device-independent, but nothing prohibits you from fiddling with this.

Zoem provides a shorthand for entering SGML-style tags. It is checked by zoem for well-formedness of the resulting SGML code, and it can be freely mixed with other modes of entering tags. Normally you would have to enter SGML-style tags in device scope, or write a macro for doing that. For example, a macro x#2 that expands \x{b}{be bold} to \@{<b>}be bold\@{</b>} is a likely candidate. However, this would be inelegant for constructions that span a long distance, and it does not provide for letting zoem expressions expand within an xml tag.

Zoem provides the \< token. It can be used in several ways:

\<foo> \: foo can be an expression. Some <content> \: of course, expressions may occur here as well. over here. \<bar>{zut} \: bar can be an expression too; \: this syntax will close itself. Some <content> \: again, expressions may occur here as well. over there. \<> \: this is a closing tag for the first foo. \</foo> works too. \<tim x=y/> \: zoem knows this closes itself. \<*br> \: zoem converts this to <br>

Suppose that foo, bar, and zut are zoem expressions expanding to strings FOO, BAR, and ZUT respectively (FOO and BAR might be of the form tag a="b" c="d"). Provided that the characters <, >, and & are automatically mapped in plain scope (as a result of correct \special#1 usage), the above will result in

<FOO> Some &lt;content&gt; over here. <BAR> ZUT </BAR> Some &lt;content&gt; over there. </FOO> <tim x=y/> <br>

The foo part inside the \<foo> syntax should never expand to something containing a >. This is entirely the responsibility of the user or macro package author.

Both kinds of syntax, \<foo> and \<bar>{zut}, are kept as they are during the expansion stage, and they can be subjected to multiple levels of expansion (which may be the case if such syntax is used inside e.g. \setx#2 or \apply#2). It is only at the output stage that the syntax is transformed to actual SGML code and that well-formedness is checked. So, the two examples just seen will first transform to \<FOO> and \<BAR>{ZUT} (please note that foo, bar, and zut all denote expressions here). If they are at that point no longer subject to expansion they enter the output stage where they are converted to <FOO> and <BAR>ZUT</BAR> (plus some additional formatting/indenting) respectively.

Zoem pushes on a stack of opening tags whenever it encounters \<foo> syntax during the output stage. It naturally knows that a tag can be followed by attributes. It also knows that a tag such as \<tag a=b/> closes itself (XML syntax), and the applies for DTD tags such as \<!ENTITY ...>. As a special case, \<*tag foo bar zut> is converted to <tag foo bar zut> to allow encoding of HTML tags such as <meta>, <link>, and <hr>. This syntax is mandatory for tags that will not be closed. Note that you should only use \<p> if you are going to use \</p> or \<> as well (because zoem requires closing tags for opening tags). That said, the syntax \<p>{ paragraph content } is preferable in most cases.

Zoem does not know about other ways of entering tags, so \@{<body>} would not affect the stack just mentioned. \<> automatically closes the top level opening tag from the stack. Again, syntax such as \@{</body>} does not interact with the stack.

It is possible to explicitly close a tag by simply using \</foo> syntax. Zoem will check whether the closing tag matches the top level opening tag. As seen before, \<> does the same thing, but rather than doing a check, zoem will use the top level opening tag to construct the corresponding closing tag.

Several keys take another key as argument, e.g. they store a value in a second key or check whether the second key exists. The full list of these meta keys is \def#2, \defx#2, \set#2, \setx#2, \undef#1, \defined#2, \apply#2, and \inspect#4. In all cases, the argument key is passed as the first argument, by means of the key signature.

For a key \key taking k (k>0) arguments its signature is key#k. The signature of a key \key taking no arguments is simply key. The rule is: Key usage always includes a single leading backslash (this activates the key). When a key is subject of inspection, it is always referred to by its signature.

Throughout this text, a key with signature key#k is mentioned by means of its key mention \key#k, that is, for extra clarity the backslash is prepended to the signature.

As explained in Primitives, built-ins and user macros, almost all primitives can be specified using quote syntax. The quote syntax is integrated with signatures. This means that primitives that expect a signature (such as \def#2, \undef#1, and \apply#2) accept quoted signatures too when the signature refers to a primitive.

A single underscore introduces an anonymous key. It is optionally followed by a #k tag (for k in 1..9), denoting the number of arguments the anonymous key takes. An occurrence of the latter is called a tagged anonymous key. The first argument to the key should be a key definition, the other arguments are the arguments for that key definition. If a tag is present, it is used for verifying that the anonymous key is used properly.

\_{\1 the \2}{row}{boat} \_#2{\1 the \2}{row}{boat}

results in

row the boat row the boat

Anonymous keys may occur in the first argument of \apply#2, within the first argument of \inspect#4, and they may occur freely in running text. The presence of a tag is required when an anonymous key is used within either of \apply#2 and \inspect#4. An example of usage in \apply#2:

\apply{_#2{\1 kisses \2\|}}{{bill}{max}{max}{bill}} bill kisses max max kisses bill

or even

\set{%foo}{{{\1 hugs \2\|}}} \apply{_#2\%{foo}}{{bill}{max}{max}{bill}} bill hugs max max hugs bill

Note that in order to store a block with \set#2, an extra pair of curlies has to be used, as blocks can only be passed as a sub-argument of a single-element vararg. Also note that in a vararg it is allowed to put white space inbetween the constituting elements.

Data can be organized in a global tree with a specialized use of \set#2 and its siblings, as shown further below. The data is retrieved from the tree using so called data keys. Such a key is started using a percent sign, immediately followed by zero, one, or more blocks, e.g. \%, \%{..}, and \%{...}{...}{...} would all be allowable invocations. If more than one block follows the percent sign, there must be no interleaving white space.

The underlying primitive has signature %#1, as the trailing scopes are congregated into a single argument before they are further processed. The two sibling primitives %free#1 and %dump#1 serve for freeing and dumping parts or whole of the tree, as described further below.

When applied to data keys, \set#2 and its siblings set one or more values in a global multi-dimensional associative array that we shall refer to here as ROOT. Please note that ROOT is for explanatory purposes only. This associative array is best viewed as a tree, in which every node can have branches to higher nodes. A node may or may not contain a value. Let us denote the value contained by a node some-node as *(some-node). The fact that beta is a node one branch higher than alpha, which is in turn one branch higher than ROOT, is denoted as ROOT->"alpha"->"beta". In this path notation, strings indexing nodes in the trees are written inbetween quotes. This has the advantage that the empty string, which is a valid index string, has the representation "". Combining these conventions, we write the value associated with beta as *(ROOT->"alpha"->"beta"). Consider these examples.

\set{%{foo}{bar}{zut}}{lez} \: now *(ROOT->"foo"->"bar"->"zut") is "lez" \set{%{foo}{bar}{zut}}{{a}{b}{x}{y}} \: now *(ROOT->"foo"->"bar"->"zut"->"a") is "b" \: and *(ROOT->"foo"->"bar"->"zut"->"x") is "y" \: and *(ROOT->"foo"->"bar"->"zut") still is "lez" \: some special cases \set{%{foo}{bar}{zut}}{{{c}}} \: now *(ROOT->"foo"->"bar"->"zut") is "{c}" \set{%{foo}{bar}{zut}}{{c}} \: now *(ROOT->"foo"->"bar"->"zut") is "c" \set{%{foo}{bar}{zut}}{c} \: now *(ROOT->"foo"->"bar"->"zut") is "c" \set{{foo}{bar}{zut}}{{c}{d}{e}} \: This does nothing, because the second argument \: must either be an *even* vararg, a 1-element vararg, \: or a simple argument. \set{%{{tiger}}}{in the woods} \: now *(ROOT->"{tiger}") is "in the woods" \set{%{tiger}}{in the woods} \: now *(ROOT->"tiger") is "in the woods" \set{%tiger}{on the loose} \: now *(ROOT->"tiger") is "on the loose" \: stripping curlies from a vararg with one argument \: does not make a difference with the exception of \: the case shown below. \set{%{}}{empty} \: now *(ROOT->"") is "empty". \set{%}{root} \: now *(ROOT) is "root".

Take note of the rule governing the second argument. If the first non-white space character is a left curly, \set#2 expects a vararg. The vararg must either be even or it must contain exactly one argument.

An even vararg is interpreted as a sequence of key-value pairs. Each key induces a new branch from the node specified in the first argument, and each value is associated with the node at the end of that branch. If the vararg contains exactly one argument, that argument is simply used as a value. This is the only way to specify a block as the value. If the first non-white space character is not a curly, \set#2 will simply interpret the second argument as a value to append to the node specified in the first argument. It is possible to sidestep these issues by using \set#3 and the directive u as argument to the modes key. This will cause the value to be copied without further interpretation as a vararg or block.

If you want the data to be stored to be expanded before it is bound, use \setx#2 or \defx#2.

Data is retrieved simply by prefixing the path with the \% token. Example:

\set{%{foo}{bar}{zut}}{{a}{b}{x}{y}} \%{foo}{bar}{zut}{a} \%{foo}{bar}{zut}{x}

will print b and y. If the path is not an existing path in the current tree it will simply be ignored, although an error message will be emitted.

Whole or part of the data tree can be freed using the \%free primitive. Again, simply append the access sequence in which you are interested. For freeing the entire tree, use \%free without trailing scopes. The \%free primitive largely exists for testing purposes to ensure that zoem gets its internal data manipulation right.

Whole or part of the data tree can be output for debugging purposes using the \%dump primitive. Simply append the access sequence in which you are interested. For printing the entire tree, use \%dump without trailing scopes. This can be used for debugging if your data manipulation does not work out as expected. There is no result text as far as usual processing is concerned. The underlying primitive dumps its findings to STDOUT in a line-based textual representation of the data-tree.

A block is a string beginning with a left curly and ending with a right curly, the curlies being balanced. This is a convenient naming convention. Blocks can be used in constructing anonymous keys; refer to the Anonymous keys section.

Some keys take a vararg argument, which is a single argument (enclosed by curlies as are all arguments), which can contain any number of sub-arguments, that is, a list consisting of blocks. Inbetween the blocks white space may occur. The \special#1 and \constant#1 keys both take a single vararg argument, and the \apply#2 and \switch#2 keys each take a vararg as their second argument. For \apply#2 the first argument is a key that is applied to subsequent batches of arguments from that vararg. The \table#5 primitive takes a vararg as its last argument. For examples, see the A zoem tour section and the \apply#2 entry.

An even vararg is a vararg with an even number of elements, An odd vararg is a vararg with an odd number of elements.

User keys may check whether an argument is a vararg by employing the \nargs#1 primitve. This can be used to take different actions depending on the structure of the argument.

This is a compact listing of session keys, created by issuing zoem -l session.

Predefined session variables \$__args__ (local to env) key/value pairs given to \begin#2 \$__xargs__ (local to env) key/value pairs given to \begin#2, expanded \__device__ name of device (given by -d) \__fnbase__ base name of entry file (given by -i/-I) \__fnentry__ name of entry file (given by -i/-I) \__fnin__ name of current input file \__fnout__ name of current output file \__fnpath__ path component of entry file (given by -i/-I) \__fnwrite__ arg1 to \write#3, accessible in arg3 scope \__lc__ expands to a left curly (only for magic) \__line__ index of current input line \__parmode__ paragraph slurping mode for interactive sessions \__rc__ expands to a right curly (only for magic) \__searchpath__ search path for macro packages (e.g. man.zmm) \__split__ user space toggle for chapter mode indicator \__sysval__ exit status of last system command \__version__ version of zoem, formatted as e.g. 2003, 2004-010 \__zoemput__ result text of last \try#1 key \__zoemstat__ status of last \try#1 key

This manual is littered with examples of the usage of \__device__. The \__fnbase__ key is useful for creating sibling files of the entry file, i.e. a table of contents file or a file containing reference information. I have the habit of naming those \__fnbase__.zmt and \__fnbase__.zmr, respectively. The \__fnin__ key is useful for emitting log, warning, or error messages particular to the file currently being parsed. The \__parmode__ macro affects the way in which zoem reads chunks in interactive mode (refer to Section Invoking zoem from the command line). The \__searchpath__ macro is one of the ways in which zoem can be instructed to search for files in a set of locations, when confronted with \dofile#2 or one of its built-in aliases. Section File search path has more information about the mechanism of file location. See also the zoem manual.

This is the result from doing zoem -l builtin:

Built-in aliases done maps to \'throw{done} ifdef#3 maps to \'if{\defined{\1}{\2}}{\3}{} ifdef#4 maps to \'if{\defined{\1}{\2}}{\3}{\4} input#1 maps to \'dofile{\1}{!+} import#1 maps to \'dofile{\1}{!-} read#1 maps to \'dofile{\1}{?+} load#1 maps to \'dofile{\1}{?-} begin#1 maps to \'begin{\1}{} env#3 maps to \'env{\1}{}{\2}{\3} system#2 maps to \'system{\1}{\2}{} system#1 maps to \'system{\1}{}{} throw#1 maps to \'throw{\1}{} inform#1 maps to \'write{stderr}{device}{\1\@{\N}} append#2 maps to \'set{{modes}{a}}{\1}{\2} appendx#2 maps to \'set{{modes}{ax}}{\1}{\2} seq#4 maps to \'set{\1}{\2}\'while{\'let{\'get{''}{\1}<\3}}{\4\'setx{\1}{\'let{\'get{''}{\1}+1}}} update#2 maps to \'set{{modes}{e}}{\1}{\2} updatex#2 maps to \'set{{modes}{ex}}{\1}{\2} "" maps to (nothing) ""#1 maps to (nothing) group#1 maps to \1 PI maps to 3.1415926536 E maps to 2.71828182846 $#1 maps to \'switch{\__device__}{\1} $#3 maps to \'switch{\__device__}{{\1}{\2}{\3}}

By default, when using \def#2 and \set#2, keys and their values are put in a global user dictionary. It could be useful to shadow keys by entering a new name scope. Zoem facilitates this by providing the \push#1 and \pop#1 keys. These push and pop a new dictionary onto/from the user dictionary stack.

A second dictionary stack is the dollar dictionary stack, which contains all keys that start with a dollar sign. The \begin#2 primitive pushes a dollar dictionary each time it is invoked, and that dictionary is popped by the corresponding \end#1 invocation. This is typically useful for creating nested environments that need access to the same type of information - by storing such information in dollar keys, it can be shadowed and recovered. Refer to the \begin#2 entry.

When a key is used its definition is searched in all dictionaries, starting from the top-level dictionary. The key \undef#1 has only access to the top-level dictionary, and will never delete a key in any other dictionary.

What follows is an informal tour through zoem's offerings. The next section contains a comprehensive overview of the zoem primitives.

Let us start with how filtering in plain space is configured. The following was obtained from the PUD man macros.

\switch{\__device__}{ {html}{ \special{ {38} {&amp;} {60} {&lt;} {62} {&gt;} {-1} {&nbsp;} \: the zoem escape \~ {-2} {<br>\!N} \: the zoem escape \| {-3} {-} \: the zoem escape \- } } {roff}{ \special{ {46} {\\.} {96} {\\`} {92} {\\\\} \: a single backslash {-1} {\\ } \: the zoem escape \~ {-2} {\!N.br\!N} \: the zoem escape \| {-3} {\\-} \: the zoem escape \- } } {\write{stderr}{txt}{No such device: \__device__\|} \write{\__fnbase__.err}{txt}{No such device: \__device__\|} \exit } }

Take note of the number of backslashes. In order to print a backslash in troff, the troff input must contain two consecutive backslashes. In order to specify a backslash in zoem, we must also provide two, thus we need four backslashes in all (in order to create this example I needed eight backslashes in the zoem input).

Also note the use of the \switch#2 primitive, which takes an expression in the first argument and an arbitrary number of pairs plus an optional clause in the second argument. The optional clause was in this case used as a failure test.

\special#1 is an example of a zoem key taking an argument that may contain arbitrarily many sub-arguments (i.e. a vararg). In this particular case the sub-arguments must be paired, each pair defining how certain characters that are special to the device must be represented.

The \write#3 and \exit need little comment, they work as expected. Zoem opens output files as needed, and closes them when it is done. The file name - is equivalent to either STDOUT or STDIN (depending on context), the file name stderr denotes STDERR.

\exit is considered a failure (and will cause zoem to stop and complain), but \throw{done} is not. \throw#2 with argument done will merely quit parsing the current stack, so if you specify it at top level in a file — not nested in a key that does its own parsing such as \setx#2, zoem will stop parsing the current file and transfer control back to the file from which it was included.

The previous example introduces the keys \__device__ and \__fnbase__. They are so called session variables described in section Session keys.

A sibling primitive to \special#1 is \constant#1. The following is an example of use.

\constant{ {'e} {&eacute;} \: Use e.g. as \*{'e}l\*{`e}ve (élève) {(c)} {&copy;} \: Use e.g. as \*{(c)} DEEDEE (© DEEDEE) {+-} {&plusmn;} \: Use e.g. as \*{+-} a few (± a few) }

The main thing to note here is that the target string (e.g. &eacute;) is always interpreted in device space. In the reference string (e.g. 'e, (c) and +- in the example above) almost anything is allowed, including backslash-escaped characters and balanced curlies. The latter are not recommended though.

There are three zoem tokens representing the characters that have meaning to zoem syntax, the backslash and the two curlies. Those zoem tokens are just like any other plain characters: they can be mapped in plain space, and they are printed literally in device space.

\\ \: A backslash; possibly mapped in plain space. \{ \: A curly; possibly mapped in plain space. \} \: A curly; possibly mapped in plain space. \, \: The atomic separator (vanishes).

These tokens are mapped only during the (final) filter stage. The atomic separator can be useful when you want to glue together items some of which will be the result of macro expansion.

\def{foo}{bar} \foo\,1 \: \foo1 would be the key \foo1

This will result in bar1. The tokens \\, \{, and \} are really the corresponding ordinary characters. They can be mapped in plain space via \special#1 using their ASCII values 92, 123, and 125 as was seen above for the backslash. In device space, they will result in \, {, and }.

Let us now continue with device scope by implementing a \bf#1 key. Below you find two possible definitions:

\def{bf}{1}{\@{<b>} \1 \@{</b>}} \: OK \def{bf}{1}{\@{<b> \1 </b>}} \: Wrong! Wrong!

The second is wrong because the contents of \1 end up in device space. If the expansion of \1 still contains keys they will not be expanded (and cause a fatal syntax error when device space is filtered), and additionally any special characters in \1 will not be mapped.

\! \!#1 \$#2 \apply#2 \begin#2 \catch#2 \cmp#3 \constant#1 \def#2 \defx#2 \defined#2 \dofile#2 \dowhile#2 \__env__#1 \end#1 \env#4 \eqt#3 \branch#1 \eval#1 \exit \f#2 \f#3 \fv#2 \finsert#1 \format#2 \formatted#1 \get#2 \if#3 \inspect#4 \length#1 \let#1 \nargs#1 \pop#1 \protect#1 \push#1 \register#2 \set#2 \setx#2 \set#3 \special#1 \switch#2 \system#3 \table#5 \textmap#2 \throw#2 \tr#2 \trace#1 \try#1 \undef#1 \vanish#1 \while#2 \whilst#2 \write#3 \writeto#1 \zinsert#1

This is an overlapping categorization in topics.

Using and inspecting keys
\apply#2 \constant#1 \def#2 \defined#2 \defx#2 \inspect#4 \pop#1 \push#1 \set#2 \setx#2 \table#5 \undef#1

These primitives affect or use either user keys that are stored in the user dictionary, dollar keys that are stored in the dollar dictionary, or anonymous keys. Dictionaries are discussed in Section 6.7.

Control, booleans, testing and comparison
Expansion, delay
Meta-zoem, introspection, exceptions, errors
Execution, tracing
Input/output
Filtering
Environment scopes
Name scopes
Data storage
\%, \%free, and \%dump are primitives described elsewhere — refer to the Tree data section.
String conversions
Arithmetic
Glyphs
Syntactic sugar

Zoem primitives may expand (which is the same as evaluate) one, several, or all of their arguments before using them. Such arguments are enclosed by double angle brackets in the listing below. The inside-out type evaluation is done recursively and works for arbitrary levels of nesting. An argument which is first expanded and is then interpreted as a label is thus written <label> in the primary entry. In the definition text accompanying the entry, the expanded argument is simply refered to as <label>, so the extra pair of brackets is dropped.

Each primitive below has a little paragraph with the caption Result text. It gives a summary of 'what comes out'. Note that the result of macro expansion is always passed to the parser again, so the result text is again subject to expansion.

These are special. Refer to section SGML/HTML/XML syntactic sugar cubes. The angle brackets are part of the syntax, do not confuse them with the angle brackets used below to enclose arguments. These primitives are respectively used as \<*any*> and \<*any*>{*any*}, so the positioning of arguments is different from all other zoem primitives.
\!
This primitive is triggered by an active backslash followed by a consecutive run of exclamation marks, which is not followed by an opening curly. The sequence is called a delay sequence, and its arity is the count of backslashes. A single exclamation mark is stripped (i.e. the arity is decremented) and the sequence is no longer subject to the current expansion stage. It is used to construct valid zoem input, which is usually redirected to file with the copy filter, stored using \setx#2, or used in nested occurrences of \apply#2, \inspect#4, and other primitives. Other uses are possible, the main thing is that one should keep a clear view of the meta-programming implied by \!. Refer also to the \eval#1 primitive.

Example The primitive \eval#1 evaluates its argument a single time, and passes it on for further evaluation. The following are fully equivalent:

\set{foo}{zut} \eval{\!foo} \foo

whereas \!foo would pass the sequence \foo to the filtering stage, where it will yield a (non-fatal) error message. Similarly, \eval{\eval{\!!foo}} is equivalent to the above.

Result text A delay sequence of decremented arity.

\!#1:  \!{<any>}

This primitive is triggered by an active backslash followed by a consecutive run of exclamation marks, which is in turn followed by a block. The block is called a delay scope. The arity of the delay scope is the count of backslashes found in the run. A single exclamation mark is stripped (i.e. the arity is decremented); if no further exclamation marks remain (i.e. the arity becomes zero) then the introducing backslash and the delimiting curlies are stripped as well. The result (including the contents of the block) is passed on and is no longer subject to the current expansion stage. The same observations hold as those made for the previous entry. Refer also to the \eval#1 primitive.

Additionally, blocks that are protected by the delay primitive will be skipped during parameter interpolation.

Result text <any>, if the arity of the delay scope just found was equal to one, otherwise, <any> put in a decremented delay scope. <any> will in both case no longer be subject to the current expansion stage.

\$#2:  \${<str>}{<any>}
This is a shortcut for activating output for a particular device. If \__device__ expands to <str>, <any> is passed on for expansion, otherwise it is ignored. The following two are equivalent:
\${html}{Seen only in the html device} \if{\cmp{eq}{\__device__}{html}}{Seen only in the html device}{}

Result text Either none or <any>.

\apply#2:  \apply{<<key-sig|anon-key>>}{<<vararg>>}

The first argument is expanded before use. It should expand either to the signature of a user key, primitive or builtin taking arguments, or to a tagged anonymous key. Examples of the first are foo#k and "bar::baz"#k, the latter takes the form _#k{..}. If you use an anonymous key containing macro sequences, be sure to escape whole or part of the anonymous key, depending on your needs. The expansion of _#2\!{{<any>}} for example, will result in _#2{<any>}. Primitives can used in both quoted and regular syntax.

The second argument should result in a vararg. \apply#2 extracts k elements at a time from <vararg>, and applies the key resulting from the first argument to each vector of k elements successively. Any elements remaining in <vararg> are ignored.

Result text Entirely depending on the key specified in the first argument.

\begin#2:  \begin{<label>}{<<vararg>>}

\begin#2 pushes a new dictionary onto the dollar dictionary stack which is popped by the matching \end#1.

\begin#1 is an alias which invokes \begin#2 with an empty <vararg> argument.

\begin#2 pushes the begin expression associated with <label> via \env#4. The <label> part is not expanded. The second argument <vararg> consists of consecutive scopes denoting key-value pairs. It is expanded before use and is allowed to be empty. The keys (which are the odd-numbered scopes, starting with one) in <vararg> must be such that prepending a dollar sign ($) to them yields a valid key signature. That signature will be used to set a dollar key in the newly pushed dollar dictionary that expands to the value part associated with the key (specified as the consecutive even-numbered scope in <vararg>). Alternatively, since the 07-333 release, it is also possible to explicitly include the dollar sign in the keys rather than having them prepended.

The \env#4 invocation that defines the environment likely sets defaults for the dollar keys (via the second argument of \env#4) that can be set as described above.

The pushing of a dictionary provides a means for shadowing and localization with nested \begin#2 statements. By associating dollar keys with an environment, these keys can be given different meanings in nested environments - the previous meaning will be restored once an environment is closed. The advantages are that the environment does not have to exercise \push#1 and \pop#1 itself, that the user dictionary stack is not unnecessarily extended (saving look-up time), and that the 'dollar' look of a key such as \$align signals that it will automagically work in nested enviroments. Of course, the latter is still the responsibility of the author of the environment.

Result text The string associated with <label> via \env#4.

Example I The zoem faq macros define a faqsec environment, for which two additional arguments are required. It is used for example as

\begin{faqsec}{{ref}{misc}{cap}{Miscellaneous questions}} ... \end{faqsec}

The ref key introduces the label, the cap key introduces the caption.

Example II The itemize environment in the zoem generic package allows one additional and optional argument. This argument, if present, must contain a vararg, and is used to set options related to the itemize environment. It is used for example as

\begin{itemize}{ {interitem}{0} {flow}{compact} {mark}{\*{itembullet}} {align}{right} } ... \end{itemize}

Internally, the itemize environment maps these options to dollar keys. Because a unique dollar dictionary is associated with each environment, this makes it possible for nested itemize instances to have separate namespaces.

Result text The (unexpanded) string stored in the third argument of the corresponding \env#4 invocation.

\catch#2:  \catch{<type>}{<any>}

This will process <any>. Depending on <type> the result is accepted as succesful. If <type> is towel, any occurrence of \throw{towel} in <any> is caught, and the truncated result is further processed. For towel, zoem errors are not caught but cascade/escalate further down/up. If <type> is error, any error in <any> is caught, and the truncated result is further processed. If <type> is done, no exception is accepted. It is possible though to use throw{done{..}} which will stop processing without generating an exception. See also \throw#2.

Output will be truncated in case an error or exception was caught. The status, currently one of done, towel, or error, is written in the session macro \__zoemstat__.

Result text The possibly truncated result of expanding <any> in case of a caught exception or error, else the full result.

\cmp#3:  \cmp{<str>}{<<any>>}{<<any>>}

The last two arguments are expanded. Their results are compared as strings. The first argument must be one of the labels lt|lq|eq|gq|gt|ne|cp. In case it equals one of the six labels lt|lq|eq|gq|gt|ne, this primitive puts in place the associated boolean as a string (i.e. either 0 or 1). In case the label equals cp, it puts in place the result of the string compare (as a string), namely one of -1, 0, or 1.

Result text Either the string enconding of a boolean (0 or 1) or the string encoding of the ternary value resulting from a string compare (-1 or 0 or 1).

\constant#1:  \constant{<vararg>}

<vararg> must have an even number of arguments. These are interpreted as pairs. The first of each pair must enclose a string that does not contain any of the characters *, \, {, or }, say string <keystr>. The second encloses a string that will be interpreted in device space, say string <valstr>. When a sequence \*{<keystr>} is encountered, it is interpreted as \@{<valstr>}. This is done at filter time only, the sequence is skipped during macro expansion. It is not allowed to use a sequence \*{<keystr>} in device scope, e.g. \@{\*{<keystr>} is illegal. For further information see section Device scope.

Result textNone.

\def#2:  \def{<key-sig|data-seq>}{<any>}

Bind second argument to the key or access sequence in the first argument. This primitive will complain if a binding exists already, but it will overwrite the previous binding and continue anyway. Use \set#2 if you do no want to be warned for overwriting. Examples of usage:

\def{foo}{FOO} \def{foo#1}{The FOO of \1} \def{foo#2}{The FOO of \1 and \2} \def{$foo#2}{The $FOO of \1 and \2} \def{"foo::oof"#3}{\foo{\1}{\2}\foo{\2}{\3}}

These examples are all of type key-sig. See the Tree data section for examples of type data-seq (this pertains to multi-dimensional data storage). See the Macro expansion section for the forms that keys may take. A key signature is the name of a key with appended to it the number of argument that the key takes, if any. If the key takes no arguments, than the key signature is identical to the key name.

If you want the value to be bound to be expanded before binding it, use either \defx#2 or \setx#2. This works the same for data keys.

Result textNone.

See also\set#3.

\defx#2:  \defx{<key-sig>}{<<any>>}

The second argument is expanded and stored in the key <key-name>. This primitive will complain if a binding for that key exists already, but it will overwrite the previous value anyway.

Result textNone.

See also\set#3.

\defined#2:  \defined{<type>}{<<access>>}

<type> is one string of key, lkey, data, primitive, builtin, zoem or ENV. The second argument is expanded before use. For the type key, the <access> argument is looked up as a key signature in either the user dictionary stack or the dollar dictionary stack. For the type lkey, it is looked up only in the top level dictionary. For the type data, the <access> argument is interpreted as a data access sequence. For the type primitive, the <access> argument is looked up in the zoem primitive table. For the type builtin, the <access> argument is looked up in the zoem builtin macro table. The type zoem corresponds with the union of the types primitive and alias. For the type ENV, it is checked whether it exists as an environment variable (which can be retrieved using the \__env__#1 primitive). This primitive pushes the string 1 if the result is indeed a valid reference, it pushes the string 0 otherwise.

Result textThe string encoding of a boolean (0 or 1).

\dofile#2:  \dofile{<<file name>>}{<char[!?]><char[+-]>}

Open a file and process its contents while keeping track of line numbers. Depending on the second argument, absence of the file is either allowed or not, and its interpreted contents are output or not. The fact that <file name> is first expanded allows you to specify file names such as \__fnbase__.zyx.

Zoem may search for a file in several locations until it is found. The process of locating a file is described in section File search path.

When found, the file is opened according to the specification in the second argument. This argument must contain exactly two characters, the first one of [!?], the second one of [+-]. The first character indicates whether the file is allowed to be absent. A '!' implies that absence is fatal, a '?' permits absence. The latter is useful e.g. when creating a Table Of Contents file. The second character indicates whether the interpreted file should be filtered and output or not ('+' for yes and '-' for no). Macro packages typically need interpretation only, whereas concatenation of document parts (c.q. chapters) stored in different files requires that the interpreted content is also filtered and output. The following aliases are available:

\input{fname} \dofile{fname}{!+} \import{fname} \dofile{fname}{!-} \read{fname} \dofile{fname}{?+} \load{fname} \dofile{fname}{?-}

The contents of <file name> cannot be captured. If you need to capture the contents of a file, use \finsert#1 or \zinsert#1.

Result text Technically none. Of course the processing of <file name> may result in output, depending on the mode of opening. However, this result text cannot be captured. For example,

\setx{foo}{\dofile{bar}{!+}}

will result in the file <bar> being processed and output via the standard output mechanisms, while the key \foo will have the empty string as value.

\dowhile#2:  \dowhile{<any>}{<condition>}

<any> is expanded and concatenated to the result text until <condition> exands to something that is nonzero when interpreted as an integer. <any> is expanded at least one time.

\__env__#1:  \__env__{<name>}

Looks up <name> in the environment.

Result text The corresponding value if <name> exists in the environment, the empty string otherwise.

Note This primitive yields identical results for names not in the environment and names in the environment for which the value is empty. Use \defined#2 to check whether <name> exist.

\end#1:  \end{<label>}

Expands the end definition associated with <label> via \env#4.

Result text The string associated with <label> via \env#4.

\env#4:  \env{<label>}{<<any1>>}{<any2>}{<any3>}

Stores expanded <any1> and unexpanded <any2> for later use with \begin#2 (when given argument <label>) and unexpanded <any3> for later use with \end#1 (when given argument <label>).

<any1> may contain a vararg denoting key-value pairs. These will be set for each \begin#2 invocation in the corresponding dollar dictionary. It provides a convenient mechanism to set default values for keys that can be passed in the second argument of \begin#2. Note that keys are passed as regular macro signatures, but they are then transformed to dollar keys by prepending a dollar sign. Environments are tighly linked to the dollar dictionary stack. Read more about this in the description of \begin#2.

With each \begin#2 invocation, after <any1> is processed as indicated above, <any2> will be pushed onto the input stream. Before this, \begin#2 defines the keys \$__args__ and \$__xargs__. These contain respectively the vararg that was passed as the second argument of \begin#2 and the same vararg after it was expanded. These keys can be used in <any2>. One possible usage is to pass the key-values on to other environment invocations. This is a likely scenario in case one environment is a thin customization wrapper around a full-fledged base environment.

Result textNone.

\eqt#3:  \eqt{<str>}{<<num1>>}{<<num2>>}

The last two arguments are expanded. Their results are compared as numbers. The first argument must be one of the labels lt|lq|eq|gq|gt|ne|cp. In case it equals one of the six labels lt|lq|eq|gq|gt|ne, this primitive pushes the associated boolean as a string (i.e. either 0 or 1). In case the label equals cp, this primitive pushes the result of the integer compare, namely one of -1 (if the result of <any1> is smaller than the result of <any2>), 0 (equal to), or 1 (greater than).

Result text Either the string enconding of a boolean (0 or 1) or the string encoding of the ternary value resulting from a numeric compare, (-1 or 0 or 1).

\branch#1:  \branch{<<vararg>>}

Two arguments are successively taken from <vararg>. The first is expanded and then evaluated as an integer. If the integer is nonzero, the second argument is expanded and everything else is ignored. Otherwise the procedure is repeated. If no (odd) argument matches, and the <vararg> has an odd number of arguments, the last argument is put in place. It can be considered a default, else, or failure clause.

\eval#1:  \eval{<<any>>}

Expands <any> and passes it on for further evaluation. This can come in handy when complicated requirements demand zoem acrobatics. This primitive used to be implemented as a macro; it is fully equivalent to

\set{eval#1}{\apply{_#1{\!1}}{\1}}

The above macro works as follows. First, \apply#2 expands both of its arguments. The second argument is the data it received from \eval, i.e. the latter's single argument. At this stage, the data is thus expanded for the first time. \apply#2 also expands its first argument. The sequence \!1 is contracted to the sequence \1. The \1 needed by \apply#2 needs to be protected by the interpolation that occurs when eval#1's argument is interpolated. Expansion of \apply#2's first argument thus yields the anonymous key _#1{\1} — a key that simply copies it argument and passes it on for further expansion.

Example \foo and \eval{\!foo} are fully equivalent. \!foo on the other hand, expands to \foo and is then passed to the filter stage.

See also \!, \!#1.

Result text <any> gone through two stages of interpretation.

\exit

goodbye world. This is a disgraceful exit for use when some error test presumably yields true. See also \throw#2.

Result textNone.

\f#2:  \f{<fun>}{<<num1>>}

Expand the last argument, interprets the result as a number, applies the operand specified by <fun>, and puts the result in place. <fun> can be one of

floor, ceil, round, abs, sign, inc, dec, not, drand, irand, and that's about it. Mode \f{drand}{<num>} yields a floating point number in the range [0-<num>], and mode \f{irand}{<int>} yields an integer in the range [0-<int>), that is, the argument <int> itself is excluded from the range.

For a wider range of mathematical functions, refer to the \let#1 primitive.

Result text The string encoding of a number.

\f#3:  \f{<fun>}{<<num1>>}{<<num2>>}

Expands the last two arguments, interprets the results as numbers, applies the operand specified by <fun>, and puts the result in place.

Most arithmetic is done using floating point arithmetic (with the C double type). Integers are preserved if possible. Since nearly everything is treated as a string in zoem, this simply means that no decimal fraction is printed when the number is output. A number is considered integer if the difference with the integer nearest by is less than the precision (1e-8) and if it can be represented as an integer using the C long type. Otherwise it is output in decimal representation of the underlying floating point representation.

<fun> can be one of

*
Multiplication.
+
Addition.
-
Subtraction.
/
Does true division, returns real.
%
Modulus.
and
Boolean and, results in 0 or 1.
or
Boolean or, results in 0 or 1.
div
Does integer division.
mod
Same as %.
pow
Power.
max
Maximum.
min
Minimum.
ceil
Nearest by higher multiple, e.g. \f{ceil}{12}{5}=15.
floor
Nearest by lower multiple, e.g. \f{floor}{12}{5}=10.

For a wider range of mathematical functions, refer to the \let#1 primitive.

Note and and or short-circuit.

Result text The string encoding of a number.

\fv#2:  \fv{<fun>}{<<vararg>>}

Expands the second argument and interprets it as vararg, and applies the operator specified by <fun> to the elements of vararg.

<fun> can be one of

*
Multiplication.
+
Addition.
and
Boolean and.
or
Boolean or.
max
Maximum.
min
Minimum.

Note and and or short-circuit.

Result text The string encoding of a number.

\finsert#1:  \finsert{<file name>}

The argument is expanded and interpreted as file name. The file is read, and every \, {, and } is escaped (resulting in one of \\, \{, and \}) The altered contents are then put in place. See also \zinsert#1. If file can not be opened, the empty string results.

Note This primitive cannot be used to read inline files whereas \zinsert#1 can. The reason is that inline files have to satisfy zoem syntax. \finsert#1 can be used to read arbitrary data.

Result text The escaped contents of <file name> or the empty string if file can not be opened.

\format#2:  \format{<<fmt>>}{<<vararg>>}

NOTE This primitive was changed in an incompatible way in the 07-333 release. The special case specification syntax was discarded and replaced by the more robust and extensible key-value based syntax described below.

The primitive formats elements from <vararg> according to the format specification in <fmt>. A format string may contain normal characters that will be output, and meta sequences. A meta sequence is started with the percent character % and either followed by a block or by another percent sign. A meta sequence consisting of two consecutive percent signs (%%) will be skipped and result in the output of a single percent sign. Otherwise, the meta sequence will format the next argument from <arg> according to the specification in the block. A specification consists of a series of key-value pairs that may occur in any order. The key is called the directive and the supported directives are:

{padding}{<any>}

The literal string padding is the directive and indicates that the value specifies the padding. The <any> content of the value block is used as the padding string. By default spaces are used for padding (and incidentally runs of spaces will be squashed unless \@{\w} is issued). Padding is applied if the width of the field exceeds the width of <arg> plus the width of the optional delimiter(s) described below.

{delimit}{<delimiter>}[{<delimiter>}]

The content of the first block is inserted inbetween the padding and <arg>. If centered alignment is used, this will be done on both sides. By default no such delimiter is used. It is possible to specify two <delimiter> arguments. In that case the first specifies the left delimiter and the second specifies the right delimiter.

{align}{left|center|right}

The directive is align, the value is one of left, center, or right and specifies how the argument taken from <vararg> is to be aligned.

{width}{<num>}

The directive is width, the value should be a positive integer number denoting the desired width of the field on which <arg> is to be printed.

{length}{{key}[{args}*]}

The directive is length, the value consists of one or more blocks. The first value block should contain the name of a macro. This is for when you want to customize the way in which the length of strings is computed. The macro will be used to compute the lenght of strings under consideration, using entries in the double directive as appropriate (see below). This allows you for example to do alignment in <pre> formatted blocks in html, while keeping the possibility to insert elements that do not take up any width (e.g. links). The first value block should contain the name of a macro. A likely candidate is \length#1, which should be specified simply as length. The first argument that is given to this macro will be the string under consideration. The rest of the value blocks, if any, will be given as additional arguments.

Currently, this custom length computation is only applied to the argument that is being formatted and the two delimiters if present. All three of these can be replaced, for the purpose of length computation, by placeholders using the double directive.

{double}{{[{key}{value}]*}}

The directive is double, the value consists of a single block containing a vararg. This is used to specify placeholders when computing the length of elements. The vararg contains placeholder types as keys and the corresponding placeholder values. It is currently possible to specify three different types of placeholders. These are the argument to be typeset, specified with the placeholder key arg, the left delimiter, specified with delimit-left, and the right delimiter, specified with delimit-right.

NOTE The value is enclosed in a block, as part of the key-value specification employed by the double specification. The value itself is a block containing key-value pairs (again specified as curly-delimited blocks). So be sure to supply the correct number and nesting of blocks.

{alignat}{{<pivot>}{<width>}}

The directive is alignat, the value consists of two blocks. This is used to specify alignment. The content of the first value block is used as the string on which to align. The content of the second block is used as the width on which the first part of <arg> (up to and including the alignment substring) will be right-aligned. If the length specification is used as well, the length macro specified therein will be used to compute the width of the string specified in the first block.

{reuse}{<num>}

This instructs zoem to reuse the current specification for another <num> arguments taken from <vararg>. Instead of <num> it is possible to specify {reuse}{*}. This will reuse the current specification until all arguments have been exhausted.

{border}{{<left>}{<right>}}

This borders the result of the current specification with <left> and <right>. This is useful in conjunction with the reuse specifier, for example for adding device line-breaks to each formatted item.

Example

\format{%{{align}{right}{width}{10}{reuse}{*}{padding}{{'}{}}}}{ {beauty}{lies}{in}{the}{eye}{of}{the}{beholder} }

results in

''''beauty''''''lies''''''''in'''''''the'''''''eye''''''''of'''''''the''beholder

Result text The formatted string.

\formatted#1:  \formatted{<any>}

This removes and adds white space from its arguments via the following rules:

It skips any \@{..} enclosed sequence.

It skips any \<..> enclosed sequence - note that the contents eventually will end up in \@{..} (at) scope.

It removes all spaces, tabs, and newlines it encounters otherwise.

It inspects and (after inspection) removes all \`{..} enclosed sequences it encounters. During inspection, \formatted#1 maps 's' to a space, 't' to a tab, and 'n' to a newline.

If the sequence \`{<} is encountered (not in at scope), \formatted#1 starts copying literally without munging whitespace; it resumes its normal mode of operation after encountering the sequence \`{>}.

This is useful for writing legible macro files while exercising full control over whitespace (modulo Zoem's white space munging rules).

Result text The argument in its unformatted form.

\get#2:  \get{<dict-label>}{<key-sig>}

The user stack is searched from top to bottom for dictionaries with label <dict-label>, and those dictionaries are searched in order for a key with signature <key-sig>. The first succesful match is retrieved and its definition is pushed onto the interpretation stack. It is an error if no such definition is found.

Note The label of the default user dictionary is ''. This ties in with the syntax \''keysig, used to specify the user dictionary stack. So the following:

\set{user}{Jill} \push{foo} \set{user}{Phil} \push{bar} \set{user}{Bill} \get{''}{user} \get{foo}{user} \get{bar}{user}

yields output Jill Phill Bill.

Note It is currently not possible to access keys that take arguments.

Result text The result of processing the retrieved definition.

\if#3:  \if{<<int-expr>>}{<any1>}{<any2>}

The first argument is expanded and interpreted as an integer. If it is nonzero, <any1> is pushed on the interpretation stack and <any2> is ignored, vice versa if it is zero.

Result text Either <any1> or <any2>.

\inspect#4:  \inspect{<<vararg>>}{<<reg>>}{<<any|anon key>>}{<<any>>}

statusExperimental

All arguments are expanded before use. <vararg> currently recognizes a single key mods. The value of mods may contain a comma-separated list of the following directives. Repeated use of mods is allowed.

posix icase dotall iter-lines iter-args match-once discard-nmp discard-nil-out discard-miss count-matches

The posix directive is currently required, specifying that POSIX regular expressions are used. The future might bring other regex syntaxes.

Argument <reg> specifies a (POSIX) regular expression. Before being passed to the match engine, it undergoes UNIX and TILDE tilde replacement as described in the zoem manual.

Consult the POSIX documentation or the regex(7) manual page for a description of posix regexp syntax.

The expansion of <any|anon key> can either result in plain data or in an anonymous key. The expansion of the last argument results in data to which the regex <reg> is successively applied.

Interpolation If the second expansion starts with the pattern _#k{ it is assumed to be an anonymous key. The subpatterns from the matched pattern are interpolated by the key, and the entire matched pattern is substituted by the interpolation. Else, the matched pattern is simply replaced by the expansion.

icase induces case insensitive matching. dotall makes the dot . match any character, including the newline. iter-lines causes matching to be applied to lines shifted from the data (i.e. data is split on newlines). iter-args causes matching to be applied to blocks shifted from the data (which should obviously be a vararg). match-once inspects each element under consideration only once. count-matches replaces the data by the count of matches. In conjunction with iter-lines or iter-args it yields the counts on separate lines and in separate blocks, respectively. discard-nmp discards non-matching parts. discard-miss removes any lines or blocks which are empty after inspect is done with it. discard-nil-out discards any strings or lines or blocks that are empty after matching and optionally interpolation has been applied.

Bugs The GNU implementation of POSIX regexes was at some point known to be buggy for long strings and/or long matches.

A search pattern consisting of a single word boundary or the start-of-string token (^) will match at each position, because after a succesful match \inspect#4 simply resumes searching for a new match by skipping to the end of the previous match (and adding a single position if the match had width zero and offset zero). Similar but not yet noticed bugs may exist.

Nevertheless, this can be a very useful primitive for the occasional odd job, and it should always work except for the cases just mentioned. If you have a complicated instance of \inspect#4, test it first in isolation. Consider sending a bug report in case you find one (a bug, or a bug report).

Result text Depending on the presence of a match and the modifiers given.

\length#1:  \length{<<any>>}

Computes the length of <any> and puts this in place. It takes into account the zoem escape sequences \\, \{, and \}. The future may bring a generalized \length#2 primitive that provides different ways of measuring string length.

Result textThe length of any <any>.

\let#1:  \let{<<let expression>>}

The \let#1 primitive puts zoem in arithmetic mode and the contents are parsed accordingly. All of C's operators are supported including the logical, bitwise, and comparison operators as well as the ternary operator. The operators ** and // are added, which respectively denote exponentiation and integer division. Operations or functions resulting in integers are tracked, and the result will be stored in the integer type used (typically long) if possible. Thus one may find that

\let{2**42} \let{2**22}

respectively result in 4398046511104.0 and 2097152.

The precedence rules used by Zoem are simpler than C's. The respective groups of logical, bitwise, and comparison operators all have identical precedence internally, and associate from left to right.

Most of the ANSI C math functions are supported, with in addition max and min. The functions round, sign, and abs behave slightly different from their C counterparts, as they result in integer results if no overflow occurs.

At any place where an atomic type is expected one is allowed to insert a zoem macro invocation. It will be evaluated and the result will be interpreted as a number. Evaluation will take place in the order as dictated by the precedence rules governing the expression.

The logical operators shortcircuit and the ternary operator evaluates only one of its branches. This can be used to create side effects, such as in

\let{\bar && \group{\set{foo}{zut}1}}

This sets foo only if bar evaluates to a non-zero number. The trailing 1 in the group macro is good practice because \let#1 expects a number to be the result of any macro it encounters. It could have been any other number, or a macro or sequence of macros evaluating to a number. The group macro is a predefined macro that does nothing except passing its arguments. It is necessary in this concocted example because any occurrence of a macro within \let#1 is interpreted as a number by itself. The sequence \bar \bar would for example be syntactically identical to 1 1, which is incorrect.

Result textA number.

\nargs#1:  \nargs{<any>}

The argument is not expanded. It puts in place a number that indicates whether this argument could be parsed as a number of scopes or whether it is a regular argument. The following list of examples illustrates the rules according to which the number is created.

\nargs{{abc}def} : -2 \: neither fish nor fowl \nargs{abc} : -1 \: regular argument \nargs{abc{def}} : -1 \: regular argument too \nargs{} : 0 \: empty vararg (not empty regular arg) \nargs{ } : 0 \: empty vararg again \nargs{{abc}} : 1 \: vararg with 1 argument \nargs{{abc}{def}} : 2 \: vararg with 2 arguments \nargs{ {abc} {def} } : 2 \: vararg with 2 arguments \: etc.

From this it is seen that if the first non-whitespace character is an opening curly the primitive expects to find a number of scopes with nothing inbetween or trailing. If it does not succeed the result text is set to the special value -2.

Result textinteger

\pop#1:  \pop{<label>}

Pops a dictionary from the user dictionary stack pushed earlier by \push#1. The tag <label> must be same as the one supplied by that specific \push#1 invocation.

Result textNone.

\protect#1:  \protect{<<any>>}

The argument is expanded. Subsequently, all backslashes and curlies are escaped. The resulting text is put in place.

Result text <any> with backslashes and curlies escaped.

\push#1:  \push{<label>}

Pushes a new dictionary onto the user dictionary stack with tag <label>. The corresponding \pop#1 should use the same tag. Note that \defined#2 with the lkey directive checks only the top-level dictionary, whereas \defined#2 with the key directive checks the whole stack of dictionaries. Also, \undef#1 only removes a key from the top-level dictionary. There is currently not a way to access keys based on dictionary label.

Result textNone.

Example of usage:

\def{num}{1} \push{foo} \def{num}{2} \push{bar} \def{num}{3} \push{tim} \def{num}{4} \pop{tim} num is \num \pop{bar} num is \num \pop{foo} num is \num

results in

num is 3 num is 2 num is 1
\register#2:  \register{<tag>}{<any>}

Register <any> to be processed at the occassion specified by <tag>. The only <tag> currently supported is END. END registrees are processed only after all regular input has been processed. Multiple \register#2 invocations are allowed. Registrees are processed in the order of registration.

Result text None at time of registering, the result of <any> at time of processing.

\set#2:  \set{<key-sig>}{<any>}

As \def#2 above, except that \set#2 will not complain if the key labeled by <key-sig> already exists.

Result textNone.

See also\set#3.

\setx#2:  \setx{<key-sig>}{<<any>>}

The second argument is expanded and stored in the key <key-name>. Besides simply storing the expansion of an expression, it can also be used to do trickier things as

\def{bar}{klaas} \setx{foo#2}{\bar says \1 and \2} \foo{x}{y} klaas says x and y

If you need lambda-like capabilities, take note that you can use \!k or \!{\k} to construct a positional parameter \k, if you want to interpolate arguments into a key that will later take other arguments. Like this:

\: is there any use for this wacky stuff? \def{lambda#2}{\setx{\1#1}{\2 says \!1}} \lambda{foo}{bar} \foo{moo} bar says moo

Take care: the \dofile#2 key outputs to the default output file. If you need to include the contents of a file within a \setx#2 call, you need to use \finsert#1 or \zinsert#1 in conjunction with \setx#2.

Result textNone.

See also\set#3.

\set#3:  \set{<{modes}{..}{if}{..}{unless}{..}{dict}{..}{start}{..}{width}{..}>}{<key-sig>}{<any>}

This primitive encompasses all of the previous four as well as providing additional modes of operation. The first argument is a vararg storing key-value pairs. The possible keys are modes, if, unless, dict, start and width. All of these are optional.

The <modes> value, if present must be a string over the following characters.

a

append to the key, do not overwrite, create if not existing.

c

conditionally; only set if not already defined.

e

existing; update existing key, possibly in lower dictionary.

g

global; set in the global (bottom) user dictionary.

u

unary; do not interpret vararg in <any> as key-value list (data keys only)

v

vararg; interpret vararg in <any> as key-value list (regular keys only).

w

warn if key exists (like \def#2 and \defx#2).

x

expand argument (like \setx#2 and \defx#2).

The u directive applies when setting data. The v directive applies when setting regular keys. In this case, <key-sig> must be empty, and <any> is treated as a vararg of repeated key-value pairs. Directives can be combined as needed.

Note that keys in the global user dictionary can be accessed even if other dictionaries are pushed using the syntax \''foo.

The if and unless directives can be used to trigger action (i.e. definition of keys) only if the corresponding clause evaluates to non-zero or zero, respectively.

The dict directive must be followed by a dictionary name in the subsequent block. The dictionary stack will be searched for a dictionary with this name. The type of dictionary is derived from the key signature. This is either the dollar dictonary used for the dictionary stack associated with \begin#2 (if the key starts with a dollar sign $), or the default user dictionary.

The start and width directives only work if a single key is set. Their values should evaluate to integers <start> and <width>. The key will be set to its old value with a segment of length <width> starting at offest <start> replaced by <any>. Offsets are zero-based and units are in bytes.

Result textNone.

See also\def#2, \defx#2, \set#2, \setx#2.

\special#1:  \special{<<vararg>>}

<vararg> is expanded before use. It must have an even number of arguments. These are interpreted as pairs. The first of each pair must enclose an integer in the range 0-255 or one of the special token identifiers -1, -2 or -3. The integers in the range 0-255 are interpreted as character indices The characters indexed -1, -2 and -3 correspond with the zoem glyphs \~, \|, and \- respectively. The second element in each pair defines the string to which the character specified by the first element must be mapped. This string is interpreted in device scope. See the Device scope section for simple uses.

A key may occur multiple times. The corresponding definitions are stacked away and will be accessed according to the current special level (cf. the section on mapped characters in device scope).

Repeated use of \special#1 does not cause the removal of previous definitions, with one exception: If \special#1 is invoked with no arguments at all then all definitions are removed.

Note Be sure to use delay sequences as appropriate, noting that vararg is expanded. Below is how Portable Unix Documentation encodes a line break in troff:

{-2} {\!N.br\!N}

Zoem interprets the value and accordingly associates the device scope sequence \N.br\N with the token \|. The escape sequence \N will thus be processed during the filter stage as is appropriate. Without the delay sequence zoem would try to expand \N during processing of the \special#1 primitive.

Result textNone.

\switch#2:  \switch{<<pivot>>}{<vararg>}

The first argument is expanded. Subsequently, two arguments are successively taken from <vararg>. The first is expanded and string compared with <pivot>. If they match, the second argument is expanded and everything else is ignored. If they do not match, the procedure is repeated. If no (odd) argument matches, and the <vararg> has an odd number of arguments, the last argument is put in place. It can be considered a failure clause. This primitive does not have fall-through behaviour; at most one branch will be handed to the parser.

Different cases can be grouped in a vararg. If \switch#2 recognizes that the test argument can be parsed as a vararg it will exctract all the corresponding sub-arguments. If the pivot matches any of these the branch corresponding to the test argument will be taken.

Result text Either the first block associated with a matching case of <pivot>, the failure clause, or nothing at all.

\system#3:  \system{<cmd>}{<<args>>}{<<data>>}

By default this primitive is disallowed. The first argument is the name of a system command. The environment variable PATH is used in tracing the location of the command. If <data> is non-empty, it is first unprotected, that is, escaped backslashes and curlies are unescaped. The resulting text is then fed to command <cmd> with arguments <args>. The latter, if non-empty, must be specified as a vararg, even if only a single argument is present. Should execution of the command (be it with or without data) result in output on STDOUT then the latter is captured, backslashes and curlies are escaped (i.e. the output is protected), and the result is put in place. STDERR is the same as it is for the parent (zoem).

Note The security implications of this feature. By default zoem will ignore \system. The command line option --unsafe will cause zoem to prompt for user confirmation (if prompting is not possible it will ignore again) for each encountered \system invocation. The option --unsafe-silent will silently allow all \system invocations. The option --allow=cmd[:cmd]* explicitly specifies which commands to allow silently. It is also possible to use this option repeatedly rather than separate different commands by colons.

If the zoem command line option --system-honor is used, zoem will exit if a system command fails or is ignored.

A simple exit status is written in the variable \__sysval__: it is zero (0) on success, and one (1) on failure.

Refer to the manual page of the zoem interpreter for more information on --unsafe, --unsafe-silent, --allow=, and --system-honor.

Built-in macros \system#2 and system#1 exist. The former drops the <data> argument, the latter also drops the <args> argument.

Example

\system{sort}{{-n}}{\finsert{foo}} \system{ls}{{-l}{-a}} \system{date}

Result text The output captured (and then protected) from <cmd>'s STDOUT, if any.

\table#5:  \table{<<row length>>}{<any1>}{<any2>}{<any3>}{<<vararg>>}

The first argument is expanded and interpreted as an integer, say k. Successively, vectors of k elements are shifted from <vararg>. Each vector is bordered on the left with <any1>, bordered on the right with <any3>, and all elements in the vector are separated with <any2>.

This primitive is perhaps not really needed as its functionality is largely covered by \apply#2.

Result text The blocks from <vararg> interspersed in a table-like manner with <any1>, <any2>, and <any3>.

\textmap#2:  \textmap{<vararg>}{<<any>>}

Apply one or more transformations to <any> and put the result in place. <vararg> takes a succession of key-value pairs. The associated transformation are applied in order. The supported transformations are:

{word}{ucase}
Uppercase <any>
{word}{lcase}
Lowercase <any>
{number}{roman}
Convert number to Roman
{number}{alpha}
Convert number to letters
{repeat}{<num>}
Concatenate <num> copies of <any>
{caesar}{<num>}
Apply caesar encryption
{vigenere}{<key>}
Apply vigenere encryption
{vigenerex}{<key>}
Apply vigenere encryption and include space

The roman transformation can e.g. used to equip the Aephea itemize environment with roman numbering. To get uppercase roman, do this:

\textmap{{number}{roman}{word}{ucase}}{\your_nice_counter}

The alpha transformation maps its argument to a string over the alphabet _a-z, i.e. all the set of all lowercase letters with the underscore added. This set is simply used for counting in base 27, with the underscore playing the role of zero.

Result text The transformed text.

\throw#2:  \throw{<towel|error|done>}{<<any>>}

Quit parsing, unwind stack until some occurrence of \catch#2, \try#1 captures this throw.

The throw \throw{done} is also unconditionally caught by \while#2 and \eval#1. If \throw{done} is encapsulated by neither of these four primitives it means that processing of the current file is stopped, and processing at the including file, if applicable, is resumed.

<any> is digested; if it has positive length the result is issued as a diagnostic.

Note Many primitives evaluate one or more of their arguments before use, as indicated in this manual. An occurrence of \throw{done} in such an argument, if not caught, will be treated like an error. It is possible to use \throw{done} in such an instance by encapsulating the argument in \eval#1.

Result text None, affects the result text of the embedding scopes.

\tr#2:  \tr{<vararg>}{<<any>>}

<vararg> contains key-value pairs. The accepted keys are from and to which must always occur together, and delete and squash. The values of these keys must be valid translation specifications. This primitive transforms <any> by successively applying translation, deletion and squashing in that order. Only the transformations that are needed need be specified.

The syntax accepted as translation specification is almost fully compliant with the syntax accepted by tr(1), with three exceptions. First, repeats are introduced as [*a*20] rather than [a*20]. Second, ranges can (for now) only be entered as X-Y, not as [X-Y]. X and Y can be entered in either octal or hexadecimal notation (see further below). As an additional feature, the magic repeat operator [*a#] stops on both class and range boundaries. Finally, character specifications can be complemented by preceding them with the caret ^. See further below for examples where these features are used.

Preprocessing The values (not the data <any>) are subjected to UNIX tilde expansion as described in the the zoem manual.

Syntax Specifications may contain ranges of characters such as a-z and 0-9. Posix character classes are allowed. The available classes are

[:alnum:] [:alpha:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]

Characters can be specified using octal notation, e.g. \012 encodes the newline. Use \173 for the opening curly, \175 for the closing curly, \134 for the backslash, and \036 for the caret if it is the first character in a specification. DON'T use \\, \{, or \} in this case! Hexadecimal notation is written as \x7b (the left curly in this instance).

Result text The expanded <any> subjected to the tr operator as specified.

Example The following was entered in interactive mode.

\tr{ {from}{[:lower:][:upper:][:digit:][:space:][:punct:]} {to}{[*L#][*U#][*D#][*S#][*P#]}}{ !"#$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ [\\]^_` abcdefghijklmnopqrstuvwxyz \{|\}~]} . ---------------------------------------- SSPPPPPPPPPPPPPPPDDDDDDDDDDPPPPPPPSUUUUUUUUUUUUUUUUUUUUUUUUUUSPPPPPPSLLLLLLLLLLLLLLLLLLLLLLLLLLSPPPPP ---------------------------------------- \tr{ {squash}{^} {from}{[:lower:][:upper:][:digit:][:space:][:punct:]} {to}{[*L#][*U#][*D#][*S#][*P#]}}{ !"#$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ [\\]^_` abcdefghijklmnopqrstuvwxyz \{|\}~]} . ---------------------------------------- SPDPSUSPSLSP

Note how the magic repeat operator [*#] stops on class boundaries.

\trace#1:  \trace{<<int>>}

The argument is expanded and interpreted as an integer. This integer encodes an ensemble of flags controlling the trace output. The different modes are exactly the same as those that can be set from the command line. Refer to the corresponding section for more information. Special values are 0 (switch off all tracing), -1 (switch on all tracing modes in short mode), -2 (switch on all tracing modes in long mode), -3 (switch to the previous tracing value), and -4 emit a listing of tracing bits. The third can be useful to switch tracing on for a short while and then off again if you need to debug your document. Additionally and redundantly, \trace#1 puts the previous tracing value in place.

Result text The previous tracing value.

\try#1:  \try{<any>}

This will process the content and output is written in the macro \__zoemput__. Output will be truncated in case \throw#2 was used or an error occurred. The status, currently one of done, towel, or error, is written in the session macro \__zoemstat__.

Result text None.

\undef#1:  \undef{<key-sig>}

Deletes the key with signature <key-sig> from the top level dictionary. Complains (but does not fail) if the key does not exist in that dictionary. It is possible to specify that a regular key (i.e. not a dollar key) must be looked up in the global dictionary by prefixing its signature with two single quotes.

Result text None.

\vanish#1:  \vanish{<any>}

This will only process the content for its side effects. Any result text is disregarded. This allows easy free-style commenting of sequences of definitions. By comparison, \formatted#1 provides the means to give a formatted presentation of the definitions themselves.

Result text None.

\while#2:  \while{<condition>}{<any>}

While <condition> exands to something that is nonzero when interpreted as an integer, <any> is expanded and concatenated to the result text. The following piece of zoem asks the user for an integer and writes all Fibonacci numbers smaller than that integer plus one extra to STDOUT.

\import{ctr.zmm} \: import ctr macros. \def{fib#1}{ \ctrset{a}{1} \ctrset{b}{1} \ctrset{c}{0} \while{\eqt{lq}{\ctrput{c}}{\1}}{ \ctrset{c}{\ctrput{a}} \ctrset{a}{\let{\ctrput{a}+\ctrput{b}}} \write{-}{txt}{\ctrput{c}\|} \ctrset{b}{\ctrset{c}} } } \write{-}{txt}{Enter a number please, } \write{-}{txt}{then press <cr> and <ctl-d>\|} \setx{num}{\finsert{-}} \: this reads from STDIN. \fib{\num}

Note The strings built up by \while#2 are internally concatenated until it is done, so the result from \while#2 can be captured. This will make \while#2 work for \setx#2. If you want to output 100M worth of lines or paragraphs in a while loop, either embed the stuff to be output in a \write#3 call and make sure that no whitespace results from the loop (for example by using \formatted#1), or simply use \whilst#2. With \write#3 you can specify a file name to which results should be output (use \__fnout__ for the current default output file) whereas \whilst#2 simply outputs to the current default stream.

\whilst#2:  \whilst{<condition>}{<any>}

While <condition> exands to something that is nonzero when interpreted as an integer, <any> is expanded and immediately output to the current default output stream.

Result text None — everything is sent to the default output stream right away. Output from \while#2 can be captured, i.e. it can be that what is assigned by a \setx#2 invocation.

\write#3:  \write{<<file name>>}{<str>}{<<any>>}

The first argument is expanded and used as a file name. It is a fatal error if the file has either not been opened by a previous \write#3 call or cannot be opened for writing. Two special file names or 'streams' are recognized, namely - and stderr. They map to STDOUT and STDERR. The third argument is expanded, filtered, and written to file. The second argument indicates the filter to be used. It must be one of the (literal) strings copy, device, or txt.

The copy filter does not filter anything at all (neither plain scope nor device scope) and does not touch any of the zoem escape sequences remaining after expansion.

The device filter does a full-fledged filtering of both parse scopes. It respects the settings according to the \special#1 primitive. The write primitive associates unique metadata with each file it opens, so at directives such as \N, \W, and \+ for different output files do not interfere with one another. Refer to the Device scope section for more information on at directives.

The txt filter maps \\ to \ (i.e. a single backslash), \~ to a single space, \- to a single hyphen, \, (the atomic separator) to nil, \| to a newline, \{ to {, and \} to }. It copies everything else verbatim.

Result text Technically none, as the output of \write#3 cannot be captured.

\writeto#1:  \writeto{<<file-name>>}

Closes the current default output stream, and changes it to point to file <file name>. Useful when splitting a document into chapters, or god forbid, nodes.

Notes If the file name contains a path separator, zoem will refuse to carry on, because this may pose a risk that sensitive files are overwritten - in case someone has written a malicious zoem input file to do just that. If the option --unsafe is used, zoem will query the user what to do. If the option --unsafe-silent is used, zoem will merrily buzz on without querying. The path separator is entirely UNIX-centric, i.e. a forward slash.

Zoem will recognize if \writeto#1 is issued more than once for the same file <file-name>. On the first occassion, it will simply open the file and truncate any previous contents. On the second occasion and onwards, it will append to the file. There is currently no option to vary this behaviour. Zoem will not recognize the fact that different strings might refer to the same file (e.g. foo and ./foo). Whenever it encounters a file name not seen before, it will try to open the file in write mode.

In interactive mode, \writeto#1 has no effect for text entered in plain mode. It does have effect in case \write#3 is issued with \__fnout__ as the file name argument, since \writeto#3 resets the \__fnout__ macro.

Result text None.

\zinsert#1:  \zinsert{<<file name>>}

The contents of file <file name> are put in place unaltered enclosed by the \!#1 delay primitive. The contents must necessarily satisfy zoem syntax. If the file can not be opened, the empty string results. See also \finsert#1.

Example

\setx{foo}{\zinsert{mydata}} \setx{foo}{\eval{\zinsert{mydata}}}

In the first case, \foo will contain the exact contents of file mydata. Those contents are first enclosed within the \!#1 primitive by \zinsert#1. The resulting text is evaluated by \setx#2 - the only thing this does is strip the enclosing \!{} scope.

In the second case, \foo will contain the evaluated contents of file mydata, as \eval#1 adds an additional layer of evaluation.

Note This primitive is able to read inline files, unlike \finsert#1.

Result text The contents of file file name or the empty string if file can not be opened.

This is a young section, with only few entries yet.

[\system#3] Beware that the argument/option list (the second argument of \system#3) is encoded as a vararg. If you have a single argument, it is easy to forget the enclosing curlies. In that case, zoem ignores the argument altogether.

Zoem protects the data returned by \system#3. So you may e.g. think (as I once did) that

\system{date}{{%e}{%B}{%Y}}

Is a neat way to create a vararg, but you will end up with something like

\{24\}\{April\}\{2004\}

[Package authors] Beware of using and scope within at scope within a \write#3 invocation that uses the copy filter.

\write{file}{copy}{ foo \@{ zut \&{ bar }}}

The bar part will not be evaluated as the copy filter does not apply the filtering stage. If the stuff written is read back in from some other part of the document, or from another document altogether, the bar part will be evaluated in a different context than the one in which it was created.

\throw#2 with argument done can be used to halt processing of the current file. Refer to the \throw#2 description for the associated requirements.

For user keys, dollar keys, and dictionary stacks, refer to the Dictionary stacks section and the Macro expansion section. For data keys, refer to the Tree data section.

For key signatures and key mention, refer to the Key signatures section. For anonymous keys: the Anonymous keys section.

Session variables are described in the Session keys section.

For varargs, arguments in which a variable number of sub-arguments can be stored, and for blocks: the Of blocks and varargs section.

For plain scope, device scope, at scope, and glyph sequences: The Scope dichotomy and Device scope sections.

For file read and inline files: the File read section.

Sometimes zoem protects or unprotects data. Refer to the Protection section.

zoem-21-341/doc/zoem.10000644000207600020760000006267414154762473011337 00000000000000.\" Copyright (c) 2021 Stijn van Dongen .TH "zoem" 1 "7 Dec 2021" "zoem 21-341" "USER COMMANDS " .po 2m .de ZI .\" Zoem Indent/Itemize macro I. .br 'in +\\$1 .nr xa 0 .nr xa -\\$1 .nr xb \\$1 .nr xb -\\w'\\$2' \h'|\\n(xau'\\$2\h'\\n(xbu'\\ .. .de ZJ .br .\" Zoem Indent/Itemize macro II. 'in +\\$1 'in +\\$2 .nr xa 0 .nr xa -\\$2 .nr xa -\\w'\\$3' .nr xb \\$2 \h'|\\n(xau'\\$3\h'\\n(xbu'\\ .. .if n .ll -2m .am SH .ie n .in 4m .el .in 8m .. .ZJ 3m 1m "1\&." NAME .in -4m .ZJ 3m 1m "2\&." SYNOPSIS .in -4m .ZJ 3m 1m "3\&." DESCRIPTION .in -4m .ZJ 3m 1m "4\&." OPTIONS .in -4m .ZJ 3m 1m "5\&." SESSION MACROS .in -4m .ZJ 3m 1m "6\&." THE SET MODIFIERS .in -4m .ZJ 3m 1m "7\&." THE INSPECT SUBLANGUAGE .in -4m .ZJ 3m 1m "8\&." THE TR SUBLANGUAGE .in -4m .ZJ 3m 1m "9\&." TILDE EXPANSION .in -4m .ZJ 3m 1m "10\&." ENVIRONMENT .in -4m .ZJ 3m 1m "11\&." DIAGNOSTICS .in -4m .ZJ 3m 1m "12\&." BUGS .in -4m .ZJ 3m 1m "13\&." SEE ALSO .in -4m .ZJ 3m 1m "14\&." EXAMPLES .in -4m .ZJ 3m 1m "15\&." AUTHOR .in -4m .SH NAME zoem \- macro processor for the Zoem macro/programming language\&. .SH SYNOPSIS \fBzoem\fP \fB[-i\fP [\&.azm] (\fIentry file name\fP)\fB]\fP \fB[-I\fP (\fIentry file name\fP)\fB]\fP \fB[-o\fP (\fIoutput file name\fP)\fB]\fP \fB[-d\fP (\fIset device key\fP)\fB]\fP \fBzoem\fP .br (enter interactive mode - happens when none of \fB-i\fP, \fB-I\fP, \fB-o\fP is given) \fBzoem\fP \fB-i\fP [\&.azm] (\fIentry file name\fP) \fB-I\fP (\fIentry file name\fP) \fB[-o\fP (\fIoutput file name\fP)\fB]\fP \fB[-d\fP (\fIset device key\fP)\fB]\fP \fB[-x\fP (\fIenter interactive mode on error\fP)\fB]\fP \fB[-s\fP [=] (\fIset key to val\fP)\fB]\fP \fB[-e\fP (\fIevaluate any, exit\fP)\fB]\fP \fB[-E\fP (\fIevaluate any, proceed\fP)\fB]\fP \fB[-chunk-size\fP (\fIprocess chunks of size num\fP)\fB]\fP \fB[--trace\fP (\fItrace mode, default\fP)\fB]\fP \fB[--trace-all-long\fP (\fIlong trace mode\fP)\fB]\fP \fB[--trace-all-short\fP (\fIshort trace mode\fP)\fB]\fP \fB[--trace-regex\fP (\fItrace regexes\fP)\fB]\fP \fB[-trace\fP k (\fItrace mode, explicit\fP)\fB]\fP \fB[--stats\fP (\fIshow symbol table stats after run\fP)\fB]\fP \fB[--split\fP (\fIassume \ewriteto usage, set \e__split__\fP)\fB]\fP \fB[--stress-write\fP (\fImake \ewrite#3 recover\fP)\fB]\fP \fB[--unsafe\fP (\fIprompt for \esystem#3\fP)\fB]\fP \fB[--unsafe-silent\fP (\fIsimply allow \esystem#3\fP)\fB]\fP \fB[-allow\fP cmd1[:cmdx]+ (\fIallowable commands\fP)\fB]\fP \fB[--system-honor\fP (\fIrequire \esystem#3 to succeed\fP)\fB]\fP \fB[-nuser\fP k (\fIuser dict stack size\fP)\fB]\fP \fB[-nenv\fP k (\fIenvironment dict stack size\fP)\fB]\fP \fB[-nsegment\fP k (\fImaximum simple nesting depth\fP)\fB]\fP \fB[-nstack\fP k (\fImaximum eval nesting depth\fP)\fB]\fP \fB[-buser\fP (\fIinitial user dict capacity\fP)\fB]\fP \fB[-bzoem\fP (\fIinitial zoem dict capacity\fP)\fB]\fP \fB[-tl\fP k (\fItab length\fP)\fB]\fP \fB[-l\fP (\fIlist items\fP)\fB]\fP \fB[-h\fP (\fIshow options\fP)\fB]\fP \fB[--apropos\fP (\fIshow options\fP)\fB]\fP .SH DESCRIPTION Zoem is a macro/programming language\&. It is fully described in the \fIZoem User Manual\fP (zum\&.html), currently available in HTML only\&. This manual page documents the zoem processor, not the zoem language\&. If the input file is specified using the \fB-i\fP option and is a regular file (i\&.e\&. not STDIN - which is specified by using a single hyphen), it must have the extension \fC\&.azm\fP\&. This extension can but need not be specified\&. The zoem key \fB\e__fnbase__\fP will be set to the file base name stripped of the \fC\&.azm\fP extension and any leading path components\&. If the input file is specified using the \fB-I\fP option, no extension is assumed, and \fB\e__fnbase__\fP is set to the file base name, period\&. The file base name is the file name with any leading path components stripped away\&. If neither \fB-i\fP nor \fB-o\fP is specified, zoem enters interactive mode\&. Zoem should fully recover from any error it encounters in the input\&. If you find an exception to this rule, consider filing a bug report\&. In interactive mode, zoem start interpreting once it encounters a line containing a single dot\&. Zoem\&'s input behaviour can be modified by setting the key \fB\e__parmode__\fP\&. See the section \fBSESSION MACROS\fP for the details\&. In interactive mode, zoem does \fInot\fP preprocess the interactive input, implying that it does not accept inline files and it does not recognize comments\&. Both types of sequence will generate syntax errors\&. Finally, readline editing and history retrieval can be used in interactive mode provided that they are available on the system\&. This means that the input lines can be retrieved, edited, and discarded with a wide range of cursor positioning and text manipulation commands\&. From within the entry file and included files it is possible to open and write to arbitrary files using the \fB\ewrite#3\fP primitive\&. Arbitrary files can be read in various modes using the \fB\edofile#2\fP macro (providing four different modes with respect to file existence and output), \fB\efinsert#1\fP, and \fB\ezinsert#1\fP\&. Zoem will write the default output to a single file, the name of which is either specified by the \fB-o\fP option, or constructed as described below\&. Zoem can split the default output among multiple files\&. This is governed from within the input files by issuing \fB\ewriteto#1\fP calls\&. Refer to the \fB--split\fP option and the \fIZoem User Manual\fP\&. If none of \fB-i\fP or \fB-o\fP is given, then zoem will enter interactive mode\&. In this mode, zoem interprets by default chunks of text that are ended by a single dot on a line of its own\&. This can be useful for testing or debugging\&. In interactive mode, zoem should recover from any failure it encounters\&. Interactive mode can also be accessed from within a file by issuing \fC\ezinsert{stdia}\fP, and it can be triggered as the mode to enter should an error occur (by adding the \fB-x\fP option to the command line)\&. If \fB-o\fP is given and \fB-i\fP is not, zoem reads input from STDIN\&. If \fB-i\fP is given and \fB-o\fP is not, zoem will construct an output file name as follows\&. If the \fB-d\fP option was used with argument \fC\fP, zoem will write to the file which results from expanding \fB\e__fnbase__\&.\fP\&. Otherwise, zoem writes to (the expansion of) \fB\e__fnbase__\&.ozm\fP\&. For \fB-i\fP and \fB-o\fP, the argument \fC-\fP is interpreted as respectively \fCstdin\fP and \fCstdout\fP\&. .SH OPTIONS .ZI 2m "\fB-i\fP [\&.azm] (\fIentry file name\fP)" \& .br Specify the entry file name\&. The file must have the \fC\&.azm\fP extension, but it need not be specified\&. .in -2m .ZI 2m "\fB-I\fP [\&.azm] (\fIentry file name\fP)" \& .br Specify the entry file name, without restrictions on the file name\&. .in -2m .ZI 2m "\fB-o\fP (\fIoutput file name\fP)" \& .br Specify the output file name\&. .in -2m .ZI 2m "\fB-d\fP (\fIset key \e__device__\fP)" \& .br Set the key \fB\e__device__\fP to \fC\fP\&. .in -2m .ZI 2m "\fB-x\fP (\fIenter interactive mode on error\fP)" \& .br The afterlife option\&. If zoem encounters an error during regular processing, it will emit error messages as usual, and then enter interactive mode\&. This allows you e\&.g\&. to inspect the values of keys used or defined within the problematic area\&. .in -2m .ZI 2m "\fB-s\fP [=] (\fIset key to val\fP)" \& .br Set the key \fB\ekey\fP to \fBval\fP if present, \fB1\fP otherwise\&. Any type of key can be set, including keys taking arguments and keys surrounded in quotes\&. Beware of the shell\&'s quote and backslash interpolation\&. Currently \fBval\fP is not evaluated, so appending or prepending to a key is not possible\&. .in -2m .ZI 2m "\fB-e\fP (\fIevaluate any, exit\fP)" \& .br This causes zoem to evaluate \fC\fP, write any result text to stdout, and exit\&. .in -2m .ZI 2m "\fB-E\fP (\fIevaluate any, proceed\fP)" \& .br This causes zoem to evaluate \fC\fP, write any result text to stdout, and proceed e\&.g\&. with the entry file or an interactive session\&. .in -2m .ZI 2m "\fB-chunk-size\fP (\fIprocess chunks of size num\fP)" \& .br Zoem reads its input in chunks\&. It fully processes a chunk before moving on with the next one\&. This option defines the (minimum) size of the chunks\&. The size or count of the chunks does not at all affect zoem\&'s output\&. The default minimum chunk size equals one megabyte\&. Zoem will read files in their entirety before further processsing if \fB-chunk-size\fP\ \&\fB0\fP is specified\&. Zoem does not chunk input files arbitrarily\&. It will append to a chunk until it is in the outermost scope (not contained within any block) and the chunk will end with a line that was fully read\&. Consequently, if e\&.g\&. a file contains a block (delimited by balanced curlies) spanning the entire file then zoem is forced to read it in its entirety\&. .in -2m .ZI 2m "\fB--trace\fP (\fItrace mode, default\fP)" \& .br Trace in default mode\&. .in -2m .ZI 2m "\fB--trace-all-long\fP (\fIlong trace mode\fP)" \& .br Sets on \fImost\fP trace options in long mode\&. Trace options \fCxxx\fP not set have their own \fB--trace-xxx\fP entry (see below)\&. .in -2m .ZI 2m "\fB--trace-all-short\fP (\fIshort trace mode\fP)" \& .br Sets on \fImost\fP trace options in short mode\&. Trace options \fCxxx\fP not set have their own \fB--trace-xxx\fP entry (see below)\&. .in -2m .ZI 2m "\fB--trace-keys\fP (\fItrace keys\fP)" \& .br Trace keys\&. .in -2m .ZI 2m "\fB--trace-regex\fP (\fItrace regexes\fP)" \& .br Trace regexes (i\&.e\&. the \fB\einspect#4\fP primitive)\&. .in -2m .ZI 2m "\fB-trace\fP k (\fItrace mode, explicit\fP)" \& .br Set trace options by adding their representing bits\&. .in -2m .ZI 2m "\fB--stress-write\fP (\fIstress test using write\fP)" \& .br This makes \fB\ewrite#3\fP recover from errors\&. It is a special purpose option used for creating zoem stress test suites, such as \fCstress\&.azm\fP in the zoem distribution \fC/examples\fP subdirectory\&. .in -2m .ZI 2m "\fB--unsafe\fP (\fIprompt for \esystem#3\fP)" \& 'in -2m .ZI 2m "\fB--unsafe-silent\fP (\fIsimply allow \esystem#3\fP)" \& 'in -2m .ZI 2m "\fB-allow\fP cmd1[:cmdx]+ (\fIallowable commands\fP)" \& 'in -2m 'in +2m \& .br With \fB--unsafe\fP system calls are allowed but the user is prompted for each invocation\&. The command and its arguments (if any) are shown, but the STDIN information (if any) is withheld\&. With \fB--unsafe-silent\fP system calls are allowed and the user is never prompted\&. Use \fB-allow\fP\ \&\fIstr\fP or \fB--allow\fP=\fIstr\fP to specify a list of allowable commands, as a string in which the commands are separated by colons\&. .in -2m .ZI 2m "\fB--system-honor\fP (\fIrequire \esystem#3 to succeed\fP)" \& .br With this option any \fC\esystem#3\fP failure (for whatever reason, including safe behaviour) is regarded as a zoem failure\&. By default, failing system calls are ignored under either safe mode, unsafe mode (--unsafe), or silent unsafe mode (--unsafe-silent)\&. .in -2m .ZI 2m "\fB--split\fP (\fIassume split output\fP)" \& .br This assumes zoem input that allows output to multiple files (e\&.g\&. chapters)\&. It sets the default output stream to \fCstdout\fP (anticipating custom output redirection with \fB\ewriteto#1\fP) and sets the session macro \fB\e__split__\fP to \fC1\fP\&. .in -2m .ZI 2m "\fB--stats\fP (\fIshow symbol table stats after run\fP)" \& .br Show symbol table chacteristics\&. Symbol tables are maintained as hashes\&. .in -2m .ZI 2m "\fB-tl\fP k (\fIset tab length\fP)" \& .br Set the tab length\&. HTML output can be indented according to nesting structure, using tabs which are expanded to simple spaces\&. By default, the tab length is zero, meaning that no indent is shown\&. The maximum value the tab length can be set to is four\&. .in -2m .ZI 2m "\fB-nsegment\fP k (\fIlevel of macro nesting allowed\fP)" \& 'in -2m .ZI 2m "\fB-nstack\fP k (\fIstack count\fP)" \& 'in -2m .ZI 2m "\fB-nuser\fP k (\fIuser dictionary stack size\fP)" \& 'in -2m .ZI 2m "\fB-nenv\fP k (\fIenvironment dictionary stack size\fP)" \& 'in -2m .ZI 2m "\fB-buser\fP k (\fIinitial user dict capacity\fP)" \& 'in -2m .ZI 2m "\fB-bzoem\fP k (\fIinitial zoem dict capacity\fP)" \& 'in -2m 'in +2m \& .br Probably needed only if you have some obscure and extreme use for zoem\&. The segment limit applies to simple nesting of macros\&. The stack limit applies to nesting of macros that evaluate an argument before use\&. Each such evaluation creates a new stack\&. The user limit applies to \fB\epush{user}\fP, the env limit applies to the nesting level of environments (started with \fC\ebegin#2\fP)\&. The user dict capacity pertains to the initial number of buckets allocated for user and environment dictionaries, and the zoem dict capacity pertains to the dictionary containing the zoem primitives\&. .in -2m .ZI 2m "\fB-l\fP (\fIlist items\fP)" \& .br List items identified by \fC\fP\&. It can be any of \fBall\fP, \fBfilter\fP\&. \fBlegend\fP, \fBbuiltin\fP, \fBsession\fP, \fBtrace\fP, or \fBzoem\fP, Multiple identifiers can be joined in a string, e\&.g\&. \fC-l legendzoem\fP prints a legend followed by a listing of zoem primitives\&. .in -2m .ZI 2m "\fB-h\fP (\fIshow options\fP)" \& .br Show short synopsis of options\&. .in -2m .SH SESSION MACROS .ZI 2m "\fB\e__parmode__\fP" \& .br This macro affects zoem\&'s read behaviour in interactive mode\&. It can be set on the command line using the \fB-s\fP option\&. Bits that can be set: .di ZV .in 0 .nf \fC 1 chomp newlines (remove the newline character) 2 skip empty newlines 4 read paragraphs (an empty line triggers input read) 8 newlines can be escaped using a backslash 16 read large paragraphs (a single dot on a line triggers input read) .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR .in -2m .ZI 2m "\fB\e__device__\fP" \& .br The current output device, set by the command line option \fB-d\fP\&. The \fBman\fP and \fBfaq\fP packages support \fBhtml\fP and \fBroff\fP as its values\&. .in -2m .ZI 2m "\fB\e__fnbase__\fP" \& .br The base name of the input file name\&. Leading path components are stripped away\&. If the \fB-i\fP option is used the input file is required to have the \fC\&.azm\fP suffix\&. In that case the suffix is also stripped to obtain the base name\&. .in -2m .ZI 2m "\fB\e__fnentry__\fP" \& .br The name of the entry file\&. .in -2m .ZI 2m "\fB\e__fnin__\fP" \& .br The file currently being processed\&. .in -2m .ZI 2m "\fB\e__fnout__\fP" \& .br The name of the default output file\&. .in -2m .ZI 2m "\fB\e__fnpath__\fP" \& .br The leading component of the input file name, possibly empty\&. .in -2m .ZI 2m "\fB\e__fnup__\fP" \& .br The file that included the current file, if applicable\&. .in -2m .ZI 2m "\fB\e__fnwrite__\fP" \& .br This key is set by \fC\ewrite#3\fP to its first argument\&. It can be used by macros that are expanded during evaluation of the third argument\&. Possible usage is to branch on the name of the \fIwrite\fP output stream\&. For example a file called \fIindex\&.html\fP may be treated differently from other files\&. The key is deleted afterwards\&. Nested invocations of \fC\ewrite#3\fP may corrupt the status of this key\&. .in -2m .ZI 2m "\fB\e__ia__\fP" \& .br The input/output separator used in interactive mode\&. .in -2m .ZI 2m "\fB\e__line__\fP" \& .br The line number in the file currently being processed\&. This number will be correct for any invocation outside the scope of a macro\&. For any invocation within a macro the result will be the line number of the closing curly of the outermost containing macro\&. The following .di ZV .in 0 .nf \fC \e__line__ \e__line__ \e__line__ \egroup{ \e__line__ \egroup{\e__line__} \e__line__} .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR Results in .di ZV .in 0 .nf \fC 1 2 3 7 7 7 .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR .in -2m .ZI 2m "\fB\e__searchpath__\fP" \& .br A vararg containing a list of paths to search when a file is to be included/imported/read/loaded\&. When you start zoem, this key should contain the location of the \fBman\&.zmm\fP and \fBfaq\&.zmm\fP package files\&. It is advisable not to overwrite this key but to append to it instead\&. .in -2m .ZI 2m "\fB\e__zoemstat__\fP" \& .br Set to one of \fCok\fP, \fCtowel\fP (that one is a bit lame), or \fCerror\fP by either the interpreter, an occurrence of \fC\ecatch#2\fP, or \fC\etry#1\fP\&. .in -2m .ZI 2m "\fB\e__zoemput__\fP" \& .br Set by \fC\etry#1\fP to the possibly truncated result of processing its argument\&. .in -2m .ZI 2m "\fB\e__lc__\fP" \& .br Expands to a left curly\&. It is hard to find a need for this \- the zoem stress suite uses it to generate a particular syntax error at a deeper interpretation level\&. .in -2m .ZI 2m "\fB\e__rc__\fP" \& .br Expands to a right curly\&. .in -2m .SH THE SET MODIFIERS The \fC\eset#3\fP primitive allows a \fC{modes}{}\fP directive in its first argument\&. Here \fI\fP can be a combination of single-letter modifiers, each described below\&. .ZI 2m "a" append to the key, do not overwrite, create if not existing\&. .in -2m .ZI 2m "c" conditionally; only set if not already defined\&. .in -2m .ZI 2m "e" existing; update existing key, possibly in lower dictionary\&. .in -2m .ZI 2m "g" global; set in the global (bottom) user dictionary\&. .in -2m .ZI 2m "u" unary; do not interpret vararg in \fC\fP as key-value list (data keys only) .in -2m .ZI 2m "v" vararg; interpret vararg in \fC\fP as key-value list (regular keys only)\&. .in -2m .ZI 2m "w" warn if key exists (like \fC\edef#2\fP and \fC\edefx#2\fP)\&. .in -2m .ZI 2m "x" expand argument (like \fC\esetx#2\fP and \fC\edefx#2\fP)\&. .in -2m .SH THE INSPECT SUBLANGUAGE The \fC\einspect#4\fP primitive takes four arguments\&. The languages accepted by the first two arguments are described below\&. The third argument is a replacement string or a replacement macro accepting back-references (supplied as an anonymous macro)\&. The fourth argument is the data to be processed\&. \fBarg 1\fP .br Is a vararg\&. Currently it accepts a single key \fImods\fP for which the value should be a comma-separated list over the words \fIposix\fP, \fIicase\fP, \fIdotall\fP, \fIiter-lines\fP \fIiter-args\fP, \fImatch-once\fP, \fIdiscard-nmp\fP, \fIdiscard-nil-out\fP, \fIdiscard-miss\fP, \fIcount-matches\fP\&. Alternatively repeated use of \fImods\fP is allowed\&. \fBarg 2\fP .br Is a regular expression\&. Tilde patterns are expanded according to all of the ZOEM, UNIX, and REGEX schemes\&. Refer to \fBTILDE EXPANSION\fP for these\&. The third argument is a constant string or an anonymous key, the fourth argument is data\&. .SH THE TR SUBLANGUAGE The \fC\etr#2\fP primitive takes two arguments\&. The first argument contains key-value pairs\&. The accepted keys are \fIfrom\fP and \fIto\fP which must always occur together, and \fIdelete\fP and \fIsquash\fP\&. The values of these keys must be valid \fItranslation\fP specifications\&. This primitive transforms the data in the second argument by successively applying translation, deletion and squashing in that order\&. Only the transformations that are needed need be specified\&. Translation specifications are subjected to UNIX tilde expansion as described below\&. The syntax accepted by translation specifications is almost fully compliant with the syntax accepted by \fBtr\fP(1), with three exceptions\&. First, repeats are introduced as \fC[*a*20]\fP rather than \fC[a*20]\fP\&. Second, ranges can (for now) only be entered as \fCX-Y\fP, not as \fC[X-Y]\fP\&. \fCX\fP and \fCY\fP \fIcan\fP be entered in either octal or hexadecimal notation (see further below)\&. As an additional feature, the magic repeat operator \fC[*a#]\fP stops on both class and range boundaries\&. Character specifications can be complemented by preceding them with the caret \fC^\fP\&. Specifications may contain ranges of characters such as \fCa-z\fP and \fC0-9\fP\&. Posix character classes are allowed\&. The available classes are .di ZV .in 0 .nf \fC [:alnum:] [:alpha:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:] .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR Characters can be specified using octal notation, e\&.g\&. \fC\e012\fP encodes the newline\&. Use \fC\e173\fP for the opening curly, \fC\e175\fP for the closing curly, \fC\e134\fP for the backslash, and \fC\e036\fP for the caret if it is the first character in a specification\&. \fIDON\&'T\fP use \fC\e\e\fP, \fC\e{\fP, or\ \&\fC\e}\fP in this case! Hexadecimal notation is written as \fC\ex7b\fP (the left curly in this instance)\&. See \fBEXAMPLES\fP for an example of \fCtr#2\fP usage\&. .SH TILDE EXPANSION Some primitives interface with UNIX libraries that require backslash escape sequences to encode certain tokens or characters\&. The backslash is special in zoem too and without further measures it can become very cumbersome to encode the correct escape sequences as it is not always clear which tokens should be escaped or unprotected at what point\&. It is especially difficult to handle the zoem characters with special meaning, \fC{\fP, \fC}\fP and \fC\e\fP\&. The two primitives under consideration are \fB\einspect#4\fP and \fB\etr#2\fP\&. Both treat the tilde as an additional escape character for certain arguments (as documented in the user manual)\&. These arguments are subjected to tilde expansion, where the tilde and the character it proceeds are translated to a new character or character sequence\&. There are three different sets of tilde escapes, ZOEM, UNIX and REGEX escapes\&. \fB\etr#2\fP only accepts UNIX escapes, \fB\einspect#4\fP accepts all\&. Tilde expansion is always the last processing step before strings are passed on to external libraries\&. The ZOEM scheme contains some convenience escapes, such as \fC~E\fP to encode a double backslash\&. \fBZOEM tilde expansion\fP .nf \fC \fB meta sequence replacement \&.-----------------------------\&. | ~~ | ~ | | ~E | \e\e | | ~e | \e | | ~I | \e{ | | ~J | \e} | | ~x | \ex | | ~i | { | | ~j | } | \&`-----------------------------\&'\fP .fi \fR The zoem tr specification language accepts \fC\ex**\fP as hexadecimal notation, e\&.g\&. \fC\ex0a\fP denotes a newline in the ASCII character set\&. \fBUNIX tilde expansion\fP .nf \fC \fB meta sequence replacement \&.-----------------------------\&. | ~a | \ea | | ~b | \eb | | ~f | \ef | | ~n | \en | | ~r | \er | | ~t | \et | | ~v | \ev | | ~0 | \e0 | | ~1 | \e1 | | ~2 | \e2 | | ~3 | \e3 | \&`-----------------------------\&'\fP .fi \fR \fBREGEX tilde expansion\fP .nf \fC \fB meta sequence replacement \&.-----------------------------\&. | ~^ | \e^ | | ~\&. | \e\&. | | ~[ | \e[ | | ~$ | \e$ | | ~( | \e( | | ~) | \e) | | ~| | \e| | | ~* | \e* | | ~+ | \e+ | | ~? | \e? | \&`-----------------------------\&'\fP .fi \fR .SH ENVIRONMENT The environment variable ZOEMSEARCHPATH may contain a colon and/or whitespace separated list of paths\&. It will be used when searching for files included via one of the \fCdofile\fP aliases \fC\einput\fP, \fC\eimport\fP, \fC\eread\fP, and \fC\eload\fP\&. Note that the zoem macro \fC\e__searchpath__\fP contains the location where the zoem macro files were copied at the time of installation of zoem\&. .SH DIAGNOSTICS On error, Zoem prints a file name and a line number to which it was able to trace the error\&. The number reported is the same as the one stored in the session macro \fC\e__line__\fP\&. For an error-trigering macro which is not nested within another macro the line number should be correct\&. For a macro that does occur nested within another macro the line number will be the line number of the closing curly in the outermost containing macro\&. If in despair, use one of the tracing modes, \fB--trace-keys\fP is one of the first to come to mind\&. Another possibility is to supply the \fB-x\fP option\&. .SH BUGS No known bugs\&. \fB\einspect#4\fP has not received thorough stress-testing, and the more esoteric parts of its interface will probably change\&. .SH SEE ALSO \fIAephea\fP is a document authoring framework largely for HTML documents\&. \fIPortable Unix Documentation\fP provides two mini-languages for authoring in the unix environment\&. These languages, pud-man and pud-faq are both written in zoem\&. .SH EXAMPLES This is a relatively new section, aimed at assembling useful or explanatory snippets\&. Create a vararg containing file names matching a pattern (\fCpng\fP in this example)\&. .di ZV .in 0 .nf \fC \esetx{images}{ \einspect{ {mods}{iter-lines,discard-miss} }{(\&.*~\&.png)}{_#1{{\e1}}}{\esystem{ls}} } .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR Use magic boundary stops with \fCtr#2\fP\&. .di ZV .in 0 .nf \fC \etr{ {from}{[:lower:][:upper:][:digit:][:space:][:punct:]} {to}{[*L#][*U#][*D#][*S#][*P#]}}{ !"#$%&\&'()*+,-\&./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ [\e\e]^_\&` abcdefghijklmnopqrstuvwxyz \e{|\e}~]} .fi \fR .in .di .ne \n(dnu .nf \fC .ZV .fi \fR .SH AUTHOR Stijn van Dongen\&. zoem-21-341/doc/zum.azm0000644000207600020760000045510614115654477011624 00000000000000\: thoughts/todo \:---------------------------------------------------------------------- \: o mention 9-arg limit. \: o ref point for white space munge rules. \: ? let maketoc have an argument which is the reference for the toc. \: NOTE \: To find where a primitive is described search for im{ \: e.g. im{format to search for format#2 (and formatted#1). \""{ TODO zum.azm: introduce class for \pr macro; use css_add slot. /""} \if{\defined{key}{__device__}}{}{\def{__device__}{html}} \import{aephea/simpledocument2.zmm} \import{zoem.shared} \begin{simpledocument2}{ {$html_title}{Zoem User's Manual} {$title}{Zoem User's Manual} {$author}{Stijn van Dongen} {$day}{\system{date}{{+%e}}} {$month}{\system{date}{{+%B}}} {$toc_date}{\!$month \!$day, \!$year} {$year}{\system{date}{{+%Y}}} {$toc_anchor}{Table of Contents} \: {css_file_in}{zum.css} \: {css_import}{{foo}{bar}} {$css_append}{ body { font-family: "Garamond", "Gill Sans", "Verdana", sans-serif; } body { text-align: justify; margin-left: 8%; margin-right: 8%; font-size: 14pt; } .toc_and_date_DATE { text-decoration: none; } .zpr { text-decoration: none; } \: example of using asd_cpar_caption \: p.asd_ccar_caption, p.asd_cpar_caption { color: red } acronym.ucase { font-size: smaller; text-transform: uppercase } abbr.ucase { font-size: smaller; text-transform: uppercase } #asd_document_outer { position: relative; } #asd_document { position: relative; } #asd_title { text-align: center; font-size: 30pt; margin-top: 40pt; } #asd_subtitle { text-align: center; font-size: 18pt; margin-top: 10pt; margin-bottom: 40pt; } #asd_date { position: absolute; left: 0pt; top: 10pt; } #asd_version { position: absolute; right: 0pt; top: 10pt; } } {keywords}{macro processing, programming, template expansion, mark-up, character filtering} } \def{builtins}{\mc{\\}, \mc{\{}, \mc{\}}, \mc{,}, \mc{~}, \mc{|}, and \mc{-}} \: need to be mapped because used as \html identifiers. \set{%strangers}{{!}{excl}{!#1}{excl#1}{$#2}{dollar#2}{$}{dollar}} \def{pr#1}{\iref{\tr{ {from}{#} {to}{_} }{\if{\defined{data}{{strangers}{\1}}}{\%{strangers}{\1}}{\1}}}{\{\\\1}}} \def{xmlpr1ref}{\iref{xmlpr1}{\v{\\<>#1}}} \def{xmlpr2ref}{\iref{xmlpr2}{\v{\\<>#2}}} \def{capref#1}{\iref{\1}{\ref{\1}{cap}}} \def{refto#2}{\@{}\2\@{}} \def{ssion#1}{\iref{session}{\v{\\\1}}} \
{ \"asd::add-toc-start"{Start} \
{ \@e{nbsp} \
{\$toc_date} \
{zoem-\finsert{stamp.stamp}} \
{\$title} \
{\$subtitle} \sec1{intro}{Introduction} \par{ \bf{Zoem:} The sound made by electrical devices and flying bugs. Pronounced: \it{zoom} or \it{zum}; the vowel is short. } \par{ Zoem is a general macro/programming language with filtering capabilities. It transforms text in two stages.} \par{ In the first stage the text is scanned for macro escape sequences. The core zoem language consists of so-called primitive macros. They provide a wide spectre of functional behaviour, including data storage, arithmetic evaluation, \io facilities, iteration and flow control, dictionary stacks, system interaction, and regular expressions. As with any macro/programming language, the real power comes from the ability to create new user-defined macros in terms of primitives and other user-defined macros. Macro expansion can be arbitrarily delayed, and inside-out evaluation is supported.} \par{ A useful feature is the combination of anonymous macros, lists, and the \pr{apply#2} primitive, constituting a callback mechanism in zoem. Another feature is the automatic popping and pushing of dictionaries with the begin/end environment, providing shadowing and localization.} \par{ In the optional second stage, the text is filtered. Two filter scopes are distinguished. The first is called \it{device scope} and is always enclosed in a filter escape sequence. The second, \it{plain scope}, is everything else. Filtering mechanisms are provided for both. The filtering language is useful when the output is meant to be in an external format with device-specific escape sequences, such as \html or troff. Conversions are specified in device specific filtering rules that are applied in plain scope, so that the zoem input is device agnostic. By setting up different filtering rules the same input can be used to generate different outputs.} \par{ This manual covers the whole zoem language. A large part of it is only interesting for someone writing a reusable macro package. A smaller part is still interesting for someone who is just using such a package, but might want to add some utilities and shortcuts of his own. The part where file inclusion, macro definitions, and macro expansions are explained is required reading for anyone considering or planning to use zoem.} \sec2{}{Other documentation} \par{ \sibref{zoem}{The manual page of the zoem interpreter}. } \par{ Zoem is used by \aref{http://micans.org/pud}{Portable Unix Documentation} (\pud) and \aref{http://micans.org/aephea}{Aephea}. The latter is a general authoring tool for writing \html documents and provides both useful abstractions and a framework for creating new abstractions. It uses and promotes the use of \css. A small core of Aephea has been ported to the typesetting language \em{troff}. This core is used in \pud, which provides mini-languages for \faq documents and \unix manual pages. Documents written in \pud can be output to troff and html, and further to plain text, PostScript, and \pdf. } \sec2{click}{About this document} \par{ Clicking on the number next to a section title (e.g. the \ref{click}{num} to the right of the title \bf{About this document} of this section) will get you to the corresponding section of the table of contents. } \par{ Zoem input and zoem output are \it{both} generally shown in a typeface font, \v{like this}. } \par{ \enref{colours}{} Links that point to locations within this document are shown in \iref{colours}{blueish colors}. Links that point to documents originating from the same package (project) or perhaps the same site are shown in in \lref{zum.html}{greenish colors}. Links that point to other stations on the internet or perhaps other packages on the same site are shown in in \aref{http://www.google.com}{reddish colors}. } \sec1{toc}{Table of Contents} \"asd::maketoc" \sec1{nutshell}{Zoem in a nutshell} \par{ Zoem supports several programming constructs, immediate and postponed expansions, stream character filtering, easy \io facilities, integer arithmetic, and a whole lot more. Its main aims are:} \begin{itemize}{ {flow}{compact} {interitem}{0} {align}{right} } \item \car{ Providing the building blocks for a structural and programmable approach. \iref{features}{Section \ref{features}{num}} contains an overview of the zoem primitives and their use.} \item \car{ Accepting a pleasant syntax that does not require much thinking, favouring simplicity and rigor over looseness and context dependent rules.} \item \car{ Creation from the keyboard while minimizing on key-strokes.} \item \car{ Few meta characters. Zoem achieves this by having a single special character and a reasonably restricted syntax.} \item \car{ Adding filtering capabilities so that multiple devices can be addressed.} \end{itemize} \sec2{features}{Features} \par{ Listed below are some features of the zoem primitives. In practice there are two kinds of zoem files. The first is a zoem macro file, which should contain macros defined in terms of lower-level macros, with zoem primitives at the lowest level. The second is a zoem document file, which should import such a macro file and only use the high-level macros defined in that macro file. Additionally, a document file can define some high-level macros of its own, in terms of low-level macros, zoem primitives, or a mixture of both. } \begin{itemize}{ {flow}{compact} {interitem}{0} {align}{right} } \item \car{ Macros with arguments, overloading of key names allowed (i.e. different keys with the same name are distinguished by the number of arguments they take). (\pr{def#2}, \pr{set#2}, and \pr{setx#2}). Zoem primitives look like regular macros, but usually they expand their arguments before use. User macros can be equipped with this behaviour by wrapping them in \pr{apply#2}.} \item \car{ Support for variable number of arguments - see the \iref{vararg}{vararg} section.} \item \car{ Easy file, \stdin, \stdout, and \stderr input/output, nested file inclusion (\pr{dofile#2}, \pr{write#3}, \pr{finsert#1}, and \pr{zinsert#1}).} \item \car{ Extensive support for arithmetic with the primitives \pr{let#1}, \pr{f#2}, \pr{f#3}, \pr{fv#2}, and \pr{eqt#3}.} \item \car{ Operators returning booleans (\pr{defined#2}, \pr{cmp#3}, \pr{eqt#3}), control operators acting on those (\pr{while#2}, \pr{if#3}).} \item \car{ The \it{for}-like primitives \pr{apply#2} and \pr{table#5}.} \item \car{ Match and substitution capabilities using \posix regexes (\pr{inspect#4}).} \item \car{ Register macros with \pr{register#2} to be processed after regular processing (e.g. to output counters or warnings).} \item \car{ The switch primitive \pr{switch#2}, employing the \iref{vararg}{vararg construct}.} \item \car{ Localized expansions (\pr{eval#1}) and meta-zoem (\pr{!} and \pr{!#1}).} \item \car{ A user dictionary stack that can be manipulated using \pr{push#1} and \pr{pop#1}. An environment environment for doing \mc{begin{stuff}} \v{..} \mc{end{stuff}} stuff (see \pr{env#4}). This environment creates name scopes by pushing and popping to/from the \iref{dictionary}{dollar dictionary stack}. Environments may take arguments, one particular useful application is that local variables (e.g. local to an \it{itemize} environment) can thus be specified by the user.} \item \car{ Storage of data by multiple string indexing \- arbitrary data can be stored in a tree by indexing nodes with (arbitrary) strings. Refer to the \secref{grape} section.} \item \car{ The ability to nicely format macros (see \pr{formatted#1}).} \item \car{ \iref{xmlsugar}{Syntactic sugar} for writing \sgml-style mark-up and having it checked.} \item \car{ Executing system commands, possibly sending data to \stdin and receiving data from \stdout \- \pr{system#3}.} \item \car{ And more.} \end{itemize} \sec1{cline}{Invoking zoem from the command line} \par{ You use zoem by invoking it from the command line. The normal mode of operation is that you specify a file for zoem to chew up and spit out. This is called the \it{entry file}, and its name usually has the extension \v{.azm}. A common invocation looks as follows:} \verbatim{zoem -i mcl.azm} \car{ The \v{-i} flag specifies the entry file. It is not necessary to write the \v{.azm} extension, zoem will append it for you. The preceding could also have been entered as} \verbatim{zoem -i mcl} \car{ In either case, zoem will set the session key \ssion{__fnbase__} to the base name of the entry file, i.e. the name stripped of its \v{.azm} suffix and any leading path components. In this example, the key \ssion{__fnbase__} will get the value \v{mcl}. If you have an input file without the \v{.azm} extension, you need to use the \v{-I} option.} \par{ Zoem writes its output to a default output file which is named according to three rules. The rules are:} \begin{itemize}{ {flow}{compact} {interitem}{0} {align}{right} } \item \car{ If the \v{-o} flag was given the value say \v{somestr}, zoem will write to the file named \v{somestr}.} \item \car{ If \v{-o} was not supplied but the \v{-d} flag was used with argument say \v{zyx}, zoem will write to the file named \ssion{__fnbase__.zyx}. The -d flag also results in the macro \ssion{__device__} being set to \v{xyz}.} \item \car{ If neither \v{-d} nor \v{-o} was given, zoem will write to the file named \ssion{__fnbase__.ozm}.} \end{itemize} \par{ It is possible to change the default output file from within the document; this is achieved with the \pr{writeto#1} primitive. Zoem can mingle default output with output to other files, use the \pr{write#3} primitive for that.} \par{ Both the \v{-i} and \v{-o} flag accept a hyphen as argument, meaning respectively that zoem will read from \stdin and write to \stdout.} \par{ Specifying just zoem and entering a return will cause zoem to enter interactive mode, in which it reads from \stdin and writes to \stdout. Interactive mode currently should catch any errors occurring, so it is a good way of experimenting and testing. By default, interactive mode reads chunks that are ended by a single dot on a line by itself. This behaviour can be changed by setting the session variable \ssion{__parmode__} using the \v{-s} option. Using \v{zoem -l parmode} shows the bits that can be set in this variable. It is for example possible to make zoem read paragraphs (ended by two or more consecutive newlines).} \cpar{Note}{ There is a difference between specifying \it{no} output stream (i.e. not using the \v{-o} option) and explicitly specifying \v{-o -}. In the latter case, zoem will never enter interactive mode. Should you need to insert zoem into some pipe sequence, then you need to use \v{-o -}.} \cpar{Tracing errors}{ If your document contains erroneous input (e.g. using a macro that was never defined), zoem will by default print the approximate corresponding line number of the current input file and the last key it saw, and then exit. If that does not suffice in tracking down the error, you have a choice of options. One possibility is to use one of the various tracing modes described below and in the zoem interpreter manual. Another possibility is to specify the \v{-x} option which says to enter interactive mode should an error occur. This enables you to inspect the values of keys defined or used in the problematic area. A selection of other options is given below. For the full story, consult \sibref{zoem}{the manual page of the zoem interpreter}.} \: mq \begin{itemize}{ {flow}{cascade} {interitem}{1} } \item{\v{-h}} \car{ lists all flags accepted by zoem with a short description for each.} \item{\v{-s foo=bar}} \car{ Sets key \mc{foo} to \v{bar}.} \item{\v{-e }} \car{ Zoem will evaluate \v{}, writing any result text to \stdout, and then exit.} \item{\v{-E }} \car{ Zoem will evaluate \v{}, writing any result text to \stdout, and then proceed.} \item{\v{-x}} \car{ If an error occurs, zoem stops processing and enters interactive mode.} \item{\v{-l }} \car{ lists all entities specified by \v{}. It can be any of \v{all}, \v{filter}, \v{legend}, \v{alias}, \v{session}, \v{trace}, or \v{zoem}. Repeated use is allowed. In fact, zoem will only check whether the target is present as a substring, so} \verbatim{zoem -l legendzoem} \car{ will print the legend and the list of zoem primitives. } \item{\v{--trace}} \car{ This traces (prints) all keys encountered, and prints possibly truncated arguments. Zoem has several other tracing flags, use the \v{-h} flag or refer to the zoem manual page for more information.} \par{ Tracing can be set from within the document using the \pr{trace#1} primitive. Part or whole of the data tree can be output from within the document using the \mc{%dump} primitive (refer to the \secref{grape} section).} \item{\v{--stats}} \car{ When zoem is done, it prints statistics about the primitive name table and about the user name table.} \end{itemize} \sec1{syntax}{Zoem syntax and parsing} \sec2{nomenclature}{Syntax and nomenclature} \par{ Zoem parses text which may contain zoem \bf{escape sequences}, these are sequences that have special meaning and cause zoem to do special processing. Each and every escape sequences starts with a backslash, no exceptions. There are three kinds of sequences that are \it{macros}, which may or may not take arguments. These are zoem primitives, user keys, and dollar keys.} \par{ There are currently about sixty zoem primitives, these are listed in the \capref{language} section. Sixty is quite a lot; it includes convenience sibling sets such as \pr{set#2}, \pr{setx#2}, \pr{def#2}, and \pr{def#2}, and entries covering a variety of areas such as \io, arithmetic, testing, control, string conversions, formatting, shadowing (scopes), and all the other stuff listed in the \secref{topicindex} section.} \par{ Additionally there are a number of zoem built-ins that are defined in terms of primitives. Built-ins live in the same dictionary as primitives and behave the same in all aspects. The next section has some further remarks on the differences and resemblances between primitives/built-ins on the one hand and user macros on the other hand.} \par{ User keys and dollar keys are discussed in the \capref{macro} section. Arguments are shipped by delimiting them with curly braces, as in} \verbatim{\mc{thiskey{takes}{\\bf{two}\\it{arguments}}}.} \car{ No characters are allowed inbetween (the delimiting curlies of) two arguments (but take note of the handy \pr{formatted#1} primitive). See the \capref{macro} section for more information. Zoem is very strict in the syntax it accepts, but it \it{garantuees} to accept a text in which each backslash \mc{} is escaped as \mc{\\} (i.e. a text in which all consecutive runs of backslashes have even length).} \par{ An \bf{active backslash} is any backslash that is not made inactive by an active backslash immediately preceding it. The first backslash seen by zoem (proceeding sequentially through the text) is active. This is one incomprehensible way of stating the obvious, and I bet you know what I mean anyway. An active backslash must always have a meaning known to zoem. If zoem does not get it, it will complain and exit. The meaning (i.e. class) of the escape sequence introduced by an active backslash is determined by the character immediately following it. A list is given below.} \par{ Within arguments, curlies not functioning as argument delimiters must also be escaped if they are not balanced. It is best practice to escape all non-argument-delimiting curlies, but I never do so myself unless they are not balanced. An \bf{escaped curly} is a curly preceded by an active backslash. An \bf{active curly} is a curly that is not escaped. A pair of \bf{balanced curlies} consists of an active left curly that matches an active right curly, where inbetween all escaped curlies are disregarded. A \bf{block} is anything delimited by balanced curlies. The word \bf{scope} is most often used to distinguish between \bf{device scope} and \bf{plain scope}, these are the two kinds of \bf{parse scopes}. An \bf{environment scope} refers to the stuff enclosed by instances of the \pr{begin#2} and \pr{end#1} primitives. So called \bf{name scopes} are entered and exited by \pr{push#1} and \pr{pop#1}.} \: \par \: A macro invocation is started with an active backslash, followed by an \: admissible macro name. This can be either a zoem primitive, or a \: user defined macro. The next section defines which names are \: admissible. This macro invocation (the active backslash followed \: by the macro name) can be followed by one or more blocks. \sec2{namespaces}{Primitives, built-ins and user macros} \par{ Zoem distinguishes between primitives and built-ins and user macros on the other hand. Consider the following slightly contrived example.} \verbatim{\protect{\:{/} \def{fib#1}{ \push{fibonacci} \set{a}{1} \set{b}{1} \set{c}{0} \while{\let{\a <= \1}}{ \setx{c}{\a} \setx{a}{\let{\a + \b}} \write{-}{txt}{\c\|} \setx{b}{\c} } \pop{fibonacci} }}} \car{ The example is contrived in that zoem is not the most appropriate language to compute Fibonacci numbers. The reason for using it is that extracts from existing macro packages require more context and are simply more boring.} \par{ In the example, the following macros are primitives: \bf{\pr{push#1}}, \bf{\pr{pop#1}}, \bf{\pr{def#2}}, \bf{\pr{set#2}}, \bf{\pr{while#2}}, \bf{\pr{let#1}}, \bf{\pr{setx#2}}, and \bf{\pr{write#3}}. The example defines a user macro \bf{\v{\\fib#1}}, which can be invoked e.g. as \v{\\fib{100}}. Doing this either from a file or from interactive mode should give the output below.} \verbatim{1 2 3 5 8 13 21 34 55 89} \par{ From the above it can be seen that a macro (primitive or user-defined) is in this text often referenced by its signature. The signature contains both the name of the macro and the number of arguments it takes, separated by the \v{#} (octothorpe) character. The octothorpe and ensuing integer are omitted if a macro does not take arguments. A new macro is defined by specifying the required signature (without the leading backslash) as the first argument of one of the definition macros. In this text a signature is usually prefixed with the backslash.} \par{ The example above also defines user macros \v{a}, \v{b}, and \v{c}. The \pr{set#2} primitive will not warn when a previous definition exists. The \pr{setx#2} acts similarly but will also first evaluate the value assigned to the macro. Finally, \pr{push#1} and \pr{pop#1} temporarily create a new dictionary in which the definitions are stored. This is one easy way to ensure that no other definitions are overwritten. This level of care is generally not required though.} \par{ The following are useful to know about primitives, built-ins and user macros.} \begin{itemize}{{align}{right}{flow}{compact}{mark}{\@{•}}} \item \car{ Primitives and built-ins live in one namespace (or dictionary), user macros live in another.} \item \car{ A built-in is a special macro provided by zoem. It is defined in terms of one or more primitives, but its definition lives in the same dictionary as primitives do. It is called a built-in because its definition is built into the zoem interpreter. Example: \v{begin#1} is defined as \v{\\begin{\\1}{}} (cf \pr{begin#2}). The full list can be obtained by issuing \v{zoem -l alias}.} \item \car{ Primitives and built-ins can be shadowed by user-macros, but a warning will be issued. You can test this by issuing e.g. \v{\\def{def#2}{\\set{\\1}{\\2}}}. This particular piece of code redefines \pr{def#2} as \pr{set#2} by shadowing the primitive \mc{def#2} as a user macro, losing the property of \pr{def#2} that it warns if a key already exists.} \item \car{ Primitives and built-ins can \it{always} be accessed by prefixing the name with a right quote, as in \v{\\'def{foo}{bar}}. The prefixed primitive syntax also has the advantage that it is slightly faster, although zoem speed is likely not something one should worry about.} \item \car{ It is impossible to access a user macro with the quote prefix syntax.} \end{itemize} \par{ It is probably a good idea in macro packages that export functionality to use the primitive quote prefix syntax. This protects the package from user redefinitions. At the same time, the ability to shadow zoem primitives implies that user macros (also those exported by macro packages themselves) are protected against potential clashes with zoem primitives that may be introduced in later versions of the language. The Fibonacci example looks as follows using the quote prefix syntax.} \verbatim{\protect{\:{/} \'def{fib#1}{ \'push{fibonacci} \'set{a}{1} \'set{b}{1} \'set{c}{0} \'while{\'let{\a <= \1}}{ \'setx{c}{\a} \'setx{a}{\'let{\a + \b}} \'write{-}{txt}{\c\|} \'setx{b}{\c} } \'pop{fibonacci} }}} \par{ The quote mechanism only works for zoem primitives and built-ins that follow the syntax of user macros. This includes names starting with a dollar \v{$} or with a double quote \v{"}. The primitive \pr{$#2} and the built-ins \v{\\""} and \v{\\""#1} are the only examples in this category. The quote mechanism does not work for special zoem primitives such as data keys (\secref{grape}), delay keys (\pr{!#1}), or \xml syntactic sugar (\secref{xmlsugar}).} \sec2{escape}{List of escape sequence classes} \par{ This is a list of escape sequence classes recognized by zoem, indexed by the (set of) character(s) triggering the class(es) \- this assumes that the character in question is preceded by an active backslash.} \begin{itemize}{ {flow}{cascade} {interitem}{1} } \item{\v{$[_a-zA-Z]*}} \car{ [dollar key] A sequence starting with a dollar sign possibly continued with underscores and alphanumeric characters. Introduces a dollar key. No dollar signs are allowed in the remainder, and the first non-alphanumeric non-underscore character terminates the sequence. The primary use of dollar keys is that they are set by \pr{begin#2} and \pr{end#1}. Dollar keys live in the dollar dictionary stack, which is pushed and popped by \pr{begin#2} and \pr{end#1}. Nested \v{begin/end} scopes can thus safely associate different values with the same key name. Refer also to the \capref{macro} section, the \capref{language} section, and the \capref{dictionary} section.} \par{ Note: \pr{$#2} is the only zoem primitive starting with a dollar.} \item{\v{[_a-zA-Z][_a-zA-Z0-9]*}} \car{ [user key/zoem primitive] A sequence starting with an underscore or an alphabetic character, with only underscores and alphanumeric characters in the remainder. Introduces a user key or a zoem primitive. The first non-alphanumeric non-underscore character terminates the sequence. These keys live in the \it{user dictionary stack}, which the user can control with the \pr{push#1} and \pr{pop#1} primitives. Refer also to the \capref{macro}, \capref{language}, and \capref{dictionary} sections.} \par{ A sequence consisting of a single underscore (i.e. not followed by an alphanumeric character) introduces an \iref{anonymous}{anonymous key}.} \item{\v{"}} \car{ [user key or zoem built-in] Starts a user key, which is only different from the user keys mentioned above in that it looks different. The sequence is terminated by a closing\~\v{"}. Inbetween, anything is allowed except a backslash or curly. This is used for creating mnemonic names such as } \verbatim{\ \\"man::author" \\"man::section" \\"man::version" \\"html::title" \\"html::charset"} \car{ These keys live in the \it{user dictionary stack}. See the \capref{macro} section and the \capref{dictionary} section.} \par{ There are two zoem built-ins that take this particular form. These are \mc{""} and \mc{""#1}. Both expand to nothing. The first can be used to temporarily separate two pieces of text, as they will be joined after expansion. The second can be used to quickly outcomment sections of text.} \item{\v{'}} \car{ [primitive quote prefix] As seen above, primitives and user keys largely live in the same syntactic namespace. It is possible to unambiguously invoke a primitive by inserting a right quote to the left of the primitive key or built-in. Refer to section \secref{namespaces}.} \par{ The user keys live in a stack of dictionaries. Dictionaries can be pushed and popped using \pr{push#1} and \pr{pop#1}. The default user dictionary is always present and acts as a global namespace. It is possible to retrieve a key \mc{foo} directly from the global namespace using the syntax \mc{''foo}, even if it is shadowed in stacked dictionaries. It is possible to set a key in the global namespace using \pr{set#3}. } \item{\v{%}} \car{ [data key] A sequence starting with a percent sign. The percent sign is followed by a number of scopes. This is used to access multi-dimensional data storage. Such data is stored using the \pr{def#2} primitive or one of its siblings. Refer also to section\~\secref{grape}.} \item{\v{[1-9]}} \car{ [positional parameter] A single (character encoding a) positive digit. The sequence backslash followed by digit is called a \it{positional parameter}. It is only interpreted in the second argument of \pr{set#2}, \pr{setx#2}, \pr{def#2}, and \pr{defx#2}, and in the definition part of an \iref{anonymous}{anonymous key} (which can be an argument to \pr{apply#2} and \pr{inspect#4}). In all these instances, the sequence denotes a positional parameter into which the corresponding argument will be interpolated when a key with arguments is used. It is allowed in other places though, as it is possible in zoem to create key definitions dynamically (see e.g. the \pr{setx#2} primitive). \bf{Note} during interpolation, positional parameters that are enclosed by the \it{delay scope} \v{\\!{..}} will not be interpolated (see \pr{!#1}). The status of this feature is not entirely clear.} \item{\v{}} \car{ [strip newline] The newline will be stripped during the interpretation stage. If you want the newline to be stripped during the file-read preprocessing stage use the sequence \v{\\:{/}}, which is a special case of the comment sequence (see below).} \item{\v{:}} \car{ [preprocessing sequence] There are a few preprocessing sequences, which are evaluated during file read (cf the \capref{fileread} section). The most important preprocessing sequence is simply the sequence \mc{:} followed by whitespace, an alphanumeric character, or a backslash. It introduces a comment up till and excluding the next newline, which is stripped.} \item{\v{|}} \car{ [zoem glyph] Comprises a special two-character sequence that can be given a device-specific meaning. It is customarily used to encode a line break. To zoem, this sequence is more or less the same as a 'normal' character. See the \pr{special#1} primitive.} \item{\v{~}} \car{ [zoem glyph] It is customarily used to encode a non-breaking space. See the entry above.} \item{\v{-}} \car{ [zoem glyph] It is customarily used to encode a long dash. See two entries back.} \item{\mc{}} \car{ [backslash] Denotes a literal backslash.} \item{\v{\{}} \car{ [left curly] Denotes a literal left curly.} \item{\v{\}}} \car{ [right curly] Denotes a literal right curly.} \item{\v{*}} \car{ [glyph sequence] Starts a glyph sequence or constant sequence. Refer to the \capref{dscope} section and to the \pr{constant#1} primitive.} \item{\v{<}} \car{ [syntactic sugar] This introduces syntactic sugar for directly writing \sgml-style mark-up, such as \html and \xml (e.g. DocBook). Refer to the \iref{xmlsugar}{anchor section} for that topic.} \item{\v{@}} \car{ [at scope] \it{Typically seen in macro package files only}. Starts a special instance of device scope called \it{at scope}. The sequence\~\mc{@} \it{must} immediately be followed by a pair of balanced curlies, so at scope always appears as \mc{@{..}}. Refer to the \capref{dichotomy} and \capref{dscope} sections for more information.} \item{\v{@e}} \car{ [at \html entity] \v{\\@e{ent}} will expand to the \html character entity &ent; \- it is equivalent to, somewhat easier to type and minimally shorter than \v{\\@{&ent;}}. } \item{\v{&}} \car{ [and scope] \it{Typically seen in macro package files only}. May only be used within device scope, and implements a limited form of macro expansion within that scope. The sequence\~\mc{&} \it{must} immediately be followed by a pair of balanced curlies. so and scope always appears as \mc{&{..}}. Refer to the \capref{dichotomy} and \capref{dscope} sections for more information.} \item{\v{`}} \car{ [back quote - formatting escape] \it{Typically seen in macro package files only}. Must be followed by a pair of balanced curlies enclosing a formatting sequence. This is only recognized within the \pr{formatted#1} primitive. This primitive removes all literal whitespace it encounters in its argument; the formatting sequences are transformed to the whitespace characters encoded by them.} \item{\v{,}} \car{ [comma - atomic separator] \it{Typically seen in macro package files only}. This is interpreted during filter time, and is always mapped to nothing. Use it for glueing things as in \mc{foo\\,1}, which will result in \v{theresultoffoo1}.} \item{\v{!}} \car{ [delay sequence] \it{Typically seen in macro package files only}. Introduces a zoem meta sequence. Such a sequence consists of a maximal run of consecutive backslashes, possibly followed by a single block. It can be used to delay interpretation during any number of interpretation stages, and is useful to delay interpretation, perhaps even in a nested fashion, for arguments in keys such as \pr{apply#2} that expand one or more of their arguments before use. The run of exclamation marks (or 'bangs' as they are internally called) actually comprises an argument to the underlying primitive, so the two primitives (one taking a single block argument) internally have respective signatures \v{!#1} and \v{!#2}. Externally though, they are just refered to as \pr{!} and \pr{!#1}.} \item{\v{=}} \car{ [inline files] \it{Rarely used feature}. Starts either a sequence of the form \mc{={fname}}, which begins a so called inline file named \v{fname}, or a sequence of the form \mc{==}, which ends such an inline file. Refer to the \capref{fileread} section.} \end{itemize} \par{ This leaves \v{0>()[]?^#/.;} for future use, hopefully very few of these will ever acquire meaning. If the sequence\~\mc{#} acquires meaning, it will probably be for encoding Unicode scalar values.} \sec2{stages}{Parsing stages} \par{ Parsing is separated into three stages, conceptually. Zoem knows two different parse scopes, plain scope and device scope. These are mentioned below, and explained in the \secref{dichotomy} section. The three stages are:} \begin{itemize}{ {flow}{compact} {interitem}{0} {align}{right} } \item File read \item Macro expansion / file inclusion - only plain scope is seen. \item Filtering - both plain scope and device scope are filtered. Device directives that lay hidden in device scope are interpreted during output. \end{itemize} \par{ A file is read in chunks, if possible. The requirement is that chunks must end on lines and be in the outermost scope. The default minimum chunk size is approximately one megabyte. Chunks are processed by recursively chunking them into smaller chunks as dictated by macro expansion. As soon as a chunk is no longer subject to macro expansion it is immediately filtered and output.} \par{ Macro expansion is done recursively. Whenever a macro is encountered, it is replaced by its expansion, and the result is again fed to the parser. Evaluatation is not necessarily lazy, that is, during macro expansion the expander may expand arguments before they are interpolated and substituted in the macro definition. This inside-out evaluation can recurse if necessary. Many zoem primitives evaluate one or more of their arguments before use. The default behaviour for user macros is lazy evaluation. This can be changed however by wrapping both the macro and its arguments in \pr{apply#2}. Expansion can be delayed using \pr{!} and \pr{!#1}, so different arguments can be treated differently.} \par{ Important is that the result from the second stage is still valid zoem input. If you re-feed it to zoem, file read and macro expansion are usually no-ops (unless some interpretation delay-magic was used), and the syntax is garantueed to be acceptable to zoem. This is because device scope is not touched during the first two stages, and device specific text (which is most likely not conforming to zoem syntax) lies always hidden in that scope. There are three kinds of escape sequences introducing device scope; these are described in the \secref{dscope} section.} \par{ This is used for example when creating a table of contents; you can write expanded but unfiltered content to a file and read it in during the following run. It is important that such content is fully expanded, because you want things like index numbers and references as they are at the time of macro invocation. It is equally important that what you read back in is still valid zoem input; this is simply achieved by witholding filtering. When the table of contents is read in, it can be subjected to filtering, and this is the right way to do toc stuff in Zoem.} \sec2{fileread}{File read} \par{ File read - stripping comments, reading inline files.} \par{ Zoem searches for files included via \pr{dofile#2} or one of its built-in aliases in a number of places if it cannot find the file in the current directory. The precise way of searching is documented in section \secref{searchpath}.} \begin{itemize}{ {flow}{compact} {interitem}{1} } \item{\mc{:}} \car{ In most cases, this sequence introduces a comment, namely where it is followed by whitespace, an alphanumeric character, or a backslash. It introduces a comment up until and excluding the next newline, which is stripped.} \par{ The sequence \v{\\:{/}} introduces a comment up till and including the newline. This feature can be useful within the \pr{protect#1} primitive, as it is the only way to delete actual newlines within the argument of that primitive.} \par{ The sequence \v{\\:{!}} is replaced by a backslash. The single use currently known is to make it easy to quote zoem input containing comment sequences. This} \verbatim{\\protect{\\foo \\bar \\zut \:{!}\:{!}: this will end up as a comment. }} \car{ will result in the following} \verbatim{\\foo \\bar \\zut \:{!}\: this will end up as a comment.} \set{{dict}{itemize}}{$flow}{cascade} \item{\mc{={fname}}} \car{ starts inline file named fname at the next line, removes remainder of line after the \mc{={fname}} sequence. When using the \pr{dofile#2} primitive or one of its four built-in aliases, an inline file takes precedence over regular files in the file system, whether it is present (as a regular file) or not. See below. This feature can be used to ship zoem input in one piece while putting the macro parts at the end. \pr{zinsert#1} can address inline files as well, but \pr{finsert#1} cannot. The reason for this is that inline files have to satisfy zoem syntax, whereas \pr{finsert#1} can be used to read arbitrary data.} \par{ The future will probably bring a zoem option that creates such a self-contained file automatically from the zoem entry file.} \set{{dict}{itemize}}{$flow}{compact} \item{\mc{==}} \car{ ends inline file, removes remainder of line.} \end{itemize} \par{ The above applies to any file read at any stage. Inline files may occur in any file included at any time, but they do not nest.} \par{ The \it{zoem entry file} is the single file that is specified on the command line. This is the main file, from which other files can be included if desired.} \par{ Zoem entry files usually have the extension \v{.azm}, which is memnonic for \bf{A ZoeM} file. This is required if the \v{-i} option is used. Arbitrary entry file names can be specified using the \v{-I} option. It is not uncommon to generate sibling files with \v{.roff}, \v{.html}, \v{.zmt} (zoem table of contents), and \v{.zmr} (zoem references) extensions \- however, this is all configurable in user space and not part of zoem itself. There are no restrictions on names of files that are included from the entry file. Inclusion is done recursively.} \par{ The future will probably bring a second extension that is allowed, namely \v{.ezm} for \bf{Expanded ZoeM} file, which is a self-contained file in which every included file is present as an inline file.} \sec2{searchpath}{File search path} \par{ If zoem cannot find a file in the current directory, it attempts to find the file in one of three different ways. These are, in the order in which they are attempted:} \begin{itemize}{{align}{right}{flow}{compact}} \item \car{ The environment variable \v{$ZOEMSEARCHPATH} is checked. It may contain a listing of paths separated by whitespace or colons.} \item \car{ The zoem variable \ssion{__searchpath__} is checked. It must contain a listing of paths stored as a vararg, i.e. a sequence of paths where each path is delimited by curly brackets. \bf{DO NOT} overwrite this variable, but rather append or prepend to it. Most likely zoem was configured and compiled locally on your system, in which case \ssion{__searchpath__} contains the path necessary to find the macro packages \v{man.zmm}, \v{faq.zmm}, and \v{ref.zmm}.} \item \car{ The path of the file currently being parsed is used. Assume that file \v{foo} contains \mc{import{/a/b/c/bar}}. If file \v{bar} wants to include file \v{zut}, which is in the same \v{/a/b/c/} directory, it need not prepend a path but can just issue \mc{import{zut}}. Should the previous search mechanisms fail to find zut, then zoem will as a last resort deduce the path from \v{/a/b/c/bar}. This feature is probably rarely needed, if ever at all.} \end{itemize} \sec2{macro}{Macro expansion} \par{ Macro expansion consists of recursive file inclusion and macro expansion. All zoem primitives and user keys are recursively expanded until none remains. Zoem primitives and user keys take one of the following forms:} \begin{itemize}{ {flow}{cascade} {interitem}{1} } \item{\mc{abc_0123_}} \car{ A key with alphanumerics and underscores only. Ends with any other character. All zoem primitives but one have this form.} \par{ Note: \mc{_} denotes an anonymous key, see the \capref{anonymous} section.} \par{ These keys live in the \it{user} dictionary stack. Initially, there is only one dictionary. The stack can be manipulated using the \pr{push#1} and \pr{pop#1} primitives.} \item{\mc{"abc::def-ghi.jkl,mno+qrs"}} \car{ A quoted key. Almost anything inbetween quotes is allowed. Always ends with a quote. No zoem primitive has this form. These keys live in the same \it{user} dictionary stack as the keys above.} \item{\mc{$abc_0123_}} \car{ A key introduced with a dollar sign. The name may further consist of alphanumerics and underscores and it ends with any other character. These keys live in the \it{dollar} dictionary stack. A dictionary is pushed with every occurrence of \pr{begin#2}, and that dictionary is popped with the corresponding occurrence of \pr{end#1}.} \par{ Further note: \pr{$#2} is a zoem primitive.} \end{itemize} \par{ All three types of keys may take arguments, and overloading is allowed:} \verbatim{\ \\foo \\: signature foo \\foo{bar} \\: signature foo#1 \\foo{bar}{bop} \\: signature foo#2 \\$foo{bar}{baz} \\: signature $foo#2 \\"foo::oof"{zut}{zit}{zot} \\: signature "foo::oof"#3} \car{ is an ensemble of valid and unique keys, which can be defined for example by} \verbatim{\ \\def{foo}{FOO} \\def{foo#1}{The FOO of \\1} \\def{foo#2}{The FOO of \\1 and \\2} \\def{$foo#2}{The $FOO of \\1 and \\2} \\def{"foo::oof"#3}{\\foo{\\1}{\\2}\\foo{\\2}{\\3}}} \car{ Additionally, zoem allows the definition of \it{constant keys} that map directly into device space and are ignored during macro expansion. Usage of such keys looks like \mc{*{'e}} or \mc{*{(c)}} and is detailed later on.} \par{ A sequence\~\mc{k} where k is in 1-9 is allowed within anonymous keys (as used for example in \pr{apply#2} and \pr{inspect#4}) and in the definition argument of the \pr{def#2} primitive and its siblings \pr{defx#2}, \pr{set#2}, and \pr{setx#2}. It indicates the position(s) where arguments should be interpolated. \bf{Note} during interpolation, positional parameters that are enclosed by the \it{delay scope} \v{\\!{..}} will not be interpolated (see \pr{!#1}). The status of this feature is not entirely clear.} \par{ A feature that should only rarely be needed is that zoem allows name scopes. Refer to the \capref{dictionary} section.} \sec2{}{File inclusion} \par{ There is one zoem primitive which has four different uses. For each of those uses, a built-in alias exists.} \verbatim{\ \\dofile#2 use alias meaning \\dofile{expr}{!+} \\input{expr} require file, interpret and output \\dofile{expr}{!-} \\import{expr} require file, interpret only \\dofile{expr}{?+} \\read{expr} permit absence, interpret and output \\dofile{expr}{?-} \\load{expr} permit absence, interpret only} \car{ The \pr{dofile#2} primitive and its four aliases are perhaps a little funny interface-wise \- better ideas are welcome. The \v{expr} argument is \it{digested}, that is, expanded until no macro's remain. It is thus possible to specify \ssion{__fnbase__.zmt} and include a table of contents file that has been written to in a previous run. \pr{dofile#2} and its aliases have the property that zoem really descends into the files, and on error will emit a message containing the approximate line number where it occurred.} \par{ Additionally, the contents of a file can be placed inline using \pr{finsert#1} and \pr{zinsert#1}.} \par{ Note: wherever \v{key} is written, it means that something of the form \mc{foo}, \mc{$foo}, or \mc{"foo"} has to be provided, so you would use \pr{setx#2} e.g. as \mc{setx{foo}{\\finsert{\\__fnbase__.zyx}}}.} \sec2{protection}{Protection} \par{ The \pr{dofile#2} primitive requires that the files to be included satisfy zoem syntax. It will descend into the files and proceed parsing them.} \par{ The \pr{finsert#1} and \pr{zinsert#1} primitives do not descend, but rather act as if the contents of the file specified were pasted into the place of macro invocation.} \par{ \pr{finsert#1} will \it{protect} the contents of the inserted file, that is, all backslashes and curlies are escaped by preprending them with a backslash. \pr{zinsert#1} will include the file unchanged, assuming that its contents satisfy zoem syntax.} \par{ The \pr{system#3} primitive is able to pipe data to a system command's \stdin stream and retrieve data from the command's \stdout stream. This primitive will \it{unprotect} the data it sends, and it will protect the data it receives. \bf{Note} the security implications of this feature as discussed at the \pr{system#3} entry.} \par{ Data can be explicitly protected using the \pr{protect#1} primitive.} \par{ Protected data can (currently) never result in it being expanded again. This is because escaped backslashes are only interpreted at filter time, and never during expansion. If you only need \it{temporary} delay of expansion, use the \pr{!} primitive or the \pr{!#1} primitive.} \sec2{dichotomy}{Scope dichotomy} \par{ Zoem knows two parse scopes: \bf{plain scope} and \bf{device scope}. The latter is also called 'at scope' because \mc{@{..}} is one (but not the only) way of entering device scope. In plain scope, every character represents itself as a glyph, i.e. as something that should show that way in print/on screen (after the zoem output/device input is fed to the device interpreter).} \par{ For example, if you write the less than sign\~\v{<} in plain scope, it should show up as a readable less than glyph, like in this very sentence. In order to make this happen, zoem provides the \pr{special#1} primitive, so that the less than sign can be automatically mapped to the html entity sequence \v{<}.} \par{ In device scope, nothing is mapped except for a double backslash should it occur. If you enter this particular sequence of mixed scope: \mc{@{}\\@{}} as zoem input, the zoem output/device input is (provided the \pr{special#1} primitive was correctly used for the html device): \v{<hello world>} and what you finally see on screen is: \@{}\@{}. In device scope, every character (except for the escape sequences available in that scope) represents itself as the character that should be present in the zoem output/device input. Device scope should normally only be seen in macros and not in running zoem input.} \par{ In plain space you type characters just as you want to see them eventually \- when you read the document after the zoem output was run through a device interpreter (such as a browser or printer, or postscript previewer). The only exceptions are the backslash and the two curlies, these should be entered as\~\mc{\}}, \mc{\{}, and\~\mc{\}}, respectively. Those escape sequences are interpreted as the characters or glyphs \mc{}, \v{\{}, and\~\v{\}}. For all characters, including these three, it is checked whether they should be further mapped according to the \pr{special#1} primitive. If a mapping is found, it is retrieved and interpreted by the device scope filter. Read on.} \sec2{dscope}{Device scope} \par{ There are three kind of strings which are interpreted by the generic device filter, and which are said to live in device scope:} \begin{itemize}{ {flow}{compact} {interitem}{0} {align}{right} } \item \car{ The strings embedded in \mc{@{..}} sequences.\|} \item \car{ The strings mapped to by the \pr{special#1} primitive, including mappings of the zoem glyphs\~\mc{~}, \mc{|}, and\~\mc{-}.} \item \car{ The strings mapped to by the \pr{constant#1} primitive.} \end{itemize} \par{ In a macro package that is meant to work for multiple devices, every use of any of these constructs will typically be embedded in something that tests the value of the active device. This can be done using either \pr{cmp#3} with \pr{if#3}, \pr{switch#1}, or \pr{$#2}, in conjuction with the pre-defined zoem key \ssion{__device__}, containing the name of the active device (which can be specified on the command-line). The following are equivalent:} \verbatim{\ \\if{\\cmp{eq}{\\__device__}{html}}{ \\@{} }{} \\: is equivalent with \\${html}{ \\@{} }} \car{ The \pr{$#2} primitive is used if something needs to be done for one device only, and it may occasionally appear in documents. For example, the \aref{http://micans.org/pud/}{\pud} man macros enable the creation of a table of contents (for both html and troff). My own convention is to have a table of contents only in html, and I specify this using the sequence} \verbatim{\mc{${html}{\\"man::maketoc"}}} \car{ When zoem enters device scope, it outputs all characters literally, except that the backslash still has special meaning. It is used for encoding the backlash itself (as \mc{\\}), and for encoding the two curlies\~\v{\{} and\~\v{\}} (as \mc{\{} and\~\mc{\}}). This is the same as in plain scope (except that in plain scope the resulting character may again be mapped onto something else, for example, in troff the backslash also needs encoding as \mc{\\}).} \par{ In device scope the sequence\~\mc{"} maps to a double quote. This is an additional feature to allow zoem input to be more susceptible to some editors moving features. It is not \it{necessary} though; simply using the double quote without escaping it is sufficient.} \par{ Additionally, the backslash can be followed by a single letter from a prescribed set listed below. Such a backslash+letter combination is called a \it{device directive}. By default, zoem will never print consecutive newlines, and it will never print consecutive spaces or spaces at the beginning of a line. The device directives allow this to be altered.} \begin{itemize}{ {flow}{compact} {interitem}{0} } \item{N} \car{garantuee a newline} \item{P} \car{garantuee a paragraph skip (two consecutive newlines)} \item{S} \car{garantuee a space (except if next char is newline)} \item{I} \car{increase indent by one (indent is printed after each newline)} \item{J} \car{decrease indent by one} \item{C} \car{set indent to zero} \item{n} \car{print newline} \item{s} \car{print space} \item{t} \car{print tab} \item{w} \car{stop managing white space (squashing spaces and newlines)} \item{W} \car{start managing white space (use after\~\v{w})} \item{&} \car{start \it{and} scope (see further below)} \item{+} \car{set the special level (see further below)} \end{itemize} \par{ Note that the directives mainly affect the lay-out of the device text (which is zoem output), not the look of the interpreted device text. The '\v{N}' directive is rather important when constructing troff macros, as many special troff commands are encoded by a dot as the first character on a line, i.e. a newline followed by a dot. Since troff attaches special meaning to two consecutive newlines as well (interpreting it as a paragraph break), zoem needs to be able to specify \it{print a newline only if the previous character was not a newline}. This is exactly what the \v{N}\~directive means. The '\v{W}' and '\v{w}' directives are required for enabling the construction of a verbatim environment.} \par{ The sequence \mc{&{}} can be used to avoid overly cumbersome constructions. It is for example illegal to write} \verbatim{\protect{\@{}}} \car{ In the early days of zoem, you had to write} \verbatim{\protect{\@{
}}} \car{ \- ugly by most standards. Today you write} \verbatim{\protect{\@{
}}} \car{ Which is not any shorter, but more pleasant to read. What happens is that the contents of \it{and} scope \v{\\&{..}} is first fully expanded in plain scope, after which the result is passed back to device scope. You have to be careful though. The content of \v{\\&{..}} should never expand to something containing the \it{at} sequence \v{\\@{..}}, because device scope is not allowed to nest. It should also not expand to something containing the \it{and} sequence \v{\\&{..}} either, as this sequence is illegal in plain scope.} \sec3{special}{Device scope resulting from mapping special characters} \par{ The first kind of zoem escape introducing device scope is \mc{@{..}}. The second kind comprises the \pr{special#1} mappings, including the three zoem glyphs\~\mc{~}, \mc{|}, and\~\mc{-}. Conventionally, these are used to encode a non-breaking space (\v{ } in html), a line break (\v{
} in html), and a long dash (emdash, not present in html). You would for example put} \verbatim{\ \\if{\\cmp{eq}{\\__device__}{html}}{ \\special{ {38} {&} \\: 38 is ascii character '&' {60} {<} \\: 60 -> '<' {62} {>} \\: 62 -> '>' {-1} { } \\: the zoem escape \\~ {-2} {
\\!N} \\: the zoem escape \\| {-3} {-} \\: the zoem escape \\- } }{ }\ } \car{ All \pr{special#1} definitions are interpreted in device scope. For every character encountered in plain scope, it is checked whether a \pr{special#1} definition exists, if so, the corresponding string is retrieved and this is filtered through the device scope filter. Note that the three zoem glyphs described here may not be used in device scope, they can only be used in plain scope. In device scope you will have to write the explicit, device-specific sequence such as \v{
} (in html).} \par{ The \pr{special#1} primitive allows different levels of mappings to be defined simultaneously. Several definitions of the same character are allowed; these are placed on a stack particular to that character (cf. the \pr{special#1} entry). When zoem encounters a character for which one or more mappings exist, it retrieves a mapping using the \it{special level}. This is an integer that has by default the value\~\v{1}. Each open output stream has a unique special level associated with it. [Output streams exist for the \it{default output file} (see e.g. \pr{writeto#1}) and for each file openend by \pr{write#3}]. A mapping is retrieved using this rule: \it{The deepest element is fetched for which the depth does not exceed the level}. The most visible element (which is the element first occurring in the \pr{special#1} invocation) has depth\~\v{1}.} \par{ The presence of different levels comes in handy e.g. when the troff device is used. In some contexts, the double quote is a special character in troff (and a printable quote is then mysteriously represented by \it{two consecutive double quotes}), in most contexts it is not. This is combatted by including these two specifications in the \mc{special#1} call preparing for troff output (note that 34 is the \ascii value representing the double quote):} \verbatim{\\special{ ... {34}{"} {34}{""} {92}{\\\\e} ... }} \car{ The first pair shown simply maps the double quote onto itself, and the second pair maps it onto a double double quote. As long as the special level is\~\v{1}, the second definition is not used. The backslash (with \ascii value \v{92}) needs only one definition as it is escaped in the same way in all troff contexts.} \par{ The special level can be set using the \mc{+}\~directive, which must be followed immediately by a digit in the range \v{0-9} enclosed by curly brackets, e.g. \v{\\@{\\+{2}}} will set the special level to \v{2}. The special level \it{can} be set to\~\v{0} (zero) and this means that no character will be mapped.} \cpar{Example}{ Double quotes need to be escaped in certain troff contexts. This is achieved by the following.} \verbatim{\\@{\\+{2}"} ... funny quote context ... \\@{"\\+{1}}} \car{ Such a context is typically encapsulated by a macro defined in a package; its definition should never be visibile to the user of the package. Note that the double quotes embedded in \it{at} scope in the example above are not susceptible to special mapping \- mapping is only applied in plain scope.} \sec3{glyph}{Device scope resulting from glyph definitions} \par{ The third kind of device scope strings are those mapped to by the \pr{constant#1} primitive. An example of (toy) usage is this:} \verbatim{\ \\constant{ {'e} {é} \\: Use e.g. as \\*{'e}l\\*{`e}ve (\*{'e}l\*{`e}ve) {(c)} {©} \\: Use e.g. as \\*{(c)} DEEDEE (\*{(c)} DEEDEE) {+-} {±} \\: Use e.g. as \\*{+-} a few (\*{+-} a few) }} \car{ This is largely convenient syntactic sugar. These constants could also have been defined as} \verbatim{\ \\def{"'e"}{\\@{é}} \\def{"(c)"}{\\@{©}} \\def{"+-"}{\\@{±}}} \car{ The idea is that the \mc{*{..}} namespace is used for glyph-like device-specific bindings, whereas the \mc{".."} namespace is used for semantic purposes that are device-independent, but nothing prohibits you from fiddling with this.} \sec2{xmlsugar}{\sgml/\html/\xml syntactic sugar cubes} \par{ Zoem provides a shorthand for entering \sgml-style tags. It is checked by zoem for well-formedness of the resulting \sgml code, and it can be freely mixed with other modes of entering tags. Normally you would have to enter \sgml-style tags in device scope, or write a macro for doing that. For example, a macro \v{x#2} that expands \mc{x{b}{be bold}} to \mc{@{}be bold\\@{}} is a likely candidate. However, this would be inelegant for constructions that span a long distance, and it does not provide for letting zoem expressions expand within an xml tag.} \par{ Zoem provides the \mc{<} token. It can be used in several ways:} \verbatim{\protect{ \ \:{!}: foo can be an expression. Some \:{!}: of course, expressions may occur here as well. over here. \{zut} \:{!}: bar can be an expression too; \:{!}: this syntax will close itself. Some \:{!}: again, expressions may occur here as well. over there. \<> \:{!}: this is a closing tag for the first foo. \ works too. \ \:{!}: zoem knows this closes itself. \<*br> \:{!}: zoem converts this to
}} \car{ Suppose that foo, bar, and zut are zoem expressions expanding to strings FOO, BAR, and ZUT respectively (FOO and BAR might be of the form \v{tag a="b" c="d"}). Provided that the characters\~\v{<}, \v{>}, and\~\v{&} are automatically mapped in plain scope (as a result of correct \pr{special#1} usage), the above will result in} \verbatim{\ Some <content> over here. ZUT Some <content> over there.
} \car{ The \v{foo} part inside the \mc{} syntax should never expand to something containing a\~\v{>}. This is entirely the responsibility of the user or macro package author.} \par{ Both kinds of syntax, \mc{} and \mc{{zut}}, are kept as they are during the expansion stage, and they can be subjected to multiple levels of expansion (which may be the case if such syntax is used inside e.g. \pr{setx#2} or \pr{apply#2}). It is only at the output stage that the syntax is transformed to actual \sgml code and that well-formedness is checked. So, the two examples just seen will first transform to \mc{} and \mc{{ZUT}} (please note that foo, bar, and zut all denote expressions here). If they are at that point no longer subject to expansion they enter the output stage where they are converted to \v{} and \v{ZUT} (plus some additional formatting/indenting) respectively.} \par{ Zoem pushes on a stack of opening tags whenever it encounters \mc{} syntax during the output stage. It naturally knows that a tag can be followed by attributes. It also knows that a tag such as \mc{} closes itself (\xml syntax), and the applies for \dtd tags such as \mc{}. As a special case, \mc{<*tag foo bar zut>} is converted to \v{} to allow encoding of \html tags such as \v{}, \v{}, and \v{
}. This syntax is mandatory for tags that will not be closed. Note that you should only use \mc{

} if you are going to use \mc{

} or \mc{<>} as well (because zoem requires closing tags for opening tags). That said, the syntax \mc{

{ paragraph content }} is preferable in most cases. } \par{ Zoem does not know about other ways of entering tags, so \mc{@{}} would not affect the stack just mentioned. \mc{<>} automatically closes the top level opening tag from the stack. Again, syntax such as \mc{@{}} does not interact with the stack. } \par{ It is possible to explicitly close a tag by simply using \mc{} syntax. Zoem will check whether the closing tag matches the top level opening tag. As seen before, \mc{<>} does the same thing, but rather than doing a check, zoem will use the top level opening tag to construct the corresponding closing tag.} \sec1{}{Zoem miscellanea} \sec2{signature}{Key signatures} \par{ Several keys take another key as argument, e.g. they store a value in a second key or check whether the second key exists. The full list of these meta keys is \pr{def#2}, \pr{defx#2}, \pr{set#2}, \pr{setx#2}, \pr{undef#1}, \pr{defined#2}, \pr{apply#2}, and \pr{inspect#4}. In all cases, the argument key is passed as the first argument, by means of the \bf{key signature}.} \par{ For a key \mc{key} taking \v{k}\~(\v{k}>0) arguments its signature is \v{key#k}. The signature of a key \mc{key} taking no arguments is simply \v{key}. The rule is: Key usage always includes a single leading backslash (this activates the key). When a key is subject of inspection, it is always referred to by its signature.} \par{ Throughout this text, a key with signature \v{key#k} is mentioned by means of its \bf{key mention} \mc{key#k}, that is, for extra clarity the backslash is prepended to the signature.} \par{ As explained in \capref{namespaces}, almost all primitives can be specified using quote syntax. The quote syntax is integrated with signatures. This means that primitives that expect a signature (such as \pr{def#2}, \pr{undef#1}, and \pr{apply#2}) accept quoted signatures too when the signature refers to a primitive.} \sec2{anonymous}{Anonymous keys} \par{ A single underscore introduces an \bf{anonymous key}. It is optionally followed by a \v{#k} tag (for\~\v{k} in\~\v{1..9}), denoting the number of arguments the anonymous key takes. An occurrence of the latter is called a \bf{tagged anonymous key}. The first argument to the key should be a key definition, the other arguments are the arguments for that key definition. If a tag is present, it is used for verifying that the anonymous key is used properly.} \: hierverder: this used to be useful because: \: This feature may be helpful when an anonymous key is the result of \: expanding the first argument to \pr{meta#3}. \: and now? -- the example below does not work with \!: \: \begin{vbt} \: \\def{foo}{#2{\\1 the \\2}} \: \\def{bar}{#3{\\1 the \\2 and \\3}} \: \: \\meta{_\\foo}{x}{{billy}{kid}} \: \\meta{_\\bar}{x}{{william}{fourth}{maxima}} \: \\meta{_\\bar}{x}{{william}{fourth}} \: \end{vbt} \: \: results in \: \: \begin{vbt} \: billy the kid \: william the fourth and maxima \: \end{vbt} \: \: and the third will fail. \verbatim{\ \\_{\\1 the \\2}{row}{boat} \\_#2{\\1 the \\2}{row}{boat}} \car{ results in} \verbatim{\ row the boat row the boat} \car{ Anonymous keys may occur in the first argument of \pr{apply#2}, within the first argument of \pr{inspect#4}, and they may occur freely in running text. The presence of a tag is required when an anonymous key is used within either of \pr{apply#2} and \pr{inspect#4}. An example of usage in \pr{apply#2}:} \verbatim{\ \\apply{_#2{\\1 kisses \\2\\|}}{{bill}{max}{max}{bill}} bill kisses max max kisses bill} \car{ or even} \verbatim{\ \\set{%foo}{{{\\1 hugs \\2\\|}}} \\apply{_#2\\%{foo}}{{bill}{max}{max}{bill}} bill hugs max max hugs bill} \car{ Note that in order to store a block with \pr{set#2}, an extra pair of curlies has to be used, as blocks can only be passed as a sub-argument of a single-element \iref{vararg}{vararg}. Also note that in a vararg it is allowed to put white space inbetween the constituting elements.} \sec2{grape}{Tree data} \par{ Data can be organized in a global tree with a specialized use of \pr{set#2} and its siblings, as shown further below. The data is retrieved from the tree using so called data keys. Such a key is started using a percent sign, immediately followed by zero, one, or more blocks, e.g. \mc{%}, \mc{%{..}}, and \mc{%{...}{...}{...}} would all be allowable invocations. If more than one block follows the percent sign, there must be no interleaving white space.} \par{ The underlying primitive has signature \v{%#1}, as the trailing scopes are congregated into a single argument before they are further processed. The two sibling primitives \v{%free#1} and \v{%dump#1} serve for freeing and dumping parts or whole of the tree, as described further below.} \par{ When applied to data keys, \pr{set#2} and its siblings set one or more values in a global multi-dimensional associative array that we shall refer to here as \v{ROOT}. Please note that \v{ROOT} is for explanatory purposes only. This associative array is best viewed as a tree, in which every node can have branches to higher nodes. A node may or may not contain a value. Let us denote the value contained by a node \v{some-node} as \v{*(some-node)}. The fact that \v{beta} is a node one branch higher than \v{alpha}, which is in turn one branch higher than \v{ROOT}, is denoted as \v{ROOT->"alpha"->"beta"}. In this \it{path} notation, strings indexing nodes in the trees are written inbetween quotes. This has the advantage that the empty string, which is a valid index string, has the representation \v{""}. Combining these conventions, we write the value associated with \v{beta} as \v{*(ROOT->"alpha"->"beta")}. Consider these examples.} \verbatim{\ \\set{%{foo}{bar}{zut}}{lez} \\: now *(ROOT->"foo"->"bar"->"zut") is "lez" \\set{%{foo}{bar}{zut}}{{a}{b}{x}{y}} \\: now *(ROOT->"foo"->"bar"->"zut"->"a") is "b" \\: and *(ROOT->"foo"->"bar"->"zut"->"x") is "y" \\: and *(ROOT->"foo"->"bar"->"zut") still is "lez" \\: some special cases \\set{%{foo}{bar}{zut}}{{{c}}} \\: now *(ROOT->"foo"->"bar"->"zut") is "{c}" \\set{%{foo}{bar}{zut}}{{c}} \\: now *(ROOT->"foo"->"bar"->"zut") is "c" \\set{%{foo}{bar}{zut}}{c} \\: now *(ROOT->"foo"->"bar"->"zut") is "c" \\set{{foo}{bar}{zut}}{{c}{d}{e}} \\: This does nothing, because the second argument \\: must either be an *even* vararg, a 1-element vararg, \\: or a simple argument. \\set{%{{tiger}}}{in the woods} \\: now *(ROOT->"{tiger}") is "in the woods" \\set{%{tiger}}{in the woods} \\: now *(ROOT->"tiger") is "in the woods" \\set{%tiger}{on the loose} \\: now *(ROOT->"tiger") is "on the loose" \\: stripping curlies from a vararg with one argument \\: does not make a difference with the exception of \\: the case shown below. \\set{%{}}{empty} \\: now *(ROOT->"") is "empty". \\set{%}{root} \\: now *(ROOT) is "root".} \car{ Take note of the rule governing the second argument. If the first non-white space character is a left curly, \pr{set#2} expects a vararg. The vararg must either be even or it must contain exactly \it{one} argument.} \par{ An even vararg is interpreted as a sequence of key-value pairs. Each key induces a new branch from the node specified in the first argument, and each value is associated with the node at the end of that branch. If the vararg contains exactly one argument, that argument is simply used as a value. This is the only way to specify a block as the value. If the first non-white space character is not a curly, \mc{set#2} will simply interpret the second argument as a value to append to the node specified in the first argument. It is possible to sidestep these issues by using \pr{set#3} and the directive \v{u} as argument to the \v{modes} key. This will cause the value to be copied without further interpretation as a vararg or block. } \par{ If you want the data to be stored to be expanded before it is bound, use \pr{setx#2} or \pr{defx#2}.} \par{ Data is retrieved simply by prefixing the path with the \mc{%} token. Example:} \verbatim{\ \\set{%{foo}{bar}{zut}}{{a}{b}{x}{y}} \\%{foo}{bar}{zut}{a} \\%{foo}{bar}{zut}{x}} \car{ will print \v{b} and \v{y}. If the path is not an existing path in the current tree it will simply be ignored, although an error message will be emitted.} \par{ Whole or part of the data tree can be freed using the \mc{%free} primitive. Again, simply append the access sequence in which you are interested. For freeing the entire tree, use \mc{%free} without trailing scopes. The \mc{%free} primitive largely exists for testing purposes to ensure that zoem gets its internal data manipulation right.} \par{ Whole or part of the data tree can be output for debugging purposes using the \mc{%dump} primitive. Simply append the access sequence in which you are interested. For printing the entire tree, use \mc{%dump} without trailing scopes. This can be used for debugging if your data manipulation does not work out as expected. There is no result text as far as usual processing is concerned. The underlying primitive dumps its findings to \stdout in a line-based textual representation of the data-tree.} \sec2{vararg}{Of blocks and varargs} \par{ A \bf{block} is a string beginning with a left curly and ending with a right curly, the curlies being balanced. This is a convenient naming convention. Blocks can be used in constructing anonymous keys; refer to the \capref{anonymous} section.} \par{ Some keys take a \it{vararg} argument, which is a single argument (enclosed by curlies as are all arguments), which can contain any number of sub-arguments, that is, a list consisting of blocks. Inbetween the blocks white space may occur. The \pr{special#1} and \pr{constant#1} keys both take a single vararg argument, and the \pr{apply#2} and \pr{switch#2} keys each take a vararg as their second argument. For \pr{apply#2} the first argument is a key that is applied to subsequent batches of arguments from that vararg. The \pr{table#5} primitive takes a vararg as its last argument. For examples, see the \capref{tour} section and the \pr{apply#2} entry.} \par{ An \bf{even vararg} is a vararg with an even number of elements, An \bf{odd vararg} is a vararg with an odd number of elements.} \par{ User keys may check whether an argument is a vararg by employing the \pr{nargs#1} primitve. This can be used to take different actions depending on the structure of the argument.} \sec2{session}{Session keys} \car{ This is a compact listing of session keys, created by issuing \v{zoem -l session}.} \verbatim{\system{../src/zoem}{{-l}{session}}} \car{ This manual is littered with examples of the usage of \ssion{__device__}. The \ssion{__fnbase__} key is useful for creating sibling files of the entry file, i.e. a table of contents file or a file containing reference information. I have the habit of naming those \ssion{__fnbase__.zmt} and \ssion{__fnbase__.zmr}, respectively. The \ssion{__fnin__} key is useful for emitting log, warning, or error messages particular to the file currently being parsed. The \ssion{__parmode__} macro affects the way in which zoem reads chunks in interactive mode (refer to Section\~\secref{cline}). The \ssion{__searchpath__} macro is one of the ways in which zoem can be instructed to search for files in a set of locations, when confronted with \pr{dofile#2} or one of its built-in aliases. Section\~\secref{searchpath} has more information about the mechanism of file location. See also \sibref{zoem}{session}{the zoem manual}.} \sec2{builtin}{Built-in macros} \par{ This is the result from doing \v{zoem -l builtin}:} \verbatim{\system{../src/zoem}{{-l}{builtin}}} \sec2{dictionary}{Dictionary stacks} \par{ By default, when using \pr{def#2} and \pr{set#2}, keys and their values are put in a global user dictionary. It could be useful to shadow keys by entering a new name scope. Zoem facilitates this by providing the \pr{push#1} and \pr{pop#1} keys. These push and pop a new dictionary onto/from the user dictionary stack.} \par{ A second dictionary stack is the \it{dollar dictionary stack}, which contains all keys that start with a dollar sign. The \pr{begin#2} primitive pushes a dollar dictionary each time it is invoked, and that dictionary is popped by the corresponding \pr{end#1} invocation. This is typically useful for creating nested environments that need access to the same type of information - by storing such information in dollar keys, it can be shadowed and recovered. Refer to the \pr{begin#2} entry.} \par{ When a key is used its definition is searched in all dictionaries, starting from the top-level dictionary. The key \pr{undef#1} has only access to the top-level dictionary, and will never delete a key in any other dictionary.} \sec1{tour}{A zoem tour} \par{ What follows is an informal tour through zoem's offerings. The next section contains a comprehensive overview of the zoem primitives.} \par{ Let us start with how filtering in plain space is configured. The following was obtained from the \aref{http://micans.org/pud/}{\pud} man macros.} \verbatim{\ \\switch{\\__device__}{ {html}{ \\special{ {38} {&} {60} {<} {62} {>} {-1} { } \\: the zoem escape \\~ {-2} {
\\!N} \\: the zoem escape \\| {-3} {-} \\: the zoem escape \\- } } {roff}{ \\special{ {46} {\\\\.} {96} {\\\\`} {92} {\\\\\\\\} \\: a single backslash {-1} {\\\\ } \\: the zoem escape \\~ {-2} {\\!N.br\\!N} \\: the zoem escape \\| {-3} {\\\\-} \\: the zoem escape \\- } } {\\write{stderr}{txt}{No such device: \\__device__\\|} \\write{\\__fnbase__.err}{txt}{No such device: \\__device__\\|} \\exit } }\ } \car{ Take note of the number of backslashes. In order to print a backslash in troff, the troff input must contain two consecutive backslashes. In order to specify a backslash in zoem, we must also provide two, thus we need four backslashes in all (in order to create this example I needed eight backslashes in the zoem input).} \par{ Also note the use of the \pr{switch#2} primitive, which takes an expression in the first argument and an arbitrary number of pairs plus an optional clause in the second argument. The optional clause was in this case used as a failure test.} \par{ \pr{special#1} is an example of a zoem key taking an argument that may contain arbitrarily many sub-arguments (i.e. a \iref{vararg}{vararg}). In this particular case the sub-arguments must be paired, each pair defining how certain characters that are special to the device must be represented.} \par{ The \pr{write#3} and \pr{exit} need little comment, they work as expected. Zoem opens output files as needed, and closes them when it is done. The file name \v{-}\~is equivalent to either \stdout or \stdin (depending on context), the file name \v{stderr} denotes \stderr.} \: The \pr{dofile#2} input primitive and its aliases \: \pr{input#1}, \pr{import#1}, \pr{read#1}, and \pr{load#1} (you \: may abhor if you wish) \par{ \pr{exit} is considered a failure (and will cause zoem to stop and complain), but \mc{throw{done}} is not. \pr{throw#2} with argument \v{done} will merely quit parsing the current stack, so if you specify it at top level in a file \- not nested in a key that does its own parsing such as \pr{setx#2}, zoem will stop parsing the current file and transfer control back to the file from which it was included.} \par{ The previous example introduces the keys \ssion{__device__} and \ssion{__fnbase__}. They are so called session variables described in section \capref{session}.} \par{ A sibling primitive to \pr{special#1} is \pr{constant#1}. The following is an example of use.} \verbatim{\ \\constant{ {'e} {é} \\: Use e.g. as \\*{'e}l\\*{`e}ve (\*{'e}l\*{`e}ve) {(c)} {©} \\: Use e.g. as \\*{(c)} DEEDEE (\*{(c)} DEEDEE) {+-} {±} \\: Use e.g. as \\*{+-} a few (\*{+-} a few) }\ } \car{ The main thing to note here is that the target string (e.g. \v{é}) is \it{always interpreted in device space}. In the reference string (e.g. \v{'e}, \v{(c)} and \v{+-} in the example above) almost anything is allowed, including backslash-escaped characters and balanced curlies. The latter are not recommended though. } \par{ There are three zoem tokens representing the characters that have meaning to zoem syntax, the backslash and the two curlies. Those zoem tokens are just like any other plain characters: they can be mapped in plain space, and they are printed literally in device space.} \verbatim{\ \\\\ \\: A backslash; possibly mapped in plain space. \\{ \\: A curly; possibly mapped in plain space. \\} \\: A curly; possibly mapped in plain space. \\, \\: The atomic separator (vanishes).} \car{ These tokens are mapped only during the (final) filter stage. The atomic separator can be useful when you want to glue together items some of which will be the result of macro expansion.} \verbatim{\ \\def{foo}{bar} \\foo\\,1 \\: \\foo1 would be the key \\foo1} \car{ This will result in bar1. The tokens\~\mc{\\}, \mc{\{}, and\~\mc{\}} are really the corresponding ordinary characters. They can be mapped in plain space via \pr{special#1} using their \ascii values 92, 123, and 125 as was seen above for the backslash. In device space, they will result in\~\mc{}, \v{\{}, and\~\v{\}}.} \par{ Let us now continue with device scope by implementing a \mc{bf#1} key. Below you find two possible definitions:} \verbatim{\ \\def{bf}{1}{\\@{} \\1 \\@{}} \\: OK \\def{bf}{1}{\\@{ \\1 }} \\: Wrong! Wrong!} \car{ The second is wrong because the contents of\~\mc{1} end up in device space. If the expansion of\~\mc{1} still contains keys they will not be expanded (and cause a fatal syntax error when device space is filtered), and additionally any special characters in\~\mc{1} will not be mapped.} \sec1{language}{The zoem language} \sec2{}{Alphabetic index} \: this stuff constructs a 'Paragraph Of Contents'. \${roff}{\write{stderr}{txt}{no support for roff device!}\exit} \def{zzarg#1}{\{<\1>\}} \formatted{ \: third arg is a vararg in which all arguments of a key are stuffed. \def{zprim#3} { \setx{keyname}{\if{\defined{data}{{strangers}{\1}}}{\%{strangers}{\1}}{\1}} \setx{keyref}{\if{\cmp{eq}{\2}{0}}{\keyname}{\keyname\""_\2}} \setx{keysig}{\if{\cmp{eq}{\2}{0}}{\mc{\1}}{\mc{\1#\2}}} \setx{keycall}{\if{\cmp{eq}{\2}{0}}{}{:\~\~\mc{\1\apply{zzarg#1}{\3}}}} \@{\N\N} \@{\N\N} \keysig\keycall \write{\__fnbase__.prm}{copy} {\@{\N\N} \keysig \@{\N\N}\`{n} } } } \zinsert{\__fnbase__.prm} \sec2{topicindex}{Topic index} \par{ This is an overlapping categorization in topics. } \begin{itemize}{ {flow}{cascade} {interitem}{1} } \item{\bf{Using and inspecting keys}} \pr{apply#2} \pr{constant#1} \pr{def#2} \pr{defined#2} \pr{defx#2} \pr{inspect#4} \pr{pop#1} \pr{push#1} \pr{set#2} \pr{setx#2} \pr{table#5} \pr{undef#1} \par{ These primitives affect or use either \it{user keys} that are stored in the user dictionary, \it{dollar keys} that are stored in the dollar dictionary, or \it{anonymous keys}. Dictionaries are discussed in \iref{dictionary}{Section\~\ref{dictionary}{num}}. } \item{\bf{Control, booleans, testing and comparison}} \pr{$#2} \pr{apply#2} \pr{branch#1} \pr{cmp#3} \pr{defined#2} \pr{dowhile#2} \pr{eqt#3} \pr{if#3} \pr{length#1} \pr{register#2} \pr{switch#2} \pr{undef#1} \pr{while#2} \item{\bf{Expansion, delay}} \pr{!} \pr{!#1} \pr{apply#2} \pr{defx#2} \pr{eval#1} \pr{setx#2} \item{\bf{Meta-zoem, introspection, exceptions, errors}} \pr{catch#2} \pr{exit} \pr{throw#2} \pr{try#1} \item{\bf{Execution, tracing}} \pr{trace#1} \item{\bf{Input/output}} \pr{dofile#2} \pr{finsert#1} \pr{format#1} \pr{register#2} \pr{vanish#1} \pr{write#3} \pr{writeto#1} \pr{zinsert#1} \item{\bf{Filtering}} \pr{special#1} \pr{vanish#1} \item{\bf{Environment scopes}} \pr{begin#2} \pr{end#1} \pr{env#4} \item{\bf{Name scopes}} \pr{pop#1} \pr{push#1} \item{\bf{Data storage}} \mc{%}, \mc{%free}, and \mc{%dump} are primitives described elsewhere \- refer to the \secref{grape} section. \item{\bf{String conversions}} \pr{format#2} \pr{inspect#4} \pr{length#1} \pr{textmap#2} \pr{tr#4} \item{\bf{Arithmetic}} \pr{f#2} \pr{f#3} \pr{fv#2} \pr{let#3} \item{\bf{Glyphs}} \pr{constant#1} \item{\bf{Syntactic sugar}} \pr{formatted#1} \pr{vanish#1} \xmlpr1ref \xmlpr2ref \end{itemize} \sec2{}{Primitives} \par{ Zoem primitives may expand (which is the same as evaluate) one, several, or all of their arguments before using them. Such arguments are enclosed by double angle brackets in the listing below. The inside-out type evaluation is done recursively and works for arbitrary levels of nesting. An argument which is first expanded and is then interpreted as a label is thus written \zarg{label} in the primary entry. In the definition text accompanying the entry, the expanded argument is simply refered to as \zarg{label}, so the extra pair of brackets is dropped. } \par{ Each primitive below has a little paragraph with the caption \bf{Result text}. It gives a summary of 'what comes out'. Note that the result of macro expansion is always passed to the parser again, so the result text is again subject to expansion. } \begin{itemize}{ {flow}{cascade} {interitem}{1} } \items{ {\enref{xmlpr1}{\mc{<>#1}}} {\enref{xmlpr2}{\mc{<>#2}}} } These are special. Refer to section \capref{xmlsugar}. The angle brackets are part of the syntax, do not confuse them with the angle brackets used below to enclose arguments. These primitives are respectively used as \mc{<*any*>} and \mc{<*any*>{*any*}}, so the positioning of arguments is different from all other zoem primitives. \item{\zprim{!}{0}{}} This primitive is triggered by an active backslash followed by a consecutive run of exclamation marks, which is \it{not} followed by an opening curly. The sequence is called a \it{delay sequence}, and its \it{arity} is the count of backslashes. A single exclamation mark is stripped (i.e. the arity is decremented) and the sequence is no longer subject to the current expansion stage. It is used to construct valid zoem input, which is usually redirected to file with the copy filter, stored using \pr{setx#2}, or used in nested occurrences of \pr{apply#2}, \pr{inspect#4}, and other primitives. Other uses are possible, the main thing is that one should keep a clear view of the meta-programming implied by\~\mc{!}. Refer also to the \pr{eval#1} primitive. \cpar{Example}{ The primitive \pr{eval#1} evaluates its argument a single time, and passes it on for further evaluation. The following are fully equivalent: } \verbatim{\protect{\set{foo}{zut} \eval{\!foo} \foo}} \car{ whereas \v{\\!foo} would pass the sequence \v{\\foo} to the filtering stage, where it will yield a (non-fatal) error message. Similarly, \v{\\eval{\\eval{\\!!foo}}} is equivalent to the above. } \cpar{Result text}{ A delay sequence of decremented arity. } \item{\zprim{!}{1}{{any}}} \car{ This primitive is triggered by an active backslash followed by a consecutive run of exclamation marks, which is in turn followed by a block. The block is called a \it{delay} scope. The arity of the delay scope is the count of backslashes found in the run. A single exclamation mark is stripped (i.e. the arity is decremented); if no further exclamation marks remain (i.e. the arity becomes zero) then the introducing backslash and the delimiting curlies are stripped as well. The result (including the contents of the block) is passed on and is no longer subject to the current expansion stage. The same observations hold as those made for the previous entry. Refer also to the \pr{eval#1} primitive. } \par{ Additionally, blocks that are protected by the delay primitive will be skipped during parameter interpolation. } \cpar{Result text}{ \zarg{any}, if the arity of the delay scope just found was equal to one, otherwise, \zarg{any} put in a decremented delay scope. \zarg{any} will in both case no longer be subject to the current expansion stage. } \item{\zprim{$}{2}{{str}{any}}} This is a shortcut for activating output for a particular device. If \ssion{__device__} expands to \zarg{str}, \zarg{any} is passed on for expansion, otherwise it is ignored. The following two are equivalent: \verbatim{\ \\${html}{Seen only in the html device} \\if{\\cmp{eq}{\\__device__}{html}}{Seen only in the html device}{}} \ccar{Result text}{ Either none or \zarg{any}. } \item{\zprim{apply}{2}{{}{}}} \car{ The first argument is expanded before use. It should expand either to the signature of a user key, primitive or builtin taking arguments, or to a \iref{anonymous}{tagged anonymous key}. Examples of the first are \v{foo#k} and \v{"bar::baz"#k}, the latter takes the form \v{_#k{..}}. If you use an anonymous key containing macro sequences, be sure to escape whole or part of the anonymous key, depending on your needs. The expansion of \v{_#2\\!{{}}} for example, will result in \v{_#2{}}. Primitives can used in both quoted and regular syntax.} \par{ The second argument should result in a vararg. \pr{apply#2} extracts \v{k}\~elements at a time from \zarg{vararg}, and applies the key resulting from the first argument to each vector of \v{k}\~elements successively. Any elements remaining in \zarg{vararg} are ignored.} \cpar{Result text}{ Entirely depending on the key specified in the first argument.} \item{\zprim{begin}{2}{{label}{}}} \car{ \pr{begin#2} pushes a new dictionary onto the dollar dictionary stack which is popped by the matching \pr{end#1}.} \par{ \mc{begin#1} is an alias which invokes \pr{begin#2} with an empty \zarg{vararg} argument.} \par{ \pr{begin#2} pushes the begin expression associated with \zarg{label} via \pr{env#4}. The \v{

} formatted blocks in html,
   while keeping the
   possibility to insert elements that do not take up any width (e.g. links).
   The first value block should contain the name of a macro.
   A likely candidate is
   \pr{length#1}, which should be specified simply as \v{length}.
   The first argument that is given to this macro will be the string
   under consideration.  The rest of the value blocks, if any, will be given
   as additional arguments.
   }

\par{
   Currently, this custom length computation is only applied to the
   argument that is being formatted and the two delimiters if present.
   All three of these can be replaced, for the purpose of length
   computation, by placeholders using the \it{double} directive.
   }

\item{\v{{double}{{[{key}{value}]*}}}}
\car{
   The directive is \v{double}, the value consists of a single block containing
   a vararg. This is used to specify placeholders when computing the length of
   elements.  The vararg contains placeholder types as keys and the
   corresponding placeholder values.  It is currently possible to specify three
   different types of placeholders. These are the argument to be typeset,
   specified with the placeholder key \it{arg}, the left delimiter, specified
   with \it{delimit-left}, and the right delimiter, specified with
   \it{delimit-right}.
   }

\cpar{NOTE}{
   The value is enclosed in a block, as part of the key-value specification
   employed by the \it{double} specification. The value itself is
   a block containing key-value pairs (again specified as curly-delimited
   blocks). So be sure to supply the correct number and nesting of blocks.
   }

\item{\v{{alignat}{{}{}}}}
\car{
   The directive is \v{alignat}, the value consists of two blocks.  This is used to
   specify alignment.  The content of the first value block is used as the
   string on which to align.  The content of the second block is used as the
   width on which the first part of \zarg{arg} (up to and including the
   alignment substring) will be right-aligned.  If the \v{length} specification
   is used as well, the length macro specified therein will be used to compute
   the width of the string specified in the first block.
   }

\item{\v{{reuse}{}}}
\car{
   This instructs zoem to reuse the current specification for another \zarg{num}
   arguments taken from \zarg{vararg}.
   Instead of \zarg{num} it is possible to specify \v{{reuse}{*}}. This
   will reuse the current specification until all arguments have been exhausted.
   }

\item{\v{{border}{{}{}}}}
\car{
   This borders the result of the current specification with \zarg{left}
   and \zarg{right}.
   This is useful in conjunction with the \v{reuse} specifier, for example
   for adding device line-breaks to each formatted item.
   }

\cpar{Example}{}

\verbatim{\protect{\:{/}
\format{%{{align}{right}{width}{10}{reuse}{*}{padding}{{'}{}}}}{
   {beauty}{lies}{in}{the}{eye}{of}{the}{beholder}
}}}
     
\car{results in}

\verbatim{\protect{\:{/}
''''beauty''''''lies''''''''in'''''''the'''''''eye''''''''of'''''''the''beholder}}

\end{itemize}


\cpar{Result text}{
   The formatted string.}


\item{\zprim{formatted}{1}{{any}}}
\car{
   This removes and adds white space from its arguments
   via the following rules:}

\begin{itemize}{
   {flow}{compact}
   {interitem}{0}
   {align}{right}
}
\item
\car{
   It skips any \mc{@{..}} enclosed sequence.}

\item
\car{
   It skips any \mc{<..>} enclosed sequence - note that the contents
   eventually will end up in \mc{@{..}} (at) scope.}

\item
\car{
   It removes all spaces, tabs, and newlines it encounters otherwise.}

\item
\car{
   It inspects and (after inspection) removes all \mc{`{..}} enclosed
   sequences it encounters.  During inspection, \pr{formatted#1} maps
   '\v{s}' to a space, '\v{t}' to a tab, and '\v{n}' to a newline.}

\item
\car{
   If the sequence \mc{`{<}} is encountered (not in at scope),
   \mc{formatted#1} starts copying literally without munging
   whitespace; it resumes its normal mode of operation
   after encountering the sequence \mc{`{>}}.}

\end{itemize}
   
\par{
 This is useful for writing legible macro files while exercising full control
 over whitespace (modulo Zoem's white space munging rules).}

\cpar{Result text}{
 The argument in its unformatted form.}


\item{\zprim{get}{2}{{dict-label}{key-sig}}}
\car{
   The user stack is searched from top to bottom for dictionaries
   with label \zarg{dict-label}, and those dictionaries
   are searched in order for a key with signature \zarg{key-sig}.
   The first succesful match is retrieved and its definition
   is pushed onto the interpretation stack.
   It is an error if no such definition is found.
   }

\cpar{Note}{
   The label of the default user dictionary is \v{''}. This ties
   in with the syntax \mc{''keysig}, used to specify the user
   dictionary stack. So the following:}

\verbatim{\protect{\:/
      \set{user}{Jill}
      \push{foo}
      \set{user}{Phil}
      \push{bar}
      \set{user}{Bill}
      \get{''}{user} \get{foo}{user} \get{bar}{user}}}

\car{
   yields output \v{Jill Phill Bill}.}

\cpar{Note}{
   It is currently not possible to access keys that take arguments.
   }


\cpar{Result text}{
   The result of processing the retrieved definition.}


\item{\zprim{if}{3}{{}{any1}{any2}}}
\car{
   The first argument is expanded and interpreted as an integer.
   If it is nonzero, \zarg{any1} is pushed on the interpretation stack
   and \zarg{any2} is ignored, vice versa if it is zero.}

\cpar{Result text}{
   Either \zarg{any1} or \zarg{any2}.}

\item{\zprim{inspect}{4}{{}{}{}{}}}
\ccar{status}{Experimental}

\par{
   All arguments are expanded before use. \zarg{vararg} currently
   recognizes a single key \it{mods}.  The value of \it{mods} may contain a
   comma-separated list of the following directives. Repeated use
   of \it{mods} is allowed.}

\verbatim{\:
   posix
   icase
   dotall
   iter-lines
   iter-args
   match-once
   discard-nmp
   discard-nil-out
   discard-miss
   count-matches}

\par{
   The \v{posix} directive is currently required, specifying that \posix
   regular expressions are used. The future might bring other regex syntaxes.}

\par{
   Argument \zarg{reg} specifies a (\posix) regular expression. Before being
   passed to the match engine, it undergoes \unix and \tilde tilde replacement
   as described in \sibref{zoem}{tildexp}{the zoem manual}.}

\par{
   Consult the \posix documentation or the regex(7) manual page for a description
   of posix regexp syntax.}

\par{
   The expansion of \zarg{any|anon key} can either result in plain data or in an
   anonymous key.  The expansion of the last argument results in data to which
   the regex \zarg{reg} is successively applied.}

\cpar{Interpolation}{
   If the second expansion starts with the pattern \v{_#k\{} it is assumed
   to be an anonymous key.  The subpatterns from the matched pattern are
   interpolated by the key, and the entire matched pattern is substituted by the
   interpolation.  Else, the matched pattern is simply replaced by the expansion.}

\par{
   \v{icase} induces case insensitive matching.
   \v{dotall} makes the dot\~\v{.} match any character, including the newline.
   \v{iter-lines} causes matching to be applied to lines shifted from the data (i.e.
     data is split on newlines).
   \v{iter-args} causes matching to be applied to blocks shifted from the data (which
     should obviously be a vararg).
   \v{match-once} inspects each element under consideration only once.
   \v{count-matches} replaces the data by the count of matches. In conjunction
     with \v{iter-lines} or \v{iter-args} it yields the counts on separate lines
     and in separate blocks, respectively.
   \v{discard-nmp} discards non-matching parts.
   \v{discard-miss} removes any lines or blocks which are empty after inspect
     is done with it.
   \v{discard-nil-out} discards any strings or lines or blocks that are empty
     after matching and optionally interpolation has been applied.}

\cpar{Bugs}{
   The \gnu implementation of \posix regexes was at some point known to be buggy
   for long strings and/or long matches.}

\par{
   A search pattern consisting of a single word boundary or the start-of-string
   token (\v{^}) will match at each position, because after a succesful match
   \pr{inspect#4} simply resumes searching for a new match by skipping to the
   end of the previous match (and adding a single position if the match had
   width zero and offset zero).  Similar but not yet noticed bugs may exist.}

\par{
   Nevertheless, this can be a very useful primitive for the occasional
   odd job, and it should always work except for the cases just mentioned.
   If you have a complicated instance of \pr{inspect#4}, test it first
   in isolation. Consider sending a bug report in case you find one (a bug,
   or a bug report).}

\cpar{Result text}{
   Depending on the presence of a match and the modifiers given.
   }


\item{\zprim{length}{1}{{}}}
\car{
   Computes the length of \zarg{any} and puts this in place.
   It takes into account the zoem escape sequences \mc{\\}, \mc{\{},
   and \mc{\}}. The future may bring a generalized \mc{length#2} primitive
   that provides different ways of measuring string length.}

\cpar{Result text}{The length of any \zarg{any}.}

\item{\zprim{let}{1}{{}}}
\car{
   The \pr{let#1} primitive puts zoem in arithmetic mode and the contents are
   parsed accordingly.  All of C's operators are supported  including the
   logical, bitwise, and comparison operators as well as the ternary operator.
   The operators \v{**} and \v{//} are added, which respectively denote
   exponentiation and integer division.
   Operations or functions resulting in integers are tracked, and
   the result will be stored in the integer type used (typically
   long) if possible. Thus one may find that}

\verbatim{\
\protect{\let{2**42}}
\protect{\let{2**22}}
}

\car{
   respectively result in \v{4398046511104.0} and \v{2097152}.}

\par{
   The precedence rules used by Zoem are simpler than C's. The respective groups
   of logical, bitwise, and comparison operators all have identical precedence
   internally, and associate from left to right.}

\par{
   Most of the \ansi C math functions are supported, with in addition
   \v{max} and \v{min}. The functions \v{round}, \v{sign}, and \v{abs} behave
   slightly different from their C counterparts, as they result in integer
   results if no overflow occurs.}

\par{
   At any place where an atomic type is expected one is allowed to insert
   a zoem macro invocation. It will be evaluated and the result will be
   interpreted as a number. Evaluation will take place in the order
   as dictated by the precedence rules governing the expression.}

\par{
   The logical operators shortcircuit and the ternary operator evaluates
   only one of its branches. This can be used to create side effects, such
   as in}

\verbatim{\protect{
   \let{\bar && \group{\set{foo}{zut}1}}
}}

\car{
   This sets \v{foo} only if \v{bar} evaluates to a non-zero number.
   The trailing\~\v{1} in the \v{group} macro is good practice because
   \pr{let#1} expects a number to be the result of any macro it encounters.
   It could have been any other number, or a macro or sequence of macros
   evaluating to a number.
   The \v{group} macro is a predefined macro that does nothing except
   passing its arguments. It is necessary in this concocted example
   because any occurrence of
   a macro within \pr{let#1} is interpreted as a number by itself.
   The sequence \v{\\bar \\bar} would for example be syntactically
   identical to \v{1 1}, which is incorrect.}


\cpar{Result text}{A number.}

\item{\zprim{nargs}{1}{{any}}}
\car{
   The argument is not expanded. It puts in place a number that indicates
   whether this argument could be parsed as a number of scopes or whether it is
   a regular argument. The following list of examples illustrates
   the rules according to which the number is created.}

\verbatim{\protect{
   \nargs{{abc}def}     : -2      \:{!}: neither fish nor fowl
   \nargs{abc}          : -1      \:{!}: regular argument
   \nargs{abc{def}}     : -1      \:{!}: regular argument too
   \nargs{}             :  0      \:{!}: empty vararg (not empty regular arg)
   \nargs{   }          :  0      \:{!}: empty vararg again
   \nargs{{abc}}        :  1      \:{!}: vararg with 1 argument
   \nargs{{abc}{def}}   :  2      \:{!}: vararg with 2 arguments
   \nargs{   {abc}
             {def}
   }                    :  2      \:{!}: vararg with 2 arguments
   \:{!}: etc.
}}

\par{
   From this it is seen that if the first non-whitespace character
   is an opening curly the primitive expects to find a number of scopes
   with nothing inbetween or trailing.
   If it does not succeed the result text is set to the special value -2.}


\cpar{Result text}{integer}

\item{\zprim{pop}{1}{{label}}}
\car{
   Pops a dictionary from the user dictionary stack pushed earlier
   by \pr{push#1}. The tag \zarg{label} must be same as the one
   supplied by that specific \pr{push#1} invocation.}

\cpar{Result text}{None.}


\item{\zprim{protect}{1}{{}}}
\car{
   The argument is expanded. Subsequently, all backslashes and curlies
   are escaped. The resulting text is put in place.}

\cpar{Result text}{
   \zarg{any} with backslashes and curlies escaped.}


\item{\zprim{push}{1}{{label}}}
\car{
   Pushes a new dictionary onto the user dictionary stack with tag
   \zarg{label}.  The corresponding \pr{pop#1} should use the same tag.  Note
   that \pr{defined#2} with the \v{lkey} directive checks only the top-level
   dictionary, whereas \pr{defined#2} with the \v{key} directive checks the
   whole stack of dictionaries.  Also, \pr{undef#1} only removes a key from the
   top-level dictionary. There is currently not a way to access keys based on
   dictionary label.}

\cpar{Result text}{None.}

\par{
   Example of usage:}

\verbatim{\
\\def{num}{1}
\\push{foo}
   \\def{num}{2}
   \\push{bar}
      \\def{num}{3}
      \\push{tim}
         \\def{num}{4}
      \\pop{tim}
      num is \\num
   \\pop{bar}
   num is \\num
\\pop{foo}
num is \\num}

\car{
   results in
   }

\verbatim{\
num is 3
num is 2
num is 1}


\item{\zprim{register}{2}{{tag}{any}}}
\car{
   Register \zarg{any} to be processed at the occassion specified by
   \zarg{tag}. The only \zarg{tag} currently supported is \v{END}.
   \v{END} registrees are processed only after all regular input has been
   processed.  Multiple \pr{register#2} invocations are allowed. Registrees are
   processed in the order of registration.}

\cpar{Result text}{
   None at time of registering, the result of \zarg{any} at time of
   processing.}

\item{\zprim{set}{2}{{key-sig}{any}}}
\car{
   As \pr{def#2} above, except that \pr{set#2} will not complain
   if the key labeled by \zarg{key-sig} already exists.}

\cpar{Result text}{None.}
\cpar{See also}{\pr{set#3}.}

\item{\zprim{setx}{2}{{key-sig}{}}}
\car{
 The second argument is expanded and stored in the key \zarg{key-name}.
 Besides simply storing the expansion of an expression, it can
 also be used to do trickier things as}

\verbatim{\
   \\def{bar}{klaas}
   \\setx{foo#2}{\\bar says \\1 and \\2}
   \\foo{x}{y}
   klaas says x and y}

\car{
 If you need lambda-like capabilities, take note that you can use \mc{!k} or
 \mc{!{\\k}} to construct a positional parameter\~\mc{k}, if you want to
 interpolate arguments into a key that will later take other arguments. Like
 this:}

\verbatim{\
   \\: is there any use for this wacky stuff?
   \\def{lambda#2}{\\setx{\\1#1}{\\2 says \\!1}}
   \\lambda{foo}{bar}
   \\foo{moo}
   bar says moo}

\car{
 Take care: the \pr{dofile#2} key outputs
 to the default output file. If you need to include the contents of
 a file within a \pr{setx#2} call, you need to use \pr{finsert#1} or \pr{zinsert#1}
 in conjunction with \pr{setx#2}.}

\cpar{Result text}{None.}
\cpar{See also}{\pr{set#3}.}


\: item{\zprim{set}{3}{{[{modes}{}][{if}{}][{unless}{}][{dict}{} and \v{}.
   The key will be set to its old value with a segment of length
   \v{} starting at offest \v{} replaced by \zarg{any}.
   Offsets are zero-based and units are in bytes.
   }

\cpar{Result text}{None.}
\cpar{See also}{\pr{def#2}, \pr{defx#2}, \pr{set#2}, \pr{setx#2}.}

\item{\zprim{special}{1}{{}}}
\car{
   \zarg{vararg} is expanded before use.
   It must have an even number of arguments.  These are
   interpreted as pairs. The first of each pair must enclose an integer in
   the range 0-255 or one of the special token identifiers \v{-1},
   \v{-2} or \v{-3}. The integers in the range 0-255 are interpreted as
   character indices The characters indexed \v{-1}, \v{-2}
   and \v{-3} correspond with the zoem glyphs\~\mc{~}, \mc{|}, and\~\mc{-}
   respectively.  The second element in each pair defines the string to
   which the character specified by the first element must be mapped.  This
   string is interpreted in device scope.  See the
   \capref{dscope} section for simple uses.}

\par{
   A key may occur multiple times. The corresponding definitions
   are stacked away and will be accessed according to the current
   \it{special level}
   (cf. the section on \iref{special}{mapped characters in device scope}).}

\par{
   Repeated use of \mc{special#1} does not cause the removal of previous
   definitions, with one exception: If \mc{special#1} is invoked
   with no arguments at all then all definitions are removed.}

\cpar{Note}{
Be sure to use delay sequences as appropriate, noting that vararg is expanded.
Below is how \aref{http://micans.org/pud/}{Portable Unix Documentation}
encodes a line break in troff:}

\verbatim{{-2} {\\!N.br\\!N}}

\car{
   Zoem interprets the value and accordingly associates
   the device scope sequence \v{\\N.br\\N} with the token \v{\\|}.
   The escape sequence \v{\\N} will thus be processed during
   the filter stage as is appropriate.
   Without the delay sequence zoem would try to expand \v{\\N} during
   processing of the \pr{special#1} primitive.}

\cpar{Result text}{None.}


\item{\zprim{switch}{2}{{}{vararg}}}
\car{
   The first argument is expanded. Subsequently, two arguments are successively
   taken from \zarg{vararg}. The first is expanded and string compared with
   \zarg{pivot}. If they match, the second argument is expanded and everything
   else is ignored.  If they do not match, the procedure is repeated.  If no
   (odd) argument matches, and the \zarg{vararg} has an odd number of
   arguments, the last argument is put in place.  It can be considered a
   failure clause.  This primitive does not have fall-through behaviour; at
   most one branch will be handed to the parser.}

\car{
   Different cases can be grouped in a vararg. If \pr{switch#2} recognizes
   that the test argument can be parsed as a vararg it will exctract all
   the corresponding sub-arguments. If the pivot matches any of these
   the branch corresponding to the test argument will be taken.}

\cpar{Result text}{
   Either the first block associated with a matching case of \zarg{pivot},
   the failure clause, or nothing at all.}


\item{\zprim{system}{3}{{cmd}{}{}}}
\car{
   \it{By default this primitive is disallowed.}
   The first argument is the name of a system command. The environment variable
   PATH is used in tracing the location of the command.  If \zarg{data} is
   non-empty, it is first \it{unprotected}, that is, escaped backslashes and
   curlies are unescaped.  The resulting text is then fed to command \zarg{cmd}
   with arguments \zarg{args}. The latter, if non-empty, must be
   specified as a vararg, even if only a single argument is present.
   Should execution of the command (be it with or
   without data) result in output on \stdout then the latter is captured,
   backslashes and curlies are escaped (i.e. the output is protected), and the
   result is put in place. \stderr  is the same as it is for the parent (zoem).}

\cpar{Note}{
   The security implications of this feature. By default
   zoem will \it{ignore} \mc{system}. The
   command line option \v{--unsafe} will cause zoem to prompt for user
   confirmation (if prompting is not possible it will ignore again) for
   each encountered \mc{system} invocation. The option \v{--unsafe-silent}
   will silently allow all \mc{system} invocations. The option
   \v{--allow=cmd[:cmd]*} explicitly specifies which commands to allow silently.
   It is also possible to use this option repeatedly rather than separate
   different commands by colons.}

\par{
   If the zoem command line option \v{--system-honor} is used, zoem will
   exit if a system command fails or is ignored.}

\par{
   A simple exit status is written in the variable \ssion{__sysval__}:
   it is zero (\v{0}) on success, and one (\v{1}) on failure.}

\par{
   Refer to \sibref{zoem}{the manual page of the zoem interpreter} for
   more information on \v{--unsafe}, \v{--unsafe-silent},
   \v{--allow=}, and \v{--system-honor}.}

\par{
   Built-in macros \mc{system#2} and \v{system#1} exist. The former
   drops the \zarg{data} argument, the latter also drops the \zarg{args}
   argument.}

\cpar{Example}{}
\verbatim{\\system{sort}{{-n}}{\\finsert{foo}}
\\system{ls}{{-l}{-a}}
\\system{date}}

\cpar{Result text}{
   The output captured (and then protected) from \zarg{cmd}'s \stdout, if any.}


\item{\zprim{table}{5}{{}{any1}{any2}{any3}{}}}
\car{
   The first argument is expanded and interpreted as an integer, say\~\v{k}.
   Successively, vectors of \v{k}\~elements are shifted from
   \zarg{vararg}. Each vector is bordered on the left with
   \zarg{any1}, bordered on the right with \zarg{any3}, and
   all elements in the vector are separated with \zarg{any2}.}

\par{
   This primitive is perhaps not really needed as its functionality
   is largely covered by \pr{apply#2}.}

\cpar{Result text}{
   The blocks from \zarg{vararg} interspersed in a table-like
   manner with \zarg{any1}, \zarg{any2}, and \zarg{any3}.}


\item{\zprim{textmap}{2}{{vararg}{}}}
\car{
   Apply one or more transformations to \zarg{any} and
   put the result in place.
   \zarg{vararg} takes a succession of key-value pairs.
   The associated transformation are applied in order. The
   supported transformations are:}

\begin{itemize}{
   {flow}{compact}
   {itemmargin}{5}
   {interitem}{0}
   {textindent}{6}
   {align}{right}
}
\item{{word}{ucase}}       Uppercase \zarg{any}
\item{{word}{lcase}}       Lowercase \zarg{any}
\item{{number}{roman}}       Convert number to Roman
\item{{number}{alpha}}       Convert number to letters
\item{{repeat}{}}        Concatenate  copies of \zarg{any}
\item{{caesar}{}}        Apply caesar encryption
\item{{vigenere}{}}      Apply vigenere encryption
\item{{vigenerex}{}}     Apply vigenere encryption and include space
\end{itemize}

\par{
   The roman transformation can e.g. used to equip the Aephea itemize
   environment with roman numbering. To get uppercase roman,
   do this:}

\verbatim{\:{/}
   \\textmap{{number}{roman}{word}{ucase}}{\\your_nice_counter}}

\car{
   The alpha transformation maps its argument to a string over the alphabet \v{_a-z}, i.e.
   all the set of all lowercase letters with the underscore added.
   This set is simply used for counting in base\~27, with the underscore
   playing the role of zero.}

\cpar{Result text}{
   The transformed text.}


\item{\zprim{throw}{2}{{towel|error|done}{}}}
\car{
   Quit parsing, unwind stack until some occurrence of
   \pr{catch#2}, \pr{try#1} captures this throw.
   }

\par{
   The throw \mc{throw{done}} is also unconditionally caught by
   \pr{while#2} and \pr{eval#1}.
   If \mc{throw{done}} is encapsulated by neither of these four
   primitives it means that processing of the current file
   is stopped, and processing at the including file, if applicable,
   is resumed.
   }

\par{
   \zarg{any} is digested; if it has positive length the result
   is issued as a diagnostic.
   }

\cpar{Note}{
   Many primitives evaluate one or more of their arguments before use,
   as indicated in this manual.
   An occurrence of \mc{throw{done}} in such an argument, if not caught, will be
   treated like an error. It is possible to use \mc{throw{done}} in such
   an instance by encapsulating the argument in \pr{eval#1}.
   }


\cpar{Result text}{
   None, affects the result text of the embedding scopes.
   }
 
\item{\zprim{tr}{2}{{vararg}{}}}
\car{
   \zarg{vararg} contains key-value pairs. The accepted keys
   are \it{from} and \it{to} which must always occur together,
   and \it{delete} and \it{squash}. The values of these keys
   must be valid \it{translation} specifications.
   This primitive transforms \zarg{any} by successively applying
   translation, deletion and squashing in that order. Only the
   transformations that are needed need be specified.}

\par{
   The syntax accepted as translation specification is almost
   fully compliant with the syntax accepted by \bf{tr}(1), with
   three exceptions. First, repeats are introduced as
   \v{[*a*20]} rather than \v{[a*20]}. Second, ranges can (for
   now) only be entered as \v{X-Y}, not as \v{[X-Y]}.
   \v{X} and \v{Y} \it{can} be entered in either octal or
   hexadecimal notation (see further below).

   As an additional feature, the magic repeat operator \v{[*a#]} stops on both
   class and range boundaries.  Finally, character specifications can be
   complemented by preceding them with the caret \v{^}.  See further below for
   examples where these features are used.}

\cpar{Preprocessing}{
   The values (not the data \zarg{any}) are subjected to \unix tilde expansion
   as described in the \sibref{zoem}{tildexp}{the zoem manual}.}

\cpar{Syntax}{
   Specifications may contain ranges of
   characters such as \v{a-z} and \v{0-9}. Posix character classes
   are allowed. The available classes are}

\verbatim{\:{/}
   [:alnum:]
   [:alpha:]
   [:cntrl:]
   [:digit:]
   [:graph:]
   [:lower:]
   [:print:]
   [:punct:]
   [:space:]
   [:upper:]
   [:xdigit:]}

\par{
   Characters can be specified using octal notation, e.g.
   \mc{012} encodes the newline. Use \mc{173} for the opening curly,
   \mc{175} for the closing curly, \mc{134} for the backslash, and \mc{036} for
   the caret if it is the first character in a specification.  \it{DON'T} use
   \mc{\\}, \mc{\{}, or\~\mc{\}} in this case!  Hexadecimal notation is written
   as \mc{x7b} (the left curly in this instance).}

\cpar{Result text}{
   The expanded \zarg{any} subjected to the \v{tr} operator as specified.}

\cpar{Example}{
   The following was entered in interactive mode.}

\verbatim{\:{/}
\\tr{
   {from}{[:lower:][:upper:][:digit:][:space:][:punct:]}
   {to}{[*L#][*U#][*D#][*S#][*P#]}}{
 !"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ
[\\\\]^_`
abcdefghijklmnopqrstuvwxyz
\\{|\\}~]}
.
----------------------------------------
SSPPPPPPPPPPPPPPPDDDDDDDDDDPPPPPPPSUUUUUUUUUUUUUUUUUUUUUUUUUUSPPPPPPSLLLLLLLLLLLLLLLLLLLLLLLLLLSPPPPP
----------------------------------------
\\tr{
   {squash}{^}
   {from}{[:lower:][:upper:][:digit:][:space:][:punct:]}
   {to}{[*L#][*U#][*D#][*S#][*P#]}}{
 !"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ
[\\\\]^_`
abcdefghijklmnopqrstuvwxyz
\\{|\\}~]}
.
----------------------------------------
SPDPSUSPSLSP}

\car{Note how the magic repeat operator \v{[*#]} stops on class boundaries.}


\item{\zprim{trace}{1}{{}}}
\car{
   The argument is expanded and interpreted as an integer.  This integer
   encodes an ensemble of flags controlling the trace output. The different
   modes are exactly the same as those that can be set from the command line.
   Refer to the \iref{cline}{corresponding section} for more information.
   Special values are\~\v{0} (switch off all tracing),
   \v{-1} (switch on all tracing modes in short mode),
   \v{-2} (switch on all tracing modes in long mode),
   \v{-3} (switch to the previous tracing value),
   and \v{-4} emit a listing of tracing bits.
   The third can be useful to switch tracing on for a short while and then off
   again if you need to debug your document.
   Additionally and redundantly, \mc{trace#1} puts the previous tracing
   value in place.}

\cpar{Result text}{
   The previous tracing value.}


\item{\zprim{try}{1}{{any}}}
\car{
   This will process the content and
   output is written in the macro \ssion{__zoemput__}.  Output will
   be truncated in case \pr{throw#2} was used or an error occurred.
   The status, currently one of \v{done}, \v{towel}, or \v{error},
   is written in the session macro \ssion{__zoemstat__}.}

\cpar{Result text}{
   None.}


\item{\zprim{undef}{1}{{key-sig}}}
\car{
   Deletes the key with signature \zarg{key-sig} from the
   top level dictionary. Complains (but does not fail) if the key
   does not exist in that dictionary.
   It is possible to specify that a regular key (i.e. not a dollar key)
   must be looked up in the global dictionary by prefixing its
   signature with two single quotes.
   }

\cpar{Result text}{
   None.}


\item{\zprim{vanish}{1}{{any}}}
\car{
   This will only process the content for its side effects. Any result text is
   disregarded.  This allows easy free-style commenting of sequences of
   definitions.  By comparison, \pr{formatted#1} provides the means to give a
   formatted presentation of the definitions themselves.}

\cpar{Result text}{
   None.}


\item{\zprim{while}{2}{{condition}{any}}}
\car{
   While \zarg{condition} exands to something that is nonzero when interpreted
   as an integer, \zarg{any} is expanded and concatenated to the result text.
   The following piece of zoem asks the user for an integer and writes all
   Fibonacci numbers smaller than that integer plus one extra to \stdout.}

\verbatim{\
\\import{ctr.zmm}     \\: import ctr macros.
\\def{fib#1}{
   \\ctrset{a}{1}
   \\ctrset{b}{1}
   \\ctrset{c}{0}
   \\while{\\eqt{lq}{\\ctrput{c}}{\\1}}{
      \\ctrset{c}{\\ctrput{a}}
      \\ctrset{a}{\\let{\\ctrput{a}+\\ctrput{b}}}
      \\write{-}{txt}{\\ctrput{c}\\|}
      \\ctrset{b}{\\ctrset{c}}
   }
}

\\write{-}{txt}{Enter a number please, }
\\write{-}{txt}{then press  and \\|}
\\setx{num}{\\finsert{-}}    \\:  this reads from \stdin.
\\fib{\\num}}

\ccar{Note}{
   The strings built up by \pr{while#2} are internally concatenated
   until it is done, so the result from \pr{while#2} \it{can} be captured.
   This will make \pr{while#2} work for \pr{setx#2}.  If you want to output
   100M worth of lines or paragraphs in a while loop, either embed the stuff to
   be output in a \pr{write#3} call and make sure that no whitespace results
   from the loop (for example by using \pr{formatted#1}), or simply use
   \pr{whilst#2}. With \pr{write#3} you can specify a file name to which
   results should be output (use \ssion{__fnout__} for the current default output
   file) whereas \pr{whilst#2} simply outputs to the current default stream.}

\item{\zprim{whilst}{2}{{condition}{any}}}
\car{
   While \zarg{condition} exands to something that is nonzero when interpreted
   as an integer, \zarg{any} is expanded and \it{immediately output} to
   the current default output stream.}

\cpar{Result text}{
   None \- everything is sent to the default output stream right away.
   Output from \pr{while#2} \it{can} be captured, i.e. it can be that what
   is assigned by a \pr{setx#2} invocation.}


\item{\zprim{write}{3}{{}{str}{}}}
\car{
   The first argument is expanded and used as a file name.  It is a fatal error
   if the file has either not been opened by a previous \mc{write#3} call or
   cannot be opened for writing.  Two special file names or 'streams' are
   recognized, namely \v{-} and \v{stderr}. They map to \stdout
   and \stderr.
   The third argument is expanded, filtered, and written to file.  The second
   argument indicates the filter to be used. It must be one of the (literal)
   strings \v{copy}, \v{device}, or \v{txt}.}

\par{
   The \v{copy} filter does not filter anything at all (neither plain scope
   nor device scope) and does not touch any of the zoem escape sequences
   remaining after expansion.}

\par{
   The \v{device} filter does a full-fledged filtering of both parse scopes.
   It respects the settings according to the \pr{special#1}
   primitive. The write primitive associates unique metadata with each
   file it opens, so \it{at directives} such as\~\mc{N}, \mc{W}, and \mc{+}
   for different output files do not interfere with one another.
   Refer to the \secref{dscope} section for more information on
   at directives.}

\par{
   The \v{txt} filter maps \mc{\\} to \mc{} (i.e. a single
   backslash), \mc{~}\~to a single space, \mc{-}\~to a single hyphen,
   \mc{,} (the atomic separator) to nil, \mc{|}\~to a newline,
   \mc{\{}\~to\~\v{\{}, and\~\mc{\}} to\~\v{\}}. It copies everything
   else verbatim.}

\cpar{Result text}{
   Technically none, as the output of \pr{write#3} cannot be captured.}

\item{\zprim{writeto}{1}{{}}}
\car{
   Closes the current default output stream, and changes it to point to file
   \zarg{file name}. Useful when splitting a document into chapters, or god
   forbid, nodes.}

\cpar{Notes}{
   If the file name contains a path separator, zoem will refuse to carry
   on, because this may pose a risk that sensitive files are overwritten -
   in case someone has written a malicious zoem input file to do just that.
   If the option \v{--unsafe} is used, zoem will query the user
   what to do. If the option \v{--unsafe-silent} is used, zoem will
   merrily buzz on without querying.
   The path separator is entirely \unix-centric, i.e. a forward slash.}

\par{
   Zoem will recognize if \mc{writeto#1} is issued more than once for the same
   file \zarg{file-name}. On the first occassion, it will simply open the file
   and truncate any previous contents.  On the second occasion and onwards, it
   will append to the file.  There is currently no option to vary this
   behaviour.  Zoem will not recognize the fact that different strings might
   refer to the same file (e.g. \v{foo} and \v{./foo}). Whenever it encounters
   a file name not seen before, it will try to open the file in write mode.}

\par{
   In interactive mode, \mc{writeto#1} has no effect for text entered
   in plain mode. It \it{does} have effect in case \pr{write#3} is issued
   with \ssion{__fnout__} as the file name argument, since \mc{writeto#3}
   resets the \ssion{__fnout__} macro.}

\cpar{Result text}{
   None.}

\item{\zprim{zinsert}{1}{{}}}
\car{
   The contents of file \zarg{file name} are put in place unaltered
   enclosed by the \pr{!#1} delay primitive.  The contents must necessarily
   satisfy zoem syntax.  If the file can not be opened, the empty
   string results.
   See also \pr{finsert#1}.}

\cpar{Example}{}

\verbatim{\protect{\setx{foo}{\zinsert{mydata}}}
\protect{\setx{foo}{\eval{\zinsert{mydata}}}}}

\par{
   In the first case, \mc{foo} will contain the exact contents
   of file \v{mydata}. Those contents are first
   enclosed within the \pr{!#1} primitive by \pr{zinsert#1}.
   The resulting text is evaluated by \pr{setx#2} - the only
   thing this does is strip the enclosing \v{\\!{}} scope.}

\par{
   In the second case, \mc{foo} will contain the \it{evaluated}
   contents of file \v{mydata}, as \pr{eval#1} adds an additional
   layer of evaluation.}

\cpar{Note}{
   This primitive is able to read
   \iref{fileread}{inline files}, unlike \pr{finsert#1}.}
   
\cpar{Result text}{
   The contents of file \v{file name} or the empty string if
   file can not be opened.}

\end{itemize}

\sec1{pitfalls}{Pitfalls}
\par{
   This is a young section, with only few entries yet.}

\begin{itemize}{{flow}{compact}{align}{right}{interitem}{1}}
\item
\car{
   [\pr{system#3}] Beware that the argument/option list (the second
   argument of \mc{system#3}) is encoded
   as a vararg. If you have a single argument, it is easy to
   forget the enclosing curlies. In that case, zoem ignores the
   argument altogether.}

\par{
   Zoem protects the data returned by \mc{system#3}. So you may
   e.g. think (as I once did) that}

\verbatim{\protect{\system{date}{{%e}{%B}{%Y}}}}

\car{
   Is a neat way to create a vararg, but you will end up with
   something like}

\verbatim{\protect{\{24\}\{April\}\{2004\}}}

\item
\car{
   [Package authors] Beware of using \it{and} scope within \it{at} scope
   within a \mc{write#3} invocation that uses the copy filter.}

\verbatim{\protect{\write{file}{copy}{ foo \@{ zut \&{ bar }}}}}

\car{
   The \v{bar} part will not be evaluated as the copy filter does not apply the
   filtering stage. If the stuff written is read back in from some other part
   of the document, or from another document altogether, the \v{bar} part will
   be evaluated in a different context than the one in which it was created.}

\item
\car{
   \pr{throw#2} with argument \v{done} can be used to halt processing of the
   current file. Refer to the \pr{throw#2} description for the associated
   requirements.}

\end{itemize}


\sec1{glossary}{Glossary}

\par{
   For \bf{user keys}, \bf{dollar keys}, and \bf{dictionary stacks},
   refer to the \capref{dictionary} section and the \capref{macro} section.
   For \bf{data keys}, refer to the \secref{grape} section.}

\par{
   For \bf{key signatures} and \bf{key mention}, refer to the \capref{signature}
   section.  For \bf{anonymous keys}: the \capref{anonymous} section.}

\par{
   \bf{Session variables} are described in the \capref{session} section.}

\: funky looking macros such as \ssion{__searchpath__}
\: that either affect zoem's runtime behaviour (as  \ssion{__searchpath__} does)
\: or provide some information to the user
\: (e.g. \ssion{__fnin__} and \ssion{__fnbase__}).

\par{
   For \bf{varargs}, arguments in which a variable number of sub-arguments
   can be stored, and for \bf{blocks}: the \capref{vararg} section.}

\par{
   For \bf{plain scope}, \bf{device scope}, \bf{at scope}, and \bf{glyph
   sequences}: The \capref{dichotomy} and \capref{dscope} sections.}

\par{
   For file read and  \bf{inline files}: the \capref{fileread} section.}

\par{
 Sometimes zoem \it{protects} or \it{unprotects} data. Refer to the
 \capref{protection} section.}



\"asd::add-toc-end"{End}
}}


\: mq
\end{simpledocument2}

\done


zoem-21-341/doc/TODO0000644000207600020760000000060314115654477010754 00000000000000
the  unprotect part in inspect (wrt pat that is passed to regex engine).

store
icmp
iclc
ifdef
ifeq
ifdefl

finsert
zinsert
cmp
icmp
iclc (and, or, bit ops)
defined
if
inspect
tr
macros (and, not)

apply, inspect, - evaluation

o  general: make headings look better in troff (PS output) by
   making the font larger and perhaps some more fidding.

o  zoemtut: \N etc in \@{..} scope.

zoem-21-341/doc/zoem.ps0000644000207600020760000014065314154762473011613 00000000000000%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Fri Dec 10 23:39:39 2021
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%+ font Courier
%%DocumentSuppliedResources: procset grops 1.22 4
%%Pages: 9
%%PageOrder: Ascend
%%DocumentMedia: Default 595 842 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.22 4
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
DEFS/BPhook known{DEFS begin BPhook end}if
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne
2 index/UniqueID ne
and
{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
mark
}bind def
/PEND{
cleartomark
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
%%IncludeResource: font Courier
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F 7.5(1. N)42.5 84 R(AME)-.35 E 7.5(2. SYNOPSIS)
42.5 96 R 7.5(3. DESCRIPTION)42.5 108 R 7.5(4. OPTIONS)42.5 120 R 7.5
(5. SESSION)42.5 132 R(MA)2.5 E(CR)-.4 E(OS)-.4 E 7.5(6. THE)42.5 144 R
(SET MODIFIERS)2.5 E 7.5(7. THE)42.5 156 R(INSPECT SUBLANGU)2.5 E -.4
(AG)-.4 G(E).4 E 7.5(8. THE)42.5 168 R(TR SUBLANGU)2.5 E -.4(AG)-.4 G(E)
.4 E 7.5(9. TILDE)42.5 180 R(EXP)2.5 E(ANSION)-.92 E 7.5(10. ENVIR)37.5
192 R(ONMENT)-.4 E 7.5(11. DIA)37.5 204 R(GNOSTICS)-.4 E 7.5(12. B)37.5
216 R(UGS)-.1 E 7.5(13. SEE)37.5 228 R(ALSO)2.5 E 7.5(14. EXAMPLES)37.5
240 R 7.5(15. A)37.5 252 R(UTHOR)-.55 E/F1 10.95/Times-Bold@0 SF -.219
(NA)20 268.8 S(ME).219 E F0
(zoem \255 macro processor for the Zoem macro/programming language.)100
280.8 Q F1(SYNOPSIS)20 297.6 Q/F2 10/Times-Bold@0 SF .322(zoem [-i)100
309.6 R F0 .322(<\214le name>[.azm] \()2.822 F/F3 10/Times-Italic@0 SF
.322(entry \214le name)B F0(\))A F2 2.821(][)C(-I)-2.821 E F0 .321
(<\214le name> \()2.821 F F3 .321(entry \214le name)B F0(\))A F2 2.821
(][)C(-o)-2.821 E F0 .321(<\214le name>)2.821 F(\()100 321.6 Q F3
(output \214le name)A F0(\))A F2 2.5(][)C(-d)-2.5 E F0( \()-.25 E F3(set de)A(vice k)-.15 E -.3(ey)-.1 G F0(\)).3 E F2(])
A(zoem)100 345.6 Q F0(\(enter interacti)100 357.6 Q .3 -.15(ve m)-.25 H
(ode - happens when none of).15 E F2(-i)2.5 E F0(,)A F2(-I)2.5 E F0(,)A
F2(-o)2.5 E F0(is gi)2.5 E -.15(ve)-.25 G(n\)).15 E F2 1.209(zoem -i)100
381.6 R F0 1.209(<\214le name>[.azm] \()3.709 F F3 1.209
(entry \214le name)B F0(\))A F2(-I)3.709 E F0 1.209(<\214le name> \()
3.709 F F3 1.21(entry \214le name)B F0(\))A F2([-o)3.71 E F0 1.21
(<\214le name>)3.71 F(\()100 393.6 Q F3 1.938(output \214le name)B F0
(\))A F2 4.437(][)C(-d)-4.437 E F0( \()-.25 F F3
1.937(set de)B 1.937(vice k)-.15 F -.3(ey)-.1 G F0(\)).3 E F2 4.437(][)C
(-x)-4.437 E F0(\()4.437 E F3 1.937(enter inter)B 1.937
(active mode on err)-.15 F(or)-.45 E F0(\))A F2 4.437(][)C(-s)-4.437 E
F0([=] \()-.25 F F3
1.272(set k)B 1.873 -.3(ey t)-.1 H 3.773(ov).3 G(al)-3.773 E F0(\))A F2
3.773(][)C(-e)-3.773 E F0( \()-.15 F F3 -.15(ev)C
1.273(aluate any).15 F 3.773(,e)-.55 G(xit)-3.973 E F0(\))A F2 3.773(][)
C(-E)-3.773 E F0( \()-.15 F F3 -.15(ev)C 1.273
(aluate any).15 F 3.773(,p)-.55 G -.45(ro)-3.773 G(-).45 E(ceed)100
417.6 Q F0(\))A F2 5.47(][)C(-chunk-size)-5.47 E F0 2.969( \()5.469
F F3(pr)A 2.969(ocess c)-.45 F 2.969(hunks of size num)-.15 F F0(\))A F2
5.469(][)C(--trace)-5.469 E F0(\()5.469 E F3(tr)A 2.969(ace mode)-.15 F
5.469(,d)-.1 G(efault)-5.469 E F0(\))A F2(])A([--trace-all-long)100
429.6 Q F0(\()2.826 E F3 .326(long tr)B .326(ace mode)-.15 F F0(\))A F2
2.827(][)C(--trace-all-short)-2.827 E F0(\()2.827 E F3 .327(short tr)B
.327(ace mode)-.15 F F0(\))A F2 2.827(][)C(--trace-r)-2.827 E(egex)-.18
E F0(\()2.827 E F3(tr)A(ace)-.15 E -.37(re)100 441.6 S -.1(ge)-.03 G
(xes)-.1 E F0(\))A F2 3.624(][)C(-trace)-3.624 E F0 3.624(k\()3.624 G F3
(tr)-3.624 E 1.124(ace mode)-.15 F 3.624(,e)-.1 G(xplicit)-3.824 E F0
(\))A F2 3.624(][)C(--stats)-3.624 E F0(\()3.624 E F3 1.124
(show symbol table stats after run)B F0(\))A F2 3.623(][)C(--split)
-3.623 E F0(\()100 453.6 Q F3 2.988(assume \\writeto usa)B 3.189 -.1
(ge, s)-.1 H 2.989(et \\__split__).1 F F0(\))A F2 5.489(][)C(--str)
-5.489 E(ess-write)-.18 E F0(\()5.489 E F3(mak)A 5.489(e\\)-.1 G 2.989
(write#3 r)-5.489 F(eco)-.37 E(ver)-.1 E F0(\))A F2 5.489(][)C(--unsafe)
-5.489 E F0(\()100 465.6 Q F3(pr)A 1.224(ompt for \\system#3)-.45 F F0
(\))A F2 3.724(][)C(--unsafe-silent)-3.724 E F0(\()3.723 E F3 1.223
(simply allow \\system#3)B F0(\))A F2 3.723(][)C(-allo)-3.723 E(w)-.1 E
F0 1.223(cmd1[:cmdx]+ \()3.723 F F3(al-)A .239(lowable commands)100
477.6 R F0(\))A F2 2.739(][)C(--system-honor)-2.739 E F0(\()2.739 E F3
-.37(re)C(quir).37 E 2.739(e\\)-.37 G .239(system#3 to succeed)-2.739 F
F0(\))A F2 2.739(][)C(-nuser)-2.739 E F0 2.739(k\()2.739 G F3 .239
(user dict stac)-2.739 F(k)-.2 E(size)100 489.6 Q F0(\))A F2 3.895(][)C
(-nen)-3.895 E(v)-.4 E F0 3.895(k\()3.895 G F3(en)-3.895 E(vir)-.4 E
1.395(onment dict stac)-.45 F 3.895(ks)-.2 G(ize)-3.895 E F0(\))A F2
3.895(][)C(-nsegment)-3.895 E F0 3.895(k\()3.895 G F3 1.395
(maximum simple nesting depth)-3.895 F F0(\))A F2(])A([-nstack)100 501.6
Q F0 3.339(k\()3.339 G F3 .839(maximum e)-3.339 F .839
(val nesting depth)-.15 F F0(\))A F2 3.339(][)C(-b)-3.339 E(user)-.2 E
F0(\()3.339 E F3 .839(initial user dict capacity)B F0(\))A F2 3.34(][)C
(-bzoem)-3.34 E F0(\()3.34 E F3(initial)A 1.489(zoem dict capacity)100
513.6 R F0(\))A F2 3.989(][)C(-tl)-3.989 E F0 3.989(k\()3.989 G F3 1.489
(tab length)-3.989 F F0(\))A F2 3.989(][)C(-l)-3.989 E F0 1.488
( \()3.989 F F3 1.488(list items)B F0(\))A F2 3.988(][)C(-h)-3.988
E F0(\()3.988 E F3 1.488(show options)B F0(\))A F2 3.988(][)C(--apr)
-3.988 E(opos)-.18 E F0(\()100 525.6 Q F3(show options)A F0(\))A F2(])A
F1(DESCRIPTION)20 542.4 Q F0 2.884
(Zoem is a macro/programming language. It is fully described in the)100
554.4 R F3 2.884(Zoem User Manual)5.384 F F0 .825
(\(zum.html\), currently a)100 566.4 R -.25(va)-.2 G .825
(ilable in HTML only. This manual page documents the zoem proces-).25 F
(sor)100 578.4 Q 2.5(,n)-.4 G(ot the zoem language.)-2.5 E .964
(If the input \214le is speci\214ed using the)100 602.4 R F2(-i)3.464 E
F0 .965(option and is a re)3.464 F .965
(gular \214le \(i.e. not STDIN - which is)-.15 F 1.125
(speci\214ed by using a single h)100 614.4 R 1.125(yphen\), it must ha)
-.05 F 1.425 -.15(ve t)-.2 H 1.125(he e).15 F(xtension)-.15 E/F4 10
/Courier@0 SF(.azm)3.624 E F0 3.624(.T)C 1.124(his e)-3.624 F 1.124
(xtension can b)-.15 F(ut)-.2 E .044
(need not be speci\214ed. The zoem k)100 626.4 R -.15(ey)-.1 G F2
(\\__fnbase__)2.694 E F0 .045
(will be set to the \214le base name stripped of the)2.544 F F4(.azm)100
638.4 Q F0 -.15(ex)3.014 G .514(tension and an).15 F 3.014(yl)-.15 G
.514(eading path components.)-3.014 F .514
(If the input \214le is speci\214ed using the)5.514 F F2(-I)3.013 E F0
(op-)3.013 E .235(tion, no e)100 650.4 R .236(xtension is assumed, and)
-.15 F F2(\\__fnbase__)2.736 E F0 .236
(is set to the \214le base name, period. The \214le base)2.736 F
(name is the \214le name with an)100 662.4 Q 2.5(yl)-.15 G
(eading path components stripped a)-2.5 E -.1(wa)-.15 G(y.).1 E .9
(If neither)100 686.4 R F2(-i)3.4 E F0(nor)3.4 E F2(-o)3.4 E F0 .9
(is speci\214ed, zoem enters interacti)3.4 F 1.2 -.15(ve m)-.25 H .9
(ode. Zoem should fully reco).15 F -.15(ve)-.15 G 3.4(rf).15 G(rom)-3.4
E(an)100 698.4 Q 2.57(ye)-.15 G .07(rror it encounters in the input.)
-2.57 F .07(If you \214nd an e)5.07 F .07
(xception to this rule, consider \214ling a b)-.15 F .07(ug re-)-.2 F
1.16(port. In interacti)100 710.4 R 1.46 -.15(ve m)-.25 H 1.16(ode, zoe\
m start interpreting once it encounters a line containing a single).15 F
.486(dot. Zoem')100 722.4 R 2.986(si)-.55 G .486(nput beha)-2.986 F .486
(viour can be modi\214ed by setting the k)-.2 F -.15(ey)-.1 G F2
(\\__parmode__)3.137 E F0 2.987(.S)C .487(ee the section)-2.987 F
(zoem 21-341)20 768 Q 2.5(7D)158.46 G(ec 2021)-2.5 E(1)205.95 E 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F/F1 10/Times-Bold@0 SF .118(SESSION MA)100 84 R
(CR)-.55 E(OS)-.3 E F0 .118(for the details.)2.618 F .118(In interacti)
5.118 F .418 -.15(ve m)-.25 H .118(ode, zoem does).15 F/F2 10
/Times-Italic@0 SF(not)2.617 E F0 .117(preprocess the interac-)2.617 F
(ti)100 96 Q .582 -.15(ve i)-.25 H .283(nput, implying that it does not\
 accept inline \214les and it does not recognize comments. Both).15 F
.496(types of sequence will generate syntax errors.)100 108 R(Finally)
5.496 E 2.996(,r)-.65 G .496(eadline editing and history retrie)-2.996 F
-.25(va)-.25 G 2.996(lc).25 G(an)-2.996 E .627(be used in interacti)100
120 R .927 -.15(ve m)-.25 H .627(ode pro).15 F .627(vided that the)-.15
F 3.127(ya)-.15 G .628(re a)-3.127 F -.25(va)-.2 G .628
(ilable on the system. This means that the).25 F .917
(input lines can be retrie)100 132 R -.15(ve)-.25 G .917
(d, edited, and discarded with a wide range of cursor positioning and)
.15 F(te)100 144 Q(xt manipulation commands.)-.15 E .353(From within th\
e entry \214le and included \214les it is possible to open and write to\
 arbitrary \214les us-)100 168 R 1.91(ing the)100 180 R F1(\\write#3)
4.41 E F0(primiti)4.41 E -.15(ve)-.25 G 4.41(.A).15 G 1.91
(rbitrary \214les can be read in v)-4.41 F 1.91(arious modes using the)
-.25 F F1(\\do\214le#2)4.41 E F0 .384(macro \(pro)100 192 R .384
(viding four dif)-.15 F .385(ferent modes with respect to \214le e)-.25
F .385(xistence and output\),)-.15 F F1(\\\214nsert#1)2.885 E F0 2.885
(,a)C(nd)-2.885 E F1(\\zinsert#1)100 204 Q F0 5.153(.Z)C .153
(oem will write the def)-5.153 F .152
(ault output to a single \214le, the name of which is either speci-)-.1
F 1.948(\214ed by the)100 216 R F1(-o)4.448 E F0 1.949
(option, or constructed as described belo)4.448 F 1.949
(w. Zoem can split the def)-.25 F 1.949(ault output)-.1 F 1.07
(among multiple \214les. This is go)100 228 R -.15(ve)-.15 G 1.069
(rned from within the input \214les by issuing).15 F F1(\\writeto#1)
3.569 E F0(calls.)3.569 E(Refer to the)100 240 Q F1(--split)2.5 E F0
(option and the)2.5 E F2(Zoem User Manual)2.5 E F0(.)A .384(If none of)
100 264 R F1(-i)2.884 E F0(or)2.884 E F1(-o)2.884 E F0 .384(is gi)2.884
F -.15(ve)-.25 G .384(n, then zoem will enter interacti).15 F .685 -.15
(ve m)-.25 H .385(ode. In this mode, zoem interprets).15 F .567(by def)
100 276 R .567(ault chunks of te)-.1 F .566
(xt that are ended by a single dot on a line of its o)-.15 F .566
(wn. This can be useful)-.25 F .817(for testing or deb)100 288 R .818
(ugging. In interacti)-.2 F 1.118 -.15(ve m)-.25 H .818
(ode, zoem should reco).15 F -.15(ve)-.15 G 3.318(rf).15 G .818(rom an)
-3.318 F 3.318(yf)-.15 G .818(ailure it encoun-)-3.418 F .501
(ters. Interacti)100 300 R .801 -.15(ve m)-.25 H .501
(ode can also be accessed from within a \214le by issuing).15 F/F3 10
/Courier@0 SF(\\zinsert{stdia})3 E F0(,)A .181(and it can be triggered \
as the mode to enter should an error occur \(by adding the)100 312 R F1
(-x)2.682 E F0 .182(option to the)2.682 F(command line\).)100 324 Q(If)
100 348 Q F1(-o)2.5 E F0(is gi)2.5 E -.15(ve)-.25 G 2.5(na).15 G(nd)-2.5
E F1(-i)2.5 E F0(is not, zoem reads input from STDIN.)2.5 E(If)100 372 Q
F1(-i)3.24 E F0 .74(is gi)3.24 F -.15(ve)-.25 G 3.24(na).15 G(nd)-3.24 E
F1(-o)3.24 E F0 .739
(is not, zoem will construct an output \214le name as follo)3.24 F .739
(ws. If the)-.25 F F1(-d)3.239 E F0(option)3.239 E -.1(wa)100 384 S 2.62
(su).1 G .12(sed with ar)-2.62 F(gument)-.18 E F3()2.62 E F0 2.62
(,z)C .12(oem will write to the \214le which results from e)-2.62 F
(xpanding)-.15 E F1(\\__fn-)2.62 E(base__.)-.15 E F0 2.5
(.O)C(therwise, zoem writes to \(the e)-2.5 E(xpansion of\))-.15 E F1
(\\__fnbase__.ozm)2.5 E F0(.)A -.15(Fo)100 420 S(r).15 E F1(-i)2.5 E F0
(and)2.5 E F1(-o)2.5 E F0 2.5(,t)C(he ar)-2.5 E(gument)-.18 E F3(-)2.5 E
F0(is interpreted as respecti)2.5 E -.15(ve)-.25 G(ly).15 E F3(stdin)2.5
E F0(and)2.5 E F3(stdout)2.5 E F0(.)A/F4 10.95/Times-Bold@0 SF(OPTIONS)
20 436.8 Q F1(-i)100 448.8 Q F0(<\214le name>[.azm] \()2.5 E F2
(entry \214le name)A F0(\))A .1
(Specify the entry \214le name. The \214le must ha)120 460.8 R .399 -.15
(ve t)-.2 H(he).15 E F3(.azm)2.599 E F0 -.15(ex)2.599 G .099(tension, b)
.15 F .099(ut it need not be spec-)-.2 F(i\214ed.)120 472.8 Q F1(-I)100
496.8 Q F0(<\214le name>[.azm] \()2.5 E F2(entry \214le name)A F0(\))A(\
Specify the entry \214le name, without restrictions on the \214le name.)
120 508.8 Q F1(-o)100 532.8 Q F0(<\214le name> \()2.5 E F2
(output \214le name)A F0(\))A(Specify the output \214le name.)120 544.8
Q F1(-d)100 568.8 Q F0( \()-.25 E F2(set k)A .6 -.3
(ey \\)-.1 H(__de).3 E(vice__)-.15 E F0(\))A(Set the k)120 580.8 Q -.15
(ey)-.1 G F1(\\__de)2.65 E(vice__)-.15 E F0(to)2.5 E F3()2.5 E
F0(.)A F1(-x)100 604.8 Q F0(\()2.5 E F2(enter inter)A
(active mode on err)-.15 E(or)-.45 E F0(\))A .563
(The afterlife option. If zoem encounters an error during re)120 616.8 R
.563(gular processing, it will emit er)-.15 F(-)-.2 E .47
(ror messages as usual, and then enter interacti)120 628.8 R .769 -.15
(ve m)-.25 H .469(ode. This allo).15 F .469(ws you e.g.)-.25 F .469
(to inspect the)5.469 F -.25(va)120 640.8 S(lues of k).25 E -.15(ey)-.1
G 2.5(su).15 G(sed or de\214ned within the problematic area.)-2.5 E F1
(-s)100 664.8 Q F0([=] \()-.25 E F2
(set k)A .6 -.3(ey t)-.1 H 2.5(ov).3 G(al)-2.5 E F0(\))A .538(Set the k)
120 676.8 R -.15(ey)-.1 G F1(\\k)3.189 E(ey)-.1 E F0(to)3.039 E F1 -.1
(va)3.039 G(l).1 E F0 .539(if present,)3.039 F F1(1)3.039 E F0 3.039
(otherwise. An)3.039 F 3.039(yt)-.15 G .539(ype of k)-3.039 F .839 -.15
(ey c)-.1 H .539(an be set, including k).15 F -.15(ey)-.1 G(s).15 E .253
(taking ar)120 688.8 R .253(guments and k)-.18 F -.15(ey)-.1 G 2.753(ss)
.15 G .252(urrounded in quotes. Be)-2.753 F -.1(wa)-.25 G .252
(re of the shell').1 F 2.752(sq)-.55 G .252(uote and backslash)-2.752 F
3.67(interpolation. Currently)120 700.8 R F1 -.1(va)3.67 G(l).1 E F0
1.17(is not e)3.67 F -.25(va)-.25 G 1.17
(luated, so appending or prepending to a k).25 F 1.47 -.15(ey i)-.1 H
3.67(sn).15 G(ot)-3.67 E(possible.)120 712.8 Q(zoem 21-341)20 768 Q 2.5
(7D)158.46 G(ec 2021)-2.5 E(2)205.95 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F/F1 10/Times-Bold@0 SF(-e)100 84 Q F0( \()-.15 E/F2 10/Times-Italic@0 SF -.15(ev)C(aluate any).15 E 2.5(,e)
-.55 G(xit)-2.7 E F0(\))A(This causes zoem to e)120 96 Q -.25(va)-.25 G
(luate).25 E/F3 10/Courier@0 SF()2.5 E F0 2.5(,w)C(rite an)-2.5 E
2.5(yr)-.15 G(esult te)-2.5 E(xt to stdout, and e)-.15 E(xit.)-.15 E F1
(-E)100 120 Q F0( \()-.15 E F2 -.15(ev)C(aluate any).15 E
2.5(,p)-.55 G -.45(ro)-2.5 G(ceed).45 E F0(\))A .461
(This causes zoem to e)120 132 R -.25(va)-.25 G(luate).25 E F3()
2.961 E F0 2.961(,w)C .461(rite an)-2.961 F 2.961(yr)-.15 G .461
(esult te)-2.961 F .46(xt to stdout, and proceed e.g. with)-.15 F
(the entry \214le or an interacti)120 144 Q .3 -.15(ve s)-.25 H(ession.)
.15 E F1(-chunk-size)100 168 Q F0( \()2.5 E F2(pr)A(ocess c)-.45 E
(hunks of size num)-.15 E F0(\))A .608
(Zoem reads its input in chunks. It fully processes a chunk before mo)
120 180 R .608(ving on with the ne)-.15 F(xt)-.15 E .259(one. This opti\
on de\214nes the \(minimum\) size of the chunks. The size or count of t\
he chunks)120 192 R(does not at all af)120 204 Q(fect zoem')-.25 E 2.5
(so)-.55 G(utput. The def)-2.5 E(ault minimum chunk size equals one me)
-.1 E -.05(ga)-.15 G(byte.).05 E 1.047
(Zoem will read \214les in their entirety before further processsing if)
120 228 R F1(-chunk-size 0)3.547 E F0 1.047(is speci-)3.547 F(\214ed.)
120 240 Q .163(Zoem does not chunk input \214les arbitrarily. It will a\
ppend to a chunk until it is in the outer)120 264 R(-)-.2 E 1.038
(most scope \(not contained within an)120 276 R 3.539(yb)-.15 G 1.039
(lock\) and the chunk will end with a line that w)-3.539 F(as)-.1 E
(fully read.)120 288 Q(Consequently)120 312 Q 2.547(,i)-.65 G 2.547(fe)
-2.547 G .046(.g. a \214le contains a block \(delimited by balanced cur\
lies\) spanning the en-)-2.547 F
(tire \214le then zoem is forced to read it in its entirety.)120 324 Q
F1(--trace)100 348 Q F0(\()2.5 E F2(tr)A(ace mode)-.15 E 2.5(,d)-.1 G
(efault)-2.5 E F0(\))A -.35(Tr)120 360 S(ace in def).35 E(ault mode.)-.1
E F1(--trace-all-long)100 384 Q F0(\()2.5 E F2(long tr)A(ace mode)-.15 E
F0(\))A .097(Sets on)120 396 R F2(most)2.597 E F0 .097
(trace options in long mode.)2.597 F -.35(Tr)5.097 G .098(ace options)
.35 F F3(xxx)2.598 E F0 .098(not set ha)2.598 F .398 -.15(ve t)-.2 H
.098(heir o).15 F(wn)-.25 E F1(--trace-)2.598 E(xxx)120 408 Q F0
(entry \(see belo)2.5 E(w\).)-.25 E F1(--trace-all-short)100 432 Q F0
(\()2.5 E F2(short tr)A(ace mode)-.15 E F0(\))A 2.232(Sets on)120 444 R
F2(most)4.732 E F0 2.232(trace options in short mode.)4.732 F -.35(Tr)
7.232 G 2.232(ace options).35 F F3(xxx)4.732 E F0 2.232(not set ha)4.732
F 2.532 -.15(ve t)-.2 H 2.232(heir o).15 F(wn)-.25 E F1(--trace-xxx)120
456 Q F0(entry \(see belo)2.5 E(w\).)-.25 E F1(--trace-k)100 480 Q(eys)
-.1 E F0(\()2.5 E F2(tr)A(ace k)-.15 E -.3(ey)-.1 G(s).3 E F0(\))A -.35
(Tr)120 492 S(ace k).35 E -.15(ey)-.1 G(s.).15 E F1(--trace-r)100 516 Q
(egex)-.18 E F0(\()2.5 E F2(tr)A(ace r)-.15 E -1.8 -.4(eg e)-.37 H(xes)
.2 E F0(\))A -.35(Tr)120 528 S(ace re).35 E(ge)-.15 E -.15(xe)-.15 G 2.5
(s\().15 G(i.e. the)-2.5 E F1(\\inspect#4)2.5 E F0(primiti)2.5 E -.15
(ve)-.25 G(\).).15 E F1(-trace)100 552 Q F0 2.5(k\()2.5 G F2(tr)-2.5 E
(ace mode)-.15 E 2.5(,e)-.1 G(xplicit)-2.7 E F0(\))A
(Set trace options by adding their representing bits.)120 564 Q F1
(--str)100 588 Q(ess-write)-.18 E F0(\()2.5 E F2(str)A
(ess test using write)-.37 E F0(\))A .923(This mak)120 600 R(es)-.1 E F1
(\\write#3)3.423 E F0(reco)3.423 E -.15(ve)-.15 G 3.423(rf).15 G .923
(rom errors.)-3.423 F .924
(It is a special purpose option used for creating)5.923 F .143
(zoem stress test suites, such as)120 612 R F3(stress.azm)2.643 E F0
.142(in the zoem distrib)2.642 F(ution)-.2 E F3(/examples)2.642 E F0
(subdi-)2.642 E(rectory.)120 624 Q F1(--unsafe)100 648 Q F0(\()2.5 E F2
(pr)A(ompt for \\system#3)-.45 E F0(\))A F1(--unsafe-silent)100 660 Q F0
(\()2.5 E F2(simply allow \\system#3)A F0(\))A F1(-allo)100 672 Q(w)-.1
E F0(cmd1[:cmdx]+ \()2.5 E F2(allowable commands)A F0(\))A -.4(Wi)120
684 S(th).4 E F1(--unsafe)3.437 E F0 .937(system calls are allo)3.437 F
.937(wed b)-.25 F .937(ut the user is prompted for each in)-.2 F -.2(vo)
-.4 G .938(cation. The).2 F .118(command and its ar)120 696 R .118
(guments \(if an)-.18 F .117(y\) are sho)-.15 F .117(wn, b)-.25 F .117
(ut the STDIN information \(if an)-.2 F .117(y\) is with-)-.15 F 2.5
(held. W)120 708 R(ith)-.4 E F1(--unsafe-silent)2.5 E F0
(system calls are allo)2.5 E(wed and the user is ne)-.25 E -.15(ve)-.25
G 2.5(rp).15 G(rompted.)-2.5 E(zoem 21-341)20 768 Q 2.5(7D)158.46 G
(ec 2021)-2.5 E(3)205.95 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F(Use)120 84 Q/F1 10/Times-Bold@0 SF(-allo)3.048
E(w)-.1 E/F2 10/Times-Italic@0 SF(str)2.5 E F0(or)3.048 E F1(--allo)
3.048 E(w)-.1 E F0(=)A F2(str)A F0 .548(to specify a list of allo)3.048
F -.1(wa)-.25 G .548(ble commands, as a string in which).1 F
(the commands are separated by colons.)120 96 Q F1(--system-honor)100
120 Q F0(\()2.5 E F2 -.37(re)C(quir).37 E 2.5(e\\)-.37 G
(system#3 to succeed)-2.5 E F0(\))A -.4(Wi)120 132 S .05
(th this option an).4 F(y)-.15 E/F3 10/Courier@0 SF(\\system#3)2.549 E
F0 -.1(fa)2.549 G .049(ilure \(for whate).1 F -.15(ve)-.25 G 2.549(rr)
.15 G .049(eason, including safe beha)-2.549 F .049(viour\) is)-.2 F(re)
120 144 Q -.05(ga)-.15 G 1.03(rded as a zoem f).05 F 3.531(ailure. By)
-.1 F(def)3.531 E 1.031(ault, f)-.1 F 1.031
(ailing system calls are ignored under either safe)-.1 F(mode, unsafe m\
ode \(--unsafe\), or silent unsafe mode \(--unsafe-silent\).)120 156 Q
F1(--split)100 180 Q F0(\()2.5 E F2(assume split output)A F0(\))A .496
(This assumes zoem input that allo)120 192 R .496
(ws output to multiple \214les \(e.g.)-.25 F .496
(chapters\). It sets the de-)5.496 F -.1(fa)120 204 S 1.602
(ult output stream to).1 F F3(stdout)4.102 E F0 1.602
(\(anticipating custom output redirection with)4.102 F F1(\\writeto#1)
4.102 E F0(\))A(and sets the session macro)120 216 Q F1(\\__split__)2.5
E F0(to)2.5 E F3(1)2.5 E F0(.)A F1(--stats)100 240 Q F0(\()2.5 E F2
(show symbol table stats after run)A F0(\))A(Sho)120 252 Q 2.5(ws)-.25 G
(ymbol table chacteristics. Symbol tables are maintained as hashes.)-2.5
E F1(-tl)100 276 Q F0 2.5(k\()2.5 G F2(set tab length)-2.5 E F0(\))A
.376(Set the tab length. HTML output can be indented according to nesti\
ng structure, using tabs)120 288 R .12(which are e)120 300 R .12
(xpanded to simple spaces. By def)-.15 F .12
(ault, the tab length is zero, meaning that no in-)-.1 F(dent is sho)120
312 Q 2.5(wn. The)-.25 F(maximum v)2.5 E
(alue the tab length can be set to is four.)-.25 E F1(-nsegment)100 336
Q F0 2.5(k\()2.5 G F2(le)-2.5 E(vel of macr)-.15 E 2.5(on)-.45 G
(esting allowed)-2.5 E F0(\))A F1(-nstack)100 348 Q F0 2.5(k\()2.5 G F2
(stac)-2.5 E 2.5(kc)-.2 G(ount)-2.5 E F0(\))A F1(-nuser)100 360 Q F0 2.5
(k\()2.5 G F2(user dictionary stac)-2.5 E 2.5(ks)-.2 G(ize)-2.5 E F0(\))
A F1(-nen)100 372 Q(v)-.4 E F0 2.5(k\()2.5 G F2(en)-2.5 E(vir)-.4 E
(onment dictionary stac)-.45 E 2.5(ks)-.2 G(ize)-2.5 E F0(\))A F1(-b)100
384 Q(user)-.2 E F0 2.5(k\()2.5 G F2(initial user dict capacity)-2.5 E
F0(\))A F1(-bzoem)100 396 Q F0 2.5(k\()2.5 G F2
(initial zoem dict capacity)-2.5 E F0(\))A 1.04
(Probably needed only if you ha)120 408 R 1.34 -.15(ve s)-.2 H 1.04
(ome obscure and e).15 F 1.04(xtreme use for zoem. The se)-.15 F(gment)
-.15 E .534(limit applies to simple nesting of macros. The stack limit \
applies to nesting of macros that)120 420 R -.25(eva)120 432 S .681
(luate an ar).25 F .681(gument before use. Each such e)-.18 F -.25(va)
-.25 G .681(luation creates a ne).25 F 3.18(ws)-.25 G .68
(tack. The user limit)-3.18 F 1.042(applies to)120 444 R F1
(\\push{user})3.542 E F0 3.542(,t)C 1.042(he en)-3.542 F 3.542(vl)-.4 G
1.042(imit applies to the nesting le)-3.542 F -.15(ve)-.25 G 3.543(lo)
.15 G 3.543(fe)-3.543 G -.4(nv)-3.543 G 1.043(ironments \(started).4 F
(with)120 456 Q F3(\\begin#2)2.741 E F0 .241
(\). The user dict capacity pertains to the initial number of b)B(uck)
-.2 E .24(ets allocated)-.1 F .352(for user and en)120 468 R .352(viron\
ment dictionaries, and the zoem dict capacity pertains to the dictionar\
y)-.4 F(containing the zoem primiti)120 480 Q -.15(ve)-.25 G(s.).15 E F1
(-l)100 504 Q F0( \()2.5 E F2(list items)A F0(\))A .354
(List items identi\214ed by)120 516 R F3()2.854 E F0 2.854(.I)C
2.853(tc)-2.854 G .353(an be an)-2.853 F 2.853(yo)-.15 G(f)-2.853 E F1
(all)2.853 E F0(,)A F1(\214lter)2.853 E F0(.)A F1(legend)5.353 E F0(,)A
F1 -.2(bu)2.853 G(iltin).2 E F0(,)A F1(session)2.853 E F0(,)A F1(trace)
2.853 E F0(,)A(or)120 528 Q F1(zoem)2.808 E F0 2.808(,M)C .309
(ultiple identi\214ers can be joined in a string, e.g.)-2.808 F F3 .309
(-l legendzoem)2.809 F F0 .309(prints a le)2.809 F(g-)-.15 E(end follo)
120 540 Q(wed by a listing of zoem primiti)-.25 E -.15(ve)-.25 G(s.).15
E F1(-h)100 564 Q F0(\()2.5 E F2(show options)A F0(\))A(Sho)120 576 Q
2.5(ws)-.25 G(hort synopsis of options.)-2.5 E/F4 10.95/Times-Bold@0 SF
(SESSION MA)20 592.8 Q(CR)-.602 E(OS)-.329 E F1(\\__parmode__)100 604.8
Q F0 1.059(This macro af)120 616.8 R 1.059(fects zoem')-.25 F 3.559(sr)
-.55 G 1.059(ead beha)-3.559 F 1.059(viour in interacti)-.2 F 1.359 -.15
(ve m)-.25 H 3.559(ode. It).15 F 1.058(can be set on the com-)3.559 F
(mand line using the)120 628.8 Q F1(-s)2.5 E F0 2.5(option. Bits)2.5 F
(that can be set:)2.5 E F3 24(1c)120 652.8 S
(homp newlines \(remove the newline character\))-24 E 24(2s)120 664.8 S
(kip empty newlines)-24 E 24(4r)120 676.8 S
(ead paragraphs \(an empty line triggers input read\))-24 E 24(8n)120
688.8 S(ewlines can be escaped using a backslash)-24 E 12(16 read)120
700.8 R(large paragraphs \(a single dot on a line)6 E
(triggers input read\))150 712.8 Q F0(zoem 21-341)20 768 Q 2.5(7D)158.46
G(ec 2021)-2.5 E(4)205.95 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F/F1 10/Times-Bold@0 SF(\\__de)100 84 Q(vice__)
-.15 E F0 .572(The current output de)120 96 R .572
(vice, set by the command line option)-.25 F F1(-d)3.072 E F0 3.072(.T)C
(he)-3.072 E F1(man)3.072 E F0(and)3.072 E F1(faq)3.072 E F0(packages)
3.072 E(support)120 108 Q F1(html)2.5 E F0(and)2.5 E F1 -.18(ro)2.5 G
(ff).18 E F0(as its v)2.5 E(alues.)-.25 E F1(\\__fnbase__)100 120 Q F0
.243(The base name of the input \214le name. Leading path components ar\
e stripped a)120 132 R -.1(wa)-.15 G .242(y. If the).1 F F1(-i)2.742 E
F0 .965(option is used the input \214le is required to ha)120 144 R
1.265 -.15(ve t)-.2 H(he).15 E/F2 10/Courier@0 SF(.azm)3.465 E F0(suf)
3.465 E .965(\214x. In that case the suf)-.25 F .965(\214x is)-.25 F
(also stripped to obtain the base name.)120 156 Q F1(\\__fnentry__)100
168 Q F0(The name of the entry \214le.)120 180 Q F1(\\__fnin__)100 192 Q
F0(The \214le currently being processed.)120 204 Q F1(\\__fnout__)100
216 Q F0(The name of the def)120 228 Q(ault output \214le.)-.1 E F1
(\\__fnpath__)100 240 Q F0
(The leading component of the input \214le name, possibly empty.)120 252
Q F1(\\__fnup__)100 264 Q F0
(The \214le that included the current \214le, if applicable.)120 276 Q
F1(\\__fnwrite__)100 288 Q F0 .884(This k)120 300 R 1.184 -.15(ey i)-.1
H 3.384(ss).15 G .884(et by)-3.384 F F2(\\write#3)3.384 E F0 .883
(to its \214rst ar)3.384 F .883
(gument. It can be used by macros that are e)-.18 F(x-)-.15 E .322
(panded during e)120 312 R -.25(va)-.25 G .322(luation of the third ar)
.25 F .323(gument. Possible usage is to branch on the name of)-.18 F
(the)120 324 Q/F3 10/Times-Italic@0 SF(write)4.182 E F0 1.682
(output stream. F)4.182 F 1.682(or e)-.15 F 1.682
(xample a \214le called)-.15 F F3(inde)4.181 E(x.html)-.2 E F0 1.681
(may be treated dif)4.181 F(ferently)-.25 E .093(from other \214les.)120
336 R .094(The k)5.094 F .394 -.15(ey i)-.1 H 2.594(sd).15 G .094
(eleted afterw)-2.594 F .094(ards. Nested in)-.1 F -.2(vo)-.4 G .094
(cations of).2 F F2(\\write#3)2.594 E F0 .094(may cor)2.594 F(-)-.2 E
(rupt the status of this k)120 348 Q -.15(ey)-.1 G(.).15 E F1(\\__ia__)
100 360 Q F0(The input/output separator used in interacti)120 372 Q .3
-.15(ve m)-.25 H(ode.).15 E F1(\\__line__)100 384 Q F0 .456
(The line number in the \214le currently being processed.)120 396 R .455
(This number will be correct for an)5.455 F(y)-.15 E(in)120 408 Q -.2
(vo)-.4 G .673(cation outside the scope of a macro. F).2 F .673(or an)
-.15 F 3.173(yi)-.15 G -1.9 -.4(nv o)-3.173 H .674
(cation within a macro the result will).4 F(be the line number of the c\
losing curly of the outermost containing macro. The follo)120 420 Q
(wing)-.25 E F2(\\__line__)138 444 Q(\\__line__)138 456 Q(\\__line__)138
468 Q(\\group{)138 480 Q(\\__line__)138 492 Q(\\group{\\__line__})138
504 Q(\\__line__})138 516 Q F0(Results in)120 540 Q F2(1)138 564 Q(2)138
576 Q(3)138 588 Q(7)138 600 Q(7)138 612 Q(7)138 624 Q F1(\\__sear)100
648 Q(chpath__)-.18 E F0 6.676(Av)120 660 S(arar)-6.926 E 6.676(gc)-.18
G 4.176(ontaining a list of paths to search when a \214le is to be incl\
uded/im-)-6.676 F 2.543(ported/read/loaded. When you start zoem, this k)
120 672 R 2.843 -.15(ey s)-.1 H 2.544(hould contain the location of the)
.15 F F1(man.zmm)120 684 Q F0(and)3.217 E F1(faq.zmm)3.217 E F0 .717
(package \214les.)3.217 F .717(It is advisable not to o)5.717 F -.15(ve)
-.15 G .716(rwrite this k).15 F 1.016 -.15(ey b)-.1 H .716(ut to ap-)
-.05 F(pend to it instead.)120 696 Q F1(\\__zoemstat__)100 708 Q F0
1.052(Set to one of)120 720 R F2(ok)3.552 E F0(,)A F2(towel)3.553 E F0
1.053(\(that one is a bit lame\), or)3.553 F F2(error)3.553 E F0 1.053
(by either the interpreter)3.553 F 3.553(,a)-.4 G(n)-3.553 E
(zoem 21-341)20 768 Q 2.5(7D)158.46 G(ec 2021)-2.5 E(5)205.95 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F(occurrence of)120 84 Q/F1 10/Courier@0 SF
(\\catch#2)2.5 E F0 2.5(,o)C(r)-2.5 E F1(\\try#1)2.5 E F0(.)A/F2 10
/Times-Bold@0 SF(\\__zoemput__)100 96 Q F0(Set by)120 108 Q F1(\\try#1)
2.5 E F0(to the possibly truncated result of processing its ar)2.5 E
(gument.)-.18 E F2(\\__lc__)100 120 Q F0 .855(Expands to a left curly. \
It is hard to \214nd a need for this \255 the zoem stress suite uses it\
 to)120 132 R
(generate a particular syntax error at a deeper interpretation le)120
144 Q -.15(ve)-.25 G(l.).15 E F2(\\__r)100 156 Q(c__)-.18 E F0
(Expands to a right curly.)120 168 Q/F3 10.95/Times-Bold@0 SF
(THE SET MODIFIERS)20 184.8 Q F0(The)100 196.8 Q F1(\\set#3)4.241 E F0
(primiti)4.241 E 2.041 -.15(ve a)-.25 H(llo).15 E 1.741(ws a)-.25 F F1
({modes}{})4.241 E F0(directi)4.241 E 2.041 -.15(ve i)-.25 H
4.241(ni).15 G 1.741(ts \214rst ar)-4.241 F(gument.)-.18 E(Here)100
208.8 Q/F4 10/Times-Italic@0 SF()-.1 E F0
(can be a combination of single-letter modi\214ers, each described belo)
2.5 E(w.)-.25 E 15.56(aa)100 232.8 S(ppend to the k)-15.56 E -.15(ey)-.1
G 2.5(,d)-.5 G 2.5(on)-2.5 G(ot o)-2.5 E -.15(ve)-.15 G
(rwrite, create if not e).15 E(xisting.)-.15 E 15.56(cc)100 244.8 S
(onditionally; only set if not already de\214ned.)-15.56 E 15.56(ee)100
256.8 S(xisting; update e)-15.71 E(xisting k)-.15 E -.15(ey)-.1 G 2.5
(,p)-.5 G(ossibly in lo)-2.5 E(wer dictionary.)-.25 E 15(gg)100 268.8 S
(lobal; set in the global \(bottom\) user dictionary.)-15 E 15(uu)100
280.8 S(nary; do not interpret v)-15 E(arar)-.25 E 2.5(gi)-.18 G(n)-2.5
E F1()2.5 E F0(as k)2.5 E -.15(ey)-.1 G(-v).15 E
(alue list \(data k)-.25 E -.15(ey)-.1 G 2.5(so).15 G(nly\))-2.5 E 15
(vv)100 292.8 S(arar)-15.25 E(g; interpret v)-.18 E(arar)-.25 E 2.5(gi)
-.18 G(n)-2.5 E F1()2.5 E F0(as k)2.5 E -.15(ey)-.1 G(-v).15 E
(alue list \(re)-.25 E(gular k)-.15 E -.15(ey)-.1 G 2.5(so).15 G(nly\).)
-2.5 E 12.78(ww)100 304.8 S(arn if k)-12.88 E .3 -.15(ey ex)-.1 H
(ists \(lik).15 E(e)-.1 E F1(\\def#2)2.5 E F0(and)2.5 E F1(\\defx#2)2.5
E F0(\).)A 15(xe)100 316.8 S(xpand ar)-15.15 E(gument \(lik)-.18 E(e)-.1
E F1(\\setx#2)2.5 E F0(and)2.5 E F1(\\defx#2)2.5 E F0(\).)A F3
(THE INSPECT SUBLANGU)20 333.6 Q -.602(AG)-.657 G(E).602 E F0(The)100
345.6 Q F1(\\inspect#4)3.154 E F0(primiti)3.153 E .953 -.15(ve t)-.25 H
(ak).15 E .653(es four ar)-.1 F .653
(guments. The languages accepted by the \214rst tw)-.18 F 3.153(oa)-.1 G
-.2(r-)-3.153 G .033(guments are described belo)100 357.6 R .033
(w. The third ar)-.25 F .034
(gument is a replacement string or a replacement macro)-.18 F .093
(accepting back-references \(supplied as an anon)100 369.6 R .093
(ymous macro\). The fourth ar)-.15 F .093(gument is the data to)-.18 F
(be processed.)100 381.6 Q F2(ar)100 405.6 Q 2.5(g1)-.1 G F0 .301
(Is a v)100 417.6 R(arar)-.25 E .302(g. Currently it accepts a single k)
-.18 F -.15(ey)-.1 G F4(mods)2.952 E F0 .302(for which the v)2.802 F
.302(alue should be a comma-sepa-)-.25 F .811(rated list o)100 429.6 R
-.15(ve)-.15 G 3.311(rt).15 G .811(he w)-3.311 F(ords)-.1 E F4(posix)
3.311 E F0(,)A F4(icase)3.311 E F0(,)A F4(dotall)3.311 E F0(,)A F4(iter)
3.311 E .811(-lines iter)-.2 F(-ar)-.2 E(gs)-.37 E F0(,)A F4(matc)3.311
E(h-once)-.15 E F0(,)A F4(discar)3.31 E(d-nmp)-.37 E F0(,)A F4(dis-)3.31
E(car)100 441.6 Q(d-nil-out)-.37 E F0(,)A F4(discar)2.5 E(d-miss)-.37 E
F0(,)A F4(count-matc)2.5 E(hes)-.15 E F0 5(.A)C(lternati)-5 E -.15(ve)
-.25 G(ly repeated use of).15 E F4(mods)2.5 E F0(is allo)2.5 E(wed.)-.25
E F2(ar)100 465.6 Q 2.5(g2)-.1 G F0 .815(Is a re)100 477.6 R .815
(gular e)-.15 F .815(xpression. T)-.15 F .815(ilde patterns are e)-.35 F
.816(xpanded according to all of the ZOEM, UNIX, and)-.15 F
(REGEX schemes.)100 489.6 Q(Refer to)5 E F2(TILDE EXP)2.5 E(ANSION)-.74
E F0(for these.)2.5 E(The third ar)100 513.6 Q
(gument is a constant string or an anon)-.18 E(ymous k)-.15 E -.15(ey)
-.1 G 2.5(,t)-.5 G(he fourth ar)-2.5 E(gument is data.)-.18 E F3
(THE TR SUBLANGU)20 530.4 Q -.602(AG)-.657 G(E).602 E F0(The)100 542.4 Q
F1(\\tr#2)2.784 E F0(primiti)2.784 E .584 -.15(ve t)-.25 H(ak).15 E .284
(es tw)-.1 F 2.784(oa)-.1 G -.18(rg)-2.784 G .284
(uments. The \214rst ar).18 F .284(gument contains k)-.18 F -.15(ey)-.1
G(-v).15 E .283(alue pairs. The ac-)-.25 F .376(cepted k)100 554.4 R
-.15(ey)-.1 G 2.876(sa).15 G(re)-2.876 E F4(fr)2.876 E(om)-.45 E F0(and)
2.876 E F4(to)2.876 E F0 .376(which must al)2.876 F -.1(wa)-.1 G .376
(ys occur together).1 F 2.876(,a)-.4 G(nd)-2.876 E F4(delete)2.876 E F0
(and)2.877 E F4(squash)2.877 E F0 5.377(.T)C .377(he v)-5.377 F(al-)-.25
E .529(ues of these k)100 566.4 R -.15(ey)-.1 G 3.029(sm).15 G .529
(ust be v)-3.029 F(alid)-.25 E F4(tr)3.029 E(anslation)-.15 E F0 3.028
(speci\214cations. This)3.029 F(primiti)3.028 E .828 -.15(ve t)-.25 H
.528(ransforms the data in).15 F .672(the second ar)100 578.4 R .672
(gument by successi)-.18 F -.15(ve)-.25 G .673
(ly applying translation, deletion and squashing in that order.).15 F
(Only the transformations that are needed need be speci\214ed.)100 590.4
Q -.35(Tr)100 614.4 S
(anslation speci\214cations are subjected to UNIX tilde e).35 E
(xpansion as described belo)-.15 E(w.)-.25 E .896(The syntax accepted b\
y translation speci\214cations is almost fully compliant with the synta\
x ac-)100 638.4 R 1.505(cepted by)100 650.4 R F2(tr)4.005 E F0 1.505
(\(1\), with three e)B 1.505
(xceptions. First, repeats are introduced as)-.15 F F1([*a*20])4.006 E
F0 1.506(rather than)4.006 F F1([a*20])100 662.4 Q F0 2.799(.S)C .299
(econd, ranges can \(for no)-2.799 F .299(w\) only be entered as)-.25 F
F1(X-Y)2.799 E F0 2.799(,n)C .299(ot as)-2.799 F F1([X-Y])2.799 E F0(.)A
F1(X)5.299 E F0(and)2.799 E F1(Y)2.799 E F4(can)2.798 E F0(be)2.798 E
.23(entered in either octal or he)100 674.4 R .23
(xadecimal notation \(see further belo)-.15 F 2.73(w\). As)-.25 F .23
(an additional feature, the)2.73 F .141(magic repeat operator)100 686.4
R F1([*a#])2.641 E F0 .141
(stops on both class and range boundaries. Character speci\214cations)
2.641 F(can be complemented by preceding them with the caret)100 698.4 Q
F1(^)2.5 E F0(.)A .694
(Speci\214cations may contain ranges of characters such as)100 722.4 R
F1(a-z)3.195 E F0(and)3.195 E F1(0-9)3.195 E F0 5.695(.P)C .695
(osix character classes)-5.695 F(zoem 21-341)20 768 Q 2.5(7D)158.46 G
(ec 2021)-2.5 E(6)205.95 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F(are allo)100 84 Q(wed. The a)-.25 E -.25(va)
-.2 G(ilable classes are).25 E/F1 10/Courier@0 SF([:alnum:])118 108 Q
([:alpha:])118 120 Q([:cntrl:])118 132 Q([:digit:])118 144 Q([:graph:])
118 156 Q([:lower:])118 168 Q([:print:])118 180 Q([:punct:])118 192 Q
([:space:])118 204 Q([:upper:])118 216 Q([:xdigit:])118 228 Q F0 .321
(Characters can be speci\214ed using octal notation, e.g.)100 252 R F1
(\\012)5.321 E F0 .321(encodes the ne)2.821 F .32(wline. Use)-.25 F F1
(\\173)2.82 E F0(for)2.82 E .139(the opening curly)100 264 R(,)-.65 E F1
(\\175)2.639 E F0 .139(for the closing curly)2.639 F(,)-.65 E F1(\\134)
2.639 E F0 .14(for the backslash, and)2.639 F F1(\\036)2.64 E F0 .14
(for the caret if)2.64 F .972
(it is the \214rst character in a speci\214cation.)100 276 R/F2 10
/Times-Italic@0 SF(DON'T)3.471 E F0(use)3.471 E F1(\\\\)3.471 E F0(,)A
F1(\\{)3.471 E F0 3.471(,o)C(r)-3.471 E F1(\\})2.5 E F0 .971
(in this case! He)3.471 F(xadecimal)-.15 E(notation is written as)100
288 Q F1(\\x7b)2.5 E F0(\(the left curly in this instance\).)2.5 E(See)
100 312 Q/F3 10/Times-Bold@0 SF(EXAMPLES)2.5 E F0(for an e)2.5 E
(xample of)-.15 E F1(tr#2)2.5 E F0(usage.)2.5 E/F4 10.95/Times-Bold@0 SF
(TILDE EXP)20 328.8 Q(ANSION)-.81 E F0 1.225(Some primiti)100 340.8 R
-.15(ve)-.25 G 3.725(si).15 G(nterf)-3.725 E 1.225
(ace with UNIX libraries that require backslash escape sequences to en-)
-.1 F .25(code certain tok)100 352.8 R .25(ens or characters. The backs\
lash is special in zoem too and without further mea-)-.1 F .25
(sures it can become v)100 364.8 R .251
(ery cumbersome to encode the correct escape sequences as it is not al)
-.15 F -.1(wa)-.1 G(ys).1 E 1.042(clear which tok)100 376.8 R 1.042(ens\
 should be escaped or unprotected at what point. It is especially dif)
-.1 F 1.042(\214cult to)-.25 F
(handle the zoem characters with special meaning,)100 388.8 Q F1({)2.5 E
F0(,)A F1(})2.5 E F0(and)2.5 E F1(\\)2.5 E F0(.)A .181(The tw)100 412.8
R 2.681(op)-.1 G(rimiti)-2.681 E -.15(ve)-.25 G 2.681(su).15 G .181
(nder consideration are)-2.681 F F3(\\inspect#4)2.681 E F0(and)2.681 E
F3(\\tr#2)2.681 E F0 5.181(.B)C .182(oth treat the tilde as an addi-)
-5.181 F .909(tional escape character for certain ar)100 424.8 R .908
(guments \(as documented in the user manual\). These ar)-.18 F(gu-)-.18
E .957(ments are subjected to tilde e)100 436.8 R .957
(xpansion, where the tilde and the character it proceeds are trans-)-.15
F 1.188(lated to a ne)100 448.8 R 3.688(wc)-.25 G 1.188
(haracter or character sequence. There are three dif)-3.688 F 1.188
(ferent sets of tilde escapes,)-.25 F .905
(ZOEM, UNIX and REGEX escapes.)100 460.8 R F3(\\tr#2)3.406 E F0 .906
(only accepts UNIX escapes,)3.406 F F3(\\inspect#4)3.406 E F0 .906
(accepts all.)3.406 F -.35(Ti)100 472.8 S 1.354(lde e).35 F 1.354
(xpansion is al)-.15 F -.1(wa)-.1 G 1.353
(ys the last processing step before strings are passed on to e).1 F
1.353(xternal li-)-.15 F(braries.)100 484.8 Q .97
(The ZOEM scheme contains some con)100 508.8 R -.15(ve)-.4 G .971
(nience escapes, such as).15 F F1(~E)3.471 E F0 .971
(to encode a double back-)3.471 F(slash.)100 520.8 Q F3
(ZOEM tilde expansion)100 544.8 Q(meta sequence)102.5 568.8 Q -.18(re)
7.5 G(placement).18 E(.-----------------------------.)100 580.8 Q 12.5
(|~)100 592.8 S 17.5(~|)-12.5 G 17.5(~|)-2.5 G 12.5(|~)100 604.8 S 17.5
(E|)-12.5 G 12.5(\\\\ |)-2.5 F 12.5(|~)100 616.8 S 17.5(e|)-12.5 G 17.5
(\\|)-2.5 G 12.5(|~)100 628.8 S 17.5(I|)-12.5 G 12.5(\\{ |)-2.5 F 12.5
(|~)100 640.8 S 17.5(J|)-12.5 G 12.5(\\} |)-2.5 F 12.5(|~)100 652.8 S
17.5(x|)-12.5 G 12.5(\\x |)-2.5 F 12.5(|~)100 664.8 S 17.5(i|)-12.5 G
17.5({|)-2.5 G 12.5(|~)100 676.8 S 17.5(j|)-12.5 G 17.5(}|)-2.5 G
(`-----------------------------')100 688.8 Q F0 .36
(The zoem tr speci\214cation language accepts)100 712.8 R F1(\\x**)2.859
E F0 .359(as he)2.859 F .359(xadecimal notation, e.g.)-.15 F F1(\\x0a)
2.859 E F0 .359(denotes a)2.859 F(ne)100 724.8 Q
(wline in the ASCII character set.)-.25 E(zoem 21-341)20 768 Q 2.5(7D)
158.46 G(ec 2021)-2.5 E(7)205.95 E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F/F1 10/Times-Bold@0 SF(UNIX tilde expansion)100
84 Q(meta sequence)102.5 108 Q -.18(re)7.5 G(placement).18 E
(.-----------------------------.)100 120 Q 12.5(|~)100 132 S 17.5(a|)
-12.5 G 12.5(\\a |)-2.5 F 12.5(|~)100 144 S 17.5(b|)-12.5 G 12.5(\\b |)
-2.5 F 12.5(|~)100 156 S 17.5(f|)-12.5 G 12.5(\\f |)-2.5 F 12.5(|~)100
168 S 17.5(n|)-12.5 G 12.5(\\n |)-2.5 F 12.5(|~)100 180 S 17.5(r|)-12.5
G 12.5(\\r |)-2.5 F 12.5(|~)100 192 S 17.5(t|)-12.5 G 12.5(\\t |)-2.5 F
12.5(|~)100 204 S 17.5(v|)-12.5 G 12.5(\\v |)-2.5 F 12.5(|~)100 216 S
17.5(0|)-12.5 G 12.5(\\0 |)-2.5 F 12.5(|~)100 228 S 17.5(1|)-12.5 G 12.5
(\\1 |)-2.5 F 12.5(|~)100 240 S 17.5(2|)-12.5 G 12.5(\\2 |)-2.5 F 12.5
(|~)100 252 S 17.5(3|)-12.5 G 12.5(\\3 |)-2.5 F
(`-----------------------------')100 264 Q(REGEX tilde expansion)100 288
Q(meta sequence)102.5 312 Q -.18(re)7.5 G(placement).18 E
(.-----------------------------.)100 324 Q 12.5(|~)100 336 S 17.5(^|)
-12.5 G 12.5(\\^ |)-2.5 F 12.5(|~)100 348 S 17.5(.|)-12.5 G 12.5(\\. |)
-2.5 F 12.5(|~)100 360 S 17.5([|)-12.5 G 12.5(\\[ |)-2.5 F 12.5(|~)100
372 S 17.5($|)-12.5 G 12.5(\\$ |)-2.5 F 12.5(|~)100 384 S 17.5(\(|)-12.5
G 12.5(\\\( |)-2.5 F 12.5(|~)100 396 S 17.5(\)|)-12.5 G 12.5(\\\) |)-2.5
F 12.5(|~)100 408 S 17.5(||)-12.5 G 12.5(\\| |)-2.5 F 12.5(|~)100 420 S
17.5(*|)-12.5 G 12.5(\\* |)-2.5 F 12.5(|~)100 432 S 17.5(+|)-12.5 G 12.5
(\\+ |)-2.5 F 12.5(|~)100 444 S 17.5(?|)-12.5 G 12.5(\\? |)-2.5 F
(`-----------------------------')100 456 Q/F2 10.95/Times-Bold@0 SF
(ENVIR)20 484.8 Q(ONMENT)-.329 E F0 .908(The en)100 496.8 R .908
(vironment v)-.4 F .908(ariable ZOEMSEARCHP)-.25 F -1.11(AT)-.92 G 3.408
(Hm)1.11 G .908(ay contain a colon and/or whitespace sepa-)-3.408 F
1.526(rated list of paths. It will be used when searching for \214les i\
ncluded via one of the)100 508.8 R/F3 10/Courier@0 SF(dofile)4.025 E F0
(aliases)100 520.8 Q F3(\\input)3.917 E F0(,)A F3(\\import)3.917 E F0(,)
A F3(\\read)3.917 E F0 3.917(,a)C(nd)-3.917 E F3(\\load)3.917 E F0 6.417
(.N)C 1.417(ote that the zoem macro)-6.417 F F3(\\__search-)3.918 E
(path__)100 532.8 Q F0 .045(contains the location where the zoem macro \
\214les were copied at the time of installation)2.545 F(of zoem.)100
544.8 Q F2(DIA)20 561.6 Q(GNOSTICS)-.602 E F0 .401(On error)100 573.6 R
2.901(,Z)-.4 G .401
(oem prints a \214le name and a line number to which it w)-2.901 F .402
(as able to trace the error. The)-.1 F .571
(number reported is the same as the one stored in the session macro)100
585.6 R F3(\\__line__)3.071 E F0 3.071(.F)C .571(or an error)-3.221 F(-)
-.2 E .214(trigering macro which is not nested within another macro the\
 line number should be correct. F)100 597.6 R(or)-.15 E 2.828(am)100
609.6 S .328(acro that does occur nested within another macro the line \
number will be the line number of)-2.828 F
(the closing curly in the outermost containing macro.)100 621.6 Q .363
(If in despair)100 645.6 R 2.863(,u)-.4 G .363
(se one of the tracing modes,)-2.863 F F1(--trace-k)2.863 E(eys)-.1 E F0
.363(is one of the \214rst to come to mind. An-)2.863 F
(other possibility is to supply the)100 657.6 Q F1(-x)2.5 E F0(option.)
2.5 E F2 -.11(BU)20 674.4 S(GS).11 E F0 .322(No kno)100 686.4 R .322
(wn b)-.25 F(ugs.)-.2 E F1(\\inspect#4)2.822 E F0 .322(has not recei)
2.822 F -.15(ve)-.25 G 2.822(dt).15 G .321
(horough stress-testing, and the more esoteric parts)-2.822 F
(of its interf)100 698.4 Q(ace will probably change.)-.1 E(zoem 21-341)
20 768 Q 2.5(7D)158.46 G(ec 2021)-2.5 E(8)205.95 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 153.455(zoem\(1\) USER)20 48 R 155.955
(COMMANDS zoem\(1\))2.5 F/F1 10.95/Times-Bold@0 SF(SEE ALSO)20 84 Q/F2
10/Times-Italic@0 SF(Aephea)100 96 Q F0(is a document authoring frame)
2.5 E -.1(wo)-.25 G(rk lar).1 E(gely for HTML documents.)-.18 E F2 -.8
(Po)100 120 S 1.19(rtable Unix Documentation).8 F F0(pro)3.691 E 1.191
(vides tw)-.15 F 3.691(om)-.1 G 1.191
(ini-languages for authoring in the unix en)-3.691 F(viron-)-.4 E
(ment. These languages, pud-man and pud-f)100 132 Q
(aq are both written in zoem.)-.1 E F1(EXAMPLES)20 148.8 Q F0
(This is a relati)100 160.8 Q -.15(ve)-.25 G(ly ne).15 E 2.5(ws)-.25 G
(ection, aimed at assembling useful or e)-2.5 E(xplanatory snippets.)
-.15 E(Create a v)100 184.8 Q(arar)-.25 E 2.5(gc)-.18 G
(ontaining \214le names matching a pattern \()-2.5 E/F3 10/Courier@0 SF
(png)A F0(in this e)2.5 E(xample\).)-.15 E F3(\\setx{images}{)100 208.8
Q(\\inspect{)118 220.8 Q({mods}{iter-lines,discard-miss})136 232.8 Q
(}{\(.*~.png\)}{_#1{{\\1}}}{\\system{ls}})118 244.8 Q(})100 256.8 Q F0
(Use magic boundary stops with)100 280.8 Q F3(tr#2)2.5 E F0(.)A F3
(\\tr{)100 304.8 Q
({from}{[:lower:][:upper:][:digit:][:space:][:punct:]})118 316.8 Q
({to}{[*L#][*U#][*D#][*S#][*P#]}}{)118 328.8 Q
(!"#$%&'\(\)*+,-./0123456789:;<=>?@)106 340.8 Q
(ABCDEFGHIJKLMNOPQRSTUVWXYZ)100 352.8 Q([\\\\]^_`)100 364.8 Q
(abcdefghijklmnopqrstuvwxyz)100 376.8 Q(\\{|\\}~]})100 388.8 Q F1 -.548
(AU)20 417.6 S(THOR).548 E F0(Stijn v)100 429.6 Q(an Dongen.)-.25 E
(zoem 21-341)20 768 Q 2.5(7D)158.46 G(ec 2021)-2.5 E(9)205.95 E 0 Cg EP
%%Trailer
end
%%EOF
zoem-21-341/doc/ecosphere.azm0000644000207600020760000002150114115654477012752 00000000000000\import{aephea/simpledocument.zmm}
\: todo: k (f1,i1,n1,o1) q u v x1 y1 z1

\begin{simpledocument}{
   {html_title}{Inhabitants of the authoring ecosphere}
   {title}{Inhabitants of the authoring ecosphere}
   {author}{Stijn van Dongen}
   {toc_and_date}{0}
   {year}{0}
   {month}{Feb}
   {day}{29}
   {keywords}{macro processing programming template expansion mark-up character filtering}
   {css_append}{
      body { font-family: "Garamond", "Gill Sans", "Verdana", sans-serif; }
      body
      {  text-align: justify;
         margin-left: 8%;
         margin-right: 8%;
      }
   }
}

\par{
 The following is a collection of links to macro and mark-up languages,
 their associated processors, and several mark-up converters.
 The links are to Google searches, as I am lazy and the items
 are in varying states of being supported.
 One missing from the list below is \lref{index.html}{zoem}.
}

\set{askee}{http://www.google.com/search?q=}
\ctrset{n_critters}{0}

\""{

  [vanished?] m5 macro processor m4 on steroids
  [vanished?] ProMAC
  [vapourware?] unixdoc

   group:
      setext
      restructuredtext
      stx (structured text)
      mml modest markup language

   highlight is a universal converter from source code to many formats
   doxygen JavaDoc-like documentation system for C++, C, Objective-C, C#, Java,
      IDL, and PHP. Doxygen can be used to generate an on-line class browser
      (in HTML) and/or an off-line reference manual (in LaTeX or RTF) from a
      set of source files

   VH-man2html
   man2html by Richard Verhoeven
}

\begin{spacing}{{left}{2}}
\begin{itemize}{
   {flow}{compact}
   {interitem}{0}
   {margintop}{1}
   {textindent}{10}
}
\apply{_#3\!{{
   \ctrinc{n_critters}
   \item{\aref{\askee\,\1}{\bf{\2}}}
      \3
   }
}}{

 {aft+almost+free+text}
 {aft}
 {almost free text}

 {arfg+pipelined+meta-language}
 {arfg}
 {pipelined meta-language employing m4, text-block diversions, and eperl}

 {asciidoc+text+document+format+html+docbook}
 {AsciiDoc}
 {translate (customizable) text format to HTML and [sic] DocBook}

 {convert+apt+almost+plain+text}
 {Aptconvert}
 {convert almost plain text}

 {bhl+plain+text+html+latex}
 {BHL}
 {brute (plain) html latex}

 {blogme+extensible+markup+lua}
 {BlogMe}
 {mark-up with embedded lua}

 {chakotay+chpp+macro+preprocessor}
 {chakotay}
 {chakotay/chpp}

 {deplate+markup+latex+html+document}
 {deplate}
 {wiki-like document markup for LaTeX/HTML output}

 {dita-xml+darwin+information+typing+architecture}
 {Dita-XML}
 {Darwin Information Typing Architecture}

 {docfrac+converter+between+text+html+rtf}
 {DocFrac}
 {DocFrac}

 {doclifter+troff+request+docbook}
 {doclifter}
 {translate troff requests into DocBook}

 {docutils+text+processing+system}
 {docutils}
 {process plaintext documentation into HTML, LaTeX etc}

 {empy+template+embedding+python+text}
 {EmPy}
 {embedded python [in text]}

 {etset+automatic+typesetting+of+electronic+text}
 {etset}
 {ETset, translate ISO 8859 Etext to LaTeX, HTML, PML, or ASCII}

 {literate+programming+macro+preprocessor}
 {FunnelWeb}
 {literate programming and macro processing}

 {gellmu}
 {gellmu}
 {generalized extensible LaTeX-like markup}

 {gema+macro+preprocessor}
 {gema}
 {gema, the general purpose macro preprocessor}

 {gpp+generic+preprocessor}
 {gpp}
 {gpp, generic preprocessor}

 {grutaxt+plain+text+html}
 {grutaxt}
 {grutaxt, a plain text to HTML converter}

 {hsc+html+sucks+competely}
 {hsc}
 {HTML s*cks completely [sic modulo s/*/u/]}

 {htmlprag+html+scheme}
 {HtmlPrag}
 {permissive HTML parsing and emitting capability to Scheme programs [sic]}

 {htlatex}
 {htlatex}
 {hypertext LaTeX}

 {htp+html+pre-processor}
 {htp}
 {HTML pre-processor}

 {gnu+info}
 {info}
 {GNU info, from the folks that abhor man pages and love topic splatter}

 {jamal+macro+language}
 {jamal}
 {Jamal, Just Another Macro Language}

 {latex2html}
 {latex2html}
 {latex to html, on my system a 17032 line Perl-script}

 {latex2man}
 {latex2man}
 {latex to man}

 {latte+html}
 {latte}
 {latte}

 {LMNL+layered+markup+annotation+language}
 {LMNL}
 {Layered Markup and Annotation Language}

 {m4}
 {m4}
 {a Unix macro processor}

 {makefaq+python+faq+html+docbook}
 {makefaq}
 {exports makefaq format to HTML, txt and DocBook}

 {man2html}
 {man2html}
 {man to html}

 {ManEdit+Unix+manual+page+format}
 {ManEdit}
 {edit man pages with an "integrated XML interface"}

 {manServer+convert+manual+pages+HTML}
 {manServer}
 {convert manual pages to HTML}

 {ManStyle+technical+documentation}
 {ManStyle}
 {documentation for HTML and PS from a simple XML format}

 {markdown+html+syntax}
 {Markdown}
 {A (plain) text-to-html conversion tool}

 {mp4h+macro+processor+html}
 {MHT}
 {A macro processor for rendering HTML}

 {ML%2FI+general+purpose+macro+processor}
 {ML/I}
 {A general purpose macro processor}

 {MML+modest+markup+language}
 {MML}
 {text markup language based on setext}

 {mp4h+macro+html}
 {mp4h}
 {m4 based macro processor for HTML documents}

 {mtex+tex+macros}
 {mtex}
 {manual TeX [by Mike Sofka]}

 {mtex+lim}
 {mtex}
 {manual TeX [by Compaq]}

 {no+tags+markup}
 {No-Tags Markup}
 {no-tags markup, \it{a few unobtrusive characters}}

 {otl+customizable+mark-up}
 {otl}
 {from user-specified syntax to user-specified mark-up} 

 {pod+plain+old+documentation}
 {pod}
 {plain old documentation (Perl's documentation format)}

 {rman+PolyglotMan}
 {PolyglotMan}
 {parses and maps troff source to other devices}

 {p4+perl+macro+processor}
 {p4}
 {beyond cpp and m4, probably perl-programmable}

 {pym+macro+preprocessor+python}
 {PYM}
 {PYM (A Macro Preprocessor based on Python)}

 {rest2web}
 {rest2web}
 {integrates with docutils and reStructuredText/HTML}

 {reStructuredText}
 {reStructuredText}
 {reStructuredText, not unlike aft and pod}

 {sdf+streaming+document+format}
 {SDF}
 {Streaming Document Format, XML saves the day}

 {setext+structurally+enhanced+text}
 {setext}
 {Structurally enhanced text (old, I believe)}

 {slip+sorta+like+python+shorthand+xml}
 {SLiP}
 {SLiP - a \it{Sorta Like Python} shorthand for XML}

 {smarthtml+html}
 {smartHTML}
 {smart HTML}

 {stx+structured+text}
 {STX/structuredtext}
 {structured text, one of the elders}

 {t2t+text+table+translator}
 {t2t}
 {text to (HTML) table translator}

 {tei+text+encoding+initiative}
 {tei}
 {text encoding initiative}

 {tex4ht}
 {tex4ht}
 {TeX for hypertext?}

 {textile+markup+web+text+generator}
 {textile}
 {Web text generator}

 {troffcvt+translator+formats}
 {troffcvt}
 {translator for troff to various other formats}

 {txt2docbook}
 {txt2docbook}
 {simple text format, docbook output}

 {txt2dw+converting+ASCII+text+XML+developer+works}
 {txt2dw}
 {converting ascii to xml, IBM-developer-works-inspired}

 {txt2tags+one+source+multi+targets}
 {txt2tags}
 {txt2tags, not unlike reStructuredText, aft, and pod}

 {WebCompile+macro+processor+HTML}
 {WebCompile}
 {An HTML macro-processor}

 {wlatex}
 {wlatex}
 {web LaTeX?}

 {wml+website+meta+language}
 {WML}
 {Website Meta Language}

 {xml+from+plain+text}
 {xfpt}
 {xml from plain text}

 {yodl+yet+oneOther+Documentation+Language}
 {yodl}
 {yet oneOther Documentation Language}

 {zml+text+wiki+formatting+alternative+syntax+XML}
 {ZML}
 {wiki-style formatting plus alternative XML syntax}
}
\end{itemize}
\end{spacing}

\par{
 Although I have not used it, the
 \bf{gema} language seems well thought-out and powerful. It transforms text by
 applying pattern transformations, so it is not tied to a single syntax.
}

\par{
 Christopher Browne has a section on macro languages:
 \httpref{http://linuxfinances.info/info/macros.html}
}

\par{
 There is a section on converting to/from HTML at
 \httpref{http://www.hypernews.org/HyperNews/get/www/html/converters.html}
}

\par{
 You might also be interested in these Freshmeat tags:
 \aref{http://freshmeat.net/tags/text-processing}{text-processing},
 \aref{http://freshmeat.net/tags/markup}{Markup},
 \aref{http://freshmeat.net/search?q=macro+text&submit=Search}{macro+text}.
}

\par{
 The Debian text section
 \httpref{http://packages.debian.org/unstable/text/} has many interesting
 entries, and so has the OpenBSD Ports textproc section
 \httpref{http://openports.se/textproc/}.
}

\par{
  The following wikipedia page links to this humble page, presently
  (and unrelatedly) needs cleanup, and mainly has a comparison
  of various fairly free-style mark-up languages.
  For example, \v{*bold*} is typically bold, \v{/italic/}
  may be italic, \v{[[...]]} denotes a hyperlink,
  \v{=...=}, \v{==...==} denote first and second-level headings, and so on.
  
  I do not very much like this style of mark-up as it seems fragile. For
  example, white-space is significant in many different ways. It introduces a
  large amount of syntax and hard-wired conventions, has poor escape
  mechanisms, usually lacks the power of macros and is hard to extend.

   Anyway, the page is
\aref{http://en.wikipedia.org/wiki/List_of_lightweight_markup_languages}{this}.
  }

\end{simpledocument}

zoem-21-341/doc/Makefile.am0000644000207600020760000000313614154672376012325 00000000000000## $Id: Makefile.am,v 1.41 2006-02-15 14:23:46 flux Exp $

TROFF = groff
ZOEM = ../src/zoem
COL = col
## perhaps could better run zoem as installed on system, so just
## say
##  ZOEM = zoem


## tidy is a HTML syntax checker and reformatter, available from
## http://www.w3.org/People/Raggett/tidy/ , by Dave Raggett 
TIDY = tidy

docdir = $(datadir)/doc/$(PACKAGE)
docdocdir = $(docdir)/doc

azms = zum.azm zoem.azm

## buzz* should get installed in /usr/local/share/doc/zoem/doc/ .  NOT
## in doc/zoem/examples : html documents contain relative hyperlinks
## should azms get installed in /usr/local/share/doc/zoem/doc/ too?
docdoc_DATA = zum.html zoem.html zoem.ps $(azms) 
man_MANS = zoem.1

EXTRA_DIST = ecosphere.azm zoem.shared $(azms) \
      $(docdoc_DATA)  $(man_MANS) stamp.year stamp.month stamp.day stamp.stamp

SUFFIXES = .1 .7 .azm .html .ps .txt

.azm.1:
	$(ZOEM) -d roff -i $< -o $@
	$(ZOEM) -d roff -i $< -o $@

.azm.7:
	$(ZOEM) -d roff -i $< -o $@
	$(ZOEM) -d roff -i $< -o $@

.1.ps:
	$(TROFF) -man $< > $@

.1.txt:
	$(TROFF) -t -e -mandoc -Tascii $< | $(COL) -bx > $@

.7.ps:
	$(TROFF) -man $< > $@

.azm.html:
	$(ZOEM) -d html -i $< -o $@
	$(ZOEM) -d html -i $< -o $@
	- $(TIDY) -e $@

zum: zum.html

ZOEMSEARCHPATH=../mac:${ZOEMSEARCHPATH}

zum.html: zum.azm ecosphere.azm
	$(ZOEM) --allow=date:../src/zoem: --system-honor --d=html --i=$(VPATH)/zum --o=$@
	$(ZOEM) --allow=date:../src/zoem: --system-honor --d=html --i=$(VPATH)/zum --o=$@
	- $(TIDY) -e $@

zoem: zoem.1 zoem.html zoem.ps

index.html: webindex.azm ecosphere.azm
	zoem  -i webindex.azm -o index.html -d html
	- tidy -e index.html

zoem-21-341/doc/stamp.month0000644000207600020760000000000414154676077012455 00000000000000Dec
zoem-21-341/TODO_DESIGN0000644000207600020760000000547214154656567011256 00000000000000
An attempt at distilling some mainlines from TODO.
None of this points to a yawning abyss of missing functionality.

The last meandering discussion of stacks tied to sinks
meshed with writeto changing output streams is of some interest.


-  (ever) better separate character munging code.
   clearer grip on device whitespace munging and special rules
   for the extreme corner cases.
   (which corner cases? maybe described in TODO).

-  implement append modes \writeto{a}{name}, \write{a}{name}{filter}{stuff}.
   For writeto also make commandline switch that makes \writeto{name}
   append by default.

-  better structuring and sectioning of source code.  parse/segment/digest
   include most of each other, due e.g. to seg_check_ok and yamFormatted1.

-  Env well-formedness should pbb best be checked at output time,
   not during processing time. It should be possible (?) to make
   contrived examples failing during processing time, producing
   correct output nevertheless.
   Well, they would be contrived, so I don't agree with this, but will
   leave the note.

-  better (inode) hashing of file pointers (right now by name, so foo
   and ./foo are different).

-  remove 9-arg limitation.
   Or not. 9 arguments should be enough for anyone. Varargs can already
   be used, and there is some parse support. This could be extended.

-  the implementation of f#2 f#3 and fv#2 is very straightforward
   from a numerical point of view.

-  fix long routines.

-  better special/level design (why/how?)
-  reconsider tracing implementation (why?)



Below seems a discussion prompted by:
-  in zpresent \writeto{} makes env {presentation} inaccessible.


further qualify stacks + dictionaries with associated sink?
or, perhaps,

\get{itemize}{foo}
   will search across all stacks irrespective of sink.

dollarstack tied to output.
default dollarstack: changed by writeto.

aephea:
   \writeto{-}
      \begin{presentation}
   \writeto{1.html}
      \begin{slide}
           \get{$presentation}{foo}
           \write{index.htmL}{device}{.... ??\get{$presentation}{foo}?? ...}
      \end{slide}

write3
      yamOutputNew(fname->str))
      yamKeyDef("__fnwrite__", fname->str)
      yamOutput(yamtxt, xfout->usr, fltidx)
         sinkPush(sk, fltidx)
         sinkPop(sk)

writeto
   yamOutputClose
   yamOutputNew
      if (!xf->usr)
      xf->usr = sinkNew
      else
      filterSetFP
   sinkPush
   ## changed sinkPush: does this fix it?

write

-  in zpresent \writeto{} makes env {presentation} inaccessible.
   1) is there a global dollar stack? (yes, sinkGetDLRdefault)
   2) why is env presentation not tied to it?
      a) is there a way to tie it?
      b) if no, make it.
         -> way to specify that dictionary should be tied to DLRdefault.
         -> OR \writeto should act the same as \write
         -> and optionally make that configurable.

zoem-21-341/shed/0000755000207600020760000000000014154762474010523 500000000000000zoem-21-341/shed/Makefile.in0000644000207600020760000004250514154762464012515 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2018 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = shed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-recursive dvi-recursive html-recursive info-recursive \
	install-data-recursive install-dvi-recursive \
	install-exec-recursive install-html-recursive \
	install-info-recursive install-pdf-recursive \
	install-ps-recursive install-recursive installcheck-recursive \
	installdirs-recursive pdf-recursive ps-recursive \
	tags-recursive uninstall-recursive
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
  $(RECURSIVE_TARGETS) \
  $(RECURSIVE_CLEAN_TARGETS) \
  $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
	distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
  while test -n "$$dir1"; do \
    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
    if test "$$first" != "."; then \
      if test "$$first" = ".."; then \
        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
      else \
        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
        if test "$$first2" = "$$first"; then \
          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
        else \
          dir2="../$$dir2"; \
        fi; \
        dir0="$$dir0"/"$$first"; \
      fi; \
    fi; \
    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
  done; \
  reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_cv_use_includepath = @ac_cv_use_includepath@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
EXTRA_DIST = bootstrap setversion buildit builditboot builditclean buildrelease
all: all-recursive

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shed/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu shed/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
#     (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
	@fail=; \
	if $(am__make_keepgoing); then \
	  failcom='fail=yes'; \
	else \
	  failcom='exit 1'; \
	fi; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
	  include_option=--etags-include; \
	  empty_fix=.; \
	else \
	  include_option=--include; \
	  empty_fix=; \
	fi; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test ! -f $$subdir/TAGS || \
	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
	  fi; \
	done; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-recursive

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(BUILT_SOURCES)
	$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir-am: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    $(am__make_dryrun) \
	      || test -d "$(distdir)/$$subdir" \
	      || $(MKDIR_P) "$(distdir)/$$subdir" \
	      || exit 1; \
	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
	    $(am__relativize); \
	    new_distdir=$$reldir; \
	    dir1=$$subdir; dir2="$(top_distdir)"; \
	    $(am__relativize); \
	    new_top_distdir=$$reldir; \
	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
	    ($(am__cd) $$subdir && \
	      $(MAKE) $(AM_MAKEFLAGS) \
	        top_distdir="$$new_top_distdir" \
	        distdir="$$new_distdir" \
		am__remove_distdir=: \
		am__skip_length_check=: \
		am__skip_mode_fix=: \
	        distdir) \
	      || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic mostlyclean-am

distclean: distclean-recursive
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

html-am:

info: info-recursive

info-am:

install-data-am:

install-dvi: install-dvi-recursive

install-dvi-am:

install-exec-am:

install-html: install-html-recursive

install-html-am:

install-info: install-info-recursive

install-info-am:

install-man:

install-pdf: install-pdf-recursive

install-pdf-am:

install-ps: install-ps-recursive

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic

pdf: pdf-recursive

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am:

.MAKE: $(am__recursive_targets) install-am install-strip

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
	check-am clean clean-generic cscopelist-am ctags ctags-am \
	distclean distclean-generic distclean-tags distdir dvi dvi-am \
	html html-am info info-am install install-am install-data \
	install-data-am install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
	pdf-am ps ps-am tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
zoem-21-341/shed/buildit0000755000207600020760000000113714154750434012020 00000000000000#!/bin/bash

set -euo pipefail

mkdir -p slate/build
cd slate/build

../../configure CFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib --prefix=$HOME/local --enable-maintainer-mode
# ../../configure CFLAGS="-Wall -Wextra -std=gnu99 -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -fno-common -I$HOME/local/include -Wno-int-in-bool-context -Wno-unused-but-set-variable -Wno-unused-function -Wno-enum-compare -Wno-unused-parameter -Wno-unused-variable -Wno-sign-compare -Wno-misleading-indentation" LDFLAGS=-L$HOME/local/lib --prefix=$HOME/local --enable-maintainer-mode

make

zoem-21-341/shed/buildrelease0000755000207600020760000000046714154675501013032 00000000000000#!/bin/bash

set -euo pipefail

version=$(cat VERSION)
place="slate/rel-$version"

rm -rf $place
mkdir -p $place

shed/bootstrap

cd $place

../../configure CFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib --prefix=$HOME/local

make
CFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib make distcheck


zoem-21-341/shed/bootstrap0000755000207600020760000000154414145673642012410 00000000000000#!/bin/bash

# $Id: bootstrap,v 1.9 2003/07/17 08:45:50 flux Exp $

#
# bootstrap - script to bootstrap the distribution rolling engine
#
# to build a tarball, ready for distribution, from fresh checked out
# cvs sources, do
#
#     automake --add-missing && ./bootstrap && ./configure && make distcheck
#
# this will yield a tarball, e.g. zoem-20020109.tar.gz .  Once this has been
# run, one can, after e.g. editing sources, run just
#
#     make distcheck
#
# to generate a new tarball.  (No need to run ./bootstrap again in this case.)
# After downloading, users do
#
#    tar zxf mcl-20020109.tar.gz
#    cd mcl-20020109
#    ./configure && make
#    make install
#

set -euo pipefail
set -x

[[ ! -f VERSION ]] && echo "Need file VERSION (cf setversion)" && false

aclocal \
    && autoheader \
    && automake --verbose --gnu --add-missing \
    && autoconf



zoem-21-341/shed/builditboot0000755000207600020760000000032414145673642012706 00000000000000#!/bin/bash

set -euo pipefail

rm -rf slate/build
mkdir -p slate/build
cd slate/build

../../configure CFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib --prefix=$HOME/local --enable-maintainer-mode

make

zoem-21-341/shed/Makefile.am0000644000207600020760000000023014145673642012470 00000000000000## Process this file with automake to produce Makefile.in

SUBDIRS = .
EXTRA_DIST = bootstrap setversion buildit builditboot builditclean buildrelease

zoem-21-341/shed/builditclean0000755000207600020760000000034514145673642013030 00000000000000#!/bin/bash

set -euo pipefail

rm -rf slate/build
mkdir -p slate/build

shed/bootstrap

cd slate/build

../../configure CFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib --prefix=$HOME/local --enable-maintainer-mode

make

zoem-21-341/shed/setversion0000755000207600020760000000226514154676072012575 00000000000000#!/bin/bash

# $Id: setversion,v 1.14 2006-03-21 11:10:01 flux Exp $
# called in bootstrap

# alias date='date -d "2007-11-29"'

set -euo pipefail

if (( $# == 0 )); then
   echo need version - suggest $(date '+%y-%j')
   false
fi

VERSION=$1
IFS=- read THEYEAR THEDAY <<< $VERSION
THEDAY0=$((THEDAY-1))
THEDATE=$(date -d "20$THEYEAR-1-1 +$THEDAY0 days")
echo "-- Using date $THEDATE"
# todo should be derived from version.
MONTHDAY=$(date '+%e' -d "$THEDATE")
MONTH=$(date '+%b' -d "$THEDATE")
YEAR=$(date '+%Y' -d "$THEDATE")
echo "-- $MONTHDAY $MONTH $YEAR"

echo $VERSION > VERSION

cat > configure.ac <> configure.ac


vsh='src/version.h'
echo -n '' > $vsh
echo '#ifndef zoem_version_h__' >> $vsh
echo '#define zoem_version_h__' >> $vsh
echo 'char *zoemDateTag;' >> $vsh
echo '#endif' >> $vsh

vsc='src/version.c'
echo -n '' > $vsc
echo 'char *zoemDateTag = "'"20$VERSION"'";' >> $vsc

echo $VERSION   >  doc/stamp.stamp
echo $MONTHDAY  >  doc/stamp.day
echo $MONTH     >  doc/stamp.month
echo $YEAR      >  doc/stamp.year

zoem-21-341/install-this-zoem.sh0000755000207600020760000000164314154700661013434 00000000000000#!/bin/bash

set -euo pipefail

# This script is a simple script for downloading + compiling zoem.

cff=21-341
zum=21-341

# Change if you want to install somewhere else
INSTALL=$HOME/local

# Now the rest of this script should have enough to run.

zumtar=zoem-$zum.tar.gz
cfftar=cimfomfa-$cff.tar.gz

if command -v wget > /dev/null; then 
   webbit=wget
elif command -v curl > /dev/null; then 
   webbit="curl -O"
else
   echo "Explain to me how to download stuff please"
   false
fi

$webbit http://micans.org/zoem/src/$zumtar
$webbit http://micans.org/cimfomfa/src/$cfftar

if true; then
  thedir=./${cfftar%.tar.gz}
  rm -rf $thedir
  tar xzf $cfftar
  ( cd $thedir
    ./configure --prefix=$INSTALL
    make
    make install
  )
fi

if true; then
  tar xzf $zumtar
  thedir=./${zumtar%.tar.gz}
  ( cd $thedir
    ./configure CFLAGS=-I$INSTALL/include LDFLAGS=-L$INSTALL/lib --prefix=$INSTALL
    make
    make install
  )
fi

zoem-21-341/autofoo/0000755000207600020760000000000014154762473011253 500000000000000zoem-21-341/autofoo/install-sh0000755000207600020760000001273614145673642013207 00000000000000#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission.  M.I.T. makes no representations about the
# suitability of this software for any purpose.  It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.  It can only install one file at a time, a restriction
# shared with many OS's install programs.


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in
	-c) instcmd="$cpprog"
	    shift
	    continue;;

	-d) dir_arg=true
	    shift
	    continue;;

	-m) chmodcmd="$chmodprog $2"
	    shift
	    shift
	    continue;;

	-o) chowncmd="$chownprog $2"
	    shift
	    shift
	    continue;;

	-g) chgrpcmd="$chgrpprog $2"
	    shift
	    shift
	    continue;;

	-s) stripcmd="$stripprog"
	    shift
	    continue;;

	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
	    shift
	    continue;;

	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
	    shift
	    continue;;

	*)  if [ x"$src" = x ]
	    then
		src=$1
	    else
		# this colon is to work around a 386BSD /bin/sh bug
		:
		dst=$1
	    fi
	    shift
	    continue;;
    esac
done

if [ x"$src" = x ]
then
	echo "install:	no input file specified"
	exit 1
else
	true
fi

if [ x"$dir_arg" != x ]; then
	dst=$src
	src=""
	
	if [ -d $dst ]; then
		instcmd=:
		chmodcmd=""
	else
		instcmd=mkdir
	fi
else

# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad 
# if $src (and thus $dsttmp) contains '*'.

	if [ -f $src -o -d $src ]
	then
		true
	else
		echo "install:  $src does not exist"
		exit 1
	fi
	
	if [ x"$dst" = x ]
	then
		echo "install:	no destination specified"
		exit 1
	else
		true
	fi

# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

	if [ -d $dst ]
	then
		dst="$dst"/`basename $src`
	else
		true
	fi
fi

## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

# Make sure that the destination directory exists.
#  this part is taken from Noah Friedman's mkinstalldirs script

# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='	
'
IFS="${IFS-${defaultIFS}}"

oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"

pathcomp=''

while [ $# -ne 0 ] ; do
	pathcomp="${pathcomp}${1}"
	shift

	if [ ! -d "${pathcomp}" ] ;
        then
		$mkdirprog "${pathcomp}"
	else
		true
	fi

	pathcomp="${pathcomp}/"
done
fi

if [ x"$dir_arg" != x ]
then
	$doit $instcmd $dst &&

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else

# If we're going to rename the final executable, determine the name now.

	if [ x"$transformarg" = x ] 
	then
		dstfile=`basename $dst`
	else
		dstfile=`basename $dst $transformbasename | 
			sed $transformarg`$transformbasename
	fi

# don't allow the sed command to completely eliminate the filename

	if [ x"$dstfile" = x ] 
	then
		dstfile=`basename $dst`
	else
		true
	fi

# Make a temp file name in the proper directory.

	dsttmp=$dstdir/#inst.$$#

# Move or copy the file name to the temp name

	$doit $instcmd $src $dsttmp &&

	trap "rm -f ${dsttmp}" 0 &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&

# Now rename the file to the real destination.

	$doit $rmcmd -f $dstdir/$dstfile &&
	$doit $mvcmd $dsttmp $dstdir/$dstfile 

fi &&


exit 0
zoem-21-341/autofoo/missing0000755000207600020760000002466614145673642012607 00000000000000#! /bin/sh
# Common stub for a few missing GNU programs while installing.

scriptversion=2003-09-02.23

# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
#   Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.

# 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, 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

if test $# -eq 0; then
  echo 1>&2 "Try \`$0 --help' for more information"
  exit 1
fi

run=:

# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
  configure_ac=configure.ac
else
  configure_ac=configure.in
fi

msg="missing on your system"

case "$1" in
--run)
  # Try to run requested program, and just exit if it succeeds.
  run=
  shift
  "$@" && exit 0
  # Exit code 63 means version mismatch.  This often happens
  # when the user try to use an ancient version of a tool on
  # a file that requires a minimum version.  In this case we
  # we should proceed has if the program had been absent, or
  # if --run hadn't been passed.
  if test $? = 63; then
    run=:
    msg="probably too old"
  fi
  ;;
esac

# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in

  -h|--h|--he|--hel|--help)
    echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...

Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.

Options:
  -h, --help      display this help and exit
  -v, --version   output version information and exit
  --run           try to run the given command, and emulate it if it fails

Supported PROGRAM values:
  aclocal      touch file \`aclocal.m4'
  autoconf     touch file \`configure'
  autoheader   touch file \`config.h.in'
  automake     touch all \`Makefile.in' files
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
  flex         create \`lex.yy.c', if possible, from existing .c
  help2man     touch the output file
  lex          create \`lex.yy.c', if possible, from existing .c
  makeinfo     touch the output file
  tar          try tar, gnutar, gtar, then tar without non-portable flags
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]

Send bug reports to ."
    ;;

  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
    echo "missing $scriptversion (GNU Automake)"
    ;;

  -*)
    echo 1>&2 "$0: Unknown \`$1' option"
    echo 1>&2 "Try \`$0 --help' for more information"
    exit 1
    ;;

  aclocal*)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
         to install the \`Automake' and \`Perl' packages.  Grab them from
         any GNU archive site."
    touch aclocal.m4
    ;;

  autoconf)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`${configure_ac}'.  You might want to install the
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
         archive site."
    touch configure
    ;;

  autoheader)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
         from any GNU archive site."
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
    test -z "$files" && files="config.h"
    touch_files=
    for f in $files; do
      case "$f" in
      *:*) touch_files="$touch_files "`echo "$f" |
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
      *) touch_files="$touch_files $f.in";;
      esac
    done
    touch $touch_files
    ;;

  automake*)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
         You might want to install the \`Automake' and \`Perl' packages.
         Grab them from any GNU archive site."
    find . -type f -name Makefile.am -print |
	   sed 's/\.am$/.in/' |
	   while read f; do touch "$f"; done
    ;;

  autom4te)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
         You might have modified some files without having the
         proper tools for further handling them.
         You can get \`$1' as part of \`Autoconf' from any GNU
         archive site."

    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
    if test -f "$file"; then
	touch $file
    else
	test -z "$file" || exec >$file
	echo "#! /bin/sh"
	echo "# Created by GNU Automake missing as a replacement of"
	echo "#  $ $@"
	echo "exit 0"
	chmod +x $file
	exit 1
    fi
    ;;

  bison|yacc)
    echo 1>&2 "\
WARNING: \`$1' $msg.  You should only need it if
         you modified a \`.y' file.  You may need the \`Bison' package
         in order for those modifications to take effect.  You can get
         \`Bison' from any GNU archive site."
    rm -f y.tab.c y.tab.h
    if [ $# -ne 1 ]; then
        eval LASTARG="\${$#}"
	case "$LASTARG" in
	*.y)
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" y.tab.c
	    fi
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" y.tab.h
	    fi
	  ;;
	esac
    fi
    if [ ! -f y.tab.h ]; then
	echo >y.tab.h
    fi
    if [ ! -f y.tab.c ]; then
	echo 'main() { return 0; }' >y.tab.c
    fi
    ;;

  lex|flex)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified a \`.l' file.  You may need the \`Flex' package
         in order for those modifications to take effect.  You can get
         \`Flex' from any GNU archive site."
    rm -f lex.yy.c
    if [ $# -ne 1 ]; then
        eval LASTARG="\${$#}"
	case "$LASTARG" in
	*.l)
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" lex.yy.c
	    fi
	  ;;
	esac
    fi
    if [ ! -f lex.yy.c ]; then
	echo 'main() { return 0; }' >lex.yy.c
    fi
    ;;

  help2man)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
	 you modified a dependency of a manual page.  You may need the
	 \`Help2man' package in order for those modifications to take
	 effect.  You can get \`Help2man' from any GNU archive site."

    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
    if test -z "$file"; then
	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
    fi
    if [ -f "$file" ]; then
	touch $file
    else
	test -z "$file" || exec >$file
	echo ".ab help2man is required to generate this page"
	exit 1
    fi
    ;;

  makeinfo)
    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
       # We have makeinfo, but it failed.
       exit 1
    fi

    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified a \`.texi' or \`.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy \`make' (AIX,
         DU, IRIX).  You might want to install the \`Texinfo' package or
         the \`GNU make' package.  Grab either from any GNU archive site."
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
    if test -z "$file"; then
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
    fi
    touch $file
    ;;

  tar)
    shift
    if test -n "$run"; then
      echo 1>&2 "ERROR: \`tar' requires --run"
      exit 1
    fi

    # We have already tried tar in the generic part.
    # Look for gnutar/gtar before invocation to avoid ugly error
    # messages.
    if (gnutar --version > /dev/null 2>&1); then
       gnutar "$@" && exit 0
    fi
    if (gtar --version > /dev/null 2>&1); then
       gtar "$@" && exit 0
    fi
    firstarg="$1"
    if shift; then
	case "$firstarg" in
	*o*)
	    firstarg=`echo "$firstarg" | sed s/o//`
	    tar "$firstarg" "$@" && exit 0
	    ;;
	esac
	case "$firstarg" in
	*h*)
	    firstarg=`echo "$firstarg" | sed s/h//`
	    tar "$firstarg" "$@" && exit 0
	    ;;
	esac
    fi

    echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
         You may want to install GNU tar or Free paxutils, or check the
         command line arguments."
    exit 1
    ;;

  *)
    echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
         You might have modified some files without having the
         proper tools for further handling them.  Check the \`README' file,
         it often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in case
         some other package would contain this missing \`$1' program."
    exit 1
    ;;
esac

exit 0

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
zoem-21-341/autofoo/compile0000755000207600020760000001632713367740426012561 00000000000000#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.

scriptversion=2018-03-07.03; # UTC

# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# 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, 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 to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# This file is maintained in Automake, please report
# bugs to  or send patches to
# .

nl='
'

# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" ""	$nl"

file_conv=

# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
  file=$1
  case $file in
    / | /[!/]*) # absolute file, and not a UNC file
      if test -z "$file_conv"; then
	# lazily determine how to convert abs files
	case `uname -s` in
	  MINGW*)
	    file_conv=mingw
	    ;;
	  CYGWIN*)
	    file_conv=cygwin
	    ;;
	  *)
	    file_conv=wine
	    ;;
	esac
      fi
      case $file_conv/,$2, in
	*,$file_conv,*)
	  ;;
	mingw/*)
	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
	  ;;
	cygwin/*)
	  file=`cygpath -m "$file" || echo "$file"`
	  ;;
	wine/*)
	  file=`winepath -w "$file" || echo "$file"`
	  ;;
      esac
      ;;
  esac
}

# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
  func_file_conv "$1"
  if test -z "$lib_path"; then
    lib_path=$file
  else
    lib_path="$lib_path;$file"
  fi
  linker_opts="$linker_opts -LIBPATH:$file"
}

# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
  lib=$1
  found=no
  save_IFS=$IFS
  IFS=';'
  for dir in $lib_path $LIB
  do
    IFS=$save_IFS
    if $shared && test -f "$dir/$lib.dll.lib"; then
      found=yes
      lib=$dir/$lib.dll.lib
      break
    fi
    if test -f "$dir/$lib.lib"; then
      found=yes
      lib=$dir/$lib.lib
      break
    fi
    if test -f "$dir/lib$lib.a"; then
      found=yes
      lib=$dir/lib$lib.a
      break
    fi
  done
  IFS=$save_IFS

  if test "$found" != yes; then
    lib=$lib.lib
  fi
}

# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
  # Assume a capable shell
  lib_path=
  shared=:
  linker_opts=
  for arg
  do
    if test -n "$eat"; then
      eat=
    else
      case $1 in
	-o)
	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
	  eat=1
	  case $2 in
	    *.o | *.[oO][bB][jJ])
	      func_file_conv "$2"
	      set x "$@" -Fo"$file"
	      shift
	      ;;
	    *)
	      func_file_conv "$2"
	      set x "$@" -Fe"$file"
	      shift
	      ;;
	  esac
	  ;;
	-I)
	  eat=1
	  func_file_conv "$2" mingw
	  set x "$@" -I"$file"
	  shift
	  ;;
	-I*)
	  func_file_conv "${1#-I}" mingw
	  set x "$@" -I"$file"
	  shift
	  ;;
	-l)
	  eat=1
	  func_cl_dashl "$2"
	  set x "$@" "$lib"
	  shift
	  ;;
	-l*)
	  func_cl_dashl "${1#-l}"
	  set x "$@" "$lib"
	  shift
	  ;;
	-L)
	  eat=1
	  func_cl_dashL "$2"
	  ;;
	-L*)
	  func_cl_dashL "${1#-L}"
	  ;;
	-static)
	  shared=false
	  ;;
	-Wl,*)
	  arg=${1#-Wl,}
	  save_ifs="$IFS"; IFS=','
	  for flag in $arg; do
	    IFS="$save_ifs"
	    linker_opts="$linker_opts $flag"
	  done
	  IFS="$save_ifs"
	  ;;
	-Xlinker)
	  eat=1
	  linker_opts="$linker_opts $2"
	  ;;
	-*)
	  set x "$@" "$1"
	  shift
	  ;;
	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
	  func_file_conv "$1"
	  set x "$@" -Tp"$file"
	  shift
	  ;;
	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
	  func_file_conv "$1" mingw
	  set x "$@" "$file"
	  shift
	  ;;
	*)
	  set x "$@" "$1"
	  shift
	  ;;
      esac
    fi
    shift
  done
  if test -n "$linker_opts"; then
    linker_opts="-link$linker_opts"
  fi
  exec "$@" $linker_opts
  exit 1
}

eat=

case $1 in
  '')
     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
     exit 1;
     ;;
  -h | --h*)
    cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]

Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.

If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.

Report bugs to .
EOF
    exit $?
    ;;
  -v | --v*)
    echo "compile $scriptversion"
    exit $?
    ;;
  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
    func_cl_wrapper "$@"      # Doesn't return...
    ;;
esac

ofile=
cfile=

for arg
do
  if test -n "$eat"; then
    eat=
  else
    case $1 in
      -o)
	# configure might choose to run compile as 'compile cc -o foo foo.c'.
	# So we strip '-o arg' only if arg is an object.
	eat=1
	case $2 in
	  *.o | *.obj)
	    ofile=$2
	    ;;
	  *)
	    set x "$@" -o "$2"
	    shift
	    ;;
	esac
	;;
      *.c)
	cfile=$1
	set x "$@" "$1"
	shift
	;;
      *)
	set x "$@" "$1"
	shift
	;;
    esac
  fi
  shift
done

if test -z "$ofile" || test -z "$cfile"; then
  # If no '-o' option was seen then we might have been invoked from a
  # pattern rule where we don't need one.  That is ok -- this is a
  # normal compilation that the losing compiler can handle.  If no
  # '.c' file was seen then we are probably linking.  That is also
  # ok.
  exec "$@"
fi

# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`

# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file.  Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
  if mkdir "$lockdir" >/dev/null 2>&1; then
    break
  fi
  sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15

# Run the compile.
"$@"
ret=$?

if test -f "$cofile"; then
  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi

rmdir "$lockdir"
exit $ret

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
zoem-21-341/autofoo/depcomp0000755000207600020760000003554514145673642012563 00000000000000#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects

scriptversion=2004-05-31.23

# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.

# 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, 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# Originally written by Alexandre Oliva .

case $1 in
  '')
     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
     exit 1;
     ;;
  -h | --h*)
    cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]

Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.

Environment variables:
  depmode     Dependency tracking mode.
  source      Source file read by `PROGRAMS ARGS'.
  object      Object file output by `PROGRAMS ARGS'.
  DEPDIR      directory where to store dependencies.
  depfile     Dependency file to output.
  tmpdepfile  Temporary file to use when outputing dependencies.
  libtool     Whether libtool is used (yes/no).

Report bugs to .
EOF
    exit 0
    ;;
  -v | --v*)
    echo "depcomp $scriptversion"
    exit 0
    ;;
esac

if test -z "$depmode" || test -z "$source" || test -z "$object"; then
  echo "depcomp: Variables source, object and depmode must be set" 1>&2
  exit 1
fi

# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}

rm -f "$tmpdepfile"

# Some modes work just like other modes, but use different flags.  We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write.  Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
  # HP compiler uses -M and no extra arg.
  gccflag=-M
  depmode=gcc
fi

if test "$depmode" = dashXmstdout; then
   # This is just like dashmstdout with a different argument.
   dashmflag=-xM
   depmode=dashmstdout
fi

case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff.  Hmm.
  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  mv "$tmpdepfile" "$depfile"
  ;;

gcc)
## There are various ways to get dependency output from gcc.  Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
##   up in a subdir.  Having to rename by hand is ugly.
##   (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
##   -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
##   than renaming).
  if test -z "$gccflag"; then
    gccflag=-MD,
  fi
  "$@" -Wp,"$gccflag$tmpdepfile"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
  sed -e 's/^[^:]*: / /' \
      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header).  We avoid this by adding
## dummy dependencies for each header file.  Too bad gcc doesn't do
## this for us directly.
  tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'.  On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

hp)
  # This case exists only to let depend.m4 do its work.  It works by
  # looking at the text of this script.  This case will never be run,
  # since it is checked for above.
  exit 1
  ;;

sgi)
  if test "$libtool" = yes; then
    "$@" "-Wp,-MDupdate,$tmpdepfile"
  else
    "$@" -MDupdate "$tmpdepfile"
  fi
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"

  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
    echo "$object : \\" > "$depfile"

    # Clip off the initial element (the dependent).  Don't try to be
    # clever and replace this with sed code, as IRIX sed won't handle
    # lines with more than a fixed number of characters (4096 in
    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
    # the IRIX cc adds comments like `#:fec' to the end of the
    # dependency line.
    tr ' ' '
' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
    tr '
' ' ' >> $depfile
    echo >> $depfile

    # The second pass generates a dummy entry for each header file.
    tr ' ' '
' < "$tmpdepfile" \
   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
   >> $depfile
  else
    # The sourcefile does not contain any dependencies, so just
    # store a dummy comment line, to avoid errors with the Makefile
    # "include basename.Plo" scheme.
    echo "#dummy" > "$depfile"
  fi
  rm -f "$tmpdepfile"
  ;;

aix)
  # The C for AIX Compiler uses -M and outputs the dependencies
  # in a .u file.  In older versions, this file always lives in the
  # current directory.  Also, the AIX compiler puts `$object:' at the
  # start of each line; $object doesn't have directory information.
  # Version 6 uses the directory in both cases.
  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
  tmpdepfile="$stripped.u"
  if test "$libtool" = yes; then
    "$@" -Wc,-M
  else
    "$@" -M
  fi
  stat=$?

  if test -f "$tmpdepfile"; then :
  else
    stripped=`echo "$stripped" | sed 's,^.*/,,'`
    tmpdepfile="$stripped.u"
  fi

  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi

  if test -f "$tmpdepfile"; then
    outname="$stripped.o"
    # Each line is of the form `foo.o: dependent.h'.
    # Do two passes, one to just change these to
    # `$object: dependent.h' and one to simply `dependent.h:'.
    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
  else
    # The sourcefile does not contain any dependencies, so just
    # store a dummy comment line, to avoid errors with the Makefile
    # "include basename.Plo" scheme.
    echo "#dummy" > "$depfile"
  fi
  rm -f "$tmpdepfile"
  ;;

icc)
  # Intel's C compiler understands `-MD -MF file'.  However on
  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
  # ICC 7.0 will fill foo.d with something like
  #    foo.o: sub/foo.c
  #    foo.o: sub/foo.h
  # which is wrong.  We want:
  #    sub/foo.o: sub/foo.c
  #    sub/foo.o: sub/foo.h
  #    sub/foo.c:
  #    sub/foo.h:
  # ICC 7.1 will output
  #    foo.o: sub/foo.c sub/foo.h
  # and will wrap long lines using \ :
  #    foo.o: sub/foo.c ... \
  #     sub/foo.h ... \
  #     ...

  "$@" -MD -MF "$tmpdepfile"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"
  # Each line is of the form `foo.o: dependent.h',
  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
  # Do two passes, one to just change these to
  # `$object: dependent.h' and one to simply `dependent.h:'.
  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
  # Some versions of the HPUX 10.20 sed can't process this invocation
  # correctly.  Breaking it into two sed invocations is a workaround.
  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
    sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

tru64)
   # The Tru64 compiler uses -MD to generate dependencies as a side
   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
   # dependencies in `foo.d' instead, so we check for that too.
   # Subdirectories are respected.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
   test "x$dir" = "x$object" && dir=
   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`

   if test "$libtool" = yes; then
      # Dependencies are output in .lo.d with libtool 1.4.
      # With libtool 1.5 they are output both in $dir.libs/$base.o.d
      # and in $dir.libs/$base.o.d and $dir$base.o.d.  We process the
      # latter, because the former will be cleaned when $dir.libs is
      # erased.
      tmpdepfile1="$dir.libs/$base.lo.d"
      tmpdepfile2="$dir$base.o.d"
      tmpdepfile3="$dir.libs/$base.d"
      "$@" -Wc,-MD
   else
      tmpdepfile1="$dir$base.o.d"
      tmpdepfile2="$dir$base.d"
      tmpdepfile3="$dir$base.d"
      "$@" -MD
   fi

   stat=$?
   if test $stat -eq 0; then :
   else
      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
      exit $stat
   fi

   if test -f "$tmpdepfile1"; then
      tmpdepfile="$tmpdepfile1"
   elif test -f "$tmpdepfile2"; then
      tmpdepfile="$tmpdepfile2"
   else
      tmpdepfile="$tmpdepfile3"
   fi
   if test -f "$tmpdepfile"; then
      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
      # That's a tab and a space in the [].
      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
      echo "#dummy" > "$depfile"
   fi
   rm -f "$tmpdepfile"
   ;;

#nosideeffect)
  # This comment above is used by automake to tell side-effect
  # dependency tracking mechanisms from slower ones.

dashmstdout)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout, regardless of -o.
  "$@" || exit $?

  # Remove the call to Libtool.
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi

  # Remove `-o $object'.
  IFS=" "
  for arg
  do
    case $arg in
    -o)
      shift
      ;;
    $object)
      shift
      ;;
    *)
      set fnord "$@" "$arg"
      shift # fnord
      shift # $arg
      ;;
    esac
  done

  test -z "$dashmflag" && dashmflag=-M
  # Require at least two characters before searching for `:'
  # in the target name.  This is to cope with DOS-style filenames:
  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
  "$@" $dashmflag |
    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
  rm -f "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

dashXmstdout)
  # This case only exists to satisfy depend.m4.  It is never actually
  # run, as this mode is specially recognized in the preamble.
  exit 1
  ;;

makedepend)
  "$@" || exit $?
  # Remove any Libtool call
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi
  # X makedepend
  shift
  cleared=no
  for arg in "$@"; do
    case $cleared in
    no)
      set ""; shift
      cleared=yes ;;
    esac
    case "$arg" in
    -D*|-I*)
      set fnord "$@" "$arg"; shift ;;
    # Strip any option that makedepend may not understand.  Remove
    # the object too, otherwise makedepend will parse it as a source file.
    -*|$object)
      ;;
    *)
      set fnord "$@" "$arg"; shift ;;
    esac
  done
  obj_suffix="`echo $object | sed 's/^.*\././'`"
  touch "$tmpdepfile"
  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  rm -f "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile" "$tmpdepfile".bak
  ;;

cpp)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout.
  "$@" || exit $?

  # Remove the call to Libtool.
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi

  # Remove `-o $object'.
  IFS=" "
  for arg
  do
    case $arg in
    -o)
      shift
      ;;
    $object)
      shift
      ;;
    *)
      set fnord "$@" "$arg"
      shift # fnord
      shift # $arg
      ;;
    esac
  done

  "$@" -E |
    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
    sed '$ s: \\$::' > "$tmpdepfile"
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  cat < "$tmpdepfile" >> "$depfile"
  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

msvisualcpp)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout, regardless of -o,
  # because we must use -o when running libtool.
  "$@" || exit $?
  IFS=" "
  for arg
  do
    case "$arg" in
    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
	set fnord "$@"
	shift
	shift
	;;
    *)
	set fnord "$@" "$arg"
	shift
	shift
	;;
    esac
  done
  "$@" -E |
  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
  echo "	" >> "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

none)
  exec "$@"
  ;;

*)
  echo "Unknown depmode $depmode" 1>&2
  exit 1
  ;;
esac

exit 0

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
zoem-21-341/AUTHORS0000644000207600020760000000040414115654477010566 00000000000000
zoem AUTHORS file

$Id: AUTHORS,v 1.3 2002/12/11 14:46:48 flux Exp $

zoem the language and zoem the interpreter were written by Stijn van Dongen.
zoem's build environment was created by Joost van Baal.

See THANKS for names of other people who contributed.

zoem-21-341/TODO0000644000207600020760000003755714146222477010224 00000000000000regularia implementatia projectia

0  reduce this ridiculous TODO

FF far future (thinking)
cc corner case
R  robustness
N  note
j  jot down a thought
j? jot down a thought, but when would it be useful/needed?
u  useful feature (needs eg: example)
?  huh? what was I thinking?
w  documentation


    ________________________________________some mainlines
   |                                        |
   -  better fixed/adaptable layout for manual, index.html (aephea)
   -  import file1 -> finsert file2 does not work, finserted stuff is still under import restriction.
      -> (came up in zpresenter macros)
   -  \begin{}{{#2}{a}} *silently* overwrites primitive.
  FF  Inhume 0-terminated strings in tingea/ting
   -  provision for string/input validation (e.g. fib example, number)
   -  product of array leads to integer overflow; should however change to double. (let library).
   w  zinsert/finsert different rules for file inclusion (do not use directory stack), different fail modes. 
  cc  interactive \| and \~ etc are ignored?
  FF  preparse macro definitions?
   j  begin: a way to check whether user set a key.
   j  'export' and documentation mode for def for tight coupling with documentation. 
      -> {doc}{doc-string} in set#3, would register documentation, accessible as \%{__doc__}{par#1}
      \register#2{name}{descr} to find all macro's supported by a package.
      -> zoem -r man.zmm could list all registered macro's in man.zmm
   j  length: strip leading, trailing white space.
   ?  writepush, writepop that remember last stream?
   j  allow \''$foo syntax ?
   j  should failed set be fatal? (yes; probably refers to named dictionary: needs-eg)
   j  \$__xargs__ is expanded; may lead to double expansion?
   j? syntax to set special level to previous value.
   w  document io/sink/filter framework
   w  \write{bar}{device}{\inform{zut}} overwrites __fnwrite__ (ok warning)
   -? further organize the filter code      |
   -  zoem should only enter interactive if isatty(stdout, stdin)
   ?  ability to create/access (by prefix) new stacks?
   N  apply creates all the key invocations and concatenates them (rather than iterating) -- useful when it is needed, if wasteful.
   ?  traverse-tree is easy to write: now generalize tree data?
   w  enter_interactive vs sourceStdia      |
   w  document ctr.zmm somewhere.
   w  vararg parsing: unary argument {} delimited argument requires {{}}.
   j  filter.[ch], espcially at ' ' and '\n' stuff.
      -> fixmefixmefixme -> indent is printed after newline regardless of what follows.
      -> note n_spaces means 'number of stacked spaces'. We do not know the number of *printed* spaces.
   N  precision_g: currently relative to absolute value.
      -> Now 0.00000009 == 0.00000001.  (it's currently meant for *basic* stuff).
   N  \system{perl}{{-e}{'print "hi\\n";'}} fails
      \system{perl}{{-e}{print "hi\\n";}}
   FF xml sugar:
      make '<' and '>' yamSpecial tokens (259 and 260), so that the
      functionality can be supported for other formats too.
      this requires some additional rules which are not yet clear.
   R  - document/consider what happens with \write{foo}{device}{\eval{\zinsert{tim}}}
      where the file tim issues \include.   |
      - document/resolve why finsert does not take inline files.
      - generally research nested inclusions and prevent/catch/alert weirdness
   j  something to push special definitions and then pop the exact same set (possibly useful for format#2).
      ->-> translate constant definitions at interpretation to at sequences?
  FF  something to strip device scope from copy filter: should see just (semantic) content?
      ->-> for \*{} sequences take key rather than value.
   ?  for extensibility: a facility to match an argument against a certain block structure.
   -  have f and fv supplied by util/let.h. OR DROP THEM COMPLETELY.
      -> document let/f/fv precision behaviour.
   -  \while{\inspect{}} will only work in boolean mode.
   w  code-doc SEGMENT_CONSTANT SEGMENT_DIGEST
   ?  format#2: explicit control over phase of padding.
   ->-> with more arguments: cycle through padding strings. mcxTingRoll().
   ?  format#2: temporary mapping of character set!?
   ?  format#2: left-padding and right padding
   ?  format#2: typeset in a box.           |
   j  investigate pipes with system
   ?  format#2: ability to store/reuse parsed format strings (clmformat)
   ?  format#2 or roff: column support      |
  cc  unprotecting-tr-protecting '\foo\@{\N}' should do what exactly?
   -  let precision, -0.0, 10**100          |
   -  formatted specifier to remove ^\s*    |
 ? !  \set{{diag}{NOOOOO}}{foo}{bar} (customized diagnostic)
   /  audit format implementation for mcxTingKAppend
   $  audit all mini and special syntax parsers. inspect#2, formatted#1.
   -  let portability of isnan, isfinite.   |
   ?  parsescopes {{a}b{c}} gives blocks a and b{c}. used somewhere?
   $? inspect mode where offset is always incremented by 1 or user-specified.
   $? introspection: stack/segment nummer, file nesting depth .. \reflect#x
   $? query internals (dump keys on pattern)|
   $? enable customization of \<> syntax    |
   $? implement \%free in \undef or \set{{free}{data,tree,node}}{%{foo}}{}
   $? implement character filtering by finite state machine driver
   $? implement grep.                       |
   ?  a \__xxxx__ unique global tag for the current dictionary (concat of names)
 ------                                     |
   $  comprehensively analyze/categorize '\\' '{' and '}' encoding issues
   $  silent overflow with overly long %{1}{2}..{} sequences
   $  audit atoi code, integer overflows .. |
 ------                                     |
   #  allow setting explicit dollar in env, e.g. {$type}{roman}
   #  \write{key}{foobarzut} / or KV interface / or just append mechanism.
   #  \:!: syntax is pretty horrid; introduce \:{!} \:{/} instead.
   #  \set{{{if|unless}{\let{\c>1}}}}{foo}{bar}
   #  format evaluate vararg val.           |
   #  \done should quit current file whatever chunk it is: extra status bit?
   #  parse.c case '+' -- what does it do? A: filter level
   #  \set{a}{-1} \let{\a+1} yields 0.0 (improved simplistic punctuation check)
   #  \''foo for straight access to global user keys.
   #  many built in tests will not equate {}|and \{ and \}.
   X  interpolation skips \!{} scope        |
   X  inspect does not support \', \'' syntax in callback
   ?  inline file syntax: \:{foo}           |
   ?  register#3, tied to sink; register exported macros
   ?  allow \10, \11? varargs alleviate most|of that
   #  hide filter* struct in filter.c.      |
   #  extensions are ugly.                  |
   #  use checkusrsig in entry.c, -s option.|
   ## enable setting primitives aside in own|namespace. \'while{}
   ## and allow zoem primitives to be overwritten (but warn).
   ## formatted \` syntax is pretty ugly.   |
   ## \:/ line-count screw-up               |
   ## missing \end{foo} not reported.
   |________________________________________|


    ________________________________________glorious syntax
   |                                        |
   |  \a-zA-Z_       primitive/user syntax  |
   |  \$             dictionary stacks      |
   |  \"xy::12+@#"   user key               |
   |  \'             primitive namespace    |
   |  \''            global user namespace  |
   |  \:             comment                |
   |  \:{..}         special comment        |
   |----------------------------------------|
   |  \-             dash glyph             |
   |  \|             newline glyph          |
   |  \~             non breaking space     |
   |  \\  \{   \}    glyph literals         |
   |  \*{ }          glyph syntax           |
   |----------------------------------------|
   |  \<             xml etc                |
   |  \%{ }          data                   |
   |----------------------------------------|
   |  \!             delay                  |
   |  \@{  }         at scope               |
   |  \+{k}          filter level           |
   |  \&{  }         and scope              |
   |  \`{  }         formatted              |
   |  \={foo}        inline files           |
   |  \,             nothing                |
   |----------------------------------------|
   |  \`  `          deprecated             |
   |  \*  *          deprecated             |
   |________________________________________|


---->8------>8------->8------>8------->8------>8---
huhuhu
\write{\__fnout__}{copy}{testtesttest}
hahaha
  concatenates testtesttesthahaha; device filter does not.
---->8------>8------->8------>8------->8------>8---
-  Note that this is weird given \__fnout__ is the current output stream
*  The copy filter does not update the state to be no longer BOL; general
   issue of filter processing + output stream interactions.

-  mod_initialize composites as tings (so no need to create/delete them)

#  it is currently possible to translate \\ and \{ and \} ? #yes
#  tr translates \@{} as well, e.g. \tr{{from}{@}{to}{F}}{\@{a}}

?  register BEGIN_FILE, END_FILE, to be run at beginning and end of each input
   file.  (with __file__ set to file name)

?  tildex#2 primitive?
   \tildex{{mode}{uzr}}{data}

-  what is the status of \writeto and environments?
?  how about enforcing well-formed-ness only at the filter level?
-  yamKeyGet does not return a const Ting. Why not?
?  This would work by inserting special at-scope tokens.
-  how about allowing \$"foobar" ?
-  add -P flag to add paths to searchpath.  -I already taken.
?  -s, setx not supported. -sx
-  reserve \-- and \--- similar to TeX. But with other bindings.
!  \text{foo}
-  traceput c argument is funny. better (symbolic) interface needed.
#  apparently formatted skips \<> scope.
?  need to reset special level when \special{} is issued (check)?
?  seg 0 stack -1 ?
-  tracing: at base file level, add line numbers to keys.
#  \@{\S} is meaningful even with \@{\w}.
-  can I remove table#5? mm not entirely replaceable by apply.
#  writeto does not work in interactive mode.
?  is there a use for stuff like substr, pos ?
-  inline files may cause premature exit (no recovery).
#  zinsert *does* strip comments.
#  \def{%%{foo}}{3} does sth.  (it sets \%{%{foo}}).

#  in stdia, writeto{foo} does not work (but it gives the impression
   it does). Except that \writeto{\__fnout__}{copy}{bar} works.

## inspect
   stop-iter-on-match    then what with the other blocks? no good.
   se-and-copy           apply for side-effects and output
                         -> nonsense, side effects passed in result text.

#  inspect#2 bug which is hard to fix:
   \inspect{posix{\\b}{()}}{ab cd ef gh}
   \b matches; pointer is set to next char; \b matches again.

?? some way to associate env with \<> syntax. automatic counters etc.

-  implement linked lists in special1 with grim code (filter.c)

?  what about filtering strings? good for anything?
   would best be integrated with byte-syntax.
   it would require some syntax for selecting and deselecting special tables.

-  do not reset (push/pop) line count in stdia.

o  does a #0 key also enter the while loop in which \k's are sought
   and checked?

/  make explicit framework for opening/writing/appending files,
   both design and interface.
   currently: indexed by file path name.

-  \zinsert{}, \finsert{} syntax to include a single line.
   [and iterating? dont do what perl does]

#  \write{stdout}{device}{enter something\@{\N> }}
      writes spurious newline *if* -o - is used, otherwise ok.
   Understandable: newline in input is simply flushed, fixed by
   escaping or removing those newlines.

-  nobody outside segment.c should need yamSegFree.
   but apply2 is a special case .... parts of it should better be
   encapsulated by segment.c and parse.c

-  this should fail ?
   ||| at scope in and scope:
   ||| \@{\&{\foo}}
   abcfoo_start{ foo_at }foo_enddef
   simply says unknown escape '@' ..

#! xml syntactic sugar, SEGMENT_CONSTANT
   I've tried to screw it up a couple of times, so far no luck.
   Does it really behave exactly like the rest of zoem wrt delay and nested digest?
   [errors cannot be caught by \catch#2, that's one difference]


-  unicode input: UCS-16 UCS-32
      + fgetwc
      -> need data structure support
   unicode input: utf-8
      + fgetc
      -> need nothing, can do nothing
   zoem unicode encoding; \#{402} \#{x192}
      -> need output hook mechanism, either string mapping (e.g. entities)
         or putwc-like thingy.

#  \catch{error}{abc\write{\__fnout__}{device}{\ hih \}def}
   results (understandably) in 'hih abc'

!  format: sth to specify no padding at right side for centered
   and substring alignment.  (to remove trailing spaces)

!  long term: possible to unify all the character-iterating code?
   checking escapes, jumping blocks etc.  (assemble into a single file)
      yamProtect
      yamUnprotect
      yamReadData
      yamLength

!/ \@{\W} is needed for indenting, but also implies squashing.
   indenting and squashing pbb need to be decoupled.
   what are reasonable rules?  do I stack indent as well????
   apparently yes.  is there a difference between device and plain scope?

?  some syntax to remember previously opened file name.
   e.g. with clmformat the first output could be used
   as log file.

-  if \writeto{..} is given before anything is output, the
   default output should not be opened, perhaps. but that
   would require some ugly check on the key index ...

at_scope
-  if you put \@{\w} at the beginning of line, what happens with
   stacked newlines, stacked spaces?

-  how about optifying \<> to variant \@{<} .. \@{>} rather than
   \@{< .. >}.

   then \<\zut> (\zut -> '>') would automatically get mapped to <>>
   simply by character filtering.  [would there be a problem with delay scope??]
   [basic problem; mixing different character translations and scopes
   is annoyingly difficult; perhaps the first stage X has to utilize
   e.g. the \@{..} second stage syntax].

-  can urlencode simply be done using inspect + predefined grape keys?
   register a grape space for zoem primitive use; e.g. __
   assumption[first '?' must not be encoded] anything else?
,  how about \urlencode primitive.
   httpref would just use that, and it would neatly localize everything.
   urlencoding is context dependent: first '?' denotes the search part (always?)
   how to discern which & -> & ; which & -> %26
   user must do the & (or #38; for that matter) part.
   http://stackoverflow.com/questions/275150/xhtml-and-ampersand-encoding

#  yamInputIncrLc; could parse.c know by itself from the seg
   whether to call it justly or not?
   Right now incrlc checks the txt against hd[idx].txt,
   to see whether we are at the outer level in a regularly
   processed file. Presumably parse.c has no way of checking
   this; a fresh seg linked list is created for each digest.

#  what happens when inline files simply don't end ?
   zoem (p)errs ok but the line number is funny; it pertains
   to the last finished chunk.

-  \inspect{{mods}{posix}}{(([a-z])*)}{_#2{\!textmap{{word}{ucase}}{\1}}}{ab234}
   does not work: no atom warning. is this a posix feature?

!  more primitives could act like '%': being able to take variable
   number of arguments.
   it would be an additional property of a primitive.

   BUT the parser has to know this; for '%' it knows by virtue of
   the first character.

   So, such primitives would e.g. have to share some prefix. like '%'.
   \%system{a}{b}{c}

   OTOH, grape keys could have been coded to just use a vararg.

   NOTE parsing stuffs everything in arg1_g;
   %#1 then *again* extract arguments.
   this is so that the macro location mechanism need not be adapted.
   (we can simply search for %#1)

!  how does nested \zinsert{stdia} work?
   it actually seems to work, but what is happening with fp's meanwhile?

?  at directive: don't write newlines (shorthand for cumbersome
   translate expression)?

-  can it be useful to keep track in yamfilterdata, the state in
   which the last character was output (at or plain)?
   This pertains also to the squashing problems and to the \S\| issue.

zoem-21-341/config.h.in0000644000207600020760000001203414154676631011542 00000000000000/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Predefined possible va_copy() implementation (id: ASP) */
#define __VA_COPY_USE_ASP(d, s) do { *(d) = *(s); } while (0)

/* Predefined possible va_copy() implementation (id: ASS) */
#define __VA_COPY_USE_ASS(d, s) do { (d) = (s); } while (0)

/* Predefined possible va_copy() implementation (id: C99) */
#define __VA_COPY_USE_C99(d, s) va_copy((d), (s))

/* Predefined possible va_copy() implementation (id: CPP) */
#define __VA_COPY_USE_CPP(d, s) memcpy((void *)(d), (void *)(s)), sizeof(*(s))

/* Predefined possible va_copy() implementation (id: CPS) */
#define __VA_COPY_USE_CPS(d, s) memcpy((void *)&(d), (void *)&(s)), sizeof((s))

/* Predefined possible va_copy() implementation (id: GCB) */
#define __VA_COPY_USE_GCB(d, s) __builtin_va_copy((d), (s))

/* Predefined possible va_copy() implementation (id: GCH) */
#define __VA_COPY_USE_GCH(d, s) __va_copy((d), (s))

/* Predefined possible va_copy() implementation (id: GCM) */
#define __VA_COPY_USE_GCM(d, s) VA_COPY((d), (s))

/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT

/* Define to 1 if you have the `dup2' function. */
#undef HAVE_DUP2

/* Define to 1 if you have the  header file. */
#undef HAVE_FCNTL_H

/* Define to 1 if you have the  header file. */
#undef HAVE_FLOAT_H

/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR

/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK

/* Define to 1 if you have the  header file. */
#undef HAVE_HISTORY_H

/* Define to 1 if you have the  header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the  header file. */
#undef HAVE_LIMITS_H

/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
   to 0 otherwise. */
#undef HAVE_MALLOC

/* Define to 1 if you have the  header file. */
#undef HAVE_MEMORY_H

/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET

/* Define to 1 if you have the `pow' function. */
#undef HAVE_POW

/* Define if you have the readline library */
#undef HAVE_READLINE

/* Define to 1 if you have the  header file. */
#undef HAVE_READLINE_H

/* Define to 1 if you have the  header file. */
#undef HAVE_READLINE_HISTORY_H

/* Define to 1 if you have the  header file. */
#undef HAVE_READLINE_READLINE_H

/* Define to 1 if you have the `regcomp' function. */
#undef HAVE_REGCOMP

/* Define to 1 if you have the `sqrt' function. */
#undef HAVE_SQRT

/* Define to 1 if you have the  header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the  header file. */
#undef HAVE_STDLIB_H

/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR

/* Define to 1 if you have the  header file. */
#undef HAVE_STRINGS_H

/* Define to 1 if you have the  header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR

/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR

/* Define to 1 if you have the  header file. */
#undef HAVE_SYS_STAT_H

/* Define to 1 if you have the  header file. */
#undef HAVE_SYS_TYPES_H

/* Define to 1 if you have  that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H

/* Define to 1 if you have the  header file. */
#undef HAVE_UNISTD_H

/* Define if va_copy() macro exists (and no fallback implementation is
   required) */
#undef HAVE_VA_COPY

/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK

/* Define to 1 if you have the  header file. */
#undef HAVE_VFORK_H

/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF

/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK

/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK

/* where to look for zoem macro files */
#undef INCLUDEPATH

/* Name of package */
#undef PACKAGE

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

/* Define to the full name of this package. */
#undef PACKAGE_NAME

/* Define to the full name and version of this package. */
#undef PACKAGE_STRING

/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Version number of package */
#undef VERSION

/* Optional va_copy() implementation activation */
#ifndef HAVE_VA_COPY
#define va_copy(d, s) __VA_COPY_USE(d, s)
#define HAVE_VA_COPY 1
#endif


/* Define to id of used va_copy() implementation */
#undef __VA_COPY_USE

/* Define to empty if `const' does not conform to ANSI C. */
#undef const

/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc

/* Define to `int' if  does not define. */
#undef pid_t

/* Define as `fork' if `vfork' does not work. */
#undef vfork
zoem-21-341/LICENSE0000644000207600020760000000240214115654477010523 00000000000000
   This directory contains source code implementing an interpreter for the
   Zoem language, and extensive documentation and examples covering the
   zoem interpreter, the zoem language, and two macro packages written
   in the zoem language.

   All C source and header files (with '.c' and '.h' extensions)
   and all zoem source files (with '.azm' and '.zmm' extensions) in the
   subdirectories of this directory are copyright (c) 2001-2007 Stijn
   van Dongen, stijn  micans  org, as are the documentation
   files derived from the zoem source files.

   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, write to the Free Software Foundation, Inc., 51
   Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

zoem-21-341/README0000644000207600020760000000342314115654477010402 00000000000000# $Id: README,v 1.4 2002/12/18 13:40:14 flux Exp $

   Zoem is an interpreter for an interpretive language which is called,
   as things go, zoem. From the Zoem User Manual:

      Zoem is an interpretive macro language with substantial facilities for
      programming. It supports a two-stage process, consisting of macro
      interpretation (featuring inside-out evaluation if needed), followed by a
      simple and powerful application of stream character filtering.

      Its syntax is remindful of \it{TeX}'s, it has dictionary stacks like
      \it{PostScript}, and various resemblances to \it{m4} and \it{info}.  It
      has interfaces to modules making life easy \- counters, references,
      arithmetic, multi-dimensional data storage, input/output operations,
      regular expressions, and system commands.

      Zoem is used for creating extendible dummy mark-up languages and mapping
      those to real mark-up languages.  The dummy languages have all the power
      of the zoem primitives available to them.  A prime application is the
      creation of little mark-up languages that allow easy preparation of
      documents for use with different devices.  Examples are the PUD \bf{faq}
      language and the PUD \bf{man} language, both of which can be used to
      generate troff output and html output. PUD stands for Portable Unix
      Documentation and is shipped with Aephea.  Aephea itself is an
      abstraction layer for creating concise and maintainable HTML documents.

   The version tag, which is of the form dd-ddd, encodes the year and
   day in year in which the distribution was made. So 02-058 encodes the
   58-th day of the year 2002.

   See LICENSE for copyright and licensing, see THANKS for contributors,
   see INSTALL for generic installation instructions.
zoem-21-341/THANKS0000644000207600020760000000040114146222477010421 00000000000000
Thanks to:

   Joost van Baal author of the mcl, zoem, and cimfomfa build environments
   for autotooling and packaging mcl and zoem and setting up and maintaining the CVS
   trees back in the day, followed by help and guidance over all subsequent years.

zoem-21-341/NEWS0000644000207600020760000000015414115654477010217 00000000000000$Id: NEWS,v 1.1 2002/05/07 11:38:00 joostvb Exp $

this is not a stub, but a file that needs to be present.
zoem-21-341/Makefile.am0000644000207600020760000000136714154702237011552 00000000000000## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.20 2004/06/24 11:43:11 flux Exp $

## all-local: stamp-util
## stamp-util:
## 	## do some magic to fiddle with util.  util is in cvs in ../util/ ,
## 	## not in the zoem tree itself.
## 	for i in $(top_srcdir)/../util/*.h $(top_srcdir)/../util/*.c; do \
##           $(INSTALL_DATA) $$i $(top_srcdir)/util; \
##         done
## 	touch stamp-util

maintainer-clean-local:
	-rm -f $(top_srcdir)/util/*.h $(top_srcdir)/util/*.c

SUBDIRS = . src doc examples shed

VERSION = @VERSION@

# AM_LDFLAGS = -lunwind -ltcmalloc
AM_LDFLAGS = -lm

configure.ac: configure.ac.in VERSION
	shed/setversion

EXTRA_DIST = configure.ac.in VERSION LICENSE TODO_DESIGN DESIGN install-this-zoem.sh

zoem-21-341/COPYING0000644000207600020760000004311014115654477010552 00000000000000		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
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

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    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
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
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
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
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
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    
    Copyright (C)   

    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year  name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  , 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.
zoem-21-341/src/0000755000207600020760000000000014154762473010366 500000000000000zoem-21-341/src/zoem.c0000644000207600020760000004041214154701642011414 00000000000000/*   (C) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Stijn van Dongen
 *
 * This file is part of Zoem. You can redistribute and/or modify Zoem under the
 * terms of the GNU General Public License;  either version 3 of the License or
 * (at your option) any later  version.  You should have received a copy of the
 * GPL along with Zoem, in the file COPYING.
*/

#include 
#include 
#include 

#include "entry.h"
#include "iface.h"
#include "util.h"
#include "ops.h"
#include "version.h"
#include "key.h"
#include "sink.h"
#include "filter.h"

#include "tingea/io.h"
#include "tingea/opt.h"
#include "tingea/ting.h"
#include "tingea/types.h"
#include "tingea/alloc.h"
#include "tingea/err.h"
#include "tingea/minmax.h"

const char *zoemVersion
=
"zoem %s\n"
"(c) Copyright 2001 Stijn van Dongen.\n"
"(c) Copyright 2021 Stijn van Dongen.\n"
"zoem comes with NO WARRANTY to the extent permitted by law.\n"
"You may redistribute copies of zoem under the terms\n"
"of the GNU General Public License.\n"
;

const char* syntax = "Usage: zoem [-i fname[.azm]] [-d device] [options]";

enum
{  MY_OPT_OUTPUT
,  MY_OPT_INPUT
,  MY_OPT_input
                     ,  MY_OPT_DEVICE
,  MY_OPT_SET        =  MY_OPT_DEVICE + 2
,  MY_OPT_EXPR
,  MY_OPT_EXPR_EXIT
,  MY_OPT_SPLIT
,  MY_OPT_CHUNK
                     ,  MY_OPT_X
,  MY_OPT_HELP       =  MY_OPT_X + 2
,  MY_OPT_APROPOS
                     ,  MY_OPT_LIST
,  MY_OPT_ALLOW      =  MY_OPT_LIST + 2
,  MY_OPT_UNSAFE
,  MY_OPT_UNSAFE_SILENT
                        ,  MY_OPT_SYSTEM_HONOR
,  MY_OPT_STRESS_WRITE  =  MY_OPT_SYSTEM_HONOR + 2
,  MY_OPT_ERR_OUT
,  MY_OPT_TRACE
,  MY_OPT_TTRACE
,  MY_OPT_VERSION
,  MY_OPT_NORL
,  MY_OPT_TL
,  MY_OPT_TRACE_KEYS
,  MY_OPT_TRACE_REGEX
,  MY_OPT_TRACE_ALL_SHORT
,  MY_OPT_TRACE_ALL_LONG
                     ,  MY_OPT_STATS
,  MY_OPT_NSEGMENT   =  MY_OPT_STATS + 2
,  MY_OPT_NSTACK
,  MY_OPT_NUSER
                     ,  MY_OPT_NENV
,  MY_OPT_AMOIXA     =  MY_OPT_NENV + 2
,  MY_OPT_AMCS
,  MY_OPT_AMIC
,  MY_OPT_HF
,  MY_OPT_BUSER
,  MY_OPT_BZOEM
}  ;


mcxOptAnchor options[] =
{  {  "-o"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_OUTPUT
   ,  ""
   ,  "specify output file name, explicitly" 
   }
,  {  "-i"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_input
   ,  ""
   ,  "specify 'azm' suffixed input file"
   }
,  {  "-I"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_INPUT
   ,  ""
   ,  "specify input file"
   }
,  {  "-d"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_DEVICE
   ,  ""
   ,  "set zoem key \\__device__ to )"
   }
,  {  "-s"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_SET
   ,  ""
   ,  "set zoem key  to  (repeated use allowed)"
   }
,  {  "-e"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_EXPR_EXIT
   ,  ""
   ,  "evaluate any (stdout output) and exit"
   }
,  {  "-E"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_EXPR
   ,  ""
   ,  "evaluate any (stdout output) and proceed"
   }
,  {  "-x"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_X
   ,  NULL
   ,  "if error occurs, enter interactive mode"
   }
,  {  "-l"
   ,  MCX_OPT_HASARG | MCX_OPT_INFO
   ,  MY_OPT_LIST
   ,  NULL
   ,  "-l {all|zoem|legend|trace|builtin|session|filter|parmode} (list and exit)"
   }
,  {  "-nsegment"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_NSEGMENT
   ,  ""
   ,  "maximum segment depth"
   }
,  {  "-nstack"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_NSTACK
   ,  ""
   ,  "maximum stack depth"
   }
,  {  "-bzoem"
   ,  MCX_OPT_HASARG | MCX_OPT_HIDDEN
   ,  MY_OPT_BZOEM
   ,  ""
   ,  "initial nrof zoem dictionary buckets"
   }
,  {  "-buser"
   ,  MCX_OPT_HASARG | MCX_OPT_HIDDEN
   ,  MY_OPT_BUSER
   ,  ""
   ,  "initial nrof user dictionary buckets"
   }
,  {  "-nuser"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_NUSER
   ,  ""
   ,  "size of user dictionary stack"
   }
,  {  "-nenv"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_NENV
   ,  ""
   ,  "size of environment dictionary stack"
   }
,  {  "--err-out"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_ERR_OUT
   ,  NULL
   ,  "redirect verbosity/error output to stdout"
   }
,  {  "--stress-write"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_STRESS_WRITE
   ,  NULL
   ,  "for stress-testing zoem via write#3 (testing only)"
   }
,  {  "-allow"
   ,  MCX_OPT_HASARG
   ,  MY_OPT_ALLOW
   ,  "[:]*"
   ,  "program invocations to allow (by name only)"
   }
,  {  "--unsafe"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_UNSAFE
   ,  NULL
   ,  "allow system calls, prompt for confirmation"
   }
,  {  "--unsafe-silent"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_UNSAFE_SILENT
   ,  NULL
   ,  "allow system calls silently"
   }
,  {  "--system-honor"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_SYSTEM_HONOR
   ,  NULL
   ,  "require system calls to succeed"
   }
,  {  "--split"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_SPLIT
   ,  NULL
   ,  "prepare for split output"
   }
,  {  "--readline-off"
   ,  MCX_OPT_DEFAULT
   ,  MY_OPT_NORL
   ,  NULL
   ,  "turn off readline in interactive mode"
   }
,  {  "-amcs"
   ,  MCX_OPT_HASARG | MCX_OPT_HIDDEN
   ,  MY_OPT_AMCS
   ,  ""
   ,  "alloc maximum chunk size"
   }
,  {  "-amic"
   ,  MCX_OPT_HASARG | MCX_OPT_HIDDEN
   ,  MY_OPT_AMIC
   ,  ""
   ,  "alloc maximum invocation count"
   }
,  {  "-hf"
   ,  MCX_OPT_HASARG | MCX_OPT_HIDDEN
   ,  MY_OPT_HF
   ,  "&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='zoem'
PACKAGE_TARNAME='zoem'
PACKAGE_VERSION='21-341'
PACKAGE_STRING='zoem 21-341'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

ac_unique_file="src/segment.c"
# 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='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
READLINE_OPT_FALSE
READLINE_OPT_TRUE
LIBOBJS
EGREP
GREP
CPP
RANLIB
LN_S
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
am__include
DEPDIR
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
ac_cv_use_includepath
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
am__untar
am__tar
AMTAR
am__leading_dot
SET_MAKE
AWK
mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
install_sh
MAKEINFO
AUTOHEADER
AUTOMAKE
AUTOCONF
ACLOCAL
VERSION
PACKAGE
CYGPATH_W
am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
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
runstatedir
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
am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
enable_maintainer_mode
with_includepath
enable_dependency_tracking
enable_readline
with_readline
'
      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'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
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 ;;

  -runstatedir | --runstatedir | --runstatedi | --runstated \
  | --runstate | --runstat | --runsta | --runst | --runs \
  | --run | --ru | --r)
    ac_prev=runstatedir ;;
  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  | --run=* | --ru=* | --r=*)
    runstatedir=$ac_optarg ;;

  -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 runstatedir
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
  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 zoem 21-341 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]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --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/zoem]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of zoem 21-341:";;
   esac
  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-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-maintainer-mode
                          enable make rules and dependencies not useful (and
                          sometimes confusing) to the casual installer
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-readline       use the readline library [[yes]]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    --with-includepath=DIR
                          a colon separated list of directories where to look
                          for definition files. It is overridden by the
                          environment variable ZOEMSEARCHPATH, if set. The
                          default is PREFIX/share/aephea. If Aephea files are
                          installed e.g. as
                          /opt/aephea/aephea/simpledocument.zmm
                          /opt/aephea/pud/man.zmm then pass
                          --with-includepath=/opt/aephea. If aephea is
                          installed with the same PREFIX as zoem, nothing need
                          be done.
  --with-readline=DIR     Readline installation directory

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
zoem configure 21-341
generated by GNU Autoconf 2.69

Copyright (C) 2012 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_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_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  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.  */
$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_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_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 ||
	 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_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 zoem $as_me 21-341, which was
generated by GNU Autoconf 2.69.  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



PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION

ac_aux_dir=
for ac_dir in autofoo "$srcdir"/autofoo; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f "$ac_dir/install.sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f "$ac_dir/shtool"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in autofoo \"$srcdir\"/autofoo" "$LINENO" 5
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.




am__api_version='1.16'

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if ${ac_cv_path_install+:} false; then :
  $as_echo_n "(cached) " >&6
else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    # Account for people who put trailing slashes in PATH elements.
case $as_dir/ in #((
  ./ | .// | /[cC]/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  /usr/ucb/* ) ;;
  *)
    # OSF1 and SCO ODT 3.0 have their own names for install.
    # Don't use installbsd from OSF since it installs stuff as root
    # by default.
    for ac_prog in ginstall scoinst install; do
      for ac_exec_ext in '' $ac_executable_extensions; do
	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

rm -rf conftest.one conftest.two conftest.dir

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    INSTALL=$ac_install_sh
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$INSTALL" >&6; }

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name.  Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
  *[\\\"\#\$\&\'\`$am_lf]*)
    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac

# Do 'set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   am_has_slept=no
   for am_try in 1 2; do
     echo "timestamp, slept: $am_has_slept" > conftest.file
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
     if test "$*" = "X"; then
	# -L didn't work.
	set X `ls -t "$srcdir/configure" conftest.file`
     fi
     if test "$*" != "X $srcdir/configure conftest.file" \
	&& test "$*" != "X conftest.file $srcdir/configure"; then

	# If neither matched, then we have a broken ls.  This can happen
	# if, for instance, CONFIG_SHELL is bash and it inherits a
	# broken ls alias from the environment.  This has actually
	# happened.  Such a system could not be considered "sane".
	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
  alias in your environment" "$LINENO" 5
     fi
     if test "$2" = conftest.file || test $am_try -eq 2; then
       break
     fi
     # Just in case.
     sleep 1
     am_has_slept=yes
   done
   test "$2" = conftest.file
   )
then
   # Ok.
   :
else
   as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  ( sleep 1 ) &
  am_sleep_pid=$!
fi

rm -f conftest.file

test "$program_prefix" != NONE &&
  program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`

# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`

if test x"${MISSING+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  *)
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
  esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
  am_missing_run="$MISSING "
else
  am_missing_run=
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi

if test x"${install_sh+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi

# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip".  However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    $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
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
$as_echo "$STRIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_STRIP"; then
  ac_ct_STRIP=$STRIP
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; 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_STRIP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_STRIP"; then
  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_STRIP="strip"
    $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_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
$as_echo "$ac_ct_STRIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_STRIP" = x; then
    STRIP=":"
  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
    STRIP=$ac_ct_STRIP
  fi
else
  STRIP="$ac_cv_prog_STRIP"
fi

fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
  if ${ac_cv_path_mkdir+:} false; then :
  $as_echo_n "(cached) " >&6
else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in mkdir gmkdir; do
	 for ac_exec_ext in '' $ac_executable_extensions; do
	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
	     'mkdir (GNU coreutils) '* | \
	     'mkdir (coreutils) '* | \
	     'mkdir (fileutils) '4.1*)
	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
	       break 3;;
	   esac
	 done
       done
  done
IFS=$as_save_IFS

fi

  test -d ./--version && rmdir ./--version
  if test "${ac_cv_path_mkdir+set}" = set; then
    MKDIR_P="$ac_cv_path_mkdir -p"
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for MKDIR_P within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    MKDIR_P="$ac_install_sh -d"
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }

for ac_prog in gawk mawk nawk awk
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_AWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AWK="$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
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$AWK" && break
done

{ $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

rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
  am__leading_dot=.
else
  am__leading_dot=_
fi
rmdir .tst 2>/dev/null

# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
  enableval=$enable_silent_rules;
fi

case $enable_silent_rules in # (((
  yes) AM_DEFAULT_VERBOSITY=0;;
   no) AM_DEFAULT_VERBOSITY=1;;
    *) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
if ${am_cv_make_support_nested_variables+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if $as_echo 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
	@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
  am_cv_make_support_nested_variables=yes
else
  am_cv_make_support_nested_variables=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
$as_echo "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
    AM_V='$(V)'
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
  AM_V=$AM_DEFAULT_VERBOSITY
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'

if test "`cd $srcdir && pwd`" != "`pwd`"; then
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  # is not polluted with repeated "-I."
  am__isrc=' -I$(srcdir)'
  # test to see if srcdir already configured
  if test -f $srcdir/config.status; then
    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
  fi
fi

# test whether we have cygpath
if test -z "$CYGPATH_W"; then
  if (cygpath --version) >/dev/null 2>/dev/null; then
    CYGPATH_W='cygpath -w'
  else
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='zoem'
 VERSION='21-341'


cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF

# Some tools Automake needs.

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}


AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}


AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}


AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}


MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}

# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# 
# 
mkdir_p='$(MKDIR_P)'

# We need awk for the "check" target (and possibly the TAP driver).  The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility.  Yes, it's still used
# in the wild :-(  We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'


# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar  pax cpio none'

am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'






# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes.  So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
  cat >&2 <<'END'
Oops!

Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present.  This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: 

Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message.  This
can help us improve future automake versions.

END
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
    echo 'Configuration will proceed anyway, since you have set the' >&2
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
    echo >&2
  else
    cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.

You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: .

If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.

END
    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
  fi
fi


ac_config_headers="$ac_config_headers config.h"

# AC_CONFIG_HEADERS([config.h])

# add a `--enable-maintainer-mode' option to `configure'; `maintainer-only' rules turned off by
# default in Makefile.in's

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
    # Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
$as_echo "$USE_MAINTAINER_MODE" >&6; }
   if test $USE_MAINTAINER_MODE = yes; then
  MAINTAINER_MODE_TRUE=
  MAINTAINER_MODE_FALSE='#'
else
  MAINTAINER_MODE_TRUE='#'
  MAINTAINER_MODE_FALSE=
fi

  MAINT=$MAINTAINER_MODE_TRUE







# Check whether --with-includepath was given.
if test "${with_includepath+set}" = set; then :
  withval=$with_includepath;  if test "x$prefix" != xNONE; then
            ac_cv_use_includepath=$withval:$prefix/share/aephea
          else
            ac_cv_use_includepath=$withval:/usr/local/share/aephea
          fi

else
   if test "x$prefix" != xNONE; then
            ac_cv_use_includepath=$prefix/share/aephea
          else
            ac_cv_use_includepath=/usr/local/share/aephea
          fi


fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Include path(s) to add" >&5
$as_echo_n "checking Include path(s) to add... " >&6; }
if ${ac_cv_use_includepath+:} false; then :
  $as_echo_n "(cached) " >&6
else

          if test "x$prefix" != xNONE; then
            ac_cv_use_includepath=$prefix/share/aephea
          else
            ac_cv_use_includepath=/usr/local/share/aephea
          fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_use_includepath" >&5
$as_echo "$ac_cv_use_includepath" >&6; }


cat >>confdefs.h <<_ACEOF
#define INCLUDEPATH $ac_cv_use_includepath
_ACEOF




# Checks for programs.
for ac_prog in gawk mawk nawk awk
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_AWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AWK="$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
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$AWK" && break
done

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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_executable_p "$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 as_fn_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"
    $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 as_fn_executable_p "$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 as_fn_executable_p "$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 
struct stat;
/* 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 whether $CC understands -c and -o together" >&5
$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
if ${am_cv_prog_cc_c_o+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
  # Make sure it works both with $CC and with simple cc.
  # Following AC_PROG_CC_C_O, we do the test twice because some
  # compilers refuse to overwrite an existing .o file with -o,
  # though they will create one.
  am_cv_prog_cc_c_o=yes
  for am_i in 1 2; do
    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } \
         && test -f conftest2.$ac_objext; then
      : OK
    else
      am_cv_prog_cc_c_o=no
      break
    fi
  done
  rm -f core conftest*
  unset am_i
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
$as_echo "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
   # Losing compiler, so override with the script.
   # FIXME: It is wrong to rewrite CC.
   # But if we don't then we get into trouble of one sort or another.
   # A longer-term fix would be to have automake use am__CC in this case,
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
   CC="$am_aux_dir/compile $CC"
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

DEPDIR="${am__leading_dot}deps"

ac_config_commands="$ac_config_commands depfiles"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
cat > confinc.mk << 'END'
am__doit:
	@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
am__include="#"
am__quote=
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
  case $?:`cat confinc.out 2>/dev/null` in #(
  '0:this is the am__doit target') :
    case $s in #(
  BSD) :
    am__include='.include' am__quote='"' ;; #(
  *) :
    am__include='include' am__quote='' ;;
esac ;; #(
  *) :
     ;;
esac
  if test "$am__include" != "#"; then
    _am_result="yes ($s style)"
    break
  fi
done
rm -f confinc.* confmf.*
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
$as_echo "${_am_result}" >&6; }

# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then :
  enableval=$enable_dependency_tracking;
fi

if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
  am__nodep='_no'
fi
 if test "x$enable_dependency_tracking" != xno; then
  AMDEP_TRUE=
  AMDEP_FALSE='#'
else
  AMDEP_TRUE='#'
  AMDEP_FALSE=
fi



depcc="$CC"   am_compiler_list=

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
if ${am_cv_CC_dependencies_compiler_type+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named 'D' -- because '-MD' means "put the output
  # in D".
  rm -rf conftest.dir
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir
  # We will build objects and dependencies in a subdirectory because
  # it helps to detect inapplicable dependency modes.  For instance
  # both Tru64's cc and ICC support -MD to output dependencies as a
  # side effect of compilation, but ICC will put the dependencies in
  # the current directory while Tru64 will put them in the object
  # directory.
  mkdir sub

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  am__universal=false
  case " $depcc " in #(
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     esac

  for depmode in $am_compiler_list; do
    # Setup a source with many dependencies, because some compilers
    # like to wrap large dependency lists on column 80 (with \), and
    # we should not choose a depcomp mode which is confused by this.
    #
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    : > sub/conftest.c
    for i in 1 2 3 4 5 6; do
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
      # Solaris 10 /bin/sh.
      echo '/* dummy */' > sub/conftst$i.h
    done
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf

    # We check with '-c' and '-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle '-M -o', and we need to detect this.  Also, some Intel
    # versions had trouble with output in subdirs.
    am__obj=sub/conftest.${OBJEXT-o}
    am__minus_obj="-o $am__obj"
    case $depmode in
    gcc)
      # This depmode causes a compiler race in universal mode.
      test "$am__universal" = false || continue
      ;;
    nosideeffect)
      # After this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested.
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
      # This compiler won't grok '-c -o', but also, the minuso test has
      # not run yet.  These depmodes are late enough in the game, and
      # so weak that their functioning should not be impacted.
      am__obj=conftest.${OBJEXT-o}
      am__minus_obj=
      ;;
    none) break ;;
    esac
    if depmode=$depmode \
       source=sub/conftest.c object=$am__obj \
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
         >/dev/null 2>conftest.err &&
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      # icc doesn't choke on unknown options, it will just issue warnings
      # or remarks (even with -Werror).  So we grep stderr for any message
      # that says an option was ignored or not supported.
      # When given -MP, icc 7.0 and 7.1 complain thusly:
      #   icc: Command line warning: ignoring option '-M'; no argument required
      # The diagnosis changed in icc 8.0:
      #   icc: Command line remark: option '-MP' not supported
      if (grep 'ignoring option' conftest.err ||
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
        am_cv_CC_dependencies_compiler_type=$depmode
        break
      fi
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type

 if
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
  am__fastdepCC_TRUE=
  am__fastdepCC_FALSE='#'
else
  am__fastdepCC_TRUE='#'
  am__fastdepCC_FALSE=
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
$as_echo "no, using $LN_S" >&6; }
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}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

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


fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # 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_ac_ct_RANLIB+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_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

fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
$as_echo "$ac_ct_RANLIB" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  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
    RANLIB=$ac_ct_RANLIB
  fi
else
  RANLIB="$ac_cv_prog_RANLIB"
fi


# Checks for libraries.

# Checks for header files.

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"
      as_fn_executable_p "$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"
      as_fn_executable_p "$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"


{ $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

{ $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

# 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


for ac_header in fcntl.h float.h limits.h stdlib.h string.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


# Checks for typedefs, structures, and compiler characteristics.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

#ifndef __cplusplus
  /* Ultrix mips cc rejects this sort of thing.  */
  typedef int charset[2];
  const charset cs = { 0, 0 };
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *pcpcc;
  char **ppc;
  /* NEC SVR4.0.2 mips cc rejects this.  */
  struct point {int x, y;};
  static struct point const zero = {0,0};
  /* AIX XL C 1.02.0.0 rejects this.
     It does not let you subtract one const X* pointer from another in
     an arm of an if-expression whose if-part is not a constant
     expression */
  const char *g = "string";
  pcpcc = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++pcpcc;
  ppc = (char**) pcpcc;
  pcpcc = (char const *const *) ppc;
  { /* SCO 3.2v4 cc rejects this sort of thing.  */
    char tx;
    char *t = &tx;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

    *t++ = 0;
    if (s) return 0;
  }
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    int x[] = {25, 17};
    const int *foo = &x[0];
    ++foo;
  }
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    typedef const int *iptr;
    iptr p = 0;
    ++p;
  }
  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    struct s { int j; const int *ap[3]; } bx;
    struct s *b = &bx; b->j = 5;
  }
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    const int foo = 10;
    if (!foo) return 0;
  }
  return !cs[0] && !zero.x;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_const=yes
else
  ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then

$as_echo "#define const /**/" >>confdefs.h

fi

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


# Checks for library functions.
for ac_func in vprintf
do :
  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
if test "x$ac_cv_func_vprintf" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_VPRINTF 1
_ACEOF

ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
if test "x$ac_cv_func__doprnt" = xyes; then :

$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h

fi

fi
done


for ac_header in vfork.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
if test "x$ac_cv_header_vfork_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_VFORK_H 1
_ACEOF

fi

done

for ac_func in fork vfork
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 "x$ac_cv_func_fork" = xyes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
$as_echo_n "checking for working fork... " >&6; }
if ${ac_cv_func_fork_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_fork_works=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

	  /* By Ruediger Kuhlmann. */
	  return fork () < 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_fork_works=yes
else
  ac_cv_func_fork_works=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
$as_echo "$ac_cv_func_fork_works" >&6; }

else
  ac_cv_func_fork_works=$ac_cv_func_fork
fi
if test "x$ac_cv_func_fork_works" = xcross; then
  case $host in
    *-*-amigaos* | *-*-msdosdjgpp*)
      # Override, as these systems have only a dummy fork() stub
      ac_cv_func_fork_works=no
      ;;
    *)
      ac_cv_func_fork_works=yes
      ;;
  esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
$as_echo_n "checking for working vfork... " >&6; }
if ${ac_cv_func_vfork_works+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_vfork_works=cross
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Thanks to Paul Eggert for this test.  */
$ac_includes_default
#include 
#ifdef HAVE_VFORK_H
# include 
#endif
/* On some sparc systems, changes by the child to local and incoming
   argument registers are propagated back to the parent.  The compiler
   is told about this with #include , but some compilers
   (e.g. gcc -O) don't grok .  Test for this by using a
   static variable whose address is put into a register that is
   clobbered by the vfork.  */
static void
#ifdef __cplusplus
sparc_address_test (int arg)
# else
sparc_address_test (arg) int arg;
#endif
{
  static pid_t child;
  if (!child) {
    child = vfork ();
    if (child < 0) {
      perror ("vfork");
      _exit(2);
    }
    if (!child) {
      arg = getpid();
      write(-1, "", 0);
      _exit (arg);
    }
  }
}

int
main ()
{
  pid_t parent = getpid ();
  pid_t child;

  sparc_address_test (0);

  child = vfork ();

  if (child == 0) {
    /* Here is another test for sparc vfork register problems.  This
       test uses lots of local variables, at least as many local
       variables as main has allocated so far including compiler
       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
       reuse the register of parent for one of the local variables,
       since it will think that parent can't possibly be used any more
       in this routine.  Assigning to the local variable will thus
       munge parent in the parent process.  */
    pid_t
      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
    /* Convince the compiler that p..p7 are live; otherwise, it might
       use the same hardware register for all 8 local variables.  */
    if (p != p1 || p != p2 || p != p3 || p != p4
	|| p != p5 || p != p6 || p != p7)
      _exit(1);

    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
       from child file descriptors.  If the child closes a descriptor
       before it execs or exits, this munges the parent's descriptor
       as well.  Test for this by closing stdout in the child.  */
    _exit(close(fileno(stdout)) != 0);
  } else {
    int status;
    struct stat st;

    while (wait(&status) != child)
      ;
    return (
	 /* Was there some problem with vforking?  */
	 child < 0

	 /* Did the child fail?  (This shouldn't happen.)  */
	 || status

	 /* Did the vfork/compiler bug occur?  */
	 || parent != getpid()

	 /* Did the file descriptor bug occur?  */
	 || fstat(fileno(stdout), &st) != 0
	 );
  }
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_vfork_works=yes
else
  ac_cv_func_vfork_works=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
$as_echo "$ac_cv_func_vfork_works" >&6; }

fi;
if test "x$ac_cv_func_fork_works" = xcross; then
  ac_cv_func_vfork_works=$ac_cv_func_vfork
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi

if test "x$ac_cv_func_vfork_works" = xyes; then

$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h

else

$as_echo "#define vfork fork" >>confdefs.h

fi
if test "x$ac_cv_func_fork_works" = xyes; then

$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h

fi

for ac_header in stdlib.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
if test "x$ac_cv_header_stdlib_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
if ${ac_cv_func_malloc_0_nonnull+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_malloc_0_nonnull=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include 
#else
char *malloc ();
#endif

int
main ()
{
return ! malloc (0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_malloc_0_nonnull=yes
else
  ac_cv_func_malloc_0_nonnull=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
if test $ac_cv_func_malloc_0_nonnull = yes; then :

$as_echo "#define HAVE_MALLOC 1" >>confdefs.h

else
  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h

   case " $LIBOBJS " in
  *" malloc.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
 ;;
esac


$as_echo "#define malloc rpl_malloc" >>confdefs.h

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
if ${ac_cv_func_memcmp_working+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_memcmp_working=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

  /* Some versions of memcmp are not 8-bit clean.  */
  char c0 = '\100', c1 = '\200', c2 = '\201';
  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
    return 1;

  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
     or more and with at least one buffer not starting on a 4-byte boundary.
     William Lewis provided this test program.   */
  {
    char foo[21];
    char bar[21];
    int i;
    for (i = 0; i < 4; i++)
      {
	char *a = foo + i;
	char *b = bar + i;
	strcpy (a, "--------01111111");
	strcpy (b, "--------10000000");
	if (memcmp (a, b, 16) >= 0)
	  return 1;
      }
    return 0;
  }

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_memcmp_working=yes
else
  ac_cv_func_memcmp_working=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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
$as_echo "$ac_cv_func_memcmp_working" >&6; }
test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
  *" memcmp.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
 ;;
esac


# AC_FUNC_REALLOC

    # Check whether --enable-readline was given.
if test "${enable_readline+set}" = set; then :
  enableval=$enable_readline;
else
  enable_readline="yes"
fi


    if test "$enable_readline" = "yes"; then


# Check whether --with-readline was given.
if test "${with_readline+set}" = set; then :
  withval=$with_readline; with_readline=$withval
fi


    if test "$with_readline" != ""; then
        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
        LIBS="-L$with_readline/lib $LIBS"
    fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the readline library" >&5
$as_echo_n "checking for the readline library... " >&6; }
if ${ac_cv_lib_readline+:} false; then :
  $as_echo_n "(cached) " >&6
else

    ac_cv_lib_readline="no"
    ORIG_LIBS=$LIBS
    LIBS="$ORIG_LIBS -lreadline -ltermcap"
    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 readline ();
int
main ()
{
return readline ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline="yes"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    if test "$ac_cv_lib_readline" = "no"; then
      LIBS=$ORIG_LIBS
    fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline" >&5
$as_echo "$ac_cv_lib_readline" >&6; }

  enable_readline="no"
  if test "$ac_cv_lib_readline" = "yes"; then
    for ac_header in readline.h readline/readline.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 whether readline supports history" >&5
$as_echo_n "checking whether readline supports history... " >&6; }
if ${ac_cv_lib_readline_history+:} false; then :
  $as_echo_n "(cached) " >&6
else

      ac_cv_lib_readline_history="no"
      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 add_history ();
int
main ()
{
return add_history ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_history="yes"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_history" >&5
$as_echo "$ac_cv_lib_readline_history" >&6; }
    if test "$ac_cv_lib_readline_history" = "yes"; then
      for ac_header in history.h readline/history.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 whether readline supports completion" >&5
$as_echo_n "checking whether readline supports completion... " >&6; }
if ${ac_cv_lib_readline_completion+:} false; then :
  $as_echo_n "(cached) " >&6
else

        ac_cv_lib_readline_completion="no"
        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 rl_completion_matches ();
int
main ()
{
return rl_completion_matches ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_readline_completion="yes"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_completion" >&5
$as_echo "$ac_cv_lib_readline_completion" >&6; }
      if test "$ac_cv_lib_readline_completion" = "yes"; then
   enable_readline="yes"
      fi
    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: readline or termcap library is missing" >&5
$as_echo "readline or termcap library is missing" >&6; }
  fi

    fi

    if test "$enable_readline" = "no"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling readline" >&5
$as_echo "disabling readline" >&6; }

$as_echo "#define HAVE_READLINE 0" >>confdefs.h

    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling readline" >&5
$as_echo "enabling readline" >&6; }

$as_echo "#define HAVE_READLINE 1" >>confdefs.h

    fi

     if test "$enable_readline" = "yes"; then
  READLINE_OPT_TRUE=
  READLINE_OPT_FALSE='#'
else
  READLINE_OPT_TRUE='#'
  READLINE_OPT_FALSE=
fi


for ac_func in dup2 floor memset pow regcomp sqrt strchr strrchr strstr
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



    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy() function" >&5
$as_echo_n "checking for va_copy() function... " >&6; }
    if ${ac_cv_va_copy+:} false; then :
  $as_echo_n "(cached) " >&6
else

    ac_cv_va_copy=""


    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) va_copy((d), (s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="C99"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) VA_COPY((d), (s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="GCM"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) __va_copy((d), (s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="GCH"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) __builtin_va_copy((d), (s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="GCB"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) do { (d) = (s); } while (0)
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="ASS"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) do { *(d) = *(s); } while (0)
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="ASP"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) memcpy((void *)&(d), (void *)&(s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="CPS"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi



    if test ".$ac_cv_va_copy" = .; then
        if test "$cross_compiling" = 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 $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include 
#include 
#include 
#define DO_VA_COPY(d, s) memcpy((void *)(d), (void *)(s))
void test(char *str, ...)
{
    va_list ap, ap2;
    int i;
    va_start(ap, str);
    DO_VA_COPY(ap2, ap);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    DO_VA_COPY(ap, ap2);
    for (i = 1; i <= 9; i++) {
        int k = (int)va_arg(ap, int);
        if (k != i)
            abort();
    }
    va_end(ap);
}
int main(int argc, char *argv[])
{
    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
    exit(0);
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_va_copy="CPP"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi

    if test ".$ac_cv_va_copy" = .; then
        as_fn_error $? "no working implementation found" "$LINENO" 5
    fi

fi

    if test ".$ac_cv_va_copy" = ".C99"; then

$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h

  fi

cat >>confdefs.h <<_ACEOF
#define __VA_COPY_USE __VA_COPY_USE_$ac_cv_va_copy
_ACEOF


    if test ".$ac_cv_va_copy" = ".C99"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
  else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (using fallback implementation)" >&5
$as_echo "no (using fallback implementation)" >&6; }
  fi



# AC_CONFIG_FILES([])
ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile src/Makefile shed/Makefile"

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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
$as_echo_n "checking that generated files are newer than configure... " >&6; }
   if test -n "$am_sleep_pid"; then
     # Hide warnings about reused PIDs.
     wait $am_sleep_pid 2>/dev/null
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
 if test -n "$EXEEXT"; then
  am__EXEEXT_TRUE=
  am__EXEEXT_FALSE='#'
else
  am__EXEEXT_TRUE='#'
  am__EXEEXT_FALSE=
fi

if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
  as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${READLINE_OPT_TRUE}" && test -z "${READLINE_OPT_FALSE}"; then
  as_fn_error $? "conditional \"READLINE_OPT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${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 -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
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


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# 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 zoem $as_me 21-341, which was
generated by GNU Autoconf 2.69.  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="\\
zoem config.status 21-341
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 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'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
AWK='$AWK'
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
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"

_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
    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    "shed/Makefile") CONFIG_FILES="$CONFIG_FILES shed/Makefile" ;;

  *) 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
  #

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  esac
  ac_MKDIR_P=$MKDIR_P
  case $MKDIR_P in
  [\\/$]* | ?:[\\/]* ) ;;
  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
  esac
_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
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;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
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
  case $_am_header in
    $_am_arg | $_am_arg:* )
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$_am_arg" : 'X\(//\)[^/]' \| \
	 X"$_am_arg" : 'X\(//\)$' \| \
	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$_am_arg" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`/stamp-h$_am_stamp_count
 ;;

  :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
    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
  # Older Autoconf quotes --file arguments for eval, but not when files
  # are listed without --file.  Let's play safe and only enable the eval
  # if we detect the quoting.
  # TODO: see whether this extra hack can be removed once we start
  # requiring Autoconf 2.70 or later.
  case $CONFIG_FILES in #(
  *\'*) :
    eval set x "$CONFIG_FILES" ;; #(
  *) :
    set x $CONFIG_FILES ;; #(
  *) :
     ;;
esac
  shift
  # Used to flag and report bootstrapping failures.
  am_rc=0
  for am_mf
  do
    # Strip MF so we end up with the name of the file.
    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
    # Check whether this is an Automake generated Makefile which includes
    # dependency-tracking related rules and includes.
    # Grep'ing the whole file directly is not great: AIX grep has a line
    # limit of 2048, but all sed's we know have understand at least 4000.
    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
      || continue
    am_dirpart=`$as_dirname -- "$am_mf" ||
$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$am_mf" : 'X\(//\)[^/]' \| \
	 X"$am_mf" : 'X\(//\)$' \| \
	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$am_mf" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    am_filepart=`$as_basename -- "$am_mf" ||
$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$am_mf" : 'X\(//\)$' \| \
	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$am_mf" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    { echo "$as_me:$LINENO: cd "$am_dirpart" \
      && sed -e '/# am--include-marker/d' "$am_filepart" \
        | $MAKE -f - am--depfiles" >&5
   (cd "$am_dirpart" \
      && sed -e '/# am--include-marker/d' "$am_filepart" \
        | $MAKE -f - am--depfiles) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } || am_rc=$?
  done
  if test $am_rc -ne 0; 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 $? "Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  Try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
  fi
  { am_dirpart=; unset am_dirpart;}
  { am_filepart=; unset am_filepart;}
  { am_mf=; unset am_mf;}
  { am_rc=; unset am_rc;}
  rm -f conftest-deps.mk
}
 ;;

  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