summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMasayuki Hatta (mhatta) <mhatta@debian.org>2008-01-03 09:38:51 -0500
committerMasayuki Hatta (mhatta) <mhatta@debian.org>2008-01-03 09:38:51 -0500
commit95b1e9489b8bed332041631a1545b43f26a1503b (patch)
tree48c16557869e78ef16a5d9ed080c53cc14f8059a /tests
Import a2ps_4.14.orig.tar.gz
[dgit import orig a2ps_4.14.orig.tar.gz]
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am72
-rw-r--r--tests/Makefile.in541
-rw-r--r--tests/a2ps-tst.cfg.in107
-rwxr-xr-xtests/align-1.tst39
-rwxr-xr-xtests/backup.tst75
-rwxr-xr-xtests/contrib.tst20
-rwxr-xr-xtests/cut.tst28
-rw-r--r--tests/defs.in128
-rwxr-xr-xtests/deleg-1.tst28
-rwxr-xr-xtests/deleg-2.tst24
-rwxr-xr-xtests/encoding.tst30
-rw-r--r--tests/gps-ref/AppDelegate.ps298
-rw-r--r--tests/gps-ref/InsertBlock.ps139
-rw-r--r--tests/gps-ref/ShellNewDummyHook.ps262
-rw-r--r--tests/gps-ref/a2ps.ps186
-rw-r--r--tests/gps-ref/bookie.ps320
-rw-r--r--tests/gps-ref/configure.ps31
-rw-r--r--tests/gps-ref/confirm.ps129
-rw-r--r--tests/gps-ref/ehandler.ps430
-rw-r--r--tests/gps-ref/eplv_chkr.ps135
-rw-r--r--tests/gps-ref/essai2.ps367
-rw-r--r--tests/gps-ref/ex1.ps126
-rw-r--r--tests/gps-ref/ex_PSGETRS.ps723
-rw-r--r--tests/gps-ref/formfeed.ps153
-rw-r--r--tests/gps-ref/ftp2.ps1373
-rw-r--r--tests/gps-ref/includeres.ps231
-rw-r--r--tests/gps-ref/mofibida.ps208
-rw-r--r--tests/gps-ref/mtvplot.ps81
-rw-r--r--tests/gps-ref/mutex.ps163
-rw-r--r--tests/gps-ref/pi.ps155
-rw-r--r--tests/gps-ref/polkaIDL.ps384
-rw-r--r--tests/gps-ref/prosamp.ps41
-rw-r--r--tests/gps-ref/psmandup.ps769
-rw-r--r--tests/gps-ref/report.ps658
-rw-r--r--tests/gps-ref/run-help.ps74
-rw-r--r--tests/gps-ref/s-garnam.ps1376
-rw-r--r--tests/gps-ref/snacc.ps282
-rw-r--r--tests/gps-ref/space.ps198
-rw-r--r--tests/gps-ref/sqlcrtbl.ps632
-rw-r--r--tests/gps-ref/sqlinit.ps369
-rw-r--r--tests/gps-ref/sqlpq92.ps31
-rw-r--r--tests/gps-ref/sqlspace.ps198
-rw-r--r--tests/gps-ref/strange.ps302
-rw-r--r--tests/gps-ref/symbol.ps621
-rw-r--r--tests/gps-ref/synopsys.ps127
-rw-r--r--tests/gps-ref/tabulation.ps68
-rw-r--r--tests/gps-ref/template.ps393
-rw-r--r--tests/gps-ref/typing.ps698
-rw-r--r--tests/gps-ref/vrcaml.ps454
-rw-r--r--tests/gps-ref/wide.ps144
-rwxr-xr-xtests/guess-1.tst41
-rwxr-xr-xtests/guess-2.tst58
-rwxr-xr-xtests/inline.tst32
-rwxr-xr-xtests/inout-1.tst27
-rwxr-xr-xtests/inout-2.tst27
-rwxr-xr-xtests/inout-3.tst27
-rwxr-xr-xtests/options-1.tst25
-rwxr-xr-xtests/pages-1.tst35
-rwxr-xr-xtests/pages-2.tst22
-rwxr-xr-xtests/params.tst38
-rwxr-xr-xtests/po.tst16
-rwxr-xr-xtests/printers.tst11
-rwxr-xr-xtests/prolog-1.tst21
-rwxr-xr-xtests/prolog-2.tst31
-rw-r--r--tests/ps-ref/AppDelegate.ps242
-rw-r--r--tests/ps-ref/InsertBlock.ps129
-rw-r--r--tests/ps-ref/ShellNewDummyHook.ps229
-rw-r--r--tests/ps-ref/a2ps.ps174
-rw-r--r--tests/ps-ref/al1-3.ps80
-rw-r--r--tests/ps-ref/al1-page.ps74
-rw-r--r--tests/ps-ref/al1-rank.ps74
-rw-r--r--tests/ps-ref/al1-sheet.ps77
-rw-r--r--tests/ps-ref/al1-virtual.ps74
-rw-r--r--tests/ps-ref/bookie.ps295
-rw-r--r--tests/ps-ref/configure.ps30
-rw-r--r--tests/ps-ref/confirm.ps103
-rw-r--r--tests/ps-ref/cut.ps55
-rw-r--r--tests/ps-ref/del.ps1
-rw-r--r--tests/ps-ref/ehandler.ps387
-rw-r--r--tests/ps-ref/encoding.ps3225
-rw-r--r--tests/ps-ref/eplv_chkr.ps113
-rw-r--r--tests/ps-ref/essai2.ps340
-rw-r--r--tests/ps-ref/ex1.ps120
-rw-r--r--tests/ps-ref/ex_PSGETRS.ps638
-rw-r--r--tests/ps-ref/formfeed.ps153
-rw-r--r--tests/ps-ref/ftp2.ps1080
-rw-r--r--tests/ps-ref/includeres.ps219
-rw-r--r--tests/ps-ref/mofibida.ps166
-rw-r--r--tests/ps-ref/mtvplot.ps76
-rw-r--r--tests/ps-ref/mutex.ps142
-rw-r--r--tests/ps-ref/pages-1.ps116
-rw-r--r--tests/ps-ref/pi.ps149
-rw-r--r--tests/ps-ref/polkaIDL.ps366
-rw-r--r--tests/ps-ref/prolog-1.ps610
-rw-r--r--tests/ps-ref/prolog-4.ps616
-rw-r--r--tests/ps-ref/prosamp.ps33
-rw-r--r--tests/ps-ref/psmandup.ps659
-rw-r--r--tests/ps-ref/report.ps616
-rw-r--r--tests/ps-ref/run-help.ps55
-rw-r--r--tests/ps-ref/s-garnam.ps1170
-rw-r--r--tests/ps-ref/snacc.ps244
-rw-r--r--tests/ps-ref/space.ps184
-rw-r--r--tests/ps-ref/sqlcrtbl.ps608
-rw-r--r--tests/ps-ref/sqlinit.ps350
-rw-r--r--tests/ps-ref/sqlpq92.ps31
-rw-r--r--tests/ps-ref/sqlspace.ps184
-rw-r--r--tests/ps-ref/strange.ps249
-rw-r--r--tests/ps-ref/strip-0.ps33
-rw-r--r--tests/ps-ref/strip-1.ps33
-rw-r--r--tests/ps-ref/strip-2.ps33
-rw-r--r--tests/ps-ref/strip-3.ps33
-rw-r--r--tests/ps-ref/symbol.ps578
-rw-r--r--tests/ps-ref/synopsys.ps106
-rw-r--r--tests/ps-ref/tabulation.ps60
-rw-r--r--tests/ps-ref/template.ps359
-rw-r--r--tests/ps-ref/toc.ps233
-rw-r--r--tests/ps-ref/typing.ps570
-rw-r--r--tests/ps-ref/vrcaml.ps446
-rw-r--r--tests/ps-ref/wide.ps144
-rwxr-xr-xtests/strip.tst39
-rwxr-xr-xtests/styles.tst123
-rwxr-xr-xtests/toc.tst36
-rw-r--r--tests/tstfiles/3-pages.txt1
-rw-r--r--tests/tstfiles/AppDelegate.m122
-rw-r--r--tests/tstfiles/InsertBlock.java41
-rw-r--r--tests/tstfiles/ShellNewDummyHook.pas94
-rw-r--r--tests/tstfiles/a2ps.man77
-rw-r--r--tests/tstfiles/bookie.idl97
-rw-r--r--tests/tstfiles/configure.in3
-rw-r--r--tests/tstfiles/confirm.m345
-rw-r--r--tests/tstfiles/ehandler65
-rw-r--r--tests/tstfiles/encoding.pre144
-rw-r--r--tests/tstfiles/eplv_chkr.v38
-rw-r--r--tests/tstfiles/essai2.o2c133
-rw-r--r--tests/tstfiles/ex1.asn138
-rw-r--r--tests/tstfiles/ex_PSGETRS.f90192
-rw-r--r--tests/tstfiles/formfeed.txt7
-rw-r--r--tests/tstfiles/ftp2.pml455
-rw-r--r--tests/tstfiles/includeres60
-rw-r--r--tests/tstfiles/mofibida.hs50
-rw-r--r--tests/tstfiles/mtvplot.octave27
-rw-r--r--tests/tstfiles/mutex.py60
-rw-r--r--tests/tstfiles/pi.b53
-rw-r--r--tests/tstfiles/polkaIDL.hh121
-rw-r--r--tests/tstfiles/prosamp.pre13
-rw-r--r--tests/tstfiles/psmandup269
-rw-r--r--tests/tstfiles/report.pre219
-rw-r--r--tests/tstfiles/run-help17
-rw-r--r--tests/tstfiles/s-garnam.adb428
-rw-r--r--tests/tstfiles/snacc.mib108
-rw-r--r--tests/tstfiles/space.pls47
-rw-r--r--tests/tstfiles/sqlcrtbl.sql192
-rw-r--r--tests/tstfiles/sqlinit.ora102
-rw-r--r--tests/tstfiles/sqlpq92.sql5
-rw-r--r--tests/tstfiles/sqlspace.pkb47
-rw-r--r--tests/tstfiles/strange.mail142
-rw-r--r--tests/tstfiles/symbol.prebin0 -> 5866 bytes
-rw-r--r--tests/tstfiles/synopsys.setup44
-rw-r--r--tests/tstfiles/tabulation.pre23
-rw-r--r--tests/tstfiles/template.e134
-rw-r--r--tests/tstfiles/typing.cl300
-rw-r--r--tests/tstfiles/vrcaml.ml138
-rw-r--r--tests/tstfiles/wide.txtbin0 -> 3788 bytes
-rwxr-xr-xtests/usropt-1.tst22
-rwxr-xr-xtests/usropt-2.tst29
-rwxr-xr-xtests/view-diff22
166 files changed, 36418 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..d777877
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,72 @@
+## -*- Makefile -*-
+## `tests' Subdirectory Makefile for a2ps.
+## Copyright (c) 1997-99 Akim Demaille, Miguel Santana
+##
+##
+## This file is part of a2ps.
+##
+## 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, 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; see the file COPYING. If not, write to
+## the Free Software Foundation, 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
+##
+## Process this file with automake to produce Makefile.in
+
+# .tst instead of .test to avoid tar warnings on MS-DOS
+
+TESTS = \
+align-1.tst \
+backup.tst \
+contrib.tst \
+cut.tst \
+deleg-1.tst \
+deleg-2.tst \
+encoding.tst \
+guess-1.tst \
+guess-2.tst \
+inline.tst \
+inout-1.tst \
+inout-2.tst \
+inout-3.tst \
+options-1.tst \
+pages-1.tst \
+pages-2.tst \
+po.tst \
+printers.tst \
+prolog-1.tst \
+prolog-2.tst \
+strip.tst \
+styles.tst \
+toc.tst \
+usropt-1.tst \
+usropt-2.tst
+
+EXTRA_DIST = $(TESTS) a2ps-tst.cfg.in defs.in \
+view-diff ps-ref gps-ref tstfiles
+
+CLEANFILES = ps-chk/* gps-chk/* ps-diff/* gps-diff/* \
+style.log defs
+
+MAINTAINERCLEANFILES = ps-ref/* gps-ref/*
+
+all-local: defs a2ps-tst.cfg
+
+a2ps-tst.cfg: a2ps-tst.cfg.in
+ top_srcdir=`cd $(top_srcdir) && pwd`; \
+ top_builddir=`cd $(top_builddir) && pwd`; \
+ sed -e "s#@libpath@#$$top_builddir/etc:$$top_srcdir/ogonkify:$$top_builddir/ogonkify:$$top_srcdir/sheets:$$top_srcdir/ps:$$top_srcdir/encoding:$$top_srcdir/afm:$$top_builddir/afm:$$top_srcdir/fonts:$$top_srcdir/ppd:$(PSFONT_PATH)#g;s#@file_link@#@FILE_LINK@#g" \
+ $(srcdir)/a2ps-tst.cfg.in > a2ps-tst.cfg
+
+DISTCLEANFILES = a2ps-tst.cfg
+
+TESTS_ENVIRONMENT= top_builddir=`cd $(top_builddir) && pwd`
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..c5eeb89
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,541 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+# .tst instead of .test to avoid tar warnings on MS-DOS
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/defs.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/a2_psutils.m4 \
+ $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/file.m4 \
+ $(top_srcdir)/m4/fp_echo.m4 $(top_srcdir)/m4/fullpath.m4 \
+ $(top_srcdir)/m4/gccwarn.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gperf-check.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \
+ $(top_srcdir)/m4/lex.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libpaper.m4 $(top_srcdir)/m4/lpr.m4 \
+ $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/malloc.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/perl.m4 $(top_srcdir)/m4/prereq.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/protos.m4 \
+ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/rename.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcasecmp.m4 \
+ $(top_srcdir)/m4/strftim.m4 $(top_srcdir)/m4/termios.m4 \
+ $(top_srcdir)/m4/tterm.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/winsz.m4 \
+ $(top_srcdir)/m4/xstrtoumax.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/auxdir/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = defs
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COM_DISPLAY = @COM_DISPLAY@
+COM_LATEX = @COM_LATEX@
+COM_PS2PDF = @COM_PS2PDF@
+COM_PSUTILS = @COM_PSUTILS@
+COM_TEXI = @COM_TEXI@
+COM_acroread = @COM_acroread@
+COM_acroread4 = @COM_acroread4@
+COM_bzip = @COM_bzip@
+COM_bzip2 = @COM_bzip2@
+COM_convert = @COM_convert@
+COM_distill = @COM_distill@
+COM_dvips = @COM_dvips@
+COM_ghostview = @COM_ghostview@
+COM_grog = @COM_grog@
+COM_gv = @COM_gv@
+COM_gzip = @COM_gzip@
+COM_html2ps = @COM_html2ps@
+COM_latex = @COM_latex@
+COM_makeinfo = @COM_makeinfo@
+COM_netscape = @COM_netscape@
+COM_pdf2ps = @COM_pdf2ps@
+COM_ps2pdf = @COM_ps2pdf@
+COM_psnup = @COM_psnup@
+COM_psselect = @COM_psselect@
+COM_tex = @COM_tex@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMACS = @EMACS@
+EMACSLOADPATH = @EMACSLOADPATH@
+ENCODING = @ENCODING@
+EXEEXT = @EXEEXT@
+EXTENSIONS_FALSE = @EXTENSIONS_FALSE@
+EXTENSIONS_TRUE = @EXTENSIONS_TRUE@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILE_LINK = @FILE_LINK@
+GMSGFMT = @GMSGFMT@
+GNU_PACKAGE = @GNU_PACKAGE@
+GPERF = @GPERF@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVERSION = @LIBVERSION@
+LN_S = @LN_S@
+LPR = @LPR@
+LPR_QUEUE_OPTION = @LPR_QUEUE_OPTION@
+LTALLOCA = @LTALLOCA@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+M4 = @M4@
+MAKEINFO = @MAKEINFO@
+MEDIUM = @MEDIUM@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PSFONT_PATH = @PSFONT_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+U = @U@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+acroread = @acroread@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+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 = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+bzip = @bzip@
+bzip2 = @bzip2@
+convert = @convert@
+datadir = @datadir@
+datarootdir = @datarootdir@
+distill = @distill@
+docdir = @docdir@
+dvidir = @dvidir@
+dvips = @dvips@
+exec_prefix = @exec_prefix@
+file_prog = @file_prog@
+ghostview = @ghostview@
+grog = @grog@
+gv = @gv@
+gzip = @gzip@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+html2ps = @html2ps@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+latex = @latex@
+libdir = @libdir@
+libexecdir = @libexecdir@
+lispdir = @lispdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+makeinfo = @makeinfo@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+netscape = @netscape@
+oldincludedir = @oldincludedir@
+pdf2ps = @pdf2ps@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+ps2pdf = @ps2pdf@
+psdir = @psdir@
+psnup = @psnup@
+psselect = @psselect@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+tex = @tex@
+TESTS = \
+align-1.tst \
+backup.tst \
+contrib.tst \
+cut.tst \
+deleg-1.tst \
+deleg-2.tst \
+encoding.tst \
+guess-1.tst \
+guess-2.tst \
+inline.tst \
+inout-1.tst \
+inout-2.tst \
+inout-3.tst \
+options-1.tst \
+pages-1.tst \
+pages-2.tst \
+po.tst \
+printers.tst \
+prolog-1.tst \
+prolog-2.tst \
+strip.tst \
+styles.tst \
+toc.tst \
+usropt-1.tst \
+usropt-2.tst
+
+EXTRA_DIST = $(TESTS) a2ps-tst.cfg.in defs.in \
+view-diff ps-ref gps-ref tstfiles
+
+CLEANFILES = ps-chk/* gps-chk/* ps-diff/* gps-diff/* \
+style.log defs
+
+MAINTAINERCLEANFILES = ps-ref/* gps-ref/*
+DISTCLEANFILES = a2ps-tst.cfg
+TESTS_ENVIRONMENT = top_builddir=`cd $(top_builddir) && pwd`
+all: all-am
+
+.SUFFIXES:
+$(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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/Makefile
+.PRECIOUS: 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__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ 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
+defs: $(top_builddir)/config.status $(srcdir)/defs.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$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
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile all-local
+installdirs:
+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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am all-local check check-TESTS check-am clean \
+ clean-generic clean-libtool distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-info-am
+
+
+all-local: defs a2ps-tst.cfg
+
+a2ps-tst.cfg: a2ps-tst.cfg.in
+ top_srcdir=`cd $(top_srcdir) && pwd`; \
+ top_builddir=`cd $(top_builddir) && pwd`; \
+ sed -e "s#@libpath@#$$top_builddir/etc:$$top_srcdir/ogonkify:$$top_builddir/ogonkify:$$top_srcdir/sheets:$$top_srcdir/ps:$$top_srcdir/encoding:$$top_srcdir/afm:$$top_builddir/afm:$$top_srcdir/fonts:$$top_srcdir/ppd:$(PSFONT_PATH)#g;s#@file_link@#@FILE_LINK@#g" \
+ $(srcdir)/a2ps-tst.cfg.in > a2ps-tst.cfg
+# 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:
diff --git a/tests/a2ps-tst.cfg.in b/tests/a2ps-tst.cfg.in
new file mode 100644
index 0000000..20bc803
--- /dev/null
+++ b/tests/a2ps-tst.cfg.in
@@ -0,0 +1,107 @@
+# Flags for testing a2ps -*- Makefile -*-
+
+########################################################################
+# Environment for the tests
+########################################################################
+# The path to the files _in the package_, so that a2ps does _not_ read
+# the installed files.
+LibraryPath: @libpath@
+
+# Defined by sed
+FileCommand: @file_link@
+
+########################################################################
+# Options for the tests
+########################################################################
+# Medium used for the tests
+Medium: A4 595 842
+Options: --medium=A4
+
+# Encoding is ISO Latin 1
+Options: --encoding=latin1
+
+# PostScript stuff
+Options: -1 --portrait --no-page-prefeed --sides=1
+
+# Output to stdout
+Options: --output=-
+
+# Be quiet
+Options: --quiet
+
+# No backups
+Options: --version-control=none
+
+# No delegations
+Options: --delegate=no
+
+# Set titles that cannot vary from path to path
+# Don't forget to check the tags (hence, use $t1 and $t2)
+Options: --left-title='#?2||%s.|'
+Options: --right-title='#?2|$t2|right|'
+Options: --center-title='#?1|$t1|$n|'
+Options: --footer='%A'
+Options: --left-footer=$s.
+Options: --right-footer=Right
+Options: --header='The room for the header'
+Options: --underlay='Test Files'
+
+# It's a weird idea to print the results of the test, so let's make it
+# easy for people displaying the results.
+Options: --prologue=color
+
+########################################################################
+# Variables for the tests
+########################################################################
+# A macro sequence for table of content
+Variable: toc_test \\Keyword{Table of Content}\n\
+#-1!f\
+|$2# \\keyword{$-.20n} sheets $3s< to $3s> ($2s#) pages $3p<-$3p> $4l# lines\n||\
+\\Keyword{End of toc}\n
+
+# Remove any information from the PS comments that may vary
+Variable: sedout \
+sed 's/^%%%%Creator.*/%%%%Creator: a version of a2ps/g;s/^%%%%CreationDate:.*/%%%%CreationDate: once upon a time/g;s!^/td (.*) def!/td (today) def!g'
+
+# Keep only the core of the document (not the prolog). Send to stdout.
+Variable: awkout \
+awk "/^%%%%Page:/, /^%%%%EOF$$/"
+
+# Keep only the prolog of the document. Send to stdout.
+Variable: awkin \
+awk "/^%%!/, /^%%%%EndSetup/"
+
+# Run the tests anynonously
+Variable: user.name Somebody
+Variable: user.host a machine
+
+########################################################################
+# Printers for the tests
+########################################################################
+# A printer that sed's away some details of the DSC which may
+# make look different identical PS programs.
+UnknownPrinter: | #{sedout} > #o
+
+Printer: prolog-only | #{awkin}
+Printer: awkin | #{awkin} | #{sedout}
+Printer: awkout | #{awkout}
+Printer: sedout | #{sedout}
+Printer: chk_dir | #{sedout} > ${CHK_DIR}/$N.ps
+Printer: void > /dev/null
+Printer: display | cat > #f0 && gv #f0
+Printer: bak > #{bak.file}
+
+########################################################################
+# Delegations for the tests
+########################################################################
+# A fake delegation for deleg*.tst
+Delegation: Testing test_delegation:ps echo OK
+
+########################################################################
+# UserOptions for the tests
+########################################################################
+# A simple user option
+UserOption: useroption-test --guess
+
+# The Page Label to use for the tests: the range of virtuals
+PageLabelFormat: #!s|$p-|,|
diff --git a/tests/align-1.tst b/tests/align-1.tst
new file mode 100755
index 0000000..16cf333
--- /dev/null
+++ b/tests/align-1.tst
@@ -0,0 +1,39 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps handles correctly --file-align
+# with non delegated files.
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+# Where is the test file
+TEST_FILE=$TST_DIR/3-pages.txt
+
+# Initialize the success
+failure=0
+
+for file_alignment in virtual rank page sheet 3
+do
+ # Checked and reference outputs
+ REF_FILE=$REF_DIR/al1-${file_alignment}.ps
+ CHK_FILE=$CHK_DIR/al1-${file_alignment}.ps
+
+ # The options to run a2ps with
+ OPT="-Eplain -4 --file-align=${file_alignment} -Pawkout -s2"
+
+ # Generation of the reports
+ # It must not crash
+ $verbose "testing: --file-align=${file_alignment}"
+ $CHK $OPT $TEST_FILE $TEST_FILE > $CHK_FILE 2>&5
+
+ # build the ref if not here
+ if test -f $REF_FILE; then :; else
+ $REF $OPT $TEST_FILE $TEST_FILE > $REF_FILE 2>&5
+ fi
+
+ # Compare
+ cmp -s $REF_FILE $CHK_FILE 2> /dev/null
+done
+
+exit 0
diff --git a/tests/backup.tst b/tests/backup.tst
new file mode 100755
index 0000000..f7e4776
--- /dev/null
+++ b/tests/backup.tst
@@ -0,0 +1,75 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps correctly backups only when needed
+# This test tries both -o foo.ps, and -P bak, bak being a printer
+# that saves in a file (supposed to be backup'd).
+: ${SRCDIR=.}
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# In this test, there are places where it is normal to fail.
+set +e
+
+# The output test file
+out=$tmpdir/backup.ps
+
+# The options to run with. Printer `bak' is:
+# Printer: bak > #{bak.file}
+OPT="-Eplain --version-control=simple --define=bak.file:$out"
+
+# It should first save a backup and then make the new file
+/bin/rm -f $out $out~
+: > $out
+$verbose "New file, -o, backup=simple"
+echo 1 | $CHK $OPT -o $out 2>&5 || exit 1
+test -f $out~ || exit 1
+
+/bin/rm -f $out $out~
+: > $out
+$verbose "New file, -P, backup=simple"
+echo 2 | $CHK $OPT -P bak 2>&5 || exit 1
+test -f $out~ || exit 1
+
+# It should not backup /dev/null (what is not possible, hence raises an error)
+echo 3 | $CHK $OPT -o /dev/null 2>&5 || exit 1
+
+echo 4 | $CHK $OPT -P bak --define=bak.file=/dev/null 2>&5 || exit 1
+
+# It should not succeed in backuping up a file which permissions
+# would have made output impossible. Hence, it should fail, not
+# create the backup file, nor remove the original
+/bin/rm -f $out $out~
+: > $out
+chmod 077 $out
+echo 5 | $CHK $OPT -o $out 2>&5 && exit 1
+test -f $out || exit 1
+test -f $out~ && exit 1
+
+/bin/rm -f $out $out~
+: > $out
+chmod 077 $out
+echo 6 | $CHK $OPT -P bak 2>&5 && exit 1
+test -f $out || exit 1
+test -f $out~ && exit 1
+
+# It should not backup when not required :), but succeed
+# The options to run with. Printer `bak' is:
+# Printer: bak > #{bak.file}
+OPT="-Eplain --version-control=none --define=bak.file:$out"
+
+/bin/rm -f $out $out~
+: > $out
+echo 7 | $CHK $OPT -o $out 2>&5 || exit 1
+test -f $out || exit 1
+test -f $out~ && exit 1
+
+/bin/rm -f $out $out~
+: > $out
+echo 8 | $CHK $OPT -P bak 2>&5 || exit 1
+test -f $out || exit 1
+test -f $out~ && exit 1
+
+# No need to clean up, done by trap
+exit 0
diff --git a/tests/contrib.tst b/tests/contrib.tst
new file mode 100755
index 0000000..f8f86a0
--- /dev/null
+++ b/tests/contrib.tst
@@ -0,0 +1,20 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Dummy test that verifies that there are no stupid syntax errors
+# in the contributions.
+
+. ./defs || exit 1
+
+for prog in card fixps pdiff psmandup psset
+do
+ for opt in --version --help
+ do
+ # There should be nothing on stderr, nor failing
+ $verbose "Running $prog $opt"
+ err=`${top_builddir}/contrib/$prog $opt 2>&1 1>&5` || exit 1
+ test "x$err" != x && exit 1
+ done
+done
+
+exit 0
diff --git a/tests/cut.tst b/tests/cut.tst
new file mode 100755
index 0000000..431b96e
--- /dev/null
+++ b/tests/cut.tst
@@ -0,0 +1,28 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program tests the validity of troncating option
+
+: ${SRCDIR=.}
+
+# The options to run with
+OPT="-cC1mq"
+
+# The testing file
+IN_NAME=tabulation.pre
+
+# Outputs
+OUT_NAME=cut.ps
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Run the test
+$CHK $OPT $TST_FILE -P awkout > $CHK_FILE
+if test -f $REF_FILE; then :; else
+ $REF $OPT $TST_FILE -P awkout > $REF_FILE
+fi
+
+# Return the verdict
+cmp $REF_FILE $CHK_FILE 2> /dev/null
+exit $?
diff --git a/tests/defs.in b/tests/defs.in
new file mode 100644
index 0000000..5e2d0f6
--- /dev/null
+++ b/tests/defs.in
@@ -0,0 +1,128 @@
+#! /bin/sh
+# Set the testing environment.
+
+# top_builddir is passed through the environment
+prog=a2ps
+top_srcdir=`cd @top_srcdir@ && pwd`
+top_builddir=`cd ${top_builddir-..} && pwd`
+srcdir=`cd @srcdir@ && pwd`
+builddir=$top_builddir/tests
+AWK=@AWK@
+
+echo_n='@ECHO_N@'
+echo_c='@ECHO_C@'
+
+# LC_MESSAGES is always shadowed by LC_ALL. Here are the only cases:
+# - GNU: LANGUAGE -> LC_ALL -> LC_MESSAGES -> LANG
+# - POSIX: LC_ALL -> LC_MESSAGES -> LANG
+# - XPG4: LC_ALL -> LANG
+# - SysV/XPG2: LANG
+# I saw a broken machine that does not support export LC_ALL before
+# its definition!
+LANGUAGE=C
+export LANGUAGE
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+
+# Make it read the provided resources, not that installed
+A2PS_CONFIG=$builddir/a2ps-tst.cfg
+export A2PS_CONFIG
+
+# Tell a2ps not to honor other config files than the system's
+# (here, A2PS_CONFIG)
+NO_HOME_CONF=no
+export NO_HOME_CONF
+
+# A var often used to detect failure
+failure=0
+
+# where is the tested program?
+CHK=$top_builddir/src/${prog}
+A2PS=$CHK
+export A2PS
+REF=${prog}
+
+# Here is stored the produced postscript
+REF_DIR=$srcdir/ps-ref
+CHK_DIR=$builddir/ps-chk
+REF_FILE=$REF_DIR/$OUT_NAME
+CHK_FILE=$CHK_DIR/$OUT_NAME
+
+# Here are the test files
+TST_DIR=$top_srcdir/tests/tstfiles
+TST_FILE=$TST_DIR/$IN_NAME
+# Let the user choose the set of test files at run time.
+: ${TEST_FILES="
+AppDelegate.m:objc
+InsertBlock.java:java
+a2ps.man:plain
+bookie.idl:cidl
+configure.in:autoconf
+confirm.m3:modula3
+ehandler:ps
+eplv_chkr.v:verilog
+essai2.o2c:o2c
+ex1.asn1:asn1
+ex_PSGETRS.f90:fortran
+ShellNewDummyHook.pas:pascal
+formfeed.txt:plain
+ftp2.pml:promela
+includeres:perl
+mofibida.hs:haskell
+mtvplot.octave:octave
+mutex.py:python
+pi.b:bc
+polkaIDL.hh:cxx
+prosamp.pre:pre
+psmandup:sh
+report.pre:texscript
+run-help:zsh
+s-garnam.adb:ada
+snacc.mib:mib
+space.pls:plsql
+sqlcrtbl.sql:sql
+sqlinit.ora:oracle
+sqlpq92.sql:sql92
+sqlspace.pkb:plsql
+strange.mail:mail
+symbol.pre:pre
+synopsys.setup:dc_shell
+tabulation.pre:pre
+template.e:eiffel
+typing.cl:claire
+vrcaml.ml:caml
+wide.txt:plain"}
+
+# The temp directory
+TMPDIR=${TMPDIR:-/tmp}
+tmpdir=$TMPDIR/a2$$
+
+# Remove the junk files.
+trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+
+# Make sure the directories exist
+for dir in $REF_DIR $CHK_DIR $tmpdir
+do
+ [ -d "$dir" ] || mkdir $dir
+ chmod u+wrx $dir
+done
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 a2ps' stderr
+if test yes = "$VERBOSE"; then
+ exec 5>&2
+ verbose=echo
+else
+ exec 5>/dev/null
+ verbose=:
+fi
+
+# Any kind of error should be a failure
+set -e
diff --git a/tests/deleg-1.tst b/tests/deleg-1.tst
new file mode 100755
index 0000000..87bbd78
--- /dev/null
+++ b/tests/deleg-1.tst
@@ -0,0 +1,28 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps handles correctly the delegations
+
+: ${SRCDIR=.}
+
+# The options to run with
+OPT="-ZEtest_delegation"
+
+# The testing file
+IN_NAME=report.pre
+
+# Outputs
+OUT_NAME=del.ps
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Run the test
+eval $CHK $OPT $TST_FILE -P $CHK_FILE
+if test -f $REF_FILE; then :; else
+ eval $REF $OPT $TST_FILE -P $REF_FILE
+fi
+
+# Return the verdict
+cmp $REF_FILE $CHK_FILE 2> /dev/null
+exit $?
diff --git a/tests/deleg-2.tst b/tests/deleg-2.tst
new file mode 100755
index 0000000..d15ed93
--- /dev/null
+++ b/tests/deleg-2.tst
@@ -0,0 +1,24 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps does not delegate with --delegate=no
+
+: ${SRCDIR=.}
+
+# The options to run with
+OPT="-Etest_delegation --delegate=no"
+
+# The testing file
+IN_NAME=report.pre
+
+# Outputs
+OUT_NAME=del.ps
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# a2ps should fail, saying it does not know the sheet test_delegation.ssh
+$CHK $OPT $TST_FILE -P void 2>&1 | fgrep 'cannot find style sheet' > /dev/null 2>&1
+
+# Return status of fgrep
+exit $?
diff --git a/tests/encoding.tst b/tests/encoding.tst
new file mode 100755
index 0000000..0fc8b56
--- /dev/null
+++ b/tests/encoding.tst
@@ -0,0 +1,30 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# We test the encoding support by a2ps.
+# This is done through a file which dynamically calls several
+# encodings.
+
+: ${SRCDIR=.}
+
+# The options to run with
+OPT="-Cm2"
+
+# Where is the test file
+IN_NAME=encoding.pre
+
+# Output name
+OUT_NAME=encoding.ps
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Run the test
+$CHK $OPT $TST_FILE -P $CHK_FILE || exit 1
+if test -f $REF_FILE; then :; else
+ $REF $OPT $TST_FILE -P $REF_FILE || exit 1
+fi
+
+# Return the verdict
+cmp $REF_FILE $CHK_FILE 2> /dev/null
+exit $?
diff --git a/tests/gps-ref/AppDelegate.ps b/tests/gps-ref/AppDelegate.ps
new file mode 100644
index 0000000..87af03e
--- /dev/null
+++ b/tests/gps-ref/AppDelegate.ps
@@ -0,0 +1,298 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+0 T () S
+(#import) K
+( ") p
+(AppDelegate.h) str
+(") p n
+0 T () N
+0 T () S
+(#import) K
+( <foundation/NSArray.h>) p n
+(5) # () S
+(#import) K
+( <dbkit/DBValue.h>) p n
+0 T () N
+0 T () S
+(@implementation) K
+( AppDelegate) p n
+0 T () N
+0 T () S
+(// --------------------- Constants) c n
+(10) # () N
+0 T () S
+(#define) K
+( N_FIELDS) p 24 T () S 32 T (\(8\)) N
+0 T () N
+0 T () S
+(// --------------------- Global variables) c n
+0 T () N
+(15) # () S
+(NSString) p n
+0 T ( *AppDelegateNewSetNotificationName = @") S
+(AppDelegateNewSetNotification) str
+(",) p n
+0 T ( ) S 8 T () S
+(// This is the name of the notification sent out when a new) c n
+0 T () S
+() p 8 T () S
+(// field set has been selected for manipulation.) c n
+0 T () S
+( *AppDelegateNewFieldNotificationName = @") p
+(AppDelegateNewSetNotification) str
+(";) p n
+(20) # ( ) S 8 T () S
+(// This is the name of the notification sent out when a new) c n
+0 T () S
+() p 8 T () S
+(// field has been selected for manipulation.) c n
+0 T () S
+( ) p n
+0 T () S
+(// --------------------- Class variables) c n
+0 T () N
+(25) # () S
+(static) K
+( NSMutableArray) p n
+0 T () S 8 T (*classDefaultSet = nil;) N
+0 T () S 8 T () N
+0 T () S
+(// --------------------- Methods) c n
+0 T () N
+(30) # () S
+(+ initize) K n
+0 T () S
+({) p n
+0 T ( ) S
+(// This method will be called automatically prior to any) c n
+0 T () S
+( ) p
+(// other to this class.) c n
+0 T () S
+( ) p n
+(35) # ( ) S
+(int) k
+( ) p n
+0 T ( ) S 8 T (i;) N
+0 T () S 8 T () N
+0 T ( ) S
+(// Create an array to hold the actual field objects.) c n
+0 T () S
+( classDefaultSet = [[NSMutableArray array] retain];) p n
+(40) # ( ) S 8 T () S 16 T ( ) N
+0 T ( ) N
+0 T ( ) S
+(return) K
+( ) p
+(self) K
+(;) p n
+0 T ( ) S 8 T () S 16 T ( ) N
+0 T (} ) S
+(// initize) c n
+(45) # () S
+( ) p n
+0 T () S
+(- \(id <FieldSet>\)fieldSet) K n
+0 T () S
+({) p n
+0 T ( ) S
+(// This method returns an object \(conforming to the FieldSet) c n
+0 T () S
+( ) p
+(// protocol\) which is being manipulated by this application. ) c n
+(50) # () S
+( ) p n
+0 T ( ) S
+(// If we don't have one yet...) c n
+0 T () S
+( ) p
+(if) K
+( \() p
+(\330) sy
+(myFieldSet\)) p n
+0 T ( {) N
+0 T ( ) S 8 T () S
+(// Just adopt the default one for this class.) c n
+(55) # () S
+() p 8 T ([) S
+(self) K
+( setFieldSet:\() p
+(id) k
+(\)classDefaultSet];) p n
+0 T ( }) N
+0 T ( ) N
+0 T ( ) S
+(return) K
+( myFieldSet;) p n
+0 T ( ) N
+(60) # (} ) S
+(// fieldSet) c n
+0 T () N
+0 T () S
+(- \(void\)setFieldSet:\(id <FieldSet>\)newValue) K n
+0 T () S
+({) p n
+0 T ( ) S
+(// This method sets the field set being manipulated to the one given.) c n
+(65) # () S
+( ) p
+(// If the new set differs from the old, the AppDelegateNewSet) c n
+0 T () S
+( ) p
+(// notification will be posted informing watchers of the change.) c n
+0 T () S
+( ) p n
+0 T ( ) S
+(// If the new field is the same as the old..) c n
+0 T () S
+( ) p
+(if) K
+( \(newValue EQ myFieldSet\)) p n
+(70) # ( {) N
+(AppDelegate.m) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p 8 T () S
+(return) K
+(;) p 16 T () S
+(// do nothing) c n
+0 T () S
+( } ) p n
+0 T ( ) N
+0 T ( ) S
+(// Release the old value and adopt the new.) c n
+(75) # () S
+( [newValue retain];) p n
+0 T ( ) N
+0 T ( ) S
+(// Post a notification of the change.) c n
+0 T () S
+( [[NotificationCenter defaultCenter]) p n
+0 T ( ) S 8 T (postNotificationName:AppDelegateNewSetNotificationName) N
+(80) # () S 8 T (object:myFieldSet];) N
+0 T ( ) N
+0 T (} ) S
+(// setFieldSet:) c n
+0 T () N
+0 T () S
+(- \(Field *\)selectedField) K n
+(85) # () S
+({) p n
+0 T ( ) S
+(// This method returns the field from our field set) c n
+0 T () S
+( ) p
+(// which is currently considered selected.) c n
+0 T () S
+( ) p n
+0 T ( ) S
+(// If we don't currently have a selected field...) c n
+(90) # () S
+( ) p
+(if) K
+( \() p
+(\330) sy
+(mySelectedField\)) p n
+0 T ( {) N
+0 T ( ) S 8 T () S
+(// Adopt the first field in our set.) c n
+0 T () S
+() p 8 T ([) S
+(self) K
+( setSelectedField:[[) p
+(self) K
+( fieldSet] fieldAtIndex:0]];) p n
+0 T ( }) N
+(95) # ( ) N
+0 T ( ) S
+(return) K
+( mySelectedField;) p n
+0 T ( ) N
+0 T (} ) S
+(// selectedField) c n
+0 T () N
+(100) # () S
+(- \(void\)setSelectedField:\(Field *\)newValue) K n
+0 T () S
+({) p n
+0 T ( ) S
+(// This method causes the given field to be taken as the active one.) c n
+0 T () S
+( ) p
+(// If the new field differs from the old, the AppDelegateNewField ) c n
+0 T () S
+( ) p
+(// notification will be posted informing watchers of the change.) c n
+(105) # () S
+( ) p n
+0 T ( ) S
+(// If the new field is the same as the old..) c n
+0 T () S
+( ) p
+(if) K
+( \(newValue EQ mySelectedField\)) p n
+0 T ( {) N
+0 T ( ) S 8 T () S
+(return) K
+(;) p 16 T () S
+(// do nothing) c n
+(110) # () S
+( } ) p n
+0 T ( ) N
+0 T ( ) S
+(// Release the old value and adopt the new.) c n
+0 T () S
+( [newValue retain];) p n
+0 T ( ) N
+(115) # ( ) S
+(// Post a notification of the change.) c n
+0 T () S
+( [[NotificationCenter defaultCenter]) p n
+0 T ( ) S 8 T (postNotificationName:AppDelegateNewFieldNotificationName ) N
+0 T () S 8 T (object:mySelectedField];) N
+0 T ( ) N
+(120) # (} ) S
+(// setSelectedField:) c n
+0 T () N
+0 T () S
+(@end) K n
+(AppDelegate.m) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/InsertBlock.ps b/tests/gps-ref/InsertBlock.ps
new file mode 100644
index 0000000..75dc3b7
--- /dev/null
+++ b/tests/gps-ref/InsertBlock.ps
@@ -0,0 +1,139 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (/* This code is part of Freenet. It is distributed under the GNU General) c n
+0 T ( * Public License, version 3 \(or at your option any later version\). See) N
+0 T ( * http://www.gnu.org/ for further details of the GPL. */) N
+0 T () S
+(package) K
+( freenet.client;) p n
+(5) # () N
+0 T () S
+(import) K
+( freenet.keys.FreenetURI;) p n
+0 T () S
+(import) K
+( freenet.support.api.Bucket;) p n
+0 T () N
+0 T () S
+(/**) C n
+(10) # ( * Class to contain everything needed for an insert.) N
+0 T ( */) N
+0 T () S
+(public) K
+( ) p
+(class) K
+( ) p
+(InsertBlock) L
+( {) p n
+0 T () N
+0 T () S 8 T () S
+(private) K
+( ) p
+(final) K
+( Bucket data;) p n
+(15) # () S 8 T () S
+(private) K
+( ) p
+(boolean) k
+( isFreed;) p n
+0 T () S 8 T () S
+(public) K
+( ) p
+(final) K
+( FreenetURI desiredURI;) p n
+0 T () S 8 T () S
+(public) K
+( ) p
+(final) K
+( ClientMetadata clientMetadata;) p n
+0 T () S 8 T () N
+0 T () S 8 T () S
+(public) K
+( InsertBlock\(Bucket data, ClientMetadata metadata, FreenetURI desi) p n
+0 T (redURI\) {) N
+(20) # () S 8 T () S 16 T () S
+(if) K
+(\(data ) p
+(\272) sy
+( ) p
+(null) k
+(\) ) p
+(throw) K
+( ) p
+(new) K
+( NullPointerException\(\);) p n
+0 T () S 8 T () S 16 T (this.data = data;) N
+0 T () S 8 T () S 16 T (this.isFreed = ) S
+(false) k
+(;) p n
+0 T () S 8 T () S 16 T () S
+(if) K
+(\(metadata ) p
+(\272) sy
+( ) p
+(null) k
+(\)) p n
+0 T () S 8 T () S 16 T () S 24 T (clientMetadata = ) S
+(new) K
+( ClientMetadata\(\);) p n
+(25) # () S 8 T () S 16 T () S
+(else) K n
+0 T () S
+() p 8 T () S 16 T () S 24 T (clientMetadata = metadata;) N
+0 T () S 8 T () S 16 T (this.desiredURI = desiredURI;) N
+0 T () S 8 T (}) N
+0 T () S 8 T () N
+(30) # () S 8 T () S
+(public) K
+( Bucket getData\(\) {) p n
+0 T () S 8 T () S 16 T () S
+(return) K
+( \(isFreed ? ) p
+(null) k
+( : data\);) p n
+0 T () S 8 T (}) N
+0 T () S 8 T () N
+0 T () S 8 T () S
+(public) K
+( ) p
+(void) k
+( free\(\){) p n
+(35) # () S 8 T () S 16 T () S
+(synchronized) K
+( \() p
+(this) k
+(\) {) p n
+0 T () S 8 T () S 16 T () S 24 T () S
+(if) K
+(\(isFreed\) ) p
+(return) K
+(;) p n
+0 T () S 8 T () S 16 T () S 24 T (isFreed = ) S
+(true) k
+(;) p n
+0 T () S 8 T () S 16 T (}) N
+0 T () S 8 T () S 16 T (data.free\(\);) N
+(40) # () S 8 T (}) N
+0 T (}) N
+(InsertBlock.java) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/ShellNewDummyHook.ps b/tests/gps-ref/ShellNewDummyHook.ps
new file mode 100644
index 0000000..bc4ad8d
--- /dev/null
+++ b/tests/gps-ref/ShellNewDummyHook.ps
@@ -0,0 +1,262 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ({-----------------------------------------------------------------------------) c n
+0 T (The contents of this file are subject to the GNU General Public License) N
+0 T (Version 1.1 or later \(the "License"\); you may not use this file except in) N
+0 T (compliance with the License. You may obtain a copy of the License at) N
+(5) # (http://www.gnu.org/copyleft/gpl.html) N
+0 T () N
+0 T (Software distributed under the License is distributed on an "AS IS" basis,) N
+0 T (WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for) N
+0 T (the specific language governing rights and limitations under the License.) N
+(10) # () N
+0 T (The Initial Developer of the Original Code is Michael Elsdrfer.) N
+0 T (All Rights Reserved.) N
+0 T () N
+0 T (You may retrieve the latest version of this file at the NTFS Link Homepage) N
+(15) # (located at http://www.elsdoerfer.net/ntfslink/) N
+0 T () N
+0 T (Please note:) N
+0 T (This is /not/ a real shell extension. We use this fake COM object factory to) N
+0 T (register the "ShellNew" menu items. It's just the easiest way to do this,) N
+(20) # (because the Delphi RTL will automatically call the UpdateRegistry\(\) method if) N
+0 T (a client calls DllRegisterServer.) N
+0 T (-----------------------------------------------------------------------------}) N
+0 T () N
+0 T () S
+(unit) K
+( ) p
+(ShellNewDummyHook) L
+(;) p n
+(25) # () N
+0 T () S
+(interface) l n
+0 T () N
+0 T () S
+(uses) K n
+0 T () S
+( Windows, ComObj, ActiveX;) p n
+(30) # () N
+0 T () S
+(type) K n
+0 T () S
+( TShellNewDummyHook ) p
+(\272) sy
+( class\(TComObject) p
+(\(* no interfaces needed, it's a fake! *\)) C
+(\)) p n
+0 T ( ) S
+(end) K
+(;) p n
+0 T () N
+(35) # ( TShellNewDummyFactory ) S
+(\272) sy
+( class\(TComObjectFactory\)) p n
+0 T ( public) N
+0 T ( ) S
+(procedure) K
+( ) p
+(UpdateRegistry) l
+(\(Register: ) p
+(Boolean) k
+(\); override;) p n
+0 T ( ) S
+(end) K
+(;) p n
+0 T () N
+(40) # (implementation) N
+0 T () N
+0 T () S
+(uses) K n
+0 T () S
+( ComServ, SysUtils, JclRegistry;) p n
+0 T () N
+(45) # () S
+({ TShellNewDummyFactory }) c n
+0 T () N
+0 T () S
+(procedure) K
+( ) p
+(TShellNewDummyFactory.UpdateRegistry) l
+(\(Register: ) p
+(Boolean) k
+(\);) p n
+0 T () N
+0 T ( ) S
+(procedure) K
+( ) p
+(CreateShellNewStructure) l
+(\(FileExtKey, FileClassKey,) p n
+(50) # ( DllFunctionName, ItemCaption: ) S
+(string) k
+(; IconIndex: ) p
+(Integer) k
+(\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( // Create the ) p
+(file) K
+( extension key + the "ShellNew" key) p n
+0 T ( CreateRegKey\(FileExtKey, '', FileClassKey, HKEY_CLASSES_ROOT\);) N
+0 T ( CreateRegKey\(FileExtKey + ') S
+(\\ShellNew) str
+(', ') p
+(Command) str
+(',) p n
+(55) # ( ') S
+(rundll32.exe ") str
+(' + ComServer.ServerFileName + ') p
+(",) str
+(' +) p n
+0 T ( DLLFunctionName + ') S
+( %1) str
+(',) p n
+0 T ( HKEY_CLASSES_ROOT\);) N
+0 T ( // Create the ) S
+(file) K
+( class key, + the the icon ) p
+(\331) sy
+( a command sub-key) p n
+0 T ( CreateRegKey\(FileClassKey, '', ItemCaption, HKEY_CLASSES_ROOT\);) N
+(60) # ( CreateRegKey\(FileClassKey + ') S
+(\\DefaultIcon) str
+(', '',) p n
+0 T ( ComServer.ServerFileName + ') S
+(,) str
+(' + IntToStr\(IconIndex\),) p n
+0 T ( HKEY_CLASSES_ROOT\);) N
+0 T ( CreateRegKey\(FileClassKey + ') S
+(\\Shell\\Open\\Command) str
+(', '', ') p
+(.) str
+(',) p n
+0 T ( HKEY_CLASSES_ROOT\);) N
+(65) # ( ) S
+(end) K
+(;) p n
+0 T () N
+0 T () S
+(const) K n
+0 T () S
+( HARDLINK_FILEEXT_KEY ) p
+(\272) sy
+( ') p
+(.ntfs-hardlink) str
+(';) p n
+0 T ( HARDLINK_FILECLASS_KEY ) S
+(\272) sy
+( ') p
+(NTFSLink.Hardlink) str
+(';) p n
+(70) # ( JUNCTION_FILEEXT_KEY ) S
+(\272) sy
+( ') p
+(.ntfs-junction) str
+(';) p n
+(ShellNewDummyHook.pas) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( JUNCTION_FILECLASS_KEY ) p
+(\272) sy
+( ') p
+(NTFSLink.Junction) str
+(';) p n
+0 T () S
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( Register ) p
+(then) K n
+0 T () S
+( ) p
+(begin) K n
+(75) # () S
+( CreateShellNewStructure\(HARDLINK_FILEEXT_KEY, HARDLINK_FILECLASS_KEY,) p n
+0 T ( ') S
+(NewHardlinkDlg) str
+(', ') p
+(NTFS Hardlink) str
+(', 0\);) p n
+0 T ( CreateShellNewStructure\(JUNCTION_FILEEXT_KEY, JUNCTION_FILECLASS_KEY,) N
+0 T ( ') S
+(NewJunctionDlg) str
+(', ') p
+(NTFS Junction Point) str
+(', 1\);) p n
+0 T ( ) S
+(end) K
+( ) p
+(else) K n
+(80) # () S
+( ) p
+(begin) K n
+0 T () S
+( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, HARDLINK_FILEEXT_KEY\); except ) p
+(end) K
+(;) p n
+0 T ( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, HARDLINK_FILECLASS_KEY\); except ) S
+(end) K
+(;) p n
+0 T ( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, JUNCTION_FILEEXT_KEY\); except ) S
+(end) K
+(;) p n
+0 T ( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, JUNCTION_FILECLASS_KEY\); except ) S
+(end) K
+(;) p n
+(85) # ( ) S
+(end) K
+(;) p n
+0 T ( ) N
+0 T ( // *NO* inherited call here, it would just make unnecessary registry entries) N
+0 T () S
+(end) K
+(;) p n
+0 T () N
+(90) # (initialization) N
+0 T ( TShellNewDummyFactory.Create\(ComServer, TShellNewDummyHook, GUID_NULL, '', '',) N
+0 T ( ciMultiInstance, tmApartment\);) N
+0 T () N
+0 T () S
+(end) K
+(.) p n
+(ShellNewDummyHook.pas) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/a2ps.ps b/tests/gps-ref/a2ps.ps
new file mode 100644
index 0000000..5bcc60a
--- /dev/null
+++ b/tests/gps-ref/a2ps.ps
@@ -0,0 +1,186 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+0 T () N
+0 T () N
+0 T (A2PS\(1L\) Misc. Reference Manual Pages A2PS\(1L\)) N
+(5) # () N
+0 T () N
+0 T () N
+0 T () S
+(NAME) K n
+0 T () S
+( a2ps - formats an ascii file for printing on a postscript) p n
+(10) # ( printer) N
+0 T () N
+0 T () S
+(SYNOPSIS) K n
+0 T () S
+( ) p
+(a2ps) K
+( [ ) p
+(global) K
+( ) p
+(options) K
+( ] [ ) p
+(positional) K
+( ) p
+(options) K
+( ] [ ) p
+(file1) k
+( [) p n
+0 T ( ) S
+(positional) K
+( ) p
+(options) K
+( ] ] ) p
+(file2) k
+( ... ] ]) p n
+(15) # () N
+0 T () S
+(DESCRIPTION) K n
+0 T () S
+( ) p
+(a2ps) k
+( formats each named file for printing in a postscript) p n
+0 T ( printer; if no file is given, ) S
+(a2ps) k
+( reads from the standard) p n
+0 T ( input. The output is sent to the printer or to stdout or to) N
+(20) # ( a file. The format used is nice and compact: normally two) N
+0 T ( pages on each physical page, borders surrounding pages,) N
+0 T ( headers with useful information \(page number, printing date,) N
+0 T ( file name or supplied header\), line numbering, keyword) N
+0 T ( highlighting, symbol substitution etc. This is very useful) N
+(25) # ( for making archive listings of programs.) N
+0 T () N
+0 T ( ) S
+(Global) K
+( ) p
+(options) K n
+0 T () S
+( Global options offered by ) p
+(a2ps) k
+( are the following:) p n
+0 T () N
+(30) # ( ) S
+(-?) K
+( ) p
+(-h) K
+( Print usage information.) p n
+0 T () N
+0 T ( ) S
+(-a) K
+( Use alternative paper size. In general defined to be) p n
+0 T ( US letter. \(see -V\).) N
+0 T () N
+(35) # ( ) S
+(-b) K
+( Force printing binary files. By default, binary files) p n
+0 T ( printing is stopped before second page \(see -nb) N
+0 T ( option\).) N
+0 T () N
+0 T ( ) S
+(-c) K
+( Compact mode for a sequence of files. This option) p n
+(40) # ( allows the printing of two files in the same physical) N
+0 T ( page: last page of the first file in the left \(or up\)) N
+0 T ( side and first page of the second file in the right) N
+0 T ( \(or down\) side. This option is valid only for twinpage) N
+0 T ( mode \(two pages per physical page\).) N
+(45) # () N
+0 T ( ) S
+(-f) K
+( Fold lines too large to be printed inside the borders) p n
+0 T ( \(default option\). Max line size depends on format and) N
+0 T ( font size used and whether line numbering has been) N
+0 T ( suppressed.) N
+(50) # () N
+0 T ( ) S
+(-h) K
+( Print usage information.) p n
+0 T () N
+0 T ( ) S
+(-I) K
+(file) k n
+0 T () S
+( Use the specified file as the postscript prologue for) p n
+(55) # ( a2ps.) N
+0 T () N
+0 T ( ) S
+(-i) K
+( Interpret TAB, BS and FF characters \(default option\).) p n
+0 T ( TAB is replaced by enough spaces to reach next tab) N
+0 T ( stop while BS and FF have their meanings.) N
+(60) # () N
+0 T () N
+0 T () N
+0 T (SunOS 5.5 Last change: 9 August 1996 1) N
+0 T () N
+(65) # (Some weird characters that exists out there are:) N
+0 T () N
+0 T (- O plus: ) S
+(\305) sy
+( and ) p
+(\305) sy n
+0 T () N
+0 T () S
+(- Copyright: ) p
+(\343) sy n
+(70) # () N
+(a2ps.man) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (- Plus or minus: ) p
+(\261) sy n
+0 T () N
+0 T () S
+(- Greater than or equal to: ) p
+(\263) sy n
+0 T () N
+(75) # () S
+(- Less than or equal to: ) p
+(\243) sy n
+0 T () N
+0 T () S
+(- Another form of ) p
+(underlining.) k
+(a2ps.man) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/bookie.ps b/tests/gps-ref/bookie.ps
new file mode 100644
index 0000000..9dde72f
--- /dev/null
+++ b/tests/gps-ref/bookie.ps
@@ -0,0 +1,320 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (/* ########################################################################) c n
+0 T () N
+0 T () S 8 T () S 16 T () S 24 T ( Bookie.idl) N
+0 T () N
+(5) # ( This program is free software; you can redistribute it and/or modify) N
+0 T ( it under the terms of the GNU General Public License as published by) N
+0 T ( the Free Software Foundation; either version 3, or \(at your option\)) N
+0 T ( any later version.) N
+0 T () N
+(10) # ( \(c\) Copyright 1999 Bob Phillips) N
+0 T () N
+0 T ( ######################################################################## */) N
+0 T () N
+0 T () S
+(#include) K
+( <IncludedIdl.idl>) p n
+(15) # () N
+0 T () S
+(#define) K
+( FIVE_BUCKS 5.00) p n
+0 T () N
+0 T () S
+(module) K
+( Bookie {) p n
+0 T () N
+(20) # () S
+(// For now, we will cheat on the date, time,) c n
+0 T (// and location. Eventually, we want to make) N
+0 T (// these real objects.) N
+0 T () S
+(typedef) K
+( ) p
+(string) k
+( Date;) p n
+0 T () S
+(typedef) K
+( ) p
+(string) k
+( Time;) p n
+(25) # () S
+(typedef) K
+( ) p
+(string) k
+( Location;) p n
+0 T () N
+0 T () S
+(exception) K
+( NoBet {};) p n
+0 T () S
+(exception) K
+( EmptyBetList{};) p n
+0 T () N
+(30) # () S 8 T () S
+(# pragma) K
+( MindlessJunk) p n
+0 T () N
+0 T () S
+(// PointSpread is a bit of a hack. We need to be able to express the) c n
+0 T (// 1/2 point push-eliminator What we will do is create an object that) N
+0 T (// can be initialized with a float/double. Any non-zero part of the) N
+(35) # (// fraction will be rounded \(up or down\) to 1/2 -- the implementation) N
+0 T (// will probably represent it as a short int \(16-bit, so, allowing 1) N
+0 T (// bit to serve as the 1/2 fraction and 1 to serve as a sign, we have) N
+0 T (// 14 bit spreads. Even in basketball, that isn't going to happen) N
+0 T (// anytime soon :^\)) N
+(40) # () N
+0 T () S
+( ) p
+(interface) K
+( PointSpread {) p n
+0 T () S 8 T () S
+(// Attributes would be the logical way to) c n
+0 T () S
+( ) p
+(// do this, but the example is short on) c n
+0 T () S
+( ) p
+(// methods... So we need to have some methods.) c n
+(45) # () S
+() p 8 T () S
+(void) k
+( ) p
+(SetSpread) l
+(\() p
+(in) K
+( ) p
+(float) k
+( spread\);) p n
+0 T () S 8 T () S
+(float) k
+( ) p
+(GetSpread) l
+(\() p
+(void) k
+(\);) p n
+0 T ( };) N
+0 T () N
+0 T () S
+(// Same sort of thing with currency. We want a Fixed representation) c n
+(50) # (// So we allow any float in. We output a Float for other purposes.) N
+0 T (// We can later add all sorts of operations.) N
+0 T () N
+0 T () S
+( ) p
+(interface) K
+( Currency {) p n
+0 T () S 8 T () S
+(attribute) K
+( ) p
+(float) k
+( amount;) p n
+(55) # ( };) N
+0 T () N
+0 T () N
+0 T () S
+(const) K
+( ) p
+(float) k
+( NICKEL_BET FIVE_BUCKS;) p n
+0 T () S
+(const) K
+( ) p
+(float) k
+( DIME_BET 10.00;) p n
+(60) # () N
+0 T ( ) S
+(interface) K
+( Team {) p n
+0 T ( ) S
+(readonly) K
+( ) p
+(attribute) K
+( ) p
+(string) k
+( name; ) p
+(// No need to change this) c n
+0 T () S
+( ) p
+(attribute) K
+( ) p
+(unsigned) k
+( ) p
+(long) k
+( wins;) p n
+0 T ( ) S
+(attribute) K
+( ) p
+(unsigned) k
+( ) p
+(long) k
+( losses;) p n
+(65) # ( };) N
+0 T () N
+0 T ( ) S
+(interface) K
+( Game {) p n
+0 T ( ) S
+(attribute) K
+( Date date;) p n
+0 T ( ) S
+(attribute) K
+( Time time;) p n
+(70) # ( ) S
+(attribute) K
+( Location location;) p n
+(bookie.idl) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( }) p n
+0 T () N
+0 T ( ) S
+(interface) K
+( Bet {) p n
+0 T () S 8 T () S
+(// If an attribute ever changes, we need to create a new Bet.) c n
+(75) # () S
+() p 8 T () S
+(// This allows for record keeping if we integrate persistent) c n
+0 T () S
+() p 8 T () S
+(// storage -- we have a record of every bet ever made.) c n
+0 T () S
+() p 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Game game;) p n
+0 T () S 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Team team;) p n
+0 T () S 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Currency amount;) p n
+(80) # ( };) N
+0 T () N
+0 T () S
+(typedef) K
+( ) p
+(sequence) k
+(<Bet> BetList;) p n
+0 T () N
+0 T ( ) S
+(interface) K
+( Customer {) p n
+(85) # ( ) S
+(readonly) K
+( ) p
+(attribute) K
+( ) p
+(string) k
+( name;) p n
+0 T ( ) S
+(attribute) K
+( ) p
+(boolean) k
+( PaidUp;) p n
+0 T ( ) S
+(void) k
+( ) p
+(AddToBetList) l
+( \() p
+(in) K
+( Bet bet\);) p n
+0 T ( ) S
+(void) k
+( ) p
+(DelFromBetList) l
+( \() p
+(in) K
+( Bet bet\)) p n
+0 T () S 8 T () S
+(raises) K
+( \(NoBet\);) p n
+(90) # ( ) S
+(void) k
+( ) p
+(SetBetlist) l
+( \() p
+(in) K
+( BetList list\);) p n
+0 T ( ) S
+(oneway) K
+( ) p
+(void) k
+( ) p
+(ClearBetList) l
+( \() p
+(void) k
+(\);) p n
+0 T ( ) S
+(void) k
+( ) p
+(FindBet) l
+(\() p
+(inout) K
+( Bet bet\) ) p
+(// Need to show an inout...) c n
+0 T () S
+() p 8 T () S
+(raises) K
+(\(NoBet\);) p n
+0 T ( ) S
+(void) k
+( ) p
+(GetBetList) l
+(\() p
+(out) K
+( BetList list\) ) p
+(// Need to show an out param...) c n
+(95) # () S
+() p 8 T () S
+(raises) K
+( \(EmptyBetList\);) p n
+0 T ( };) N
+0 T (};) N
+(bookie.idl) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/configure.ps b/tests/gps-ref/configure.ps
new file mode 100644
index 0000000..f2feab2
--- /dev/null
+++ b/tests/gps-ref/configure.ps
@@ -0,0 +1,31 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (AC_INIT) K n
+0 T (AC_FATAL) S
+(\([You are not supposed to run this file]\)) p
+(dnl) k
+( Kill the empty line.) c n
+0 T () S
+(AC_OUTPUT) K
+(configure.in) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/confirm.ps b/tests/gps-ref/confirm.ps
new file mode 100644
index 0000000..c8e357b
--- /dev/null
+++ b/tests/gps-ref/confirm.ps
@@ -0,0 +1,129 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+0 T () N
+0 T () S
+(MODULE) K
+( Confirm ) p
+(EXPORTS) K
+( Main;) p n
+0 T () N
+(5) # () S
+(IMPORT) K
+( Trestle, VBT, TextVBT, RigidVBT, ButtonVBT, BorderedVBT, HVSplit;) p n
+0 T () S
+(IMPORT) K
+( PaintOp, Pixmap, Axis;) p n
+0 T () S
+(IMPORT) K
+( ConfirmVBT;) p n
+0 T () N
+0 T () S
+(PROCEDURE) K
+( Yes \(self: ButtonVBT.T; ) p
+(READONLY) K
+( cd: VBT.MouseRec\) ) p
+(\272) sy n
+(10) # () S
+( ) p
+(BEGIN) K n
+0 T () S
+( Trestle.Delete\(main\);) p n
+0 T ( ) S
+(END) K
+( Yes;) p n
+0 T () N
+0 T () S
+(PROCEDURE) K
+( QuitAction \(self: ButtonVBT.T; ) p
+(READONLY) K
+( cd: VBT.MouseRec\) ) p
+(\272) sy n
+(15) # () S
+( ) p
+(VAR) K n
+0 T () S
+( msg := ") p
+(Do you really wish to quit?) str
+(";) p n
+0 T ( confirm := ConfirmVBT.New\(msg, Yes\);) N
+0 T ( ) S
+(BEGIN) K n
+0 T () S
+( Trestle.Install\(confirm\)) p n
+(20) # ( ) S
+(END) K
+( QuitAction;) p n
+0 T () N
+0 T () S
+(CONST) K n
+0 T () S
+( \(*) p
+( sizes for the RigidVBT ) c
+(*\)) p n
+0 T ( horz ) S
+(\272) sy
+( 30.0;) p n
+(25) # ( vert ) S
+(\272) sy
+( 10.0; \(*) p
+( size in millimeters ) c
+(*\)) p n
+0 T ( \(*) S
+( border size for text and button ) c
+(*\)) p n
+0 T ( bsize ) S
+(\272) sy
+( 1.5; \(*) p
+( size in millimeters ) c
+(*\)) p n
+0 T () N
+0 T () S
+(VAR) K n
+(30) # () S
+( blue := PaintOp.FromRGB\(0.0, 0.0, 1.0\);) p n
+0 T ( green := PaintOp.FromRGB\(0.0, 1.0, 0.0\);) N
+0 T ( text := RigidVBT.FromHV\(TextVBT.New\(") S
+(Confirm demo) str
+("\), horz, vert\);) p n
+0 T ( top := BorderedVBT.New\() N
+0 T ( text, size := bsize, op := blue, txt := Pixmap.Solid\);) N
+(35) # ( button := ButtonVBT.New\(TextVBT.New\(") S
+(Quit) str
+("\), QuitAction\);) p n
+0 T ( bottom := BorderedVBT.New\() N
+0 T ( button, size := bsize, op := green, txt := Pixmap.Gray\);) N
+0 T ( main := HVSplit.Cons\(Axis.T.Ver, top, bottom\);) N
+0 T () N
+(40) # () S
+(BEGIN) K n
+0 T () S
+( Trestle.Install\(main\);) p n
+0 T ( Trestle.AwaitDelete\(main\)) N
+0 T () S
+(END) K
+( Confirm.) p n
+0 T () N
+(45) # () N
+(confirm.m3) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/ehandler.ps b/tests/gps-ref/ehandler.ps
new file mode 100644
index 0000000..de9d77b
--- /dev/null
+++ b/tests/gps-ref/ehandler.ps
@@ -0,0 +1,430 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (%!ps) C n
+0 T () S
+(% lib/ehandler.ps -- Downloaded Error Break-page handler) c n
+0 T (% GOVERNMENT END USERS: See Notice file in TranScript library directory) N
+0 T (% -- probably /usr/lib/ps/Notice) N
+(5) # (% -- code follows this line --) N
+0 T (% assumes serverloop password is the default one) N
+0 T () S
+(/$brkpage ) p
+(where) K n
+0 T () S
+({) p
+(pop) K
+(\() p
+(Error Handler in place - not loaded again\\n) str
+(\)print flush stop}) p n
+0 T ({serverdict ) S
+(begin) K
+( statusdict ) p
+(begin) K
+( 0000 checkpassword) p n
+(10) # ( {\() S
+(Error Handler downloaded.\\n) str
+(\)print flush 0000 exitserver}) p n
+0 T ( {\() S
+(Bad Password on loading error handler!!!\\n) str
+(\)print flush stop}) p
+(ifelse) K n
+0 T () S
+(}) p
+(ifelse) K n
+0 T () S
+(/$brkpage 64 ) p
+(dict) K
+( ) p
+(def) K
+( $brkpage ) p
+(begin) K n
+0 T () S
+(/prnt) p n
+(15) # ( {) S
+(dup) K
+( type/stringtype ) p
+(\271) sy
+({=string cvs}) p
+(if) K
+( ) p
+(dup) K
+( ) p
+(length) K
+( 6 ) p
+(mul) K
+(/tx ) p
+(exch) K
+( ) p
+(def) K
+(/ty 10 ) p
+(def) K n
+0 T () S
+( currentpoint/toy ) p
+(exch) K
+( ) p
+(def) K
+(/tox ) p
+(exch) K
+( ) p
+(def) K
+( 1 ) p
+(setgray) K
+( ) p
+(newpath) K n
+0 T () S
+( tox toy 2 ) p
+(sub) K
+( ) p
+(moveto) K
+( 0 ty ) p
+(rlineto) K
+( tx 0 ) p
+(rlineto) K
+( 0 ty ) p
+(neg) K
+( ) p
+(rlineto) K n
+0 T () S
+( ) p
+(closepath) K
+( ) p
+(fill) K
+( tox toy ) p
+(moveto) K
+( 0 ) p
+(setgray) K
+( ) p
+(show) K
+(}) p
+(bind) K
+( ) p
+(def) K n
+0 T () S
+(/nl) L
+({currentpoint ) p
+(exch) K
+( ) p
+(pop) K
+( lmargin ) p
+(exch) K
+( ) p
+(moveto) K
+( 0 -10 ) p
+(rmoveto) K
+(}) p
+(def) K n
+(20) # () S
+(/=={/cp 0 ) p
+(def) K
+( typeprint nl}) p
+(def) K n
+0 T () S
+(/typeprint) L
+({) p
+(dup) K
+( type exec}readonly ) p
+(def) K n
+0 T () S
+(/lmargin 72 ) p
+(def) K n
+0 T () S
+(/rmargin 72 ) p
+(def) K n
+0 T () S
+(/tprint) p n
+(25) # ( {) S
+(dup) K
+( ) p
+(length) K
+( cp ) p
+(add) K
+( rmargin ) p
+(gt) K
+({nl/cp 0 ) p
+(def) K
+(}) p
+(if) K n
+0 T () S
+( ) p
+(dup) K
+( ) p
+(length) K
+( cp ) p
+(add) K
+(/cp ) p
+(exch) K
+( ) p
+(def) K
+( prnt}readonly ) p
+(def) K n
+0 T () S
+(/cvsprint) L
+({=string cvs tprint\() p
+( ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/integertype) L
+({cvsprint}readonly ) p
+(def) K n
+0 T () S
+(/realtype) L
+({cvsprint}readonly ) p
+(def) K n
+(30) # () S
+(/booleantype) L
+({cvsprint}readonly ) p
+(def) K n
+0 T () S
+(/operatortype) L
+({\() p
+(--) str
+(\)tprint =string cvs tprint\() p
+(-- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/marktype) L
+({) p
+(pop) K
+(\() p
+(-mark- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/dicttype) L
+({) p
+(pop) K
+(\() p
+(-dictionary- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/nulltype) L
+({) p
+(pop) K
+(\() p
+(-null- ) str
+(\)tprint}readonly ) p
+(def) K n
+(35) # () S
+(/filetype) L
+({) p
+(pop) K
+(\() p
+(-filestream- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/savetype) L
+({) p
+(pop) K
+(\() p
+(-savelevel- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/fonttype) L
+({) p
+(pop) K
+(\() p
+(-fontid- ) str
+(\)tprint}readonly ) p
+(def) K n
+0 T () S
+(/nametype) L
+({) p
+(dup) K
+( xcheck not{\() p
+(/) str
+(\)tprint}) p
+(if) K
+( cvsprint}readonly ) p
+(def) K n
+0 T () S
+(/stringtype) p n
+(40) # ( {) S
+(dup) K
+( rcheck{\() p
+(\\\() str
+(\)tprint tprint\() p
+(\\\)) str
+(\)tprint}{) p
+(pop) K
+(\() p
+(-string- ) str
+(\)tprint}) p
+(ifelse) K n
+0 T () S
+( }readonly ) p
+(def) K n
+0 T () S
+(/arraytype) p n
+0 T ( {) S
+(dup) K
+( rcheck{) p
+(dup) K
+( xcheck) p n
+0 T ( {\() S
+({) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(}) str
+(\)tprint}) p n
+(45) # ( {\() S
+([) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(]) str
+(\)tprint}) p
+(ifelse) K
+(}{) p
+(pop) K
+(\() p
+(-array- ) str
+(\)tprint}) p
+(ifelse) K n
+0 T () S
+( }readonly ) p
+(def) K n
+0 T () S
+(/packedarraytype) p n
+0 T ( {) S
+(dup) K
+( rcheck{) p
+(dup) K
+( xcheck) p n
+0 T ( {\() S
+({) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(}) str
+(\)tprint}) p n
+(50) # ( {\() S
+([) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(]) str
+(\)tprint}) p
+(ifelse) K
+(}{) p
+(pop) K
+(\() p
+(-packedarray- ) str
+(\)tprint}) p
+(ifelse) K n
+0 T () S
+( }readonly ) p
+(def) K n
+0 T () S
+(/courier/Courier ) p
+(findfont) K
+( 10 ) p
+(scalefont) K
+( ) p
+(def) K n
+0 T (end) S
+( ) p
+(%$brkpage) c n
+0 T () S
+(errordict/handleerror) p n
+(55) # ( {systemdict ) S
+(begin) K
+( $error ) p
+(begin) K
+( $brkpage ) p
+(begin) K
+( newerror) p n
+0 T ( {/newerror ) S
+(false) k
+( store) p n
+0 T ( vmstatus ) S
+(pop) K
+( ) p
+(pop) K
+( 0 ) p
+(\271) sy
+({grestoreall}) p
+(if) K
+( initgraphics courier ) p
+(setfont) K n
+0 T () S
+( lmargin 720 ) p
+(moveto) K
+(\() p
+(ERROR: ) str
+(\)prnt errorname prnt) p n
+0 T ( nl\() S
+(OFFENDING COMMAND: ) str
+(\)prnt/command load prnt) p n
+(60) # ( $error/ostack) N
+0 T ( ) S
+(known) K
+({nl nl\() p
+(STACK:) str
+(\)prnt nl nl $error/ostack ) p
+(get) K
+( aload ) p
+(length) K
+({==}repeat}) p
+(if) K n
+0 T () S
+( systemdict/) p
+(showpage) K
+( ) p
+(get) K
+( exec\() p
+(%%[ Error: ) str
+(\)print) p n
+0 T ( errorname =print\() S
+(; OffendingCommand: ) str
+(\)print/command) p n
+0 T ( load =print\() S
+( ]%%) str
+(\)= flush}) p
+(if) K
+( ) p
+(end) K
+( ) p
+(end) K
+( ) p
+(end) K
+(}) p n
+(65) # () S
+(dup) K
+( 0 systemdict ) p
+(put) K
+( ) p
+(dup) K
+( 4 $brkpage ) p
+(put) K
+( ) p
+(bind) K
+( readonly ) p
+(put) K n
+(ehandler) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/eplv_chkr.ps b/tests/gps-ref/eplv_chkr.ps
new file mode 100644
index 0000000..4266ad1
--- /dev/null
+++ b/tests/gps-ref/eplv_chkr.ps
@@ -0,0 +1,135 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (// This module checks for BDVL deasserting when BEPVL is asserted.) c n
+0 T () N
+0 T () S
+(module) K
+( epvl_chkr\(clk, bpvl, bepvl, bdvl, stop\);) p n
+0 T ( ) S
+(input) K
+( clk;) p n
+(5) # ( ) S
+(input) K
+( bpvl;) p n
+0 T ( ) S
+(input) K
+( bepvl;) p n
+0 T ( ) S
+(input) K
+( bdvl;) p n
+0 T ( ) S
+(input) K
+( stop; ) p
+(// $stop \(or $finish if BATCH\) on error) c n
+0 T () N
+(10) # () S
+(`ifdef) k
+( JUST_COUNT_PACKETS) p n
+0 T ( ) S
+(// Do nothing) c n
+0 T () S
+(`else) k n
+0 T () S
+( ) p
+(integer) K
+( status;) p n
+0 T () S
+(`endif) k
+( ) p
+(// ifdef JUST_COUNT_PACKETS) c n
+(15) # () N
+0 T () S
+( ) p
+(always) K
+( @\() p
+(posedge) K
+( clk\) ) p
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( \(!bpvl && bepvl && bdvl\) ) p
+(begin) K n
+0 T () S
+( $display\(") p
+(%%E-%M, %0t BDVL cannot be deasserted with BEPVL) str
+(",) p n
+0 T ( $time\);) N
+(20) # ( ) S
+(if) K
+( \(stop\) ) p
+(begin) K n
+0 T () S
+( #1000) p n
+0 T () S
+(`ifdef) k
+( JUST_CHECK_COUNTS) p n
+0 T ( ) S
+(// Do nothing) c n
+0 T () S
+(`else) k n
+(25) # () S
+( status = $check_counts;) p n
+0 T () S
+(`endif) k
+( ) p
+(// !ifdef JUST_CHECK_COUNTS) c n
+0 T () S
+( $display\(") p
+(%%I-%M, %0t Stopping simulation on error!) str
+(", $time\);) p n
+0 T () S
+(`ifdef) k
+( BATCH) p n
+0 T ( $finish;) N
+(30) # () S
+(`else) k n
+0 T () S
+( $stop;) p n
+0 T () S
+(`endif) k
+( ) p
+(// !ifdef BATCH) c n
+0 T () S
+( ) p
+(end) K
+( ) p
+(// if \(backplane.stop_on_error\)) c n
+0 T () N
+(35) # () S
+( ) p
+(end) K
+( ) p
+(// if \(!bpvl && bepvl && bdvl\)) c n
+0 T () S
+( ) p
+(end) K
+( ) p
+(// always @ \(posedge clk\)) c n
+0 T () N
+0 T () S
+(endmodule) K
+( ) p
+(// epvl_chkr) c n
+(eplv_chkr.v) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/essai2.ps b/tests/gps-ref/essai2.ps
new file mode 100644
index 0000000..583a7af
--- /dev/null
+++ b/tests/gps-ref/essai2.ps
@@ -0,0 +1,367 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (set options ") p
+(-I/inf/erebe/bdstag/sigbench/release/Schema/include) str
+(";) p n
+0 T (set ) S
+(schema) K
+( sigrel;) p n
+0 T (set ) S
+(base) K
+( sigrelb;) p n
+0 T () N
+(5) # (set ) S
+(application ) K
+(Index_lineaire;) L n
+0 T () N
+0 T () S
+(name) K
+( Nt_rem_oid:Tt_rem_oid;) p n
+0 T () S
+(name) K
+( Ns_rem_oid:set \(Tt_rem_oid\);) p n
+0 T () S
+(name) K
+( No_JS_feuilleA:C_Feuille;) p n
+(10) # () S
+(name) K
+( No_JS_feuilleB:C_Feuille;) p n
+0 T () S
+(name) K
+( Ns_JS_jointure_cles:set \(tuple \(cleA:string, cleB:string\)\);) p n
+0 T () S
+(function) K n
+0 T () S
+(F_JS_big_theta \(Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid\):boolean;) p n
+0 T ( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_big_theta \(Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid\):boolean) p n
+(15) # ({) N
+0 T () S
+(/* test si "a intersecte b \(sens strict\)" */) c n
+0 T () S
+( ) p
+(return) K
+( \(\(Pt_a.Ai_xmin < Pt_b.Ai_xmax\)) p n
+0 T () S 8 T ( ) S
+(\331) sy
+( \(Pt_a.Ai_ymin < Pt_b.Ai_ymax\)) p n
+0 T () S 8 T ( ) S
+(\331) sy
+( \(Pt_a.Ai_xmax > Pt_b.Ai_xmin\) ) p
+(\331) sy
+( \(Pt_a.Ai_ymax > Pt_b.Ai_ymin\)\);) p n
+(20) # (};) N
+0 T () S
+(function) K n
+0 T () S
+(F_JS_existe_cle \(Pc_cleA:string, Pc_cleB:string\):boolean;) p n
+0 T ( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_existe_cle \(Pc_cleA:string, Pc_cleB:string\):boolean) p n
+0 T ({) N
+(25) # () S
+(#include) K
+( ") p
+(varextbis.h) str
+(") p n
+0 T () N
+0 T ( Handle poign_root, poign_objet_final, *poign_cle;) N
+0 T ( Scan *scan_index;) N
+0 T ( Predicate *predicat;) N
+(30) # ( ) S
+(void) k
+( *index_id;) p n
+0 T ( ) S
+(o2) K
+( string cle = ") p
+(index-racine) str
+(";) p n
+0 T () N
+0 T () S
+(/************** Fermeture du scan index et retour ******/) c n
+0 T () S
+( o2_col_scan_close \(scan_index\);) p n
+(35) # () S
+(/*printf\("sortie F_Lecture_index\\n"\);*/) c n
+0 T () S
+( printf \(") p
+( ===> feuille %s ok ...\\n) str
+(", Pc_cleA + Pc_cleB\);) p n
+0 T ( ) S
+(return) K
+( true;) p n
+0 T (};) N
+0 T () N
+(40) # () S
+(function) K n
+0 T () S
+(F_JS_get_quadrant \(Pc_cle:string, Pt_rem:Tt_rem_oid\):Tt_rem_oid;) p n
+0 T ( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_get_quadrant \(Pc_cle:string,) p n
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( Pt_rem:Tt_rem_oid\):Tt_rem_oid) N
+0 T ({) N
+(45) # ( ) S
+(o2) K
+( integer dx = \(Pt_rem.Ai_xmax - Pt_rem.Ai_xmin\) / 2;) p n
+0 T ( ) S
+(o2) K
+( integer dy = \(Pt_rem.Ai_ymax - Pt_rem.Ai_ymin\) / 2;) p n
+0 T ( ) S
+(o2) K
+( integer i;) p n
+0 T ( ) S
+(for) K
+( \(i = 0; i < count \(Pc_cle\); i++\)) p n
+0 T ( {) N
+(50) # ( ) S
+(switch) K
+( \(Pc_cle[i]\)) p n
+0 T () S 8 T ({) N
+0 T () S 8 T () S
+(default) K
+(:) p n
+0 T () S 8 T ( printf \(") S
+(Nom de feuille \(%s\) erronee !!!\\n) str
+(", Pc_cle\);) p n
+0 T () S 8 T (}) N
+(55) # ( dx = dx / 2;) N
+0 T ( dy = dy / 2;) N
+0 T ( }) N
+0 T ( ) S
+(return) K
+( \(Pt_rem\);) p n
+0 T (};) N
+(60) # () N
+0 T () N
+0 T () S
+(function) K
+( F_JS_join_f \(Pc_cleA:string,) p n
+0 T () S 8 T () S 16 T ( Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid\);) N
+0 T () S
+(function) K
+( ) p
+(body) K n
+(65) # () S
+(F_JS_join_f \(Pc_cleA:string,) p n
+0 T () S 8 T ( Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid\)) N
+0 T ({) N
+0 T () S
+(#include) K
+( ") p
+(varextbis.h) str
+(") p 24 T () S 32 T () S
+(/* contexte general */) c n
+0 T () N
+(70) # () S
+( printf \(") p
+(tente \(%s,%s\) ...) str
+(", Pc_cleA, Pc_cleB\);) p n
+(essai2.o2c) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(if) K
+( \(F_JS_small_theta \(Pt_remA, Pt_remB\)\)) p n
+0 T ( {) N
+0 T ( printf \(") S
+(===> ok) str
+("\);) p n
+0 T ( Ns_JS_jointure_cles += set \(tuple \(cleA: Pc_cleA, cleB:Pc_cleB\)\);) N
+(75) # ( }) N
+0 T ( printf \(") S
+(\\n) str
+("\);) p n
+0 T ( ) S
+(return) K
+(;) p n
+0 T (};) N
+0 T (;) N
+(80) # () N
+0 T () S
+(program) K
+( private) p n
+0 T (P_JS_Lance_jointure \(Pc_quad_linA:string, Pc_quad_linB:string\)) N
+0 T ( ) S
+(in) K
+( ) p
+(application ) K
+(Index_lineaire;) L n
+0 T () S
+( ) p
+(transaction body ) K
+(P_JS_Lance_jointure \(Pc_quad_linA:string,) L n
+(85) # () S 8 T () S 16 T () S 24 T () S 32 T () S 40 T ( Pc_quad_linB:string\)) N
+0 T ( ) S
+( in application ) K
+(Index_lineaire) L n
+0 T () S
+( {) p n
+0 T () S
+(#include) K
+( ") p
+(varextbis.h) str
+(") p n
+0 T () N
+(90) # ( ) S
+(o2) K
+( Tt_def_index t_def_idxA;) p n
+0 T ( ) S
+(o2) K
+( Tt_def_index t_def_idxB;) p n
+0 T ( ) S
+(o2) K
+( Tt_def_index def_idx;) p n
+0 T () N
+0 T ( ) S
+(o2) K
+( Tt_rem_oid t_remA;) p n
+(95) # ( ) S
+(o2) K
+( Tt_rem_oid t_remB;) p n
+0 T () N
+0 T ( };) N
+0 T () N
+0 T () S
+(program) K
+( ) p
+(public) K n
+(100) # () S
+(P_JS_select \(Pc_noeud:string\)) p n
+0 T ( ) S
+(in) K
+( ) p
+(application ) K
+(Index_lineaire;) L n
+0 T () S
+( ) p
+(transaction body ) K
+(P_JS_select \(Pc_noeud:string\)) L n
+0 T ( ) S
+( in application ) K
+(Index_lineaire) L n
+0 T () S
+( {) p n
+(105) # ( ) S
+(o2) K
+( set \(C_Feuille\) Tree = set \(\);) p n
+0 T ( ) S
+(o2) K
+( C_Feuille f = nil;) p n
+0 T ( ) S
+(o2) K
+( integer reso2q = 0;) p n
+0 T ( ) S
+(o2) K
+( Tt_rem_oid rem, quadrant;) p n
+0 T ( ) S
+(o2) K
+( set \(Tt_rem_oid\) Resultat = set \(\);) p n
+(110) # ( ) S
+(o2) K
+( Tt_rem_oid Po_objet = Nt_rem_oid;) p n
+0 T ( ) S
+(o2) K
+( Tt_def_index Po_index, idx;) p n
+0 T ( ) S
+(for) K
+( \(idx ) p
+(in) K
+( Nt_indexes.Al_def_index\)) p n
+0 T () S 8 T ( ) S
+(if) K
+( \(idx.Ao_index ) p
+(\272) sy
+( No_quad_lin01\)) p n
+0 T () S 8 T ( Po_index = idx;) N
+(115) # () N
+0 T () S
+(/* Recuperation des feuilles de l'arbre */) c n
+0 T () S
+( reso2q = ) p
+(o2query) K
+( \(Tree, ") p
+(select f from f in $1) str
+(", Po_index.Ao_index\);) p n
+0 T ( ) S
+(if) K
+( \(reso2q\)) p n
+0 T () S 8 T ( {) N
+(120) # () S 8 T ( printf \(") S
+(Index vide ou inexistant ...!!!) str
+("\);) p n
+0 T () S
+(/* return set\(\);*/) c n
+0 T () S
+() p 8 T ( ) S
+(abort) K
+(;) p n
+0 T () S 8 T ( }) N
+0 T () N
+(125) # ( ) S
+(for) K
+( \(f ) p
+(in) K
+( Tree\)) p n
+0 T ( ) S
+(if) K
+( \(F_JS_small_theta \(Po_objet, rem\)) p n
+0 T ( Resultat += set \(rem\);) N
+0 T ( Ns_rem_oid = Resultat;) N
+0 T () S
+(/*return Resultat;*/) c n
+(130) # () S
+( };) p n
+0 T () N
+0 T () S
+(commit) K
+(;) p n
+0 T () S
+(quit) K
+(;) p n
+(essai2.o2c) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/ex1.ps b/tests/gps-ref/ex1.ps
new file mode 100644
index 0000000..aae1e7a
--- /dev/null
+++ b/tests/gps-ref/ex1.ps
@@ -0,0 +1,126 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (-- file: .../asn1specs/ex1.asn1) c n
+0 T (--) N
+0 T (-- This is an example ASN.1 module used in the documentation) N
+0 T (--) N
+(5) # (-- MS 92) N
+0 T (--) N
+0 T (-- Initial checkin.) N
+0 T (--) N
+0 T (-- Revision 1.2 1997/02/16 20:25:22 rj) N
+(10) # (-- check-in of a few cosmetic changes) N
+0 T (--) N
+0 T (-- Revision 1.1 1994/10/08 05:41:32 rj) N
+0 T (-- initial check-in.) N
+0 T (--) N
+(15) # () N
+0 T () S
+(EX1 ) p
+(DEFINITIONS) K
+( ::=) p n
+0 T () S
+(BEGIN) K n
+0 T () N
+0 T () S
+(anOidVal ) p
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( ::= { ) p
+(joint-iso-ccitt) k
+( 40 foobar\(29\) }) p n
+(20) # (theSameOidVal ) S
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( ::= { 2 40 29 }) p n
+0 T (anIntVal ) S
+(INTEGER) K
+( ::= 1) p n
+0 T (aBoolVal ) S
+(BOOLEAN) K
+( ::= ) p
+(TRUE) K n
+0 T () N
+0 T () N
+(25) # (NULL) S
+( ::= identifier ) p
+(END) K n
+0 T () N
+0 T () S
+(T1 ::= ) p
+(SEQUENCE) K n
+0 T () S
+({) p n
+0 T ( ) S
+(INTEGER) K
+( ) p
+(OPTIONAL) K
+(,) p n
+(30) # ( ) S
+(OCTET) K
+( ) p
+(STRING) K
+( ) p
+(OPTIONAL) K
+(,) p n
+0 T ( ) S
+(ENUMERATED) K
+( { a\(0\), b\(1\), c\(2\) },) p n
+0 T ( ) S
+(SEQUENCE) K
+( ) p
+(OF) K
+( ) p
+(INTEGER) K
+(,) p n
+0 T ( ) S
+(SEQUENCE) K
+( { id ) p
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+(, value ) p
+(OCTET) K
+( ) p
+(STRING) K
+( },) p n
+0 T ( ) S
+(CHOICE) K
+( { ) p
+(INTEGER) K
+(, ) p
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( }) p n
+(35) # ( DESCRIPTION ") S
+(This is a string with a quote "" in it.) str
+(") p n
+0 T (}) N
+0 T () N
+0 T () S
+(END) K n
+(ex1.asn1) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/ex_PSGETRS.ps b/tests/gps-ref/ex_PSGETRS.ps
new file mode 100644
index 0000000..ab29f2a
--- /dev/null
+++ b/tests/gps-ref/ex_PSGETRS.ps
@@ -0,0 +1,723 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (! Gilles GRASSEAU \(CNRS/IDRIS - France\) <Gilles.Grasseau@idris.fr> - Nov. 1996) c n
+0 T () N
+0 T () S
+(program) K
+( ) p
+(test_psgetrs) L n
+0 T () S
+(!-------------------------------------------------------------------) c n
+(5) # (! Description : ) N
+0 T (! Exemple de factorisation LU puis de resolution du systeme : ) N
+0 T (! A * x = b , ou A est une matrice \(5,5\). ) N
+0 T (!) N
+0 T (! Principe :) N
+(10) # (! Les matrice/vecteurs A, x et b sont globaux et les matrices/ ) N
+0 T (! vecteurs dist_a, dist_x et dist_b sont respectivement les ) N
+0 T (! matrices/vecteurs distribuees sur la grille de proc. 2x2. ) N
+0 T (! La repartition de la matrice se fait par blocs cycliques 2x2 ) N
+0 T (! \(2 elements par ligne et 2 elements par colonne - ) N
+(15) # (! voir Exemple de repartition d'une matrice\). ) N
+0 T (! La repartition des vecteurs se fait par blocs cycliques 2x1 ) N
+0 T (! \(le processeur logique \(0,0\) possede les blocs {x\(1:2\) ,x\(5\)} ) N
+0 T (! et le processeur logique \(1,0\) possede le bloc x\(3:4\) \). ) N
+0 T (!) N
+(20) # (! Algorithme :) N
+0 T (! 1 - Initialisation du BLACS et autres.) N
+0 T (! 2 - Distribution de la matrice A et du vecteur x vers les blocs ) N
+0 T (! locaux dist_a et dist_x de chaque processeur logique.) N
+0 T (! \(voir Distribution de matrice\) ) N
+(25) # (! On a simule la situation ou seul le processeur \(0,0\) possede ) N
+0 T (! la matrice et les vecteurs globaux A, x et b. ) N
+0 T (! 3 - Factorisation LU et resolution.) N
+0 T (! 4 - Recuperation et impression des resultats par le processeur) N
+0 T (! logique \(0,0\).) N
+(30) # (!) N
+0 T (! Remarque :) N
+0 T (! 1 - Le tableau de travail 'work' a ete dimensionne a la valeur) N
+0 T (! donnee par INITBUFF pour psgetrs \( > au buffer de psgetrf\).) N
+0 T (! 2 - La liste des pivots locaux 'dist_piv' est dimensionnee a ) N
+(35) # (! 'n_max' + 'rb_size'.) N
+0 T (!) N
+0 T (!-------------------------------------------------------------------) N
+0 T () S
+( ) p
+(implicit) K
+( ) p
+(none) K n
+0 T () N
+(40) # () S
+( ) p
+(integer) K
+( :: pe, npes ) p
+(! Identificateur du processeur et) c n
+0 T () S
+( ) p
+(! nombre de processeurs physiques.) c n
+0 T () N
+0 T () S
+( ) p
+(integer) K
+(, ) p
+(parameter) K
+(:: nprow=2, npcol=2 ) p
+(! Grille de proc. logiques.) c n
+0 T () S
+( ) p
+(integer) K
+( :: prow, pcol ) p
+(! Coord. de mon proc. logique) c n
+(45) # () N
+0 T () S
+( ) p
+(integer) K
+( :: icntxt ) p
+(! Contexte \(grille de procs\)) c n
+0 T () S
+( ) p
+(integer) K
+(, ) p
+(dimension) K
+(\(8\) :: desc_a ) p
+(! Descripteur de la matrice.) c n
+0 T () S
+( ) p
+(integer) K
+(, ) p
+(dimension) K
+(\(8\) :: desc_x ) p
+(! Descripteur des vecteurs.) c n
+0 T () N
+(50) # () S
+( ) p
+(integer) K
+(, ) p
+(parameter) K
+( :: n=5 ) p
+(! Ordre matrices/vecteurs.) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n,n\) :: a ) p
+(! Matrice globale a.) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n\) :: x ) p
+(! Vecteur resultat x\(global\)) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n\) :: b ) p
+(! Vecteur b \(global\)) c n
+0 T () N
+(55) # () S
+( ) p
+(integer) K
+(, ) p
+(parameter) K
+( :: n_max=3 ) p
+(! Dim. des matrices/vecteurs) c n
+0 T () S
+( ) p
+(! locaux.) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max,n_max\):: dist_a ) p
+(! Matrice locale.) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max\) :: dist_x ) p
+(! Vecteur local.) c n
+0 T () S
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max\) :: dist_b ) p
+(! Vecteur local.) c n
+(60) # () N
+0 T () S
+( ) p
+(integer) K
+(, ) p
+(parameter) K
+( :: rb_size=2, & ) p
+(! Taille des blocs lignes ) c n
+0 T () S
+( cb_size=2 ) p
+(! et colonnes.) c n
+0 T () N
+0 T () S
+( ) p
+(integer) K
+(, ) p
+(dimension) K
+(\(n_max+rb_size\):: dist_piv ) p
+(! Vecteur local des) c n
+(65) # () S
+( ) p
+(! pivots.) c n
+0 T () N
+0 T () S
+( ) p
+(integer) K
+( :: info, i, j) p n
+0 T () N
+0 T ( ) S
+(data) K
+( a/ 0.5, 0.0, 2.3, 0.0,-2.6, & ) p
+(! Coefficients de la matrice ) c n
+(70) # () S
+( 0.0, 0.5,-1.4, 0.0,-0.7, & ) p
+(! globale A.) c n
+(ex_PSGETRS.f90) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( 2.3,-1.4, 0.5, 0.0, 0.0, &) p n
+0 T ( 0.0, 0.0, 0.0, 1.0, 0.0, &) N
+0 T ( -2.6,-0.7, 0.0, 0.0, 0.5/ ) N
+0 T () N
+(75) # ( ) S
+(data) K
+( b/-2.1, 0.3, 1.5, 0.0,-1.5/ ) p
+(! Coefficients du vecteur global) c n
+0 T () N
+0 T () N
+0 T () S
+( ) p
+(integer) K
+(,) p
+(parameter) K
+(:: minb=rb_size, maxb=minb ) p
+(! Calcul de l'espace ) c n
+0 T () S
+( ) p
+(integer) K
+(,) p
+(parameter) K
+(:: minp=nprow, maxd=n ) p
+(! de travail) c n
+(80) # () S
+( ) p
+(integer) K
+(,) p
+(parameter) K
+(:: wsize=2*maxb*\(\(\(maxd/minb\)/minp\)*maxb+maxb\)*8) p n
+0 T ( ) S
+(real) K
+(, ) p
+(dimension) K
+(\(wsize/8\) :: work) p n
+0 T () N
+0 T () S
+(! Initialisation BLACS et autres.) c n
+0 T (!--------------------------------------) N
+(85) # () S
+( ) p
+(call) K
+( ) p
+(initbuff) l
+(\(work,wsize\) ) p
+(! Init. des buffers internes au PBLAS) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(blacs_pinfo) l
+(\(pe, npes\) ) p
+(! Init. mon PE, nbre de procs physiques) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(blacs_gridinit) l
+(\(icntxt, & ) p
+(! Init. Grille de proc. logiques.) c n
+0 T () S
+( ') p
+(C) str
+(', nprow, npcol\)) p n
+0 T () N
+(90) # ( ) S
+(call) K
+( ) p
+(blacs_gridinfo) l
+(\(icntxt, & ) p
+(! Mes coord. dans la grille ) c n
+0 T () S
+( nprow, npcol, prow, pcol\) ) p
+(! de processeurs logiques.) c n
+0 T () N
+0 T () S
+( ) p
+(call) K
+( ) p
+(descinit) l
+(\(desc_a, n, n, & ) p
+(! Init. descripteur de la ) c n
+0 T () S
+( rb_size, cb_size, 0, 0, & ) p
+(! matrice a) c n
+(95) # () S
+( icntxt, n_max, info\)) p n
+0 T ( ) S
+(if) K
+( \(info<0\) ) p
+(stop) K
+( ') p
+(descinit) str
+(') p n
+0 T () N
+0 T ( ) S
+(call) K
+( ) p
+(descinit) l
+(\(desc_x, n, 1, & ) p
+(! Init. descripteur du vecteur x) c n
+0 T () S
+( rb_size, 1, 0, 0, &) p n
+(100) # ( icntxt, n_max, info\) &) N
+0 T ( ) S
+(if) K
+( \(info<0\) ) p
+(stop) K
+( ') p
+(descinit) str
+(') p n
+0 T () N
+0 T () S
+(! Distribution de la matrice 'a' vers la matrice distribuee 'dist_a'.) c n
+0 T (!--------------------------------------------------------------------) N
+(105) # () S
+( ) p
+(call) K
+( ) p
+(distribue) l
+(\(icntxt, a, n, dist_a, n_max, prow, pcol\)) p n
+0 T () N
+0 T () S
+(! Distribution du vecteur 'b' sur le vecteur distribue 'dist_b'.) c n
+0 T (!------------------------------------------------------------------) N
+0 T () S
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(\331) sy
+(\(pcol==0\)\) ) p
+(then) K n
+(110) # () S
+( dist_b\(1:2\) = b\(1:2\) ) p
+(! copie de b\(1:2\) dans proc\(0,0\)) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\(icntxt,2,1, & ) p
+(! b\(3:5\) envoie au proc \(1,0\)) c n
+0 T () S
+( b\(3\),n,1,0\) ) p n
+0 T ( dist_b\(3\) = b\(5\) ) S
+(! copie de b\(5\) dans proc \(0,0\)) c n
+0 T () S
+( ) p
+(end) K
+( ) p
+(if) K n
+(115) # () S
+( ) p
+(if) K
+( \(\(prow==1\)) p
+(\331) sy
+(\(pcol==0\)\) ) p
+(then) K n
+0 T () S
+( ) p
+(call) K
+( ) p
+(sgerv2d) l
+(\(icntxt, 2,1, dist_b\(1\), & ) p
+(! reception b\(3:5\) dans ) c n
+0 T () S
+( n_max, 0, 0\) ) p
+(! dist_b\(1:2\).) c n
+0 T () S
+( ) p
+(end) K
+( ) p
+(if) K n
+0 T () N
+(120) # () S
+(! Calculs) c n
+0 T (!----------------------------------) N
+0 T () S
+( ) p
+(call) K
+( ) p
+(PSGETRF) l
+(\(n, n, dist_a, 1, 1, desc_a, &) p n
+0 T ( dist_piv, info\)) N
+0 T ( ) S
+(if) K
+( \(info ) p
+(\271) sy
+( 0\) ) p
+(print) K
+( *,') p
+(Erreur dans la factorisation : ) str
+(',info) p n
+(125) # () N
+0 T ( ) S
+(call) K
+( ) p
+(PSGETRS) l
+(\( ') p
+(N) str
+(', n, 1, dist_a, 1, 1, desc_a, &) p n
+0 T ( dist_piv, dist_b, 1, 1, desc_x, info\)) N
+0 T ( ) S
+(if) K
+( \(info ) p
+(\271) sy
+( 0\) ) p
+(print) K
+( *,') p
+(Erreur dans la resolution : ) str
+(',info) p n
+0 T () N
+(130) # () S
+(! Recuperation des resultats 'dist_b' -> 'x') c n
+0 T (!----------------------------------------------) N
+0 T () S
+( ) p
+(if) K
+( \(\(prow==1\)) p
+(\331) sy
+(\(pcol==0\)\) ) p
+(then) K n
+0 T () S
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\(icntxt,2,1,dist_b\(1\), & ) p
+(! envoie de dist_b\(1:2\) ) c n
+0 T () S
+( n_max, 0, 0\) ) p
+(! au proc \(0,0\)) c n
+(135) # () S
+( ) p
+(end) K
+( ) p
+(if) K n
+0 T () S
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(\331) sy
+(\(pcol==0\)\) ) p
+(then) K n
+0 T () S
+( x\(1:2\) = dist_b\(1:2\) ) p
+(! copie de dist_b\(1:2\) dans proc\(0,0\)) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(sgerv2d) l
+(\(icntxt,2,1, & ) p
+(! reception dist_b\(1:2\) dans x\(3:4\)) c n
+0 T () S
+( x\(3\), n, 1, 0\)) p n
+(140) # ( x\(5\) = dist_b\(3\) ) S
+(! copie de dist_b\(3\) dans proc \(0,0\)) c n
+(ex_PSGETRS.f90) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(end) K
+( ) p
+(if) K n
+0 T () N
+0 T () S
+(! Impression des resultats) c n
+0 T (!-----------------------------) N
+(145) # () S
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(\331) sy
+(\(pcol==0\)\) ) p
+(then) K n
+0 T () S
+( ) p
+(write) K
+(\(6,*\) ') p
+( resultats :) str
+(') p n
+0 T ( ) S
+(write) K
+(\(6,') p
+(\(1x,5F5.1\)) str
+('\) \(x\(j\),j=1,n\)) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () N
+(150) # (end) S
+( program) p n
+0 T () N
+0 T () S
+(!--------------------------------------------------------------------) c n
+0 T (! Distribution de la matrice 'x' vers la matrice distribuee 'dist_x'.) N
+0 T (!--------------------------------------------------------------------) N
+(155) # () S
+(subroutine) K
+( ) p
+(distribue) L
+(\( icntxt, x, n, dist_x, n_max, prow, pcol\)) p n
+0 T ( ) S
+(implicit) K
+( ) p
+(none) K n
+0 T () S
+( ) p
+(integer) K
+( :: icntxt ) p
+(! Contexte \(grille de procs\)) c n
+0 T () S
+( ) p
+(integer) K
+( :: n ) p
+(! Ordre de la matrice X) c n
+0 T () S
+( ) p
+(integer) K
+( :: n_max ) p
+(! Ordre de la matrice locale.) c n
+(160) # () S
+( ) p
+(real) K
+(,) p
+(dimension) K
+(\(n,n\):: x ) p
+(! Matrice globale X.) c n
+0 T () S
+( ) p
+(real) K
+(,) p
+(dimension) K
+(\(n_max,n_max\):: dist_x ) p
+(! Matrice locale.) c n
+0 T () S
+( ) p
+(integer) K
+( :: prow, pcol ) p
+(! Coord. de mon proc. logique) c n
+0 T () N
+0 T () S
+( ) p
+(if) K
+( \(\(prow == 0\) ) p
+(\331) sy
+( \(pcol == 0\)\) ) p
+(then) K
+( ) p
+(! Emission par le ) c n
+(165) # () S
+( ) p
+(! processeur \(0,0\)) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(1,3\), n, 0, 1\)) p n
+0 T ( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(3,1\), n, 1, 0\)) p n
+0 T ( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(3,3\), n, 1, 1\)) p n
+0 T ( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,1, x\(3,5\), n, 1, 0\)) p n
+(170) # ( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 1,2, x\(5,3\), n, 0, 1\)) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () N
+0 T () S
+( ) p
+(if) K
+( \(\(prow == 0\) ) p
+(\331) sy
+( \(pcol == 0\)\) ) p
+(then) K
+( ) p
+(! Copie des blocs ) c n
+0 T () S
+( dist_x\(1:2,1:2\) = x\(1:2,1:2\) ) p
+(! appartenant au proc\(0,0\)) c n
+(175) # () S
+( dist_x\(1:2,3\) = x\(1:2,5\)) p n
+0 T ( dist_x\(3,1:2\) = x\(5,1:2\)) N
+0 T ( dist_x\(3,3\) = x\(5,5\)) N
+0 T ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () S
+( ) p
+(! Reception par les ) c n
+(180) # () S
+( ) p
+(if) K
+( \(\(prow == 0\) ) p
+(\331) sy
+( \(pcol == 1\)\) ) p
+(then) K
+( ) p
+(! autres processeurs.) c n
+0 T () S
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+0 T ( ) S
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 1,2, dist_x\(3,1\), n_max, 0, 0\)) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () S
+( ) p
+(if) K
+( \(\(prow == 1\) ) p
+(\331) sy
+( \(pcol == 0\)\) ) p
+(then) K n
+(185) # () S
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+0 T ( ) S
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,1, dist_x\(1,3\), n_max, 0, 0\)) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () S
+( ) p
+(if) K
+( \(\(prow == 1\) ) p
+(\331) sy
+( \(pcol == 1\)\) ) p
+(then) K n
+0 T () S
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+(190) # ( ) S
+(end) K
+( ) p
+(if) K n
+0 T () N
+0 T (end) S
+( ) p
+(subroutine) K
+( ) p
+(distribue) L n
+(ex_PSGETRS.f90) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/formfeed.ps b/tests/gps-ref/formfeed.ps
new file mode 100644
index 0000000..72607eb
--- /dev/null
+++ b/tests/gps-ref/formfeed.ps
@@ -0,0 +1,153 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (1) p n
+0 T () N
+(formfeed.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (2) p n
+0 T () N
+(formfeed.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+(formfeed.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) # (5) p n
+(formfeed.txt) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+(formfeed.txt) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (6) p n
+(formfeed.txt) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (7) p n
+(formfeed.txt) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/ftp2.ps b/tests/gps-ref/ftp2.ps
new file mode 100644
index 0000000..aedf023
--- /dev/null
+++ b/tests/gps-ref/ftp2.ps
@@ -0,0 +1,1373 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (/* ) c n
+0 T ( * File Transfer Protocol ) N
+0 T ( * ) N
+0 T ( * Promela \(Protocol Meta Language\) ) N
+(5) # ( * ) N
+0 T ( * J-Ph Cottin 12/96 \(inspired by Gerard J. Holzmann\) ) N
+0 T ( */) S
+( ) p n
+0 T ( ) N
+0 T ( ) N
+(10) # () S
+(/* ) c n
+0 T ( * Global Definitions ) N
+0 T ( */) S
+( ) p n
+0 T ( ) N
+0 T () S
+(#define) K
+( LOSS 0 ) p
+(/* message loss */) c
+( ) p n
+(15) # () S
+(#define) K
+( DUPS 0 ) p
+(/* duplicate msgs */) c
+( ) p n
+0 T () S
+(#define) K
+( QSZ 2 ) p
+(/* queue size */) c
+( ) p n
+0 T ( ) N
+0 T () S
+(mtype) K
+( = { ) p n
+0 T ( red, white, blue, ) N
+(20) # ( abort, ) S
+(accept) K
+(, ack, sync_ack, close, connect, ) p n
+0 T ( create, data, eof, open, reject, sync, transfer, ) N
+0 T ( FATAL, NON_FATAL, COMPLETE ) N
+0 T ( } ) N
+0 T ( ) N
+(25) # ( ) N
+0 T () S
+(/*chan use_to_pres[2] = [QSZ] of {byte}; ) c n
+0 T (chan pres_to_use[2] = [QSZ] of {byte}; ) N
+0 T (chan pres_to_ses[2] = [QSZ] of {byte}; ) N
+0 T ( ) N
+(30) # (chan ses_to_pres[2] = [QSZ] of {byte,byte}; ) N
+0 T (chan ses_to_flow[2] = [QSZ] of {byte,byte}; ) N
+0 T (chan flow_to_ses[2] = [QSZ] of {byte,byte}; ) N
+0 T (chan dll_to_flow[2] = [QSZ] of {byte,byte}; ) N
+0 T (chan flow_to_dll[2] = [QSZ] of {byte,byte}; ) N
+(35) # ( ) N
+0 T (chan ses_to_fsrv[2] = [QSZ] of {byte}; ) N
+0 T (chan fsrv_to_ses[2] = [QSZ] of {byte}; */) N
+0 T () S
+( ) p n
+0 T () S
+(chan) k
+( use_to_pres[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+(40) # () S
+(chan) k
+( pres_to_use[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+0 T () S
+(chan) k
+( pres_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+0 T ( ) N
+0 T () S
+(chan) k
+( ses_to_pres[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+0 T () S
+(chan) k
+( ses_to_flow[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+(45) # () S
+(chan) k
+( flow_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+0 T () S
+(chan) k
+( dll_to_flow[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+0 T () S
+(chan) k
+( flow_to_dll[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+0 T ( ) N
+0 T () S
+(chan) k
+( ses_to_fsrv[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+(50) # () S
+(chan) k
+( fsrv_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+0 T ( ) N
+0 T () S
+(/* ) c n
+0 T ( * User Layer Validation Model ) N
+0 T ( */) S
+( ) p n
+(55) # ( ) N
+0 T () S
+(proctype) K
+( userprc \( ) p
+(bit) k
+( n\) ) p n
+0 T ({ ) N
+0 T ( use_to_pres[n]!transfer; ) N
+0 T ( ) S
+(if) K
+( ) p n
+(60) # ( :: pres_to_use[n]?) S
+(accept) K
+( ) p
+(\256) sy
+( ) p
+(goto) K
+( Done ) p n
+0 T ( :: pres_to_use[n]?reject ) S
+(\256) sy
+( ) p
+(goto) K
+( Done ) p n
+0 T ( :: use_to_pres[n]!abort ) S
+(\256) sy
+( ) p
+(goto) K
+( Aborted ) p n
+0 T ( ) S
+(fi) K
+(; ) p n
+0 T (Aborted: ) N
+(65) # ( ) S
+(if) K
+( ) p n
+0 T ( :: pres_to_use[n]?) S
+(accept) K
+( ) p
+(\256) sy
+( ) p
+(goto) K
+( Done ) p n
+0 T ( :: pres_to_use[n]?reject ) S
+(\256) sy
+( ) p
+(goto) K
+( Done ) p n
+0 T ( ) S
+(fi) K
+(; ) p n
+0 T (Done: ) N
+(70) # ( ) S
+(skip) K
+( ) p n
+(ftp2.pml) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( } ) p n
+0 T ( ) N
+0 T ( ) N
+0 T () S
+(/* ) c n
+(75) # ( * Presentation Layer Validation Model ) N
+0 T ( */) S
+( ) p n
+0 T ( ) N
+0 T () S
+(proctype) K
+( present\() p
+(bit) k
+( n\) ) p n
+0 T ({ ) N
+(80) # ( ) S
+(byte) k
+( status, uabort; ) p n
+0 T ( ) N
+0 T (endIDLE: ) N
+0 T ( ) S
+(do) K
+( ) p n
+0 T ( :: use_to_pres[n]?transfer ) S
+(\256) sy
+( ) p n
+(85) # ( uabort = 0; ) N
+0 T ( ) S
+(break) K
+( ) p n
+0 T ( :: use_to_pres[n]?abort ) S
+(\256) sy
+( ) p n
+0 T ( ) S
+(skip) K
+( ) p n
+0 T ( ) S
+(od) K
+(; ) p n
+(90) # ( ) N
+0 T (TRANSFER: ) N
+0 T ( pres_to_ses[n]!transfer; ) N
+0 T ( ) S
+(do) K
+( ) p n
+0 T ( :: use_to_pres[n]?abort ) S
+(\256) sy
+( ) p n
+(95) # ( ) S
+(if) K
+( ) p n
+0 T ( :: \(!uabort\) ) S
+(\256) sy
+( ) p n
+0 T ( uabort = 1; ) N
+0 T ( pres_to_ses[n]!abort ) N
+0 T ( :: \(uabort\) ) S
+(\256) sy
+( ) p n
+(100) # ( ) S
+(assert) K
+(\(1+1) p
+(\271) sy
+(2\) ) p n
+0 T ( ) S
+(fi) K
+( ) p n
+0 T ( :: ses_to_pres[n]?) S
+(accept) K
+(,0 ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(goto) K
+( DONE) p n
+0 T ( :: ses_to_pres[n]?reject\(status\) ) S
+(\256) sy n
+(105) # () S
+( ) p
+(if) K
+( ) p n
+0 T ( :: \(status ) S
+(\272) sy
+( FATAL ) p
+(\332) sy
+( uabort\) ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(goto) K
+( FAIL ) p n
+0 T ( :: \(status ) S
+(\272) sy
+( NON_FATAL ) p
+(\331) sy
+( !uabort\) ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(goto) K
+( TRANSFER ) p n
+(110) # ( ) S
+(fi) K
+( ) p n
+0 T ( ) S
+(od) K
+( ;) p n
+0 T ( ) N
+0 T (DONE: ) N
+0 T ( pres_to_use[n]!) S
+(accept) K
+(; ) p n
+(115) # ( ) S
+(goto) K
+( endIDLE; ) p n
+0 T (FAIL: ) N
+0 T ( pres_to_use[n]!reject; ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( } ) N
+(120) # ( ) N
+0 T () S
+(/* ) c n
+0 T ( * Session Layer Validation Model ) N
+0 T ( */) S
+( ) p n
+0 T ( ) N
+(125) # ( ) N
+0 T () S
+(proctype) K
+( session \() p
+(bit) k
+( n\) ) p n
+0 T ({ ) N
+0 T ( ) S
+(bit) k
+( toggle; ) p n
+0 T ( ) S
+(byte) k
+( type, status; ) p n
+(130) # ( ) N
+0 T (endIDLE: ) N
+0 T ( ) S
+(do) K
+( ) p n
+0 T ( :: pres_to_ses[n]?type ) S
+(\256) sy
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+(135) # ( :: \(type ) S
+(\272) sy
+( transfer\) ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(goto) K
+( DATA_OUT ) p n
+0 T ( :: \(type ) S
+(\271) sy
+( transfer\) ) p
+(/* ignore */) c
+( ) p n
+0 T ( ) S
+(fi) K
+( ) p n
+0 T ( :: flow_to_ses[n]?type, 0 ) S
+(\256) sy
+( ) p n
+(140) # ( ) S
+(if) K
+( ) p n
+(ftp2.pml) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( :: \(type ) p
+(\272) sy
+( connect\) ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(goto) K
+( DATA_IN ) p n
+0 T ( :: \(type ) S
+(\271) sy
+( connect\) ) p
+(/* ignore */) c
+( ) p n
+0 T ( ) S
+(fi) K
+( ) p n
+(145) # ( ) S
+(od) K
+(; ) p n
+0 T ( ) N
+0 T (DATA_IN: ) S
+(/* 1. prepare local file fsrver */) c
+( ) p n
+0 T ( ses_to_fsrv[n]!create; ) N
+0 T ( ) S
+(do) K
+( ) p n
+(150) # ( :: fsrv_to_ses[n]?reject ) S
+(\256) sy
+( ) p n
+0 T ( ses_to_flow[n]!reject,0; ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( :: fsrv_to_ses[n]?) S
+(accept) K
+( ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_flow[n]!) S
+(accept) K
+(,0; ) p n
+(155) # ( ) S
+(break) K
+( ) p n
+0 T ( ) S
+(od) K
+(; ) p n
+0 T ( ) S
+(/* 2. Receive the data, upto eof */) c
+( ) p n
+0 T ( ) S
+(do) K
+( ) p n
+0 T ( :: flow_to_ses[n]?data,0 ) S
+(\256) sy
+( ) p n
+(160) # ( ses_to_fsrv[n]!data ) N
+0 T ( :: flow_to_ses[n]?eof,0 ) S
+(\256) sy
+( ) p n
+0 T ( ses_to_fsrv[n]!eof; ) N
+0 T ( ) S
+(break) K
+( ) p n
+0 T ( :: pres_to_ses[n]?transfer ) S
+(\256) sy
+( ) p n
+(165) # ( ses_to_pres[n]!reject\(NON_FATAL\) ) N
+0 T ( :: flow_to_ses[n]?close,0 ) S
+(\256) sy
+( ) p
+(/* remote user aborted */) c
+( ) p n
+0 T ( ses_to_fsrv[n]!close; ) N
+0 T ( ) S
+(break) K
+( ) p n
+0 T ( :: ) S
+(timeout) K
+( ) p
+(\256) sy
+( ) p
+(/* got disconnect */) c
+( ) p n
+(170) # ( ses_to_fsrv[n]!close; ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( ) S
+(od) K
+(; ) p n
+0 T ( ) S
+(/* 3. Close the connection */) c
+( ) p n
+0 T ( ses_to_flow[n]!close,0; ) N
+(175) # ( ) S
+(goto) K
+( endIDLE; ) p n
+0 T ( ) N
+0 T (DATA_OUT: ) S
+(/* 1. prepare local file fsver */) c
+( ) p n
+0 T ( ses_to_fsrv[n]!open; ) N
+0 T ( ) S
+(if) K
+( ) p n
+(180) # ( :: fsrv_to_ses[n]?reject ) S
+(\256) sy
+( ) p n
+0 T ( ses_to_pres[n]!reject\(FATAL\); ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( :: fsrv_to_ses[n]?) S
+(accept) K
+( ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(skip) K
+( ) p n
+(185) # ( ) S
+(fi) K
+(; ) p n
+0 T ( ) S
+(/* 2. Initialize flow control */) c
+( ) p n
+0 T ( ses_to_flow[n]!sync,toggle; ) N
+0 T ( ) S
+(do) K
+( ) p n
+0 T ( :: ) S
+(atomic) K
+( { ) p n
+(190) # ( flow_to_ses[n]?sync_ack,type ) S
+(\256) sy
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+0 T ( :: \(type) S
+(\271) sy
+( toggle\) ) p n
+0 T ( :: \(type ) S
+(\272) sy
+( toggle\) ) p
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( ) S
+(fi) K
+( ) p n
+(195) # ( } ) N
+0 T ( :: ) S
+(timeout) K
+( ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_fsrv[n]!close; ) N
+0 T ( ses_to_pres[n]!reject\(FATAL\); ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+(200) # () S
+(od) K
+(; ) p n
+0 T ( toggle = 1 - toggle; ) N
+0 T ( ) S
+(/* 3. Prepare remote file fsrver */) c
+( ) p n
+0 T ( ses_to_flow[n]!connect,0; ) N
+0 T ( ) S
+(if) K
+( ) p n
+(205) # ( :: flow_to_ses[n]?reject,0 ) S
+(\256) sy
+( ) p n
+0 T ( ses_to_fsrv[n]!close; ) N
+0 T ( ses_to_pres[n]!reject\(FATAL\); ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( :: flow_to_ses[n]?connect,0 ) S
+(\256) sy
+( ) p n
+(210) # ( ses_to_fsrv[n]!close; ) N
+(ftp2.pml) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ses_to_pres[n]!reject\(NON_FATAL\); ) p n
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T ( :: flow_to_ses[n]?) S
+(accept) K
+(,0 ) p
+(\256) sy
+( ) p n
+0 T ( ) S
+(skip) K
+( ) p n
+(215) # ( :: ) S
+(timeout) K
+( ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_fsrv[n]!close; ) N
+0 T ( ses_to_pres[n]!reject\(FATAL\); ) N
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+0 T () S
+(fi) K
+(; ) p n
+(220) # ( ) S
+(/* 4. Transmit the data, upto eof*/) c
+( ) p n
+0 T () S
+(do) K
+( ) p n
+0 T ( :: fsrv_to_ses[n]?data ) S
+(\256) sy
+( ) p n
+0 T ( ses_to_flow[n]!data,0 ) N
+0 T ( :: fsrv_to_ses[n]?eof ) S
+(\256) sy
+( ) p n
+(225) # ( ses_to_flow[n]!eof,0; ) N
+0 T ( status = COMPLETE; ) N
+0 T ( ) S
+(break) K
+( ) p n
+0 T ( :: pres_to_ses[n]?abort ) S
+(\256) sy
+( ) p
+(/* local user aborted */) c n
+0 T () S
+( ses_to_fsrv[n]!close;) p n
+(230) # ( ses_to_flow[n]!close,0;) N
+0 T ( status = FATAL;) N
+0 T ( ) S
+(break) K n
+0 T (od) S
+(; ) p n
+0 T ( ) S
+(/* 5. Close the connexion */) c
+( ) p n
+(235) # () S
+(do) K
+( ) p n
+0 T ( :: pres_to_ses[n]?abort ) S
+(/* ignore */) c
+( ) p n
+0 T ( :: flow_to_ses[n]?close,0 ) S
+(\256) sy
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+0 T ( :: \(status ) S
+(\272) sy
+( COMPLETE\) ) p
+(\256) sy
+( ) p n
+(240) # ( ses_to_pres[n]!) S
+(accept) K
+(,0 ) p n
+0 T ( :: \(status ) S
+(\271) sy
+( COMPLETE\) ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_pres[n]!reject\(status\) ) N
+0 T ( ) S
+(fi) K
+(; ) p n
+0 T ( ) S
+(break) K
+( ) p n
+(245) # ( :: ) S
+(timeout) K
+( ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_pres[n]!reject\(FATAL\); ) N
+0 T ( ) S
+(break) K
+( ) p n
+0 T ( ) S
+(od) K
+(; ) p n
+0 T ( ) S
+(goto) K
+( endIDLE ) p n
+(250) # ( ) N
+0 T (} ) N
+0 T ( ) N
+0 T () S
+(/* ) c n
+0 T ( * File Server Validation Model ) N
+(255) # ( */) S
+( ) p n
+0 T ( ) N
+0 T () S
+(proctype) K
+( fserver \() p
+(bit) k
+( n\) ) p n
+0 T ({ ) N
+0 T ( end: ) N
+(260) # ( ) S
+(do) K
+( ) p n
+0 T ( :: ses_to_fsrv[n]?create ) S
+(\256) sy
+( ) p
+(/* incoming */) c
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+0 T ( :: fsrv_to_ses[n]!reject ) N
+0 T ( :: fsrv_to_ses[n]!) S
+(accept) K
+( ) p
+(\256) sy
+( ) p n
+(265) # ( ) S
+(do) K
+( ) p n
+0 T ( :: ses_to_fsrv[n]?data ) N
+0 T ( :: ses_to_fsrv[n]?eof ) S
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( :: ses_to_fsrv[n]?close ) S
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( ) S
+(od) K
+( ) p n
+(270) # ( ) S
+(fi) K
+( ) p n
+0 T ( :: ses_to_fsrv[n]?open ) S
+(\256) sy
+( ) p
+(/* outgoing */) c
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+0 T ( :: fsrv_to_ses[n]!reject ) N
+0 T ( :: fsrv_to_ses[n]!) S
+(accept) K
+( ) p
+(\256) sy
+( ) p n
+(275) # ( ) S
+(do) K
+( ) p n
+0 T ( :: fsrv_to_ses[n]!data ) N
+0 T ( :: fsrv_to_ses[n]!eof ) S
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( :: ses_to_fsrv[n]?close ) S
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( ) S
+(od) K
+( ) p n
+(280) # ( ) S
+(fi) K
+( ) p n
+(ftp2.pml) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(od) K
+( ) p n
+0 T (} ) N
+0 T ( ) N
+0 T () S
+(/* ) c n
+(285) # ( * Flow Control Laer Validation Model ) N
+0 T ( */) S
+( ) p n
+0 T ( ) N
+0 T () S
+(#define) K
+( true 1 ) p n
+0 T () S
+(#define) K
+( false 0 ) p n
+(290) # ( ) N
+0 T () S
+(#define) K
+( M 4 ) p
+(/* range sequence numbers */) c
+( ) p n
+0 T () S
+(#define) K
+( W 2 ) p
+(/* window size : M/2 */) c
+( ) p n
+0 T ( ) N
+0 T () S
+(proctype) K
+( fc\() p
+(bit) k
+( n\) ) p n
+(295) # ({ ) N
+0 T ( ) S
+(bool) k
+( busy[M]; ) p
+(/* outstanding messages */) c
+( ) p n
+0 T ( ) S
+(byte) k
+( q; ) p
+(/* seq# oldest unacked msg */) c
+( ) p n
+0 T ( ) S
+(byte) k
+( m; ) p
+(/* seq# last msg received */) c
+( ) p n
+0 T ( ) S
+(byte) k
+( s; ) p
+(/* seq# next msg to send */) c
+( ) p n
+(300) # ( ) S
+(byte) k
+( window; ) p
+(/* nr of outstanding msgs */) c
+( ) p n
+0 T ( ) S
+(byte) k
+( type; ) p
+(/* msg type */) c
+( ) p n
+0 T ( ) S
+(bit) k
+( received[M]; ) p
+(/* receiver housekeeping */) c
+( ) p n
+0 T ( ) S
+(bit) k
+( x; ) p
+(/* scratch variable */) c
+( ) p n
+0 T ( ) S
+(byte) k
+( p; ) p
+(/* seq# of last msg acked */) c
+( ) p n
+(305) # ( ) S
+(byte) k
+( I_buf[M], O_buf[M]; ) p
+(/* message buffers */) c
+( ) p n
+0 T ( ) N
+0 T ( ) S
+(/* sender part */) c
+( ) p n
+0 T ( end: ) N
+0 T ( ) S
+(do) K
+( ) p n
+(310) # ( :: ) S
+(atomic) K
+( { ) p n
+0 T ( \(window < W ) S
+(\331) sy
+( ) p
+(len) K
+( \(ses_to_flow [n]\) > 0 ) p n
+0 T ( ) S
+(\331) sy
+( ) p
+(len) K
+( \(flow_to_dll[n]\) < QSZ \) ) p
+(\256) sy
+( ) p n
+0 T ( ses_to_flow[n]?type,x; ) N
+0 T ( window = window +1; ) N
+(315) # ( busy[s]= true; ) N
+0 T ( O_buf[s] = type; ) N
+0 T ( flow_to_dll[n]!type, s; ) N
+0 T ( ) S
+(if) K
+( ) p n
+0 T ( :: \(type ) S
+(\271) sy
+( sync\) ) p
+(\256) sy
+( ) p n
+(320) # ( s = \(s+1\) %M ) N
+0 T ( :: \(type ) S
+(\272) sy
+( sync\) ) p
+(\256) sy
+( ) p n
+0 T ( window = 0; ) N
+0 T ( s = M; ) N
+0 T ( ) S
+(do) K
+( ) p n
+(325) # ( :: \(s > 0\) ) S
+(\256) sy
+( ) p n
+0 T ( s= s - 1; ) N
+0 T ( busy[s] = false ) N
+0 T ( :: \(s ) S
+(\272) sy
+( 0\) ) p
+(\256) sy
+( ) p
+(break) K
+( ) p n
+0 T ( ) S
+(od) K
+( ) p n
+(330) # ( ) S
+(fi) K
+( ) p n
+0 T ( } ) N
+0 T ( :: ) S
+(atomic) K
+( { ) p n
+0 T ( \(window > 0 ) S
+(\331) sy
+( busy[q] ) p
+(\272) sy
+( false\) ) p
+(\256) sy
+( ) p n
+0 T ( window = window -1; ) N
+(335) # ( q = \(q+1\) %M ) N
+0 T ( } ) N
+0 T () S
+(#if) K
+( DUPS ) p n
+0 T ( :: ) S
+(atomic) K
+( { ) p n
+0 T ( \() S
+(len) K
+(\(flow_to_dll[n]\) < QSZ ) p n
+(340) # ( ) S
+(\331) sy
+( window >0 ) p
+(\331) sy
+( busy[q] ) p
+(\272) sy
+( true\) ) p
+(\256) sy
+( ) p n
+0 T ( flow_to_dll[n]! O_buf[q], q ) N
+0 T ( } ) N
+0 T () S
+(#endif) K
+( ) p n
+0 T ( :: ) S
+(atomic) K
+( { ) p n
+(345) # ( \() S
+(timeout) K
+( ) p
+(\331) sy
+( ) p
+(len) K
+(\(flow_to_dll[n]\) < QSZ ) p n
+0 T ( ) S
+(\331) sy
+( window >0 ) p
+(\331) sy
+( busy[q] ) p
+(\272) sy
+( true\) ) p
+(\256) sy
+( ) p n
+0 T ( flow_to_dll[n]! O_buf[q], q ) N
+0 T ( } ) N
+0 T () S
+(/* receiver part */) c
+( ) p n
+(350) # () S
+(#if) K
+( LOSS ) p n
+(ftp2.pml) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( :: dll_to_flow[n]?type,m ) p
+(/* lose any message */) c
+( ) p n
+0 T () S
+(#endif) K
+( ) p n
+0 T ( :: dll_to_flow[n]?type,m ) S
+(\256) sy
+( ) p n
+0 T ( ) S
+(if) K
+( ) p n
+(355) # ( :: ) S
+(atomic) K
+({ ) p n
+0 T ( \(type ) S
+(\272) sy
+( ack\) ) p
+(\256) sy
+( ) p n
+0 T ( busy[m] = false ) N
+0 T ( } ) N
+0 T ( :: ) S
+(atomic) K
+({ ) p n
+(360) # ( \(type ) S
+(\272) sy
+( sync\) ) p
+(\256) sy
+( ) p n
+0 T ( m = 0;) N
+0 T ( ) S
+(do) K n
+0 T () S
+( :: \(m < M\) ) p
+(\256) sy n
+0 T () S
+( received[m] = 0;) p n
+(365) # ( m = m + 1) N
+0 T () S 8 T () S 16 T () S 24 T ( :: \(m ) S
+(\272) sy
+( M\) ) p
+(\256) sy n
+0 T () S
+( ) p
+(break) K n
+0 T () S
+( ) p
+(od) K
+( ) p n
+0 T ( }; ) N
+(370) # ( flow_to_dll[n]!sync_ack,0) N
+0 T () S 8 T ( :: \(type ) S
+(\272) sy
+( sync_ack\) ) p
+(\256) sy n
+0 T () S
+( flow_to_ses[n]!sync_ack,0) p n
+0 T () S 8 T ( :: \(type ) S
+(\271) sy
+( ack ) p
+(\331) sy
+( type ) p
+(\271) sy
+( sync ) p
+(\331) sy
+( type ) p
+(\271) sy
+( sync_ack\) ) p
+(\256) sy n
+0 T () S
+( ) p
+(if) K n
+(375) # () S
+( :: ) p
+(atomic) K
+( {) p n
+0 T ( \(received[m] ) S
+(\272) sy
+( true\) ) p
+(\256) sy n
+0 T () S
+( x = \(\(0 < p-m ) p
+(\331) sy
+( p-m) p
+(\243) sy
+( W\)) p n
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( ) S
+(\332) sy
+( \(0 < p-m-M ) p
+(\331) sy
+( p-m-M ) p
+(\243) sy
+(W\)\)};) p n
+0 T ( ) S
+(if) K
+( ) p n
+(380) # ( :: \(x\) ) S
+(\256) sy
+( flow_to_dll[n]!ack,m) p n
+0 T () S 8 T () S 16 T () S 24 T ( :: \(!x\) ) S
+(/* else skip */) c
+( ) p n
+0 T ( ) S
+(fi) K n
+0 T () S
+() p 8 T () S 16 T ( :: ) S
+(atomic) K
+( {) p n
+0 T ( \(received[m] ) S
+(\272) sy
+( false\) ) p
+(\256) sy n
+(385) # () S
+( I_buf[m] = type;) p n
+0 T ( received[m] = true;) N
+0 T ( received[\(m-W+M\)%M] = false) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T (}) N
+0 T ( ) S
+(fi) K n
+(390) # () S
+( ) p
+(fi) K n
+0 T () N
+0 T () S
+( :: \(received[p] ) p
+(\272) sy
+( true ) p
+(\331) sy
+( ) p
+(len) K
+(\(flow_to_ses[n]\)<QSZ) p n
+0 T ( ) S
+(\331) sy
+( ) p
+(len) K
+(\(flow_to_dll[n]\)<QSZ \) ) p
+(\256) sy n
+0 T () S
+( flow_to_ses[n]!I_buf[p],0;) p n
+(395) # ( flow_to_dll[n]!ack,p;) N
+0 T ( p = \(p+1\) % M) N
+0 T ( ) S
+(od) K n
+0 T () S
+( }) p n
+0 T () N
+(400) # () S
+(/*) c n
+0 T ( * Datalink Layer Validation Model) N
+0 T ( */) N
+0 T () N
+0 T () S
+(proctype) K
+( data_link \(\)) p n
+(405) # ({) N
+0 T () S
+(byte) k
+( type, seq;) p n
+0 T () N
+0 T (end:) N
+0 T ( ) S
+(do) K n
+(410) # () S
+() p 8 T ( :: flow_to_dll[0]?type,seq ) S
+(\256) sy n
+0 T () S
+( ) p
+(if) K n
+0 T () S
+( :: dll_to_flow[1]!type,seq) p n
+0 T () S 8 T () S 16 T ( :: ) S
+(skip) K
+( ) p
+(/* lose message */) c n
+0 T () S
+( ) p
+(fi) K n
+(415) # () S
+( :: flow_to_dll[1]?type,seq ) p
+(\256) sy n
+0 T () S
+( ) p
+(if) K n
+0 T () S
+( :: dll_to_flow[0]!type,seq) p n
+0 T () S 8 T () S 16 T ( :: ) S
+(skip) K
+( ) p
+(/* lose message */) c n
+0 T () S
+( ) p
+(fi) K n
+(420) # () S
+( ) p
+(od) K n
+(ftp2.pml) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (}) p n
+0 T () N
+0 T () S
+(/* ) c n
+0 T ( * Main Program ) N
+(425) # ( */) S
+( ) p n
+0 T ( ) N
+0 T () S
+(/*init ) c n
+0 T ( { ) N
+0 T ( atomic { ) N
+(430) # ( run userprc\(0\); run userprc\(1\); ) N
+0 T ( run present\(0\); run present\(1\); ) N
+0 T ( run session\(0\); run session\(1\); ) N
+0 T ( run fserver\(0\); run fserver\(1\); ) N
+0 T ( run fc\(0\); run fc\(1\); ) N
+(435) # ( run data_link\(\) ) N
+0 T ( } ) N
+0 T ( } ) N
+0 T ( */) N
+0 T () N
+(440) # () S
+(init) K
+( ) p n
+0 T ( { ) N
+0 T ( ) S
+(atomic) K
+( { ) p n
+0 T ( ) S
+(run) K
+( userprc\(0\); ) p n
+0 T ( ) S
+(run) K
+( present\(0\); ) p n
+(445) # ( ) S
+(run) K
+( session\(0\); ) p n
+0 T ( ) S
+(run) K
+( fserver\(0\); ) p n
+0 T ( ) S
+(run) K
+( fc\(0\); ) p n
+0 T ( ) S
+(run) K
+( data_link\(\);) p n
+0 T ( ) S
+(run) K
+( fc\(1\); ) p n
+(450) # ( ) S
+(run) K
+( fserver\(1\); ) p n
+0 T ( ) S
+(run) K
+( session\(1\); ) p n
+0 T ( ) S
+(run) K
+( present\(1\); ) p n
+0 T ( ) S
+(run) K
+( userprc\(1\); ) p n
+0 T ( } ) N
+(455) # ( } ) N
+(ftp2.pml) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/includeres.ps b/tests/gps-ref/includeres.ps
new file mode 100644
index 0000000..81e94cc
--- /dev/null
+++ b/tests/gps-ref/includeres.ps
@@ -0,0 +1,231 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#!/usr/local/bin/perl) c n
+0 T () S
+(eval) K
+( ') p
+(exec perl -S $0 "$@") str
+(') p n
+0 T () S 8 T () S
+(if) K
+( $running_under_some_shell;) p n
+0 T () N
+(5) # () S
+(# includeres: include resources in PostScript file) c n
+0 T (#) N
+0 T (# Copyright \(C\) Angus J. C. Duggan 1991-1995) N
+0 T (# See file LICENSE for details.) N
+0 T () N
+(10) # () S
+($prog = \($0 =~ ) p
+(s) K
+(=.*/==\);) p n
+0 T () N
+0 T (%extn = \(") S
+(font) str
+(", ") p
+(.pfa) str
+(", ") p
+(file) str
+(", ") p
+(.ps) str
+(", ") p
+(procset) str
+(", ") p
+(.ps) str
+(", ) p
+(# resource extns) c n
+0 T () S
+() p 8 T ( ") S
+(pattern) str
+(", ") p
+(.pat) str
+(", ") p
+(form) str
+(", ") p
+(.frm) str
+(", ") p
+(encoding) str
+(", ") p
+(.enc) str
+("\);) p n
+0 T (%type = \(") S
+(%%BeginFile:) str
+(", ") p
+(file) str
+(", ") p
+(%%BeginProcSet:) str
+(", ") p
+(procset) str
+(",) p n
+(15) # () S 8 T ( ") S
+(%%BeginFont:) str
+(", ") p
+(font) str
+("\); ) p
+(# resource types) c n
+0 T () N
+0 T () S
+(=head1 NAME) C n
+0 T () N
+0 T ( foo - script which blah ) N
+(20) # () N
+0 T (=cut) N
+0 T () N
+0 T () N
+0 T () S
+(sub) K
+( ) p
+(filename) L
+( {) p 16 T () S 24 T () S 32 T () S
+(# make filename for resource in @_) c n
+(25) # () S
+( ) p
+(local) K
+(\($name\);) p n
+0 T ( ) S
+(foreach) K
+( \(@_\) {) p 24 T () S 32 T () S
+(# sanitise name) c n
+0 T () S
+( ) p
+(s) K
+(/[!\(\)\\$\\#*&\\\\\\|\\`\\'\\"\\~\\{\\}\\[\\]\\<\\>\\?]//g;) p n
+0 T ( $name .= $_;) N
+0 T ( }) N
+(30) # ( $name =~ ) S
+(s) K
+(@.*/@@;) p 24 T () S 32 T () S
+(# drop directories) c n
+0 T () S
+( ) p
+(die) K
+( ") p
+(Filename not found for resource ) str
+(", ) p
+(join) K
+(\(") p
+( ) str
+(", @_\), ") p
+(\\n) str
+(") p n
+0 T ( ) S
+(if) K
+( $name =~ /^$/;) p n
+0 T ( $name;) N
+0 T (}) N
+(35) # () N
+0 T () S
+(while) K
+( \(<>\) {) p n
+0 T ( ) S
+(if) K
+( \(/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/\) {) p n
+0 T ( ) S
+(local) K
+(\($comment, @res\) = ) p
+(split) K
+(\(/\\s+/\);) p n
+0 T ( ) S
+(local) K
+(\($type\) = ) p
+(defined) K
+(\($type{$comment}\) ? $type{$comment} : ) p
+(shift) K
+(\(@res\);) p n
+(40) # ( ) S
+(local) K
+(\($name\) = ) p
+(&filename) l
+(\(@res\);) p n
+0 T ( ) S
+(local) K
+(\($inc\) = ") p
+(/inf/soft/infthes/demaille/include/psutils) str
+("; ) p
+(# system include directory) c n
+0 T () S
+( ) p
+(if) K
+( \() p
+(open) K
+(\(RES, $name\) || ) p
+(open) K
+(\(RES, ") p
+($name$extn{$type}) str
+("\) ||) p n
+0 T () S 8 T ( ) S
+(open) K
+(\(RES, ") p
+($inc/$name) str
+("\) || ) p
+(open) K
+(\(RES, ") p
+($inc/$name$extn{$type}) str
+("\)\) {) p n
+0 T () S 8 T ( ) S
+(while) K
+( \(<RES>\) {) p n
+(45) # () S 8 T ( ) S
+(print) K
+( $_;) p n
+0 T () S 8 T ( }) N
+0 T () S 8 T ( ) S
+(close) K
+(\(RES\);) p n
+0 T ( } ) S
+(else) K
+( {) p n
+0 T () S 8 T ( ) S
+(print) K
+( ") p
+(%%IncludeResource: ) str
+(", ) p
+(join) K
+(\(") p
+( ) str
+(", $type, @res\), ") p
+(\\n) str
+(";) p n
+(50) # () S 8 T ( ) S
+(print) K
+( STDERR ") p
+(Resource $name not found\\n) str
+(";) p n
+0 T ( }) N
+0 T ( } ) S
+(else) K
+( {) p n
+0 T ( ) S
+(print) K
+( $_;) p n
+0 T ( }) N
+(55) # (}) N
+0 T () N
+0 T () S
+(=head1 SEE ALSO) C n
+0 T () N
+0 T (blah blah. This is pod documentation.) N
+(60) # (blah blah) N
+(includeres) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/mofibida.ps b/tests/gps-ref/mofibida.ps
new file mode 100644
index 0000000..ba6b53f
--- /dev/null
+++ b/tests/gps-ref/mofibida.ps
@@ -0,0 +1,208 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#!/usr/pd/bin/runhugs) C n
+0 T () S
+({- A sample Haskell file -}) c n
+0 T () S
+(module) K
+( Test) p n
+0 T () S
+(where) K n
+(5) # (import) S
+( ) p
+(qualified) K
+( Monad) p n
+0 T () S
+(import) K
+( Prelude ) p
+(hiding) K
+( \(zip3\)) p n
+0 T () N
+0 T () S
+({-#specialise qsort :: [String]->[String] #-}) C
+( ) p
+(-- a pragma) c n
+0 T () N
+(10) # (-- Quicksort) N
+0 T () S
+(qsort :: Ord a => [a] -> [a] -- type annotation) C n
+0 T () S
+(qsort ) p
+([]) K
+( = ) p
+([]) K n
+0 T () S
+(qsort \(x) p
+(:) K
+(xs\) = qsort elts_lt_x ++ ) p
+([) K
+(x) p
+(]) K
+( ++ qsort elts_greq_x) p n
+0 T ( ) S
+(where) K n
+(15) # () S
+( elts_lt_x = ) p
+([) K
+(y | y ) p
+(\254) sy
+( xs, y < x) p
+(]) K n
+0 T () S
+( elts_greq_x = ) p
+([) K
+(y | y ) p
+(\254) sy
+( xs, y ) p
+(\263) sy
+( x) p
+(]) K n
+0 T () N
+0 T () S
+(-- Fibbonacci sequence) c n
+0 T () S
+(fib = 1 ) p
+(:) K
+( 1 ) p
+(:) K
+( ) p
+([) K
+( a+b | \(a,b\) ) p
+(\254) sy
+( zip fib \(tail fib\) ) p
+(]) K n
+(20) # () N
+0 T () S
+(-- Binary tree) c n
+0 T () S
+(data) K
+( Tree a = Branch \(Tree a\) \(Tree a\) | Leaf a) p n
+0 T () N
+0 T () S
+(-- State monad from "http://haskell.org/tutorial/monads.html") c n
+(25) # (-- note that ">>=" should not be prited as ">\\geq") N
+0 T () S
+(data) K
+( S = Tree String) p n
+0 T () S
+(data) K
+( SM a = SM \(S ) p
+(\256) sy
+( \(a,S\)\) ) p
+(-- The monadic type) c n
+0 T () S
+(instance) K
+( Monad SM ) p
+(where) K n
+0 T () S
+( ) p
+(-- defines state propagation) c n
+(30) # () S
+( SM c1 >>= fc2 = SM \(\\s0 ) p
+(\256) sy
+( ) p
+(let) K
+( \(r,s1\) = c1 s0) p n
+0 T ( SM c2 = fc2 r ) S
+(in) K n
+0 T () S
+( c2 s1\)) p n
+0 T ( return k = SM \(\\s ) S
+(\256) sy
+( \(k,s\)\)) p n
+0 T () N
+(35) # (leap = \\n ) S
+(\256) sy
+( \( \(n ) p
+(`mod`) K
+( 4 == 0\)&&\(n ) p
+(`mod`) K
+( 100 > 0\) || \(n ) p
+(`mod`) K
+( 400 == 0\)\)) p n
+0 T () N
+0 T (a<->b = a ++ ") S
+(<->) str
+(" ++ b ) p
+(-- <-> is a new binary operator) c n
+0 T () N
+0 T () S
+(infixr) K
+( 7 <-> ) p
+(-- infix declaration can be anywhere in the module) c n
+(40) # () N
+0 T (-- dark corners of Haskell syntax are not pretty-printed correctly:) N
+0 T () S
+(if) K
+(\345' = True ) p
+(-- characters outside ASCII are allowed,) c n
+0 T () S
+(\() p
+(\243) sy
+(\253\) ) p
+(\316) sy
+( String) p
+(\256) sy
+(String) p
+(\256) sy
+(String ) p
+(-- <=\253 is a valid operator name,) c n
+0 T () S
+(a ) p
+(\243) sy
+(\253 b = a++") p
+(<=<<) str
+("++b) p n
+(45) # (a |-- b = a++") S
+(|--) str
+("++b ) p
+(-- operator names can even inlude double dash,) c n
+0 T () S
+( ) p
+(-- but many compilers will confuse it with a comment) c n
+0 T () S
+(data) K
+( Pair = String ) p
+(\316) sy
+(:) K
+( String ) p
+(-- ::: is a valid constructor) c n
+0 T () S
+(\(x,) p
+(hiding) K
+(,) p
+(qualified) K
+(\) = \(0,0,0\) ) p
+(-- not actually reserved words) c n
+0 T () S
+(string_with_gaps = ") p
+(Hel\\ \\lo,\\HTwo\\) str n
+(50) # ( \\rld) S
+("++) p
+([) K
+('\\33') p
+(]) K
+( ) p
+(-- the value is "Hello,\\tworld!") c n
+(mofibida.hs) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/mtvplot.ps b/tests/gps-ref/mtvplot.ps
new file mode 100644
index 0000000..ed53d47
--- /dev/null
+++ b/tests/gps-ref/mtvplot.ps
@@ -0,0 +1,81 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (## usage mtvplot\(input,titles,filename\)) c n
+0 T (##) N
+0 T (## Outpluts graphs in MTV 1.4.1 curve2d format.) N
+0 T (##) N
+(5) # (## input: is a matrix with the ordinate in the first column,) N
+0 T (## each successive column is a separate curve to plot) N
+0 T (## on the SEPARATE axes.) N
+0 T (## titles: a list of string titles for each plot) N
+0 T (## filename: the file to store the mtv file in) N
+(10) # () N
+0 T () S
+(function) K
+( mtvplot\(input,titles,filename\)) p n
+0 T ( file=fopen\(filename,") S
+(w) str
+("\);) p n
+0 T () N
+0 T () N
+(15) # ( ) S
+(for) K
+( g=\(1:columns\(input\)-1\)) p n
+0 T ( fprintf\(file,") S
+(%s\\n) str
+(",") p
+($DATA=Curve2d) str
+("\);) p n
+0 T ( fprintf\(file,") S
+(%s %s %s\\n) str
+(",") p
+(%toplabel=\\") str
+(",titles\(g,:\),") p
+(\\") str
+("\);) p n
+0 T ( fprintf\(file,") S
+(%s\\n) str
+(",") p
+(% linetype=1) str
+("\);) p n
+0 T ( ) S
+(for) K
+( x=1:rows\(input\)) p n
+(20) # ( fprintf\(file,") S
+(%f %f\\n) str
+(",input\(x,1\),input\(x,g+1\)\);) p n
+0 T ( ) S
+(endfor) K n
+0 T () S
+( ) p
+(endfor) K n
+0 T () S
+( fclose\(file\)) p n
+0 T () S
+(endfunction) K n
+(25) # () N
+0 T () S
+( ) p n
+0 T ( ) S
+(mtvplot.octave) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/mutex.ps b/tests/gps-ref/mutex.ps
new file mode 100644
index 0000000..d02360b
--- /dev/null
+++ b/tests/gps-ref/mutex.ps
@@ -0,0 +1,163 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (# Mutual exclusion -- for use with module sched) c n
+0 T () N
+0 T (# A mutex has two pieces of state -- a 'locked' bit and a queue.) N
+0 T (# When the mutex is not locked, the queue is empty.) N
+(5) # (# Otherwise, the queue contains 0 or more \(function, argument\) pairs) N
+0 T (# representing functions \(or methods\) waiting to acquire the lock.) N
+0 T (# When the mutex is unlocked while the queue is not empty,) N
+0 T (# the first queue entry is removed and its function\(argument\) pair called,) N
+0 T (# implying it now has the lock.) N
+(10) # (#) N
+0 T (# Of course, no multi-threading is implied -- hence the funny interface) N
+0 T (# for lock, where a function is called once the lock is aquired.) N
+0 T (#) N
+0 T () S
+(class) K
+( mutex:) p n
+(15) # () S 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(# Create a new mutex -- initially unlocked) c n
+0 T () S
+() p 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(def) K
+( __init__\(self\):) p n
+0 T () S 8 T () S 16 T (self.locked = 0) N
+(20) # () S 8 T () S 16 T (self.queue = []) N
+0 T () S 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(# Test the locked bit of the mutex) c n
+0 T () S
+() p 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(def) K
+( test\(self\):) p n
+(25) # () S 8 T () S 16 T () S
+(return) K
+( self.locked) p n
+0 T () S 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(# Atomic test-and-set -- grab the lock if it is not set,) c n
+0 T () S
+() p 8 T () S
+(# return true if it succeeded) c n
+0 T () S
+() p 8 T () S
+(#) c n
+(30) # () S
+() p 8 T () S
+(def) K
+( testandset\(self\):) p n
+0 T () S 8 T () S 16 T () S
+(if) K
+( ) p
+(\330) sy
+( self.locked:) p n
+0 T () S 8 T () S 16 T () S 24 T (self.locked = 1) N
+0 T () S 8 T () S 16 T () S 24 T () S
+(return) K
+( 1) p n
+0 T () S 8 T () S 16 T () S
+(else) K
+(:) p n
+(35) # () S 8 T () S 16 T () S 24 T () S
+(return) K
+( 0) p n
+0 T () S 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(# Lock a mutex, call the function with supplied argument) c n
+0 T () S
+() p 8 T () S
+(# when it is acquired.) c n
+0 T () S
+() p 8 T () S
+(# If the mutex is already locked, place function and argument) c n
+(40) # () S
+() p 8 T () S
+(# in the queue.) c n
+0 T () S
+() p 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(def) K
+( lock\(self, function, argument\):) p n
+0 T () S 8 T () S 16 T (""") S
+(Take it.) str
+(""") p n
+0 T () S 8 T () S 16 T () S
+(if) K
+( self.testandset\(\):) p n
+(45) # () S 8 T () S 16 T () S 24 T (function\(argument\)) N
+0 T () S 8 T () S 16 T () S
+(else) K
+(:) p n
+0 T () S 8 T () S 16 T () S 24 T (self.queue.append\(\(function, argument\)\)) N
+0 T () S 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(# Unlock a mutex. If the queue is not empty, call the next) c n
+(50) # () S
+() p 8 T () S
+(# function with its argument.) c n
+0 T () S
+() p 8 T () S
+(#) c n
+0 T () S
+() p 8 T () S
+(def) K
+( unlock\(self\):) p n
+0 T () S 8 T () S 16 T (""") S
+(Release.) str
+(""") p n
+0 T () S 8 T () S 16 T () S
+(if) K
+( self.queue:) p n
+(55) # () S 8 T () S 16 T () S 24 T (function, argument = self.queue[0]) N
+0 T () S 8 T () S 16 T () S 24 T () S
+(del) K
+( self.queue[0]) p n
+0 T () S 8 T () S 16 T () S 24 T (function\(argument\)) N
+0 T () S 8 T () S 16 T () S
+(else) K
+(:) p n
+0 T () S 8 T () S 16 T () S 24 T (self.locked = 0) N
+(60) # () S 8 T () S
+(#) c n
+(mutex.py) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/pi.ps b/tests/gps-ref/pi.ps
new file mode 100644
index 0000000..fe953d1
--- /dev/null
+++ b/tests/gps-ref/pi.ps
@@ -0,0 +1,155 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (/*) c n
+0 T ( This is a program to determine the distribution of digits in the) N
+0 T ( fraction part of PI. It will look at the first scale digits.) N
+0 T () N
+(5) # ( The results are left in the global variable digits.) N
+0 T ( digits[0] is the number of 0's in PI.) N
+0 T () N
+0 T ( This program requires the math library.) N
+0 T (*/) N
+(10) # () N
+0 T () S
+(define) K
+( ) p
+(pi) L
+( \(\) {) p n
+0 T ( ) S
+(auto) K
+( ix, pi, save_scale, work;) p n
+0 T () N
+0 T ( save_scale = ) S
+(scale) K
+(;) p n
+(15) # ( ) S
+(scale) K
+( += 5;) p n
+0 T ( ) S
+(print) K
+( ") p
+(\\n\\nCalculating PI to ) str
+(",) p
+(scale) K
+(,") p
+( digits. Please wait . . .) str
+(";) p n
+0 T ( pi = 4*a\(1\);) N
+0 T ( ) S
+(scale) K
+( -= 5;) p n
+0 T ( work = pi;) N
+(20) # () N
+0 T ( ) S
+(print) K
+( ") p
+(\\nCounting digits. . .) str
+(";) p n
+0 T ( ) S
+(for) K
+( \(ix = 0; ix < 10; ix++\) digits[ix] = 0;) p n
+0 T () N
+0 T ( ) S
+(/* Extract the One's digit from pi. */) c n
+(25) # () S
+( ) p
+(scale) K
+( = 0;) p n
+0 T ( one_digit = work / 1;) N
+0 T () N
+0 T ( ) S
+(for) K
+( \(ix = save_scale; ix > 0; ix--\) {) p n
+0 T () N
+(30) # ( ) S
+(/* Remove the One's digit and multiply by 10. */) c n
+0 T () S
+( ) p
+(scale) K
+( = ix;) p n
+0 T ( work = \(work - one_digit\) / 1 * 10;) N
+0 T () N
+0 T ( ) S
+(/* Extract the One's digit. */) c n
+(35) # () S
+( ) p
+(scale) K
+( = 0;) p n
+0 T ( one_digit = work / 1;) N
+0 T () N
+0 T ( digits[one_digit] += 1;) N
+0 T ( }) N
+(40) # () N
+0 T ( ) S
+(/* Restore the scale. */) c n
+0 T () S
+( ) p
+(scale) K
+( = save_scale;) p n
+0 T () N
+0 T ( ) S
+(/* Report. */) c n
+(45) # () S
+( ) p
+(print) K
+( ") p
+(\\n\\n) str
+(") p n
+0 T ( ) S
+(print) K
+( ") p
+(PI to ) str
+(", ) p
+(scale) K
+(, ") p
+( digits is:\\n) str
+(", pi/1, ") p
+(\\n\\n) str
+(") p n
+0 T ( ) S
+(print) K
+( ") p
+(The frequency of the digits are:\\n) str
+(") p n
+0 T ( ) S
+(for) K
+( \(ix = 0; ix < 10; ix++\) {) p n
+0 T ( ) S
+(print) K
+( ") p
+( ) str
+(", ix, ") p
+( - ) str
+(", digits[ix], ") p
+( times\\n) str
+(") p n
+(50) # ( }) N
+0 T () N
+0 T ( ) S
+(print) K
+( ") p
+(\\n\\n) str
+(") p n
+0 T (}) N
+(pi.b) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/polkaIDL.ps b/tests/gps-ref/polkaIDL.ps
new file mode 100644
index 0000000..4a6a120
--- /dev/null
+++ b/tests/gps-ref/polkaIDL.ps
@@ -0,0 +1,384 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#ifndef) K
+( __polkaIDL_hh__) p n
+0 T () S
+(#define) K
+( __polkaIDL_hh__) p n
+0 T () N
+0 T () S
+(#include) K
+( <omniORB2/CORBA.h>) p n
+(5) # () N
+0 T () S
+(#include) K
+( <polkaTypes.hh>) p n
+0 T (_CORBA_MODULE polka {) N
+0 T (_CORBA_MODULE_PUBLIC) N
+0 T () N
+(10) # () S
+(#ifndef) K
+( __polka_loader__) p n
+0 T () S
+(#define) K
+( __polka_loader__) p n
+0 T ( ) S
+(class) K
+( loader;) p n
+0 T ( ) S
+(typedef) K
+( loader* loader_ptr;) p n
+0 T ( ) S
+(typedef) K
+( loader_ptr loaderRef;) p n
+(15) # () N
+0 T ( ) S
+(class) K
+( loader_Helper {) p n
+0 T ( ) S
+(public) K
+(:) p n
+0 T ( ) S
+(static) K
+( loader_ptr _nil\(\);) p n
+0 T ( ) S
+(static) K
+( CORBA::Boolean is_nil\(loader_ptr p\);) p n
+(20) # ( ) S
+(static) K
+( ) p
+(void) k
+( release\(loader_ptr p\);) p n
+0 T ( ) S
+(static) K
+( loader_ptr unmarshalObjRef\(MemBufferedStream &s\);) p n
+0 T ( };) N
+0 T ( ) S
+(typedef) K
+( _CORBA_ObjRef_Var<loader,loader_Helper> loader_var;) p n
+0 T () N
+(25) # () S
+(#endif) K n
+0 T (#define) S
+( polka_loader_IntfRepoID ") p
+(IDL:polka/loader:1.0) str
+(") p n
+0 T () N
+0 T ( ) S
+(class) K
+( _sk_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+0 T ( ) S
+(public) K
+(:) p n
+(30) # () N
+0 T ( _sk_loader\(\) {}) N
+0 T ( _sk_loader\() S
+(const) K
+( omniORB::objectKey& k\);) p n
+0 T ( ) S
+(virtual) K
+( ~_sk_loader\(\) {}) p n
+0 T ( loader_ptr _this\(\) { ) S
+(return) K
+( loader::_duplicate\() p
+(this) K
+(\); }) p n
+(35) # ( ) S
+(void) k
+( _obj_is_ready\(CORBA::BOA_ptr boa\) { boa) p
+(\256) sy
+(obj_is_ready\() p
+(this) K
+(\); }) p n
+0 T () N
+0 T ( ) S
+(protected) K
+(:) p n
+0 T ( ) S
+(virtual) K
+( ) p
+(void) k
+( *_widenFromTheMostDerivedIntf\() p
+(const) K
+( ) p
+(char) k
+( *repoId\) {) p n
+0 T ( ) S
+(return) K
+( loader::_widenFromTheMostDerivedIntf\(repoId\);) p n
+(40) # ( }) N
+0 T ( ) S
+(private) K
+(:) p n
+0 T ( _sk_loader \() S
+(const) K
+( _sk_loader&\);) p n
+0 T ( _sk_loader &) S
+(operator) K
+(=\() p
+(const) K
+( _sk_loader&\);) p n
+0 T ( };) N
+(45) # () N
+0 T ( ) S
+(class) K
+( _proxy_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+0 T ( ) S
+(private) K
+(:) p n
+0 T () N
+0 T ( _proxy_loader \() S
+(const) K
+( _proxy_loader&\);) p n
+(50) # ( _proxy_loader &) S
+(operator) K
+(=\() p
+(const) K
+( _proxy_loader&\);) p n
+0 T ( };) N
+0 T () N
+0 T ( ) S
+(class) K
+( _nil_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+0 T ( ) S
+(public) K
+(:) p n
+(55) # ( _nil_loader\(\) { ) S
+(this) K
+(\256) sy
+(PR_setobj\(0\); }) p n
+0 T ( ) S
+(virtual) K
+( ~_nil_loader\(\) {}) p n
+0 T ( ) S
+(void) k
+( dump \( \){) p n
+0 T ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+0 T ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+(60) # () S
+( ) p
+(return) K
+(;) p n
+0 T ( }) N
+0 T () N
+0 T ( polkaStatus enregistreServeur \( ) S
+(const) K
+( ) p
+(char) k
+( * name \){) p n
+0 T ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+(65) # ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+0 T () S
+( polkaStatus _result = 0;) p n
+0 T ( ) S
+(return) K
+( _result;) p n
+0 T ( }) N
+0 T () N
+(70) # ( polkaStatus enregistreClient \( ) S
+(const) K
+( ) p
+(char) k
+( * name, CORBA::Long & numSerie \)) p n
+(polkaIDL.hh) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ({) p n
+0 T ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+0 T ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+0 T () S
+( polkaStatus _result = 0;) p n
+0 T ( ) S
+(return) K
+( _result;) p n
+(75) # ( }) N
+0 T () N
+0 T ( polkaStatus supprimeServeur \( ) S
+(const) K
+( ) p
+(char) k
+( * name \){) p n
+0 T ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+0 T ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+(80) # () S
+( polkaStatus _result = 0;) p n
+0 T ( ) S
+(return) K
+( _result;) p n
+0 T ( }) N
+0 T () N
+0 T ( polkaStatus supprimeClient \( ) S
+(const) K
+( ) p
+(char) k
+( * name, CORBA::Long numSerie \){) p n
+(85) # ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+0 T ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+0 T () S
+( polkaStatus _result = 0;) p n
+0 T ( ) S
+(return) K
+( _result;) p n
+0 T ( }) N
+(90) # () N
+0 T ( ) S
+(void) k
+( terminaisonClient \( \){) p n
+0 T ( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+0 T ( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+0 T () S
+( ) p
+(return) K
+(;) p n
+(95) # ( }) N
+0 T () N
+0 T ( ) S
+(protected) K
+(:) p n
+0 T ( ) S
+(virtual) K
+( ) p
+(void) k
+( *_widenFromTheMostDerivedIntf\() p
+(const) K
+( ) p
+(char) k
+( *repoId\) {) p n
+0 T ( ) S
+(return) K
+( loader::_widenFromTheMostDerivedIntf\(repoId\);) p n
+(100) # ( }) N
+0 T ( };) N
+0 T () N
+0 T ( ) S
+(class) K
+( loader_proxyObjectFactory : ) p
+(public) K
+( proxyObjectFactory {) p n
+0 T ( ) S
+(public) K
+(:) p n
+(105) # ( loader_proxyObjectFactory \(\) {}) N
+0 T ( ) S
+(virtual) K
+( ~loader_proxyObjectFactory \(\) {}) p n
+0 T ( ) S
+(virtual) K
+( ) p
+(const) K
+( ) p
+(char) k
+( *irRepoId\(\) ) p
+(const) K
+(;) p n
+0 T ( ) S
+(virtual) K
+( CORBA::Object_ptr newProxyObject\(Rope *r,CORBA::Octet *key,size_t ke) p n
+0 T (ysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release\);) N
+0 T ( ) S
+(virtual) K
+( CORBA::Boolean is_a\() p
+(const) K
+( ) p
+(char) k
+( *base_repoId\) ) p
+(const) K
+(;) p n
+(110) # ( ) S
+(static) K
+( polka::loader_ptr _nil\(\) {) p n
+0 T ( ) S
+(if) K
+( \() p
+(\330) sy
+(__nil_loader\) {) p n
+0 T ( __nil_loader = ) S
+(new) K
+( polka::_nil_loader;) p n
+0 T ( }) N
+0 T ( ) S
+(return) K
+( __nil_loader;) p n
+(115) # ( }) N
+0 T ( ) S
+(private) K
+(:) p n
+0 T ( ) S
+(static) K
+( polka::loader_ptr __nil_loader;) p n
+0 T ( };) N
+0 T (};) N
+(120) # () N
+0 T () S
+(#endif) K
+( ) p
+(// __polkaIDL_hh__) c n
+(polkaIDL.hh) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/prosamp.ps b/tests/gps-ref/prosamp.ps
new file mode 100644
index 0000000..8526e36
--- /dev/null
+++ b/tests/gps-ref/prosamp.ps
@@ -0,0 +1,41 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) # (This is an example of keyword) k n
+0 T () S
+(This is an example of keyword strong) K n
+0 T () S
+(This is an example of comment) c n
+0 T () S
+(This is an example of Comment strong) C n
+0 T () S
+(This is an example of label) l n
+(10) # () S
+(This is an example of Label strong) L n
+0 T () S
+(This is an example of string) str n
+0 T () S
+(This is an example of symbol) sy n
+0 T () S
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/psmandup.ps b/tests/gps-ref/psmandup.ps
new file mode 100644
index 0000000..1178550
--- /dev/null
+++ b/tests/gps-ref/psmandup.ps
@@ -0,0 +1,769 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#! /bin/sh -e) c n
+0 T (# -*- ksh -*-) N
+0 T () N
+0 T (# psmandup --- produce a version of a PS file to print in manual Duplex.) N
+(5) # () N
+0 T (# Copyright \(c\) 1998, 1999 Akim Demaille, Miguel Santana) N
+0 T () N
+0 T (# This program is free software; you can redistribute it and/or modify) N
+0 T (# it under the terms of the GNU General Public License as published by) N
+(10) # (# the Free Software Foundation; either version 3, or \(at your option\)) N
+0 T (# any later version.) N
+0 T (#) N
+0 T (# This program is distributed in the hope that it will be useful,) N
+0 T (# but WITHOUT ANY WARRANTY; without even the implied warranty of) N
+(15) # (# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) N
+0 T (# GNU General Public License for more details.) N
+0 T (#) N
+0 T (# You should have received a copy of the GNU General Public License) N
+0 T (# along with this program; if not, you can either send email to this) N
+(20) # (# program's maintainer or write to: The Free Software Foundation,) N
+0 T (# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.) N
+0 T () N
+0 T (# Author: Akim Demaille <Akim.Demaille@freefriends.org>) N
+0 T () N
+(25) # (# Get the name of the program) N
+0 T () S
+(program=`) p
+(echo) K
+( $0 | sed ') p
+(s#.*/##g) str
+('`) p n
+0 T () N
+0 T () S
+(# Local vars) c n
+0 T () S
+(address=0) p 16 T () S
+(# Where to put the manual feed feature) c n
+(30) # () S
+(back=:) p 8 T () S 16 T () S
+(# Print the back side pages.) c n
+0 T () S
+(debug=) p n
+0 T (file=) N
+0 T (front=:) S 8 T () S 16 T () S
+(# Print the front side pages.) c n
+0 T () S
+(output=-) p 16 T () S
+(# Default is stdout) c n
+(35) # () S
+(fixps=${FIXPS:-fixps}) p n
+0 T (message=) N
+0 T (psselect=${PSSELECT:-psselect}) N
+0 T (psset=${PSSET:-psset}) N
+0 T (tmpdir=`mktemp -d -t psmandup.XXXXXX` || { ) S
+(echo) K
+( ") p
+($program: Cannot create temporary dir!) str
+(" >&) p n
+0 T (2 ; ) S
+(exit) K
+( 1; }) p n
+(40) # () N
+0 T () S
+(# These two must be kept in synch. They are opposed.) c n
+0 T () S
+(verbose=) p
+(echo) K n
+0 T () S
+(quiet=:) p n
+0 T () N
+(45) # () S
+(# The version/usage strings) c n
+0 T () S
+(version=") p
+(psmandup 2.1 \(GNU a2ps 4.13c\)) str n
+0 T (Written by Akim Demaille.) N
+0 T () N
+0 T (Copyright \(c\) 1998-1999 Akim Demaille, Miguel Santana) N
+(50) # (This is free software; see the source for copying conditions. There is NO) N
+0 T (warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.) S
+(") p n
+0 T () N
+0 T (usage=") S
+(\\) str n
+0 T (Usage: $program FILE) N
+(55) # (Tries to produce a version of the PostScript FILE to print in manual) N
+0 T (Duplex.) N
+0 T () N
+0 T (Options:) N
+0 T ( -h, --help display this help and exit) N
+(60) # ( -v, --version display version information and exit) N
+0 T ( -q, --quiet don't print informational messages) N
+0 T ( -o, --output=FILE save result in FILE. If FILE is \\`-', send to stdout) N
+0 T ( -n, --no-fix don't call fixps to fix PS problems in FILE) N
+0 T ( -f, --front output only the front pages \(recto\) on the regular) N
+(65) # ( tray) N
+0 T ( -b, --back output only the back pages \(verso\) on the manual) N
+0 T ( feed tray) N
+0 T () N
+0 T (Produced output is meant for PS level 2 printers which don't support) N
+(psmandup) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(70) # (Duplex printing, but support Manual Feed. Once the first set of pages) str n
+0 T (is printed \(odd pages\), manual feed is asked: introduce the odd pages) N
+0 T (to print the even pages on the other side.) N
+0 T () N
+0 T (Because there is usually a short time out for manually fed jobs, you) N
+(75) # (should really be next to the printer. If ever the time out expired,) N
+0 T (use the option -b to send only the missing part.) N
+0 T () N
+0 T (Environment variables FIXPS, PSSELECT and PSSET, if defined, are used) N
+0 T (to find the tools.) N
+(80) # () N
+0 T (News, updates and documentation: http://www.inf.enst.fr/~demaille/a2ps/) N
+0 T (Report bugs to <bug-a2ps@gnu.org>) S
+(") p n
+0 T () N
+0 T (help=") S
+(Try \\`$program --help' for more information.) str
+(") p n
+(85) # () N
+0 T () S
+(# Parse command line arguments.) c n
+0 T () S
+(option_without_arguments=') p
+(vhsqnDbf) str
+(') p n
+0 T () N
+0 T () S
+(# Push a token among the arguments that will be used to notice when) c n
+(90) # (# we ended options/arguments parsing.) N
+0 T () S
+(arg_sep=") p
+($$--$$) str
+(") p n
+0 T () S
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($arg_sep) str
+(") p n
+0 T () S
+(shift) K n
+0 T (while) S
+( ) p
+(test) K
+( ") p
+(x$1) str
+(" != ") p
+(x$arg_sep) str
+("; ) p
+(do) K n
+(95) # () N
+0 T () S
+( ) p
+(# Handle --option=value by splitting apart and putting back on argv.) c n
+0 T () S
+( ) p
+(case) K
+( ") p
+($1) str
+(" ) p
+(in) K n
+0 T () S
+( --*=*\)) p n
+0 T ( opt=`) S
+(echo) K
+( ") p
+($1) str
+(" | sed -e ') p
+(s/=.*//) str
+('`) p n
+(100) # ( val=`) S
+(echo) K
+( ") p
+($1) str
+(" | sed -e ') p
+(s/[^=]*=//) str
+('`) p n
+0 T ( ) S
+(shift) K n
+0 T () S
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($val) str
+(" ${1+") p
+($@) str
+("}) p n
+0 T ( ) S
+(shift) K n
+0 T () S
+( ;;) p n
+(105) # () N
+0 T ( -[$option_without_arguments]?*\)) N
+0 T ( ) S
+(# Prefix $1 with x to avoid running `echo -na' for instance.) c n
+0 T () S
+( opt=`) p
+(echo) K
+( ") p
+(x$1) str
+(" | sed -e ') p
+(s/x-\\\(.\\\).*/-\\1/) str
+('`) p n
+0 T ( rest=`) S
+(echo) K
+( ") p
+(x$1) str
+(" | sed -e ') p
+(s/x-.\\\(.*\\\)/-\\1/) str
+('`) p n
+(110) # ( ) S
+(shift) K n
+0 T () S
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($rest) str
+(" ${1+") p
+($@) str
+("}) p n
+0 T ( ) S
+(shift) K n
+0 T () S
+( ;;) p n
+0 T () N
+(115) # ( ) S
+(# This case needs to be protected so that the case `-??*' does) c n
+0 T () S
+( ) p
+(# not split long options without arguments) c n
+0 T () S
+( --*\)) p n
+0 T ( ;;) N
+0 T () N
+(120) # ( ) S
+(# This is an option with argument. Split apart and put back on argv.) c n
+0 T () S
+( -??*\)) p n
+0 T ( opt=`) S
+(echo) K
+( ") p
+(x$1) str
+(" | sed -e ') p
+(s/x-\\\(.\\\).*/-\\1/) str
+('`) p n
+0 T ( arg=`) S
+(echo) K
+( ") p
+(x$1) str
+(" | sed -e ') p
+(s/x-.\\\(.*\\\)/\\1/) str
+('`) p n
+0 T ( ) S
+(shift) K n
+(125) # () S
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($arg) str
+(" ${1+") p
+($@) str
+("}) p n
+0 T ( ) S
+(shift) K n
+0 T () S
+( ;;) p n
+0 T ( ) S
+(esac) K n
+0 T () N
+(130) # () S
+( ) p
+(# Now, handle the options. $1 is the option *only*. If it has an) c n
+0 T () S
+( ) p
+(# argument, it is now necessarily in $2 etc. Remember to shift) c n
+0 T () S
+( ) p
+(# when fetching an argument.) c n
+0 T () S
+( ) p
+(case) K
+( ") p
+($1) str
+(" ) p
+(in) K n
+0 T () S
+( -v | --v*\) ) p
+(echo) K
+( ") p
+($version) str
+("; ) p
+(exit) K
+( 0;;) p n
+(135) # ( -h | --h*\) ) S
+(echo) K
+( ") p
+($usage) str
+("; ) p
+(exit) K
+( 0;;) p n
+0 T ( -q | -s | --s* | --q*\) verbose=:; quiet=) S
+(echo) K
+(;;) p n
+0 T ( ) S
+(# Delay debugging so that options parsing does not appear) c n
+0 T () S
+( -D | --deb*\) debug=-D ;;) p n
+0 T ( -o | --out*\) ) S
+(shift) K
+( ; output=$1 ;;) p n
+(psmandup) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(140) # ( -b | --bac*\) front= ; back=: ;;) p n
+0 T ( -f | --fro*\) front=: ; back= ;;) N
+0 T ( -\) ) S
+(# We are working with stdin ;;) c n
+0 T () S
+( ) p
+(set) K
+( dummy ") p
+($@) str
+(" ") p
+($1) str
+(") p n
+0 T ( ) S
+(shift) K n
+(145) # () S
+( ;;) p n
+0 T ( -n | --no*\) fixps= ;;) N
+0 T () N
+0 T ( --\) ) S
+(# What remains are not options.) c n
+0 T () S
+( ) p
+(shift) K n
+(150) # () S
+( ) p
+(while) K
+( ) p
+(test) K
+( ") p
+(x$1) str
+(" != ") p
+(x$arg_sep) str
+("; ) p
+(do) K n
+0 T () S
+( ) p
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($1) str
+(") p n
+0 T ( ) S
+(shift) K n
+0 T () S
+() p 8 T () S
+(shift) K n
+0 T () S
+( ) p
+(done) K n
+(155) # () S
+( ) p
+(break) K
+(;;) p n
+0 T () N
+0 T ( -*\)) N
+0 T ( ) S
+(echo) K
+( ") p
+($program: Unknown or ambiguous option \\`$1'.) str
+(" >&2) p n
+0 T ( ) S
+(echo) K
+( ") p
+($program: Try \\`--help' for more information.) str
+(" >&2) p n
+(160) # ( ) S
+(exit) K
+( 1;;) p n
+0 T ( *\) ) S
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($1) str
+(") p n
+0 T ( ) S
+(shift) K n
+0 T () S
+( ;;) p n
+0 T ( ) S
+(esac) K n
+(165) # () S
+( ) p
+(shift) K n
+0 T (done) N
+0 T () S
+(# Pop the token) c n
+0 T () S
+(shift) K n
+0 T () N
+(170) # () N
+0 T () S
+(# Check the number of arguments.) c n
+0 T () S
+(case) K
+( $# ) p
+(in) K n
+0 T () S
+( 0\) file=-;;) p n
+0 T ( 1\) file=$1;;) N
+(175) # ( *\) ) S
+(echo) K
+( ") p
+($program: too many arguments) str
+(" 1>&2) p n
+0 T ( ) S
+(echo) K
+( ") p
+($help) str
+(" 1>&2) p n
+0 T ( ) S
+(exit) K
+( 1;;) p n
+0 T () S
+(esac) K n
+0 T () N
+(180) # (if) S
+( ) p
+(test) K
+( -n ") p
+($debug) str
+("; ) p
+(then) K n
+0 T () S
+( ) p
+(# Set -x now if debugging) c n
+0 T () S
+( ) p
+(set) K
+( -x) p n
+0 T () S
+(else) K n
+0 T () S
+( ) p
+(# Temp dir. Get ready not to leave junk \(if not debugging\)) c n
+(185) # () S
+( ) p
+(trap) K
+( ") p
+(/bin/rm -rf $tmpdir) str
+(" 0 1 2 3 13 15) p n
+0 T () S
+(fi) K n
+0 T () N
+0 T () S
+(# If printing from stdin, save into a tmp file) c n
+0 T () S
+(if) K
+( ) p
+(test) K
+( $file = ') p
+(-) str
+('; ) p
+(then) K n
+(190) # () S
+( file=$tmpdir/stdin.ps) p n
+0 T ( cat > $file) N
+0 T () S
+(fi) K n
+0 T () N
+0 T () S
+(# Fix the file beforehand, so that we can really expect to find the) c n
+(195) # (# page numbers.) N
+0 T () S
+(if) K
+( ) p
+(test) K
+( -n ") p
+($fixps) str
+("; ) p
+(then) K n
+0 T () S
+( $fixps $file -o $tmpdir/fixed.ps `$quiet -q`) p n
+0 T ( file=$tmpdir/fixed.ps) N
+0 T () S
+(fi) K n
+(200) # () N
+0 T () S
+(# Get the number of pages of the document) c n
+0 T () S
+(pagenum=`sed -ne ') p
+(/^%%Pages:/{) str n
+0 T (s/%%Pages: \\\\\([0-9]*\\\\\).*$/\\\\1/p) N
+0 T (q) N
+(205) # (}) S
+(' $file`) p n
+0 T () N
+0 T () S
+(# Make the string to get the front pages \(even, increasing\) if needed) c n
+0 T () S
+(if) K
+( ) p
+(test) K
+( -n ") p
+($front) str
+("; ) p
+(then) K n
+0 T () S
+( evens=") p
+(1) str
+(") p n
+(psmandup) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(210) # ( i=3) p n
+0 T ( ) S
+(# Build the string to give to psselect) c n
+0 T () S
+( ) p
+(while) K
+( ) p
+(test) K
+( $i -le $pagenum;) p n
+0 T ( ) S
+(do) K n
+0 T () S
+( evens=") p
+($evens,$i) str
+(") p n
+(215) # ( i=`expr $i + 2`) N
+0 T ( ) S
+(done) K n
+0 T (fi) N
+0 T () N
+0 T () S
+(# Make the string to get the back pages \(odd, decreasing\) if needed) c n
+(220) # () S
+(if) K
+( ) p
+(test) K
+( -n ") p
+($back) str
+("; ) p
+(then) K n
+0 T () S
+( ) p
+(# If the number of pages is odd, we need to insert a blank sheet) c n
+0 T () S
+( ) p
+(case) K
+( ") p
+($pagenum) str
+(" ) p
+(in) K n
+0 T () S
+( *[13579]\)) p n
+0 T ( odds=") S
+(_) str
+(") p n
+(225) # ( i=`expr $pagenum - 1 || ) S
+(exit) K
+( 0`) p n
+0 T ( ;;) N
+0 T ( *\) ) S
+(# Odd, and not 0, so at least >= 2) c n
+0 T () S
+( odds=$pagenum) p n
+0 T ( i=`expr $pagenum - 2 || ) S
+(exit) K
+( 0`) p n
+(230) # ( ;;) N
+0 T ( ) S
+(esac) K n
+0 T () N
+0 T () S
+( ) p
+(# Make the string to get the second half \(odd, decreasing\)) c n
+0 T () S
+( ) p
+(while) K
+( ) p
+(test) K
+( $i != 0;) p n
+(235) # ( ) S
+(do) K n
+0 T () S
+( odds=") p
+($odds,$i) str
+(") p n
+0 T ( i=`expr $i - 2 || ) S
+(exit) K
+( 0`) p n
+0 T ( ) S
+(done) K n
+0 T (fi) N
+(240) # () N
+0 T () S
+(# If there are both odds and evens to print, the separator is `,') c n
+0 T () S
+(test) K
+( -n ") p
+($odds) str
+(" && ) p
+(test) K
+( -n ") p
+($evens) str
+(" && separator=,) p n
+0 T () N
+0 T () S
+(# Reorder the pages) c n
+(245) # () S
+($psselect -q $evens$separator$odds $file > $tmpdir/ordered.ps) p n
+0 T () N
+0 T () S
+(# If needed, insert the manual feed request) c n
+0 T () S
+(if) K
+( ) p
+(test) K
+( -n ") p
+($back) str
+("; ) p
+(then) K n
+0 T () S
+( ) p
+(# The option of psset to ask the manual feed. If not set,) c n
+(250) # () S
+( ) p
+(# psset just does nothing.) c n
+0 T () S
+( pssetmanfeed=-m) p n
+0 T ( ) S
+(# Compute the address, depending on front pages are printed or not.) c n
+0 T () S
+( ) p
+(if) K
+( ) p
+(test) K
+( -n ") p
+($front) str
+("; ) p
+(then) K n
+0 T () S
+( address=`expr ') p
+(\() str
+(' $pagenum + 1 ') p
+(\)) str
+(' / 2 + 1`) p n
+(255) # ( message=") S
+(\\) str n
+0 T (Once the first half of the file printed, insert the sheets stack into) N
+0 T (the manual feed tray to print the second half. Be aware the time out) N
+0 T (if usually short. If it expired, use option -b to proceed.) S
+(") p n
+0 T ( ) S
+(else) K n
+(260) # () S
+( address=0) p n
+0 T ( message=") S
+(Insert the front pages stack into the manual feed tray.) str
+(") p n
+0 T ( ) S
+(fi) K n
+0 T (fi) N
+0 T () N
+(265) # () S
+(# Insert the manual feed request if needed) c n
+0 T () S
+($psset -n $pssetmanfeed -a $address -o$output $tmpdir/ordered.ps $debug) p n
+0 T () N
+0 T () S
+(test) K
+( -n ") p
+($message) str
+(" && $verbose ") p
+($message) str
+(" 1>&2) p n
+0 T () S
+(exit) K
+( 0) p n
+(psmandup) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/report.ps b/tests/gps-ref/report.ps
new file mode 100644
index 0000000..20fa7c2
--- /dev/null
+++ b/tests/gps-ref/report.ps
@@ -0,0 +1,658 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) # () p n
+0 T () N
+0 T () S
+(This is the automatic report about styles of a2ps, version 4.8.2) K n
+0 T () N
+0 T () N
+0 T () N
+0 T () N
+(75) # () S
+(Style definitions) L n
+0 T () S
+(The reader should first note that a2ps is _not_ a powerful syntactical pretty-printer: it just handles lexical structures, i.e) str n
+0 T (., if in your language) S
+( IF IF == THEN THEN ELSE := IF ELSE ELSE := THEN ) p
+(is legal, then a2ps is not t) str n
+0 T (he tool you need. It is for the same reason that you can't expect a2ps to highlight the function definitions in C.) N
+0 T (In the following is described how the style sheets are defined. You can skip this section if you don't care how a2ps doe) N
+0 T (s this, and if you don't expect to implement new styles.) N
+0 T () N
+0 T () S
+(Consistancy) L n
+(80) # () S
+(There are no found problems in the styles.) str n
+0 T () N
+0 T () N
+0 T () S
+(Known languages) L n
+0 T () N
+(85) # () S
+( 1) p
+(\267) sy
+( ada) p n
+0 T ( 2) S
+(\267) sy
+( c) p n
+0 T ( 3) S
+(\267) sy
+( c++) p n
+0 T ( 4) S
+(\267) sy
+( caml) p n
+0 T ( 5) S
+(\267) sy
+( claire) p n
+(90) # ( 6) S
+(\267) sy
+( coq-vernacular) p n
+0 T (37) S
+(\267) sy
+( Unity) p n
+0 T (38) S
+(\267) sy
+( VERILOG) p n
+0 T (39) S
+(\267) sy
+( VHDL) p n
+0 T (40) S
+(\267) sy
+( zsh) p n
+(95) # () N
+0 T () N
+0 T () N
+0 T () N
+0 T () S
+(Description of the language styles) L n
+(100) # () S
+(1) K
+( ) p
+(ada style) l n
+0 T () N
+0 T () S
+(\267) sy
+( ) p
+(the abbreviation are:) str
+( adb, ads.) p n
+0 T () S
+(\267) sy
+( ) p
+(first alphabet is:) str n
+(105) # () S
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '_'\(9) p n
+0 T (5\), '\)'\(41\).) N
+0 T () S
+(\267) sy
+( ) p
+(second alphabet is:) str n
+0 T () S
+('0123456789'\(48-57\), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstu) p n
+0 T (vwxyz'\(97-122\), '_'\(95\), '''\(39\).) N
+0 T () S
+(\267) sy
+( ) p
+(keywords, symbols and sequences recognition is case insensitive.) str n
+0 T () S
+(\267) sy
+( ) p
+(the keywords are:) str n
+(110) # () S
+(abort) K
+(, ) p
+(abs) K
+(, ) p
+(abstract) K
+(, ) p
+(accept) K
+(, ) p
+(access) K
+(, ) p
+(access function) K
+(, ) p
+(access procedure) K
+(, ) p
+(aliased) K
+() p n
+0 T (, ) S
+(all) K
+(, ) p
+(and) K
+(, ) p
+(array) K
+(, ) p
+(at) K
+(, ) p
+(begin) K
+(, ) p
+(body) K
+(, ) p
+(case) K
+(, ) p
+(constant) K
+(, ) p
+(declare) K
+(, ) p
+(delay) K
+(, ) p
+(delta) K
+(, ) p
+(digit) K n
+0 T (s) S
+(, ) p
+(do) K
+(, ) p
+(else) K
+(, ) p
+(elsif) K
+(, ) p
+(end) K
+(, ) p
+(entry) K
+(, ) p
+(exception) K
+(, ) p
+(exit) K
+(, ) p
+(for) K
+(, ) p
+(function) K
+(, ) p
+(generic) K
+(, ) p
+(goto) K
+(, ) p
+(i) K n
+0 T (f) S
+(, ) p
+(in) K
+(, ) p
+(is) K
+(, ) p
+(limited) K
+(, ) p
+(loop) K
+(, ) p
+(mod) K
+(, ) p
+(new) K
+(, ) p
+(not) K
+(, ) p
+(null) K
+(, ) p
+(of) K
+(, ) p
+(or) K
+(, ) p
+(others) K
+(, ) p
+(out) K
+(, ) p
+(package) K
+(, ) p
+(pra) K n
+0 T (gma) S
+(, ) p
+(private) K
+(, ) p
+(procedure) K
+(, ) p
+(protected) K
+(, ) p
+(raise) K
+(, ) p
+(range) K
+(, ) p
+(record) K
+(, ) p
+(rem) K
+(, ) p
+(renames) K
+(, ) p
+(requeue) K
+(,) p n
+0 T ( ) S
+(return) K
+(, ) p
+(reverse) K
+(, ) p
+(select) K
+(, ) p
+(separate) K
+(, ) p
+(subtype) K
+(, ) p
+(tagged) K
+(, ) p
+(task) K
+(, ) p
+(terminate) K
+(, ) p
+(then) K
+(, ) p
+(type) K
+() p n
+0 T (, ) S
+(until) K
+(, ) p
+(use) K
+(, ) p
+(when) K
+(, ) p
+(while) K
+(, ) p
+(with) K
+(, ) p
+(xor) K
+(.) p n
+0 T () S
+(\267) sy
+( ) p
+(the regular symbols are:) str n
+(130) # () S
+(\267) sy
+( ) p
+(the special symbols are:) str n
+0 T () S
+(!= ) p
+(\256) sy
+( ) p
+(\271) sy
+(, == ) p
+(\256) sy
+( ) p
+(\272) sy
+(, <= ) p
+(\256) sy
+( ) p
+(\243) sy
+(, >= ) p
+(\256) sy
+( ) p
+(\263) sy
+(, => ) p
+(\256) sy
+( ) p
+(\336) sy
+(.) p n
+0 T () S
+(\267) sy
+( ) p
+(the sequences are:) str n
+(135) # () S
+(--inside$ ) p
+(\256) sy
+( ) p
+(--inside) c
+($, "inside" ) p
+(\256) sy
+( ") p
+(inside) str
+(", 'inside' ) p
+(\256) sy
+( ') p
+(inside) str
+(', package body insi) p n
+0 T (de is ) S
+(\256) sy
+( ) p
+(package body ) K
+(inside) L
+( is) K
+(, package inside is ) p
+(\256) sy
+( ) p
+(package ) K
+(inside) L
+( is) K
+(, package) p n
+0 T ( inside renames ) S
+(\256) sy
+( ) p
+(package ) K
+(inside) L
+( renames) K
+(, procedure inside renames ) p
+(\256) sy
+( ) p
+(procedure) K n
+0 T ( ) S
+(inside) l
+( renames) K
+(, procedure inside is ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+( is) K
+(, procedure inside \( ) p
+() sy n
+0 T (\256) S
+( ) p
+(procedure ) K
+(inside) l
+( \(, procedure inside\( ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+(\(, procedure inside$) p n
+0 T ( ) S
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+($, procedure inside; ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+(;, function inside r) p n
+0 T (enames ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( renames) K
+(, function inside is ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( is) K
+(, fun) p n
+0 T (ction inside \( ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( \(, function inside\( ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+(\(, funct) p n
+0 T (ion inside$ ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+($, function inside; ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+(;.) p n
+0 T () S
+(\267) sy
+( ) p
+(the verbatims are:) str n
+0 T () S
+("'''".) p n
+(155) # () S
+(\267) sy
+( ) p
+(the escapes are:) str n
+0 T () S
+("""", "\\\\", "\\'".) p n
+(ada style) (Style sheets of a2ps version 4.8.2) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+0 T () N
+0 T () N
+(160) # () S
+(25) K
+( ) p
+(PreScript style) l n
+0 T () N
+0 T () S
+(\267) sy
+( This is prescript, a language of description of textual pages. It provides by ) p n
+0 T (the use of LaTeX like commands, a way to describe the pages that this program sh) N
+0 T (ould produce. It can be a very good choice of destination language for people wh) N
+0 T (o want to produce text to print \(e.g. pretty-printing, automating documentation ) N
+0 T (etc.\) but who definitely do not want to learn postscript, nor to require the use) N
+0 T ( of LaTeX.) N
+0 T (It is also known as BifTeX \(Basic Instruction From LaTeX\), of ptf \(Poor Text For) N
+0 T (mat\).) N
+(165) # (Symbol translation is always enabled in this mode.) N
+0 T () S
+(\267) sy
+( ) p
+(the abbreviation are:) str
+( prescript, biftex, bif, pre, ptf.) p n
+0 T () S
+(\267) sy
+( ) p
+(first alphabet is:) str n
+0 T () S
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '\\'\(9) p n
+0 T (2\), '_'\(95\).) N
+0 T () S
+(\267) sy
+( ) p
+(second alphabet is:) str n
+(170) # () S
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '_'\(9) p n
+0 T (5\).) N
+0 T () S
+(\267) sy
+( ) p
+(keywords, symbols and sequences recognition is case sensitive.) str n
+0 T () S
+(\267) sy
+( ) p
+(there are no keywords.) str n
+0 T () S
+(\267) sy
+( ) p
+(there are no regular symbols.) str n
+0 T () S
+(\267) sy
+( ) p
+(the special symbols are:) str n
+(175) # () S
+(\\$ ) p
+(\256) sy
+( $, $ ) p
+(\256) sy
+( , \\_ ) p
+(\256) sy
+( _, \\% ) p
+(\256) sy
+( %, \\& ) p
+(\256) sy
+( &, \\# ) p
+(\256) sy
+( #, \\\( ) p
+(\256) sy
+( \(, \\\) ) p
+(\256) sy
+( \), \\[ ) p
+(\256) sy
+( [, \\] ) p
+() sy n
+0 T (\256) S
+( ], \\{ ) p
+(\256) sy
+( {, \\| ) p
+(\256) sy
+( |, \\} ) p
+(\256) sy
+( }.) p n
+0 T () S
+(\267) sy
+( ) p
+(the sequences are:) str n
+0 T () S
+(\\\\encoding{inside} ) p
+(\256) sy
+( inside, %%prescript:skipinside%%prescript:piks$ ) p
+(\256) sy
+( , %insi) p n
+0 T (de$ ) S
+(\256) sy
+( , \\\\item[inside] ) p
+(\256) sy
+( ) p
+(inside) l
+(, \\\\section{inside} ) p
+(\256) sy
+( ) p
+(inside) L
+(, \\\\subsection{insi) p n
+0 T (de} ) S
+(\256) sy
+( ) p
+(inside) l
+(, \\\\subsubsection{inside} ) p
+(\256) sy
+( ) p
+(inside) l
+(, \\\\header{inside}$ ) p
+(\256) sy
+( inside, \\\\) p n
+0 T (footer{inside}$ ) S
+(\256) sy
+( inside, \\\\textbf{inside} ) p
+(\256) sy
+( ) p
+(inside) K
+(, \\\\textit{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+() p n
+0 T (, \\\\textbi{inside} ) S
+(\256) sy
+( ) p
+(inside) K
+(, \\\\textrm{inside} ) p
+(\256) sy
+( ) p
+(inside) str
+(, \\\\textsy{inside} ) p
+(\256) sy
+( ) p
+(inside) sy
+() p n
+0 T (, \\\\texttt{inside} ) S
+(\256) sy
+( inside, \\\\keyword{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+(, \\\\Keyword{inside} ) p
+(\256) sy
+( ) p
+(i) K n
+0 T (nside) S
+(, \\\\comment{inside} ) p
+(\256) sy
+( ) p
+(inside) c
+(, \\\\Comment{inside} ) p
+(\256) sy
+( ) p
+(inside) C
+(, \\\\label{inside}) p n
+0 T ( ) S
+(\256) sy
+( ) p
+(inside) l
+(, \\\\Label{inside} ) p
+(\256) sy
+( ) p
+(inside) L
+(, \\\\string{inside} ) p
+(\256) sy
+( ) p
+(inside) str
+(, \\\\magicbf{inside) p n
+0 T (} ) S
+(\256) sy
+( ) p
+(inside) K
+(, \\\\magicit{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+(, \\\\magicbi{inside} ) p
+(\256) sy
+( ) p
+(inside) K
+(, \\\\magicrm{) p n
+0 T (inside} ) S
+(\256) sy
+( ) p
+(inside) str
+(, \\\\magicsy{inside} ) p
+(\256) sy
+( ) p
+(inside) sy
+(, \\\\magictt{inside} ) p
+(\256) sy
+( inside, \\\\verb+) p n
+0 T (inside+ ) S
+(\256) sy
+( inside, \\\\verb!inside! ) p
+(\256) sy
+( inside, \\\\verb|inside| ) p
+(\256) sy
+( inside, \\\\verb#ins) p n
+0 T (ide# ) S
+(\256) sy
+( inside, \\\\verb=inside= ) p
+(\256) sy
+( inside.) p n
+0 T () S
+(\267) sy
+( ) p
+(there are no verbatims.) str n
+0 T () S
+(\267) sy
+( ) p
+(there are no escapes.) str n
+0 T () N
+0 T () N
+(PreScript style) (Style sheets of a2ps version 4.8.2) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/run-help.ps b/tests/gps-ref/run-help.ps
new file mode 100644
index 0000000..1eab37d
--- /dev/null
+++ b/tests/gps-ref/run-help.ps
@@ -0,0 +1,74 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#! /bin/zsh) c n
+0 T (# zsh script to peruse the help directory) N
+0 T (#) N
+0 T () S
+(if) K
+( [[ $1 = ") p
+(-l) str
+(" ]]; ) p
+(then) K n
+(5) # () S
+( ) p
+(if) K
+( [[ ${HELPDIR:-} ) p
+(\330) sy
+(= "" ]]; ) p
+(then) K n
+0 T () S
+( ) p
+(echo) K
+( ') p
+(Here is a list of topics for which help is available:) str
+(') p n
+0 T ( ) S
+(echo) K
+( "") p n
+0 T ( ls $HELPDIR) N
+0 T ( ) S
+(else) K n
+(10) # () S
+( ) p
+(echo) K
+( ') p
+(There is no help available at this time) str
+(') p n
+0 T ( ) S
+(fi) K n
+0 T (elif) S
+( [[ ${HELPDIR:-} ) p
+(\330) sy
+(= "" && -r $HELPDIR/$1 ]]) p n
+0 T () S
+(then) K n
+0 T () S
+( ${=PAGER:-more} $HELPDIR/$1) p n
+(15) # () S
+(else) K n
+0 T () S
+( man $1) p n
+0 T () S
+(fi) K n
+(run-help) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/s-garnam.ps b/tests/gps-ref/s-garnam.ps
new file mode 100644
index 0000000..df6337e
--- /dev/null
+++ b/tests/gps-ref/s-garnam.ps
@@ -0,0 +1,1376 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (------------------------------------------------------------------------------) c n
+0 T (-- --) N
+0 T (-- GLADE COMPONENTS --) N
+0 T (-- --) N
+(5) # (-- S Y S T E M . G A R L I C . N A M I N G --) N
+0 T (-- --) N
+0 T (-- B o d y --) N
+0 T (-- --) N
+0 T (-- --) N
+(10) # (-- Copyright \(C\) 1996,1997 Free Software Foundation, Inc. --) N
+0 T (-- --) N
+0 T (-- GARLIC is free software; you can redistribute it and/or modify it under --) N
+0 T (-- terms of the GNU General Public License as published by the Free Soft- --) N
+0 T (-- ware Foundation; either version 3, or \(at your option\) any later ver- --) N
+(15) # (-- sion. GARLIC is distributed in the hope that it will be useful, but --) N
+0 T (-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI- --) N
+0 T (-- LITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --) N
+0 T (-- License for more details. You should have received a copy of the GNU --) N
+0 T (-- General Public License distributed with GARLIC; see file COPYING. If --) N
+(20) # (-- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --) N
+0 T (-- Boston, MA 02111-1307, USA. --) N
+0 T (-- --) N
+0 T (-- As a special exception, if other files instantiate generics from this --) N
+0 T (-- unit, or you link this unit with other files to produce an executable, --) N
+(25) # (-- this unit does not by itself cause the resulting executable to be --) N
+0 T (-- covered by the GNU General Public License. This exception does not --) N
+0 T (-- however invalidate any other reasons why the executable file might be --) N
+0 T (-- covered by the GNU Public License. --) N
+0 T (-- --) N
+(30) # (-- GLADE is maintained by ACT Europe. --) N
+0 T (-- \(email: glade-report@act-europe.fr\) --) N
+0 T (-- --) N
+0 T (------------------------------------------------------------------------------) N
+0 T () N
+(35) # () S
+(with) K
+( Ada.Exceptions;) p n
+0 T () S
+(with) K
+( Interfaces.C; ) p
+(use) K
+( Interfaces.C;) p n
+0 T () S
+(with) K
+( Interfaces.C.Strings; ) p
+(use) K
+( Interfaces.C.Strings;) p n
+0 T () S
+(with) K
+( System.Garlic.Constants; ) p
+(use) K
+( System.Garlic.Constants;) p n
+0 T () S
+(with) K
+( System.Garlic.OS_Lib; ) p
+(use) K
+( System.Garlic.OS_Lib;) p n
+(40) # () S
+(with) K
+( Unchecked_Conversion;) p n
+0 T () S
+(with) K
+( Unchecked_Deallocation;) p n
+0 T () N
+0 T () S
+(package body ) K
+(System.Garlic.Naming) L
+( is) K n
+0 T () N
+(45) # () S
+( ) p
+(use) K
+( Thin;) p n
+0 T () N
+0 T ( Default_Buffer_Size : ) S
+(constant) K
+( := 16384;) p n
+0 T () N
+0 T ( ) S
+(procedure ) K
+(Free) l
+( is) K n
+(50) # () S
+( ) p
+(new) K
+( Unchecked_Deallocation \(char_array, char_array_access\);) p n
+0 T () N
+0 T ( ) S
+(function ) K
+(Allocate) l
+( \(Size : Positive := Default_Buffer_Size\)) p n
+0 T ( ) S
+(return) K
+( char_array_access;) p n
+0 T ( ) S
+(-- Allocate a buffer.) c n
+(55) # () N
+0 T () S
+( ) p
+(function ) K
+(Parse_Entry) l
+( \(Host : Hostent\)) p n
+0 T ( ) S
+(return) K
+( Host_Entry;) p n
+0 T ( ) S
+(-- Parse an entry.) c n
+0 T () N
+(60) # () S
+( ) p
+(procedure ) K
+(Raise_Naming_Error) l n
+0 T () S
+( \(Errno : ) p
+(in) K
+( C.Int;) p n
+0 T ( Message : ) S
+(in) K
+( String\);) p n
+0 T ( ) S
+(-- Raise the exception Naming_Error with an appropriate error message.) c n
+0 T () N
+(65) # () S
+( ) p
+(protected) K
+( Gethost_In_Progress ) p
+(is) K n
+0 T () S
+( ) p
+(entry) K
+( Lock;) p n
+0 T ( ) S
+(procedure ) K
+(Unlock) l
+(;) p n
+0 T ( ) S
+(private) K n
+0 T () S
+( Locked : Boolean := False;) p n
+(70) # ( ) S
+(end) K
+( Gethost_In_Progress;) p n
+(s-garnam.adb) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(-- We have to protect this.) c n
+0 T () N
+0 T () S
+( ) p
+(----------------) c n
+0 T () S
+( ) p
+(-- Address_Of --) c n
+(75) # () S
+( ) p
+(----------------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Address_Of) l
+( \(Something : String\)) p n
+0 T ( ) S
+(return) K
+( Address) p n
+0 T ( ) S
+(is) K n
+(80) # () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( Is_IP_Address \(Something\) ) p
+(then) K n
+0 T () S
+( ) p
+(return) K
+( Value \(Something\);) p n
+0 T ( ) S
+(else) K n
+0 T () S
+( ) p
+(return) K
+( Info_Of \(Something\) .Addresses \(1\);) p n
+(85) # ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+0 T ( ) S
+(end) K
+( Address_Of;) p n
+0 T () N
+0 T ( ) S
+(------------) c n
+0 T () S
+( ) p
+(-- Adjust --) c n
+(90) # () S
+( ) p
+(------------) c n
+0 T () N
+0 T () S
+( ) p
+(procedure ) K
+(Adjust) l
+( \(Object : ) p
+(in) K
+( ) p
+(out) K
+( Host_Entry\)) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( Aliases : String_Array ) p
+(renames) K
+( Object.Aliases;) p n
+(95) # ( ) S
+(begin) K n
+0 T () S
+( Object.Name := ) p
+(new) K
+( String'\(Object.Name.) p
+(all) K
+(\);) p n
+0 T ( ) S
+(for) K
+( I ) p
+(in) K
+( Aliases'Range ) p
+(loop) K n
+0 T () S
+( Aliases \(I\) := ) p
+(new) K
+( String'\(Aliases \(I\) .) p
+(all) K
+(\);) p n
+0 T ( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+(100) # ( ) S
+(end) K
+( Adjust;) p n
+0 T () N
+0 T ( ) S
+(--------------) c n
+0 T () S
+( ) p
+(-- Allocate --) c n
+0 T () S
+( ) p
+(--------------) c n
+(105) # () N
+0 T () S
+( ) p
+(function ) K
+(Allocate) l n
+0 T () S
+( \(Size : Positive := Default_Buffer_Size\)) p n
+0 T ( ) S
+(return) K
+( char_array_access) p n
+0 T ( ) S
+(is) K n
+(110) # () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(return) K
+( ) p
+(new) K
+( char_array \(1 .. size_t \(Size\)\);) p n
+0 T ( ) S
+(end) K
+( Allocate;) p n
+0 T () N
+0 T ( ) S
+(-----------------) c n
+(115) # () S
+( ) p
+(-- Any_Address --) c n
+0 T () S
+( ) p
+(-----------------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Any_Address) l
+( return) K
+( Address) p n
+0 T ( ) S
+(is) K n
+(120) # () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(return) K
+( To_Address \(Inaddr_Any\);) p n
+0 T ( ) S
+(end) K
+( Any_Address;) p n
+0 T () N
+0 T ( ) S
+(--------------) c n
+(125) # () S
+( ) p
+(-- Finalize --) c n
+0 T () S
+( ) p
+(--------------) c n
+0 T () N
+0 T () S
+( ) p
+(procedure ) K
+(Finalize) l
+( \(Object : ) p
+(in) K
+( ) p
+(out) K
+( Host_Entry\)) p n
+0 T ( ) S
+(is) K n
+(130) # () S
+( Aliases : String_Array ) p
+(renames) K
+( Object.Aliases;) p n
+0 T ( ) S
+(procedure ) K
+(Free) l
+( is) K n
+0 T () S
+( ) p
+(new) K
+( Unchecked_Deallocation \(String, String_Access\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( Free \(Object.Name\);) p n
+(135) # ( ) S
+(for) K
+( I ) p
+(in) K
+( Aliases'Range ) p
+(loop) K n
+0 T () S
+( Free \(Aliases \(I\)\);) p n
+0 T ( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+0 T ( ) S
+(end) K
+( Finalize;) p n
+0 T () N
+(140) # ( ) S
+(-------------------------) c n
+(s-garnam.adb) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(-- Gethost_In_Progress --) c n
+0 T () S
+( ) p
+(-------------------------) c n
+0 T () N
+0 T () S
+( ) p
+(protected) K
+( ) p
+(body) K
+( Gethost_In_Progress ) p
+(is) K n
+(145) # () N
+0 T () S
+( ) p
+(----------) c n
+0 T () S
+( ) p
+(-- Lock --) c n
+0 T () S
+( ) p
+(----------) c n
+0 T () N
+(150) # () S
+( ) p
+(entry) K
+( Lock ) p
+(when) K
+( ) p
+(not) K
+( Locked ) p
+(is) K n
+0 T () S
+( ) p
+(begin) K n
+0 T () S
+( Locked := True;) p n
+0 T ( ) S
+(end) K
+( Lock;) p n
+0 T () N
+(155) # ( ) S
+(------------) c n
+0 T () S
+( ) p
+(-- Unlock --) c n
+0 T () S
+( ) p
+(------------) c n
+0 T () N
+0 T () S
+( ) p
+(procedure ) K
+(Unlock) l
+( is) K n
+(160) # () S
+( ) p
+(begin) K n
+0 T () S
+( Locked := False;) p n
+0 T ( ) S
+(end) K
+( Unlock;) p n
+0 T () N
+0 T ( ) S
+(end) K
+( Gethost_In_Progress;) p n
+(165) # () N
+0 T ( ) S
+(---------------) c n
+0 T () S
+( ) p
+(-- Host_Name --) c n
+0 T () S
+( ) p
+(---------------) c n
+0 T () N
+(170) # () S
+( ) p
+(function ) K
+(Host_Name) l
+( return) K
+( String) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( Buff : char_array_access := Allocate;) p n
+0 T ( Buffer : ) S
+(constant) K
+( chars_ptr := To_Chars_Ptr \(Buff\);) p n
+0 T ( Res : ) S
+(constant) K
+( int := C_Gethostname \(Buffer, Buff'Length\);) p n
+(175) # ( ) S
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( Res = Failure ) p
+(then) K n
+0 T () S
+( Free \(Buff\);) p n
+0 T ( Raise_Naming_Error \(C_Errno, ""\);) N
+0 T ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+(180) # ( ) S
+(declare) K n
+0 T () S
+( Result : ) p
+(constant) K
+( String := Value \(Buffer\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( Free \(Buff\);) p n
+0 T ( ) S
+(return) K
+( Result;) p n
+(185) # ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+( Host_Name;) p n
+0 T () N
+0 T ( ) S
+(-----------) c n
+0 T () S
+( ) p
+(-- Image --) c n
+(190) # () S
+( ) p
+(-----------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Image) l
+( \(Add : Address\) ) p
+(return) K
+( String) p n
+0 T ( ) S
+(is) K n
+0 T () N
+(195) # () S
+( ) p
+(function ) K
+(Image) l
+( \(A : Address_Component\) ) p
+(return) K
+( String;) p n
+0 T ( ) S
+(-- Return the string corresponding to its argument without) c n
+0 T () S
+( ) p
+(-- the leading space.) c n
+0 T () N
+0 T () S
+( ) p
+(-----------) c n
+(200) # () S
+( ) p
+(-- Image --) c n
+0 T () S
+( ) p
+(-----------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Image) l
+( \(A : Address_Component\)) p n
+0 T ( ) S
+(return) K
+( String) p n
+(205) # ( ) S
+(is) K n
+0 T () S
+( Im : ) p
+(constant) K
+( String := Address_Component'Image \(A\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( ) p
+(return) K
+( Im \(2 .. Im'Last\);) p n
+0 T ( ) S
+(end) K
+( Image;) p n
+(210) # () N
+(s-garnam.adb) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(begin) K n
+0 T () S
+( ) p
+(return) K
+( Image \(Add.H1\) & ") p
+(.) str
+(" & Image \(Add.H2\) & ") p
+(.) str
+(" &) p n
+0 T ( Image \(Add.H3\) & ") S
+(.) str
+(" & Image \(Add.H4\);) p n
+0 T ( ) S
+(end) K
+( Image;) p n
+(215) # () N
+0 T ( ) S
+(-------------) c n
+0 T () S
+( ) p
+(-- Info_Of --) c n
+0 T () S
+( ) p
+(-------------) c n
+0 T () N
+(220) # () S
+( ) p
+(function ) K
+(Info_Of) l
+( \(Name : String\)) p n
+0 T ( ) S
+(return) K
+( Host_Entry) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( Res : Hostent_Access;) p n
+0 T ( C_Name : chars_ptr := New_String \(Name\);) N
+(225) # ( ) S
+(begin) K n
+0 T () S
+( Gethost_In_Progress.Lock;) p n
+0 T ( Res := C_Gethostbyname \(C_Name\);) N
+0 T ( Free \(C_Name\);) N
+0 T ( ) S
+(if) K
+( Res = ) p
+(null) K
+( ) p
+(then) K n
+(230) # () S
+( Gethost_In_Progress.Unlock;) p n
+0 T ( Raise_Naming_Error \(C_Errno, Name\);) N
+0 T ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+0 T ( ) S
+(declare) K n
+0 T () S
+( Result : ) p
+(constant) K
+( Host_Entry := Parse_Entry \(Res.) p
+(all) K
+(\);) p n
+(235) # ( ) S
+(begin) K n
+0 T () S
+( Gethost_In_Progress.Unlock;) p n
+0 T ( ) S
+(return) K
+( Result;) p n
+0 T ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+( Info_Of;) p n
+(240) # () N
+0 T ( ) S
+(-------------) c n
+0 T () S
+( ) p
+(-- Info_Of --) c n
+0 T () S
+( ) p
+(-------------) c n
+0 T () N
+(245) # () S
+( ) p
+(function ) K
+(Info_Of) l
+( \(Addr : Address\)) p n
+0 T ( ) S
+(return) K
+( Host_Entry) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( ) p
+(function ) K
+(Convert) l
+( is) K n
+0 T () S
+( ) p
+(new) K
+( Unchecked_Conversion \(Source ) p
+(\336) sy
+( In_Addr_Access,) p n
+(250) # ( Target ) S
+(\336) sy
+( chars_ptr\);) p n
+0 T ( Temp : ) S
+(aliased) K
+( In_Addr := To_In_Addr \(Addr\);) p n
+0 T ( C_Addr : ) S
+(constant) K
+( chars_ptr := Convert \(Temp'Unchecked_Access\);) p n
+0 T ( Res : Hostent_Access;) N
+0 T ( ) S
+(begin) K n
+(255) # () S
+( Gethost_In_Progress.Lock;) p n
+0 T ( Res := C_Gethostbyaddr \(C_Addr,) N
+0 T ( C.Int \(Temp'Size / CHAR_BIT\),) N
+0 T ( Af_Inet\);) N
+0 T ( ) S
+(if) K
+( Res = ) p
+(null) K
+( ) p
+(then) K n
+(260) # () S
+( Gethost_In_Progress.Unlock;) p n
+0 T ( Raise_Naming_Error \(C_Errno, Image \(Addr\)\);) N
+0 T ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+0 T ( ) S
+(declare) K n
+0 T () S
+( Result : ) p
+(constant) K
+( Host_Entry := Parse_Entry \(Res.) p
+(all) K
+(\);) p n
+(265) # ( ) S
+(begin) K n
+0 T () S
+( Gethost_In_Progress.Unlock;) p n
+0 T ( ) S
+(return) K
+( Result;) p n
+0 T ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+( Info_Of;) p n
+(270) # () N
+0 T ( ) S
+(------------------------) c n
+0 T () S
+( ) p
+(-- Info_Of_Name_Or_IP --) c n
+0 T () S
+( ) p
+(------------------------) c n
+0 T () N
+(275) # () S
+( ) p
+(function ) K
+(Info_Of_Name_Or_IP) l
+( \(Something : String\)) p n
+0 T ( ) S
+(return) K
+( Host_Entry) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( Is_IP_Address \(Something\) ) p
+(then) K n
+(280) # () S
+( ) p
+(return) K
+( Info_Of \(Value \(Something\)\);) p n
+(s-garnam.adb) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(else) K n
+0 T () S
+( ) p
+(return) K
+( Info_Of \(Something\);) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+0 T ( ) S
+(end) K
+( Info_Of_Name_Or_IP;) p n
+(285) # () N
+0 T ( ) S
+(-------------------) c n
+0 T () S
+( ) p
+(-- Is_Ip_Address --) c n
+0 T () S
+( ) p
+(-------------------) c n
+0 T () N
+(290) # () S
+( ) p
+(function ) K
+(Is_IP_Address) l
+( \(Something : String\)) p n
+0 T ( ) S
+(return) K
+( Boolean) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( First : ) p
+(constant) K
+( Natural := Character'Pos \(Something \(Something'First\)\);) p n
+0 T ( ) S
+(begin) K n
+(295) # () S
+( ) p
+(return) K
+( First ) p
+(\263) sy
+( Character'Pos \(') p
+(0) str
+('\) ) p
+(and) K
+( ) p
+(then) K n
+0 T () S
+( First ) p
+(\243) sy
+( Character'Pos \(') p
+(9) str
+('\);) p n
+0 T ( ) S
+(end) K
+( Is_IP_Address;) p n
+0 T () N
+0 T ( ) S
+(-------------) c n
+(300) # () S
+( ) p
+(-- Name_Of --) c n
+0 T () S
+( ) p
+(-------------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Name_Of) l
+( \(Something : String\)) p n
+0 T ( ) S
+(return) K
+( String) p n
+(305) # ( ) S
+(is) K n
+0 T () S
+( Hostent : ) p
+(constant) K
+( Host_Entry := Info_Of_Name_Or_IP \(Something\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( ) p
+(if) K
+( Hostent.Name = ) p
+(null) K
+( ) p
+(then) K n
+0 T () S
+( Ada.Exceptions.Raise_Exception \(Naming_Error'Identity,) p n
+(310) # ( ") S
+(No name for ) str
+(" & Something\);) p n
+0 T ( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+0 T ( ) S
+(return) K
+( Hostent.Name.) p
+(all) K
+(;) p n
+0 T ( ) S
+(end) K
+( Name_Of;) p n
+0 T () N
+(315) # ( ) S
+(-----------------) c n
+0 T () S
+( ) p
+(-- Parse_Entry --) c n
+0 T () S
+( ) p
+(-----------------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Parse_Entry) l
+( \(Host : Hostent\)) p n
+(320) # ( ) S
+(return) K
+( Host_Entry) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( C_Aliases : ) p
+(constant) K
+( Thin.Chars_Ptr_Array :=) p n
+0 T ( Chars_Ptr_Pointers.Value \(Host.H_Aliases\);) N
+0 T ( C_Addr : ) S
+(constant) K
+( In_Addr_Access_Array :=) p n
+(325) # ( In_Addr_Access_Pointers.Value) N
+0 T ( \(Host.H_Addr_List\);) N
+0 T ( Result : Host_Entry \(N_Aliases ) S
+(\336) sy
+( C_Aliases'Length - 1,) p n
+0 T ( N_Addresses ) S
+(\336) sy
+( C_Addr'Length - 1\);) p n
+0 T ( ) S
+(begin) K n
+(330) # () S
+( Result.Name := ) p
+(new) K
+( String'\(Value \(Host.H_Name\)\);) p n
+0 T ( ) S
+(for) K
+( I ) p
+(in) K
+( 1 .. Result.Aliases'Last ) p
+(loop) K n
+0 T () S
+( ) p
+(declare) K n
+0 T () S
+( Index : Natural := I - 1 + Natural \(C_Aliases'First\);) p n
+0 T ( Current : chars_ptr ) S
+(renames) K
+( C_Aliases \(size_t \(Index\)\);) p n
+(335) # ( ) S
+(begin) K n
+0 T () S
+( Result.Aliases \(I\) := ) p
+(new) K
+( String'\(Value \(Current\)\);) p n
+0 T ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+0 T ( ) S
+(for) K
+( I ) p
+(in) K
+( Result.Addresses'Range ) p
+(loop) K n
+(340) # () S
+( ) p
+(declare) K n
+0 T () S
+( Index : Natural := I - 1 + Natural \(C_Addr'First\);) p n
+0 T ( Current : In_Addr_Access ) S
+(renames) K
+( C_Addr \(Index\);) p n
+0 T ( ) S
+(begin) K n
+0 T () S
+( Result.Addresses \(I\) := To_Address \(Current.) p
+(all) K
+(\);) p n
+(345) # ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+0 T ( ) S
+(return) K
+( Result;) p n
+0 T ( ) S
+(end) K
+( Parse_Entry;) p n
+0 T () N
+(350) # ( ) S
+(------------------------) c n
+(s-garnam.adb) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(-- Raise_Naming_Error --) c n
+0 T () S
+( ) p
+(------------------------) c n
+0 T () N
+0 T () S
+( ) p
+(procedure ) K
+(Raise_Naming_Error) l n
+(355) # () S
+( \(Errno : ) p
+(in) K
+( C.Int;) p n
+0 T ( Message : ) S
+(in) K
+( String\)) p n
+0 T ( ) S
+(is) K n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Error_Message) l
+( return) K
+( String;) p n
+(360) # ( ) S
+(-- Return the message according to Errno.) c n
+0 T () N
+0 T () S
+( ) p
+(-------------------) c n
+0 T () S
+( ) p
+(-- Error_Message --) c n
+0 T () S
+( ) p
+(-------------------) c n
+(365) # () N
+0 T () S
+( ) p
+(function ) K
+(Error_Message) l
+( return) K
+( String ) p
+(is) K n
+0 T () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(case) K
+( Errno ) p
+(is) K n
+0 T () S
+( ) p
+(when) K
+( Host_Not_Found ) p
+(\336) sy
+( ) p
+(return) K
+( ") p
+(Host not found) str
+(";) p n
+(370) # ( ) S
+(when) K
+( Try_Again ) p
+(\336) sy
+( ) p
+(return) K
+( ") p
+(Try again) str
+(";) p n
+0 T ( ) S
+(when) K
+( No_Recovery ) p
+(\336) sy
+( ) p
+(return) K
+( ") p
+(No recovery) str
+(";) p n
+0 T ( ) S
+(when) K
+( No_Address ) p
+(\336) sy
+( ) p
+(return) K
+( ") p
+(No address) str
+(";) p n
+0 T ( ) S
+(when) K
+( ) p
+(others) K
+( ) p
+(\336) sy
+( ) p
+(return) K
+( ") p
+(Unknown error) str
+(" &) p n
+0 T ( C.Int'Image \(Errno\);) N
+(375) # ( ) S
+(end) K
+( ) p
+(case) K
+(;) p n
+0 T ( ) S
+(end) K
+( Error_Message;) p n
+0 T () N
+0 T ( ) S
+(begin) K n
+0 T () S
+( Ada.Exceptions.Raise_Exception \(Naming_Error'Identity,) p n
+(380) # ( Error_Message & ") S
+(: ) str
+(" & Message\);) p n
+0 T ( ) S
+(end) K
+( Raise_Naming_Error;) p n
+0 T () N
+0 T ( ) S
+(----------------) c n
+0 T () S
+( ) p
+(-- To_Address --) c n
+(385) # () S
+( ) p
+(----------------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(To_Address) l
+( \(Addr : In_Addr\) ) p
+(return) K
+( Address) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( ) p
+(begin) K n
+(390) # () S
+( ) p
+(return) K
+( \(H1 ) p
+(\336) sy
+( Address_Component \(Addr.S_B1\),) p n
+0 T ( H2 ) S
+(\336) sy
+( Address_Component \(Addr.S_B2\),) p n
+0 T ( H3 ) S
+(\336) sy
+( Address_Component \(Addr.S_B3\),) p n
+0 T ( H4 ) S
+(\336) sy
+( Address_Component \(Addr.S_B4\)\);) p n
+0 T ( ) S
+(end) K
+( To_Address;) p n
+(395) # () N
+0 T ( ) S
+(----------------) c n
+0 T () S
+( ) p
+(-- To_In_Addr --) c n
+0 T () S
+( ) p
+(----------------) c n
+0 T () N
+(400) # () S
+( ) p
+(function ) K
+(To_In_Addr) l
+( \(Addr : Address\) ) p
+(return) K
+( In_Addr) p n
+0 T ( ) S
+(is) K n
+0 T () S
+( ) p
+(begin) K n
+0 T () S
+( ) p
+(return) K
+( \(S_B1 ) p
+(\336) sy
+( unsigned_char \(Addr.H1\),) p n
+0 T ( S_B2 ) S
+(\336) sy
+( unsigned_char \(Addr.H2\),) p n
+(405) # ( S_B3 ) S
+(\336) sy
+( unsigned_char \(Addr.H3\),) p n
+0 T ( S_B4 ) S
+(\336) sy
+( unsigned_char \(Addr.H4\)\);) p n
+0 T ( ) S
+(end) K
+( To_In_Addr;) p n
+0 T () N
+0 T ( ) S
+(-----------) c n
+(410) # () S
+( ) p
+(-- Value --) c n
+0 T () S
+( ) p
+(-----------) c n
+0 T () N
+0 T () S
+( ) p
+(function ) K
+(Value) l
+( \(Add : String\) ) p
+(return) K
+( Address) p n
+0 T ( ) S
+(is) K n
+(415) # () S
+( ) p
+(function ) K
+(Convert) l
+( is) K n
+0 T () S
+( ) p
+(new) K
+( Unchecked_Conversion \(Source ) p
+(\336) sy
+( unsigned_long,) p n
+0 T ( Target ) S
+(\336) sy
+( In_Addr\);) p n
+0 T ( C_Add : chars_ptr := New_String \(Add\);) N
+0 T ( Converted : ) S
+(constant) K
+( In_Addr := Convert \(C_Inet_Addr \(C_Add\)\);) p n
+(420) # ( ) S
+(begin) K n
+(s-garnam.adb) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( Free \(C_Add\);) p n
+0 T ( ) S
+(return) K
+( \(H1 ) p
+(\336) sy
+( Address_Component \(Converted.S_B1\),) p n
+0 T ( H2 ) S
+(\336) sy
+( Address_Component \(Converted.S_B2\),) p n
+0 T ( H3 ) S
+(\336) sy
+( Address_Component \(Converted.S_B3\),) p n
+(425) # ( H4 ) S
+(\336) sy
+( Address_Component \(Converted.S_B4\)\);) p n
+0 T ( ) S
+(end) K
+( Value;) p n
+0 T () N
+0 T () S
+(end) K
+( System.Garlic.Naming;) p n
+(s-garnam.adb) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/snacc.ps b/tests/gps-ref/snacc.ps
new file mode 100644
index 0000000..2cc0cbe
--- /dev/null
+++ b/tests/gps-ref/snacc.ps
@@ -0,0 +1,282 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (-- This file is extracted from the Snacc distribution.) c n
+0 T (-- Parts have be cut to win bytes, and the result is probably meaningless.) N
+0 T (--) N
+0 T () N
+(5) # () S
+(RFC1213-MIB DEFINITIONS ::= ) p
+(BEGIN) L n
+0 T () N
+0 T () S
+( ) p
+(IMPORTS) L n
+0 T () S
+( mgmt, NetworkAddress, ) p
+(IpAddress) k
+(, Counter, ) p
+(Gauge) k
+(,) p n
+0 T ( ) S
+(TimeTicks) k n
+(10) # () S
+( FROM RFC1155-SMI) p n
+0 T () N
+0 T () S
+(-- OBJECT-TYPE) c n
+0 T (-- FROM RFC-1212) N
+0 T () N
+(15) # () S
+( ;) p n
+0 T () N
+0 T ( ) S
+(-- MIB-II \(same prefix as MIB-I\)) c n
+0 T () N
+0 T () S
+( mib-2 ) p
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mgmt 1 }) p n
+(20) # () N
+0 T ( ) S
+(-- textual conventions) c n
+0 T () N
+0 T () S
+( ) p
+(DisplayString) k
+( ::=) p n
+0 T ( ) S
+(OCTET) k
+( ) p
+(STRING) k n
+(25) # () S
+( ) p
+(-- This data type is used to model textual information taken) c n
+0 T () S
+( ) p
+(-- from the NVT ASCII character set. By convention, objects) c n
+0 T () S
+( ) p
+(-- with this syntax are declared as having) c n
+0 T () S
+( ) p
+(-- SIZE \(0..255\)) c n
+0 T () N
+(30) # () S
+( ) p
+(-- groups in MIB-II) c n
+0 T () N
+0 T () S
+( system ) p
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mib-2 1 }) p n
+0 T () N
+0 T ( ) S
+(-- historical \(some say hysterical\)) c n
+(35) # () S
+( ) p
+(-- cmot OBJECT IDENTIFIER ::= { mib-2 9 }) c n
+0 T () N
+0 T () S
+( transmission ) p
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mib-2 10 }) p n
+0 T () N
+0 T () N
+(40) # ( ) S
+(-- the Interfaces table) c n
+0 T () N
+0 T () S
+( ) p
+(-- The Interfaces table contains information on the entity's) c n
+0 T () S
+( ) p
+(-- interfaces. Each interface is thought of as being) c n
+0 T () S
+( ) p
+(-- attached to a `subnetwork'. Note that this term should) c n
+(45) # () S
+( ) p
+(-- not be confused with `subnet' which refers to an) c n
+0 T () S
+( ) p
+(-- addressing partitioning scheme used in the Internet suite) c n
+0 T () S
+( ) p
+(-- of protocols.) c n
+0 T () N
+0 T () S
+( ifTable ) p
+(OBJECT-TYPE) K n
+(50) # () S
+( ) p
+(SYNTAX) K
+( ) p
+(SEQUENCE) K
+( ) p
+(OF) K
+( IfEntry) p n
+0 T ( ) S
+(ACCESS) K
+( not-accessible) p n
+0 T ( ) S
+(STATUS) K
+( mandatory) p n
+0 T ( ) S
+(DESCRIPTION) K n
+0 T () S
+( ") p
+(A list of interface entries. The number of) str n
+(55) # ( entries is given by the value of ifNumber.) S
+(") p n
+0 T ( ::= { interfaces 2 }) N
+0 T () N
+0 T ( IfEntry ::=) N
+0 T ( ) S
+(SEQUENCE) K
+( {) p n
+(60) # ( ifIndex) N
+0 T ( ) S
+(INTEGER) k
+(,) p n
+0 T ( ifDescr) N
+0 T ( ) S
+(DisplayString) k
+(,) p n
+0 T ( ifType) N
+(65) # ( ) S
+(INTEGER) k
+(,) p n
+0 T ( ifMtu) N
+0 T ( ) S
+(INTEGER) k
+(,) p n
+0 T ( ifSpeed) N
+0 T ( ) S
+(Gauge) k
+(,) p n
+(70) # ( ifPhysAddress) N
+(snacc.mib) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( ) p
+(PhysAddress) k
+(,) p n
+0 T ( ifSpecific) N
+0 T ( ) S
+(OBJECT) k
+( ) p
+(IDENTIFIER) k n
+0 T () S
+( }) p n
+(75) # () N
+0 T () N
+0 T ( ifType ) S
+(OBJECT-TYPE) K n
+0 T () S
+( ) p
+(SYNTAX) K
+( ) p
+(INTEGER) k
+( {) p n
+0 T ( other\(1\), ) S
+(-- none of the following) c n
+(80) # () S
+( regular1822\(2\),) p n
+0 T ( hdh1822\(3\),) N
+0 T ( ddn-x25\(4\),) N
+0 T ( rfc877-x25\(5\),) N
+0 T ( e1\(19\), ) S
+(-- european equiv. of T-1) c n
+(85) # () S
+( basicISDN\(20\),) p n
+0 T ( primaryISDN\(21\), ) S
+(-- proprietary serial) c n
+0 T () S
+( propPointToPointSerial\(22\),) p n
+0 T ( ppp\(23\),) N
+0 T ( softwareLoopback\(24\),) N
+(90) # ( eon\(25\), ) S
+(-- CLNP over IP [11]) c n
+0 T () S
+( ethernet-3Mbit\(26\),) p n
+0 T ( nsip\(27\), ) S
+(-- XNS over IP) c n
+0 T () S
+( slip\(28\), ) p
+(-- generic SLIP) c n
+0 T () S
+( ultra\(29\), ) p
+(-- ULTRA technologies) c n
+(95) # () S
+( ds3\(30\), ) p
+(-- T-3) c n
+0 T () S
+( sip\(31\), ) p
+(-- SMDS) c n
+0 T () S
+( frame-relay\(32\)) p n
+0 T ( }) N
+0 T ( ) S
+(ACCESS) K
+( read-only) p n
+(100) # ( ) S
+(STATUS) K
+( mandatory) p n
+0 T ( ) S
+(DESCRIPTION) K n
+0 T () S
+( ") p
+(The type of interface, distinguished according to) str n
+0 T ( the physical/link protocol\(s\) immediately `below') N
+0 T ( the network layer in the protocol stack.) S
+(") p n
+(105) # ( ::= { ifEntry 3 }) N
+0 T () N
+0 T () N
+0 T () S
+(END) L n
+(snacc.mib) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/space.ps b/tests/gps-ref/space.ps
new file mode 100644
index 0000000..a8f2422
--- /dev/null
+++ b/tests/gps-ref/space.ps
@@ -0,0 +1,198 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (REM Script to check space left in database.) c n
+0 T (REM ) N
+0 T () S
+(DECLARE) K n
+0 T () S
+( ) p
+(CURSOR) K
+( tot_space ) p
+(IS) K n
+(5) # () S
+( ) p
+(SELECT) K
+( a.tablespace_name, ) p
+(sum) K
+(\(a.bytes\) ) p
+(FROM) K
+( dba_data_files a) p n
+0 T ( ) S
+(GROUP) K
+( ) p
+(BY) K
+( tablespace_name;) p n
+0 T ( tbl_tot ) S
+(VARCHAR2) K
+(\(50\);) p n
+0 T ( byt_tot ) S
+(NUMBER) K
+(\(13\);) p n
+0 T ( ) S
+(CURSOR) K
+( free_space ) p
+(IS) K n
+(10) # () S
+( ) p
+(SELECT) K
+( ) p
+(sum) K
+(\(b.bytes\) ) p
+(FROM) K
+( dba_free_space b) p n
+0 T ( ) S
+(WHERE) K
+( b.tablespace_name = tbl_tot) p n
+0 T ( ) S
+(GROUP) K
+( ) p
+(BY) K
+( b.tablespace_name;) p n
+0 T ( byt_free ) S
+(NUMBER) K
+(\(13\);) p n
+0 T ( pct_used ) S
+(NUMBER) K
+(\(3\);) p n
+(15) # () S
+(/* ) c n
+0 T ( * Here are some useless comments, inserted for testing a2ps) N
+0 T ( */) N
+0 T () S
+(BEGIN) K n
+0 T () S
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') p
+(TABLESPACE) str
+(',30,') p
+( ) str
+('\) || LPAD\(') p
+(Total Bytes) str
+(',17,') p
+( ) str
+('\) ||) p n
+0 T ( LPAD\(') S
+(Free Bytes) str
+(',17,') p
+( ) str
+('\)) p n
+(20) # ( || LPAD\(') S
+(% Used) str
+(',10,') p
+( ) str
+('\)\);) p n
+0 T ( DBMS_OUTPUT.PUT_LINE \(RPAD\(') S
+(-) str
+(',79,') p
+(-) str
+('\)\);) p n
+0 T ( ) S
+(LOOP) K n
+0 T () S
+( ) p
+(IF) K
+( ) p
+(NOT) K
+( tot_space%ISOPEN) p n
+0 T ( ) S
+(THEN) K n
+(25) # () S
+( ) p
+(OPEN) K
+( tot_space;) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+0 T ( ) S
+(FETCH) K
+( tot_space ) p
+(INTO) K n
+0 T () S
+( tbl_tot,) p n
+0 T ( byt_tot;) N
+(30) # ( ) S
+(IF) K
+( tot_space%FOUND) p n
+0 T ( ) S
+(THEN) K n
+0 T () S
+( ) p
+(OPEN) K
+( free_space;) p n
+0 T ( ) S
+(FETCH) K
+( free_space ) p
+(INTO) K
+( byt_free;) p n
+0 T ( ) S
+(IF) K
+( free_space%FOUND) p n
+(35) # ( ) S
+(THEN) K n
+0 T () S
+( pct_used := TRUNC\(\(\(1 - \(byt_free/byt_tot\)\) * 100\),0\);) p n
+0 T ( DBMS_OUTPUT.PUT_LINE \(RPAD\(tbl_tot,30,') S
+( ) str
+('\) || LPAD\(byt_tot,17,') p
+( ) str
+('\) || LP) p n
+0 T (AD\(byt_free,17,') S
+( ) str
+('\)) p n
+0 T ( || LPAD\(pct_used,10,') S
+( ) str
+('\)\);) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+(40) # ( ) S
+(CLOSE) K
+( free_space;) p n
+0 T ( ) S
+(ELSE) K n
+0 T () S
+( ) p
+(EXIT) K
+(;) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+0 T ( ) S
+(END) K
+( ) p
+(LOOP) K
+(;) p n
+(45) # ( ) S
+(CLOSE) K
+( tot_space;) p n
+0 T () S
+(END) K
+(;) p n
+0 T (/) N
+(space.pls) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/sqlcrtbl.ps b/tests/gps-ref/sqlcrtbl.ps
new file mode 100644
index 0000000..03dc286
--- /dev/null
+++ b/tests/gps-ref/sqlcrtbl.ps
@@ -0,0 +1,632 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#) p 8 T (Skeleton script ) S
+(for) K
+( creating a ) p
+(table) K n
+0 T () S
+(#) p n
+0 T (#) S 8 T (Notes:) N
+0 T (#) S 8 T (- Script should be formatted exactly ) S
+(as) K
+( indicated) p n
+(5) # (#) S 8 T (- The primary key columns should always be the first columns indicated) N
+0 T (#) S 8 T (- ) S
+(All) K
+( SQL statements should be terminated ) p
+(with) K
+( a /) p n
+0 T (#) S 8 T (- Primary key, foreign key, ) S
+(and) K
+( ) p
+(unique) K
+( constraints are out-) p
+(of) K
+(-line.) p n
+0 T (#) S 8 T (- Multi-) S
+(column) K
+( constraints are out-) p
+(of) K
+(-line.) p n
+0 T (#) S 8 T (- ) S
+(All) K
+( other constraints are ) p
+(in) K
+(-line.) p n
+(10) # (#) S 8 T (- ) S
+(Remove all comments above the next line) c n
+0 T () S
+(#=============================================================================) p n
+0 T (# Name :) N
+0 T (# Created ) S
+(On) K
+(:) p n
+0 T (# Created ) S
+(By) K
+(:) p n
+(15) # (# SCN No :) N
+0 T (# Purpose :) N
+0 T (#==============================================================================) N
+0 T () S
+(drop) K
+( ) p
+(table) K
+( owner.table_name) p n
+0 T (/) N
+(20) # () S
+(create) K
+( ) p
+(table) K
+( owner.table_name \() p n
+0 T () S 8 T (column_name) S 24 T () S
+(varchar2) K
+(\(4\)) p 40 T (constraint table_name_nn1 ) S
+(not) K
+( ) p
+(null) K
+(,) p n
+0 T () S 8 T (column_name) S 24 T () S
+(varchar2) K
+(\(10\),) p n
+0 T () S 8 T (column_name) S 24 T () S
+(number) K
+(\(8,2\) ) p 40 T (constraint ) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T () S 40 T (table_name_ck1 \( column_name > 0\),) N
+(25) # () S 8 T (column_name) S 24 T () S
+(number) K
+(\(4,2\)) p 40 T () S
+(default) K
+( 0,) p n
+0 T () S 8 T (column_name) S 24 T () S
+(date) K
+(,) p n
+0 T () S 8 T (.) N
+0 T () S 8 T (.) N
+0 T () S 8 T (.) N
+(30) # () S 8 T (constraint table_name_pk1) N
+0 T () S 8 T () S 16 T (primary key \(column_name, column_name, ...\)) N
+0 T (#) N
+0 T (# ) S
+(All) K
+( constraints that ) p
+(create) K
+( an ) p
+(index) K
+( must have a USING ) p
+(INDEX) K
+( clause) p n
+0 T (# ) S
+(To) K
+( calculate the ) p
+(initial) K
+( extent ) p
+(of) K
+( an ) p
+(index) K
+(, use the following \(assuming) p n
+(35) # (# a 4K block ) S
+(size) K
+(\):) p n
+0 T (# bytes = \(\(x*\(11+x+len\)\)/\(\(4096 - 90\)*\(1 - ) S
+(pctfree) K
+(/100\)\)\)*\(4096 * 1.1\)) p n
+0 T (# ) S
+(where) K n
+0 T () S
+(#) p 8 T (x ) S 16 T () S 24 T (= expected ) S
+(number) K
+( ) p
+(of) K
+( ) p
+(rows) K
+( after 6 months) p n
+0 T (#) S 8 T (z) S 16 T () S 24 T (= ) S
+(number) K
+( ) p
+(of) K
+( columns indexed) p n
+(40) # (#) S 8 T (len) S 16 T () S 24 T (= the average length ) S
+(of) K
+( the indexed ) p
+(column) K n
+0 T () S
+(#) p n
+0 T (# Alternatively, you may use one ) S
+(of) K
+( the following storage clauses:) p n
+0 T (#) N
+0 T (#) S 8 T (Small \(small indexes 20K ) S
+(to) K
+( 2560K\)) p n
+(45) # (#) N
+0 T (# storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T (#) S 8 T (Medium \(medium indexes 2560K ) S
+(to) K
+( 40960K\)) p n
+(50) # (#) N
+0 T (# storage \() S
+(initial) K
+( 2560K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T (#) S 8 T (Large \(large indexes 40960K ) S
+(and) K
+( up\)) p n
+(55) # (#) N
+0 T (# storage \() S
+(initial) K
+( 40960K next 320K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T () S 8 T () S 16 T (using ) S
+(index) K n
+(60) # () S
+() p 8 T () S 16 T () S 24 T (tablespace get_from_dba) N
+0 T () S 8 T () S 16 T () S 24 T () S
+(pctfree) K
+( 10) p n
+0 T () S 8 T () S 16 T () S 24 T (storage \() S
+(initial) K
+( 20K) p n
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( next 20K) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( minextents 1 ) N
+(65) # () S 8 T () S 16 T () S 24 T () S 32 T ( ) S
+(maxextents) K
+( 99) p n
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( pctincrease 100) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( freelists 1\)) N
+0 T () S 8 T (constraint table_name_fk1) N
+0 T () S 8 T () S 16 T (foreign key \(column_name\) references) N
+(70) # () S 8 T () S 16 T (table_name \(column_name\),) N
+(sqlcrtbl.sql) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p 8 T (constraint table_name_u1) N
+0 T () S 8 T () S 16 T () S
+(unique) K
+( \(column_name, column_name\)) p n
+0 T () S 8 T () S 16 T (using ) S
+(index) K n
+0 T () S
+() p 8 T () S 16 T () S 24 T (tablespace get_from_dba) N
+(75) # () S 8 T () S 16 T () S 24 T () S
+(pctfree) K
+( 10) p n
+0 T () S 8 T () S 16 T () S 24 T (storage \() S
+(initial) K
+( 20K) p n
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( next 20K) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( minextents 1 ) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( ) S
+(maxextents) K
+( 99) p n
+(80) # () S 8 T () S 16 T () S 24 T () S 32 T ( pctincrease 100) N
+0 T () S 8 T () S 16 T () S 24 T () S 32 T ( freelists 1\)) N
+0 T (# ) S
+(pctfree) K
+( should be ) p
+(set) K
+( ) p
+(to) K
+( 0 ) p
+(for) K
+( tables whose ) p
+(rows) K
+( are ) p
+(not) K
+( updated ) p n
+0 T (# \(e.g. validation tables, control tables, history tables, etc.\)) N
+0 T (# ) S
+(and) K
+( whose columsn will ) p
+(all) K
+( be complete \() p
+(not) K
+( ) p
+(null) K
+(\) upon first ) p
+(insert) K
+(.) p n
+(85) # (#) N
+0 T (# ) S
+(pctfree) K
+( should be ) p
+(set) K
+( higher than 10 ) p
+(for) K
+( those ) p
+(rows) K
+( ) p
+(where) K
+( many columns) p n
+0 T (# will initially be left ) S
+(null) K
+( upon the first ) p
+(insert) K
+(, but will be updated) p n
+0 T (# later) N
+0 T () S
+(pctfree) K
+( 10 pctused 40) p n
+(90) # (tablespace get_from_dba) N
+0 T (#) N
+0 T (# STORAGE CLAUSE) N
+0 T (#) N
+0 T (# ) S
+(Initial) K
+( Extent) p n
+(95) # (# ) S
+(Initial) K
+( extent storage should be ) p
+(set) K
+( ) p
+(to) K
+( the appropriate ) p
+(number) K
+( ) p
+(of) K
+( bytes) p n
+0 T (# \(rounded ) S
+(to) K
+( a multiple ) p
+(of) K
+( 20K bytes\) this ) p
+(table) K
+( ) p
+(is) K
+( expected ) p
+(to) K
+( grow ) p
+(to) K
+( ) p
+(in) K
+( ) p n
+0 T (# the first 6 months.) N
+0 T (# ) S
+(To) K
+( calculate the ) p
+(initial) K
+( extent, use the following \(assuming) p n
+0 T (# a 4K block ) S
+(size) K
+(\):) p n
+(100) # (# bytes = \(\(x*\(5+y*\(1+len\)\)\)/\(\(4096 - 90\)*\(1 - ) S
+(pctfree) K
+(/100\)\)\)*4096) p n
+0 T (# ) S
+(where) K n
+0 T () S
+(#) p 8 T (x ) S 16 T () S 24 T (= expected ) S
+(number) K
+( ) p
+(of) K
+( ) p
+(rows) K
+( after 6 months) p n
+0 T (#) S 8 T (y) S 16 T () S 24 T (= ) S
+(number) K
+( ) p
+(of) K
+( columns ) p
+(in) K
+( the ) p
+(table) K n
+0 T () S
+(#) p 8 T (len) S 16 T () S 24 T (= the average ) S
+(column) K
+( length) p n
+(105) # (#) S 8 T () S
+(pctfree) K
+() p 16 T () S 24 T (= obtained ) S
+(from) K
+( guidelines above) p n
+0 T (#) N
+0 T (# Round the ) S
+(initial) K
+( extent up ) p
+(to) K
+( one ) p
+(of) K
+( the ) p
+(values) K
+( ) p
+(in) K
+( the ) p
+(table) K
+( below.) p n
+0 T (# Determine the next extent ) S
+(from) K
+( the ) p
+(table) K
+( below \(again assuming 4K ) p n
+0 T (# block sizes\):) N
+(110) # (#) N
+0 T (#) S 8 T () S
+(Initial) K
+( Extent) p 24 T () S 32 T (Next Extent) N
+0 T (#) S 8 T (=============) S 24 T () S 32 T (===========) N
+0 T (#) S 8 T ( 20K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 40K) S 24 T () S 32 T ( 20K) N
+(115) # (#) S 8 T ( 80K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 160K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 320K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 640K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 1280K) S 24 T () S 32 T ( 20K) N
+(120) # (#) S 8 T ( 2560K) S 24 T () S 32 T ( 20K) N
+0 T (#) S 8 T ( 5120K) S 24 T () S 32 T ( 40K) N
+0 T (#) S 8 T ( 10240K) S 24 T () S 32 T ( 80K) N
+0 T (#) S 8 T ( 20480K) S 24 T () S 32 T ( 160K) N
+0 T (#) S 8 T ( 40960K) S 24 T () S 32 T ( 320K) N
+(125) # (#) S 8 T ( 81920K) S 24 T () S 32 T ( 640K) N
+0 T (#) S 8 T ( 163840K) S 24 T () S 32 T ( 1280K) N
+0 T (#) S 8 T ( 327680K) S 24 T () S 32 T ( 2560K) N
+0 T (#) S 8 T ( 655360K) S 24 T () S 32 T ( 5120K) N
+0 T (#) S 8 T (1310720K) S 24 T () S 32 T (10240K) N
+(130) # (#) S 8 T (etc, ) S
+(with) K
+( each succeeding value twice the previous value.) p n
+0 T (#) N
+0 T (# Alternatively, you may use one ) S
+(of) K
+( the following storage clauses:) p n
+0 T (#) N
+0 T (#) S 8 T (Small \(small tables 20K ) S
+(to) K
+( 2560K\)) p n
+(135) # (#) N
+0 T (# storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T (#) S 8 T (Medium \(medium tables 2560K ) S
+(to) K
+( 40960K\)) p n
+(140) # (#) N
+(sqlcrtbl.sql) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (# storage \() p
+(initial) K
+( 2560K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T (#) S 8 T (Large \(large tables 40960K ) S
+(and) K
+( up\)) p n
+(145) # (#) N
+0 T (# storage \() S
+(initial) K
+( 40960K next 320K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+0 T (#) S 8 T () S 16 T (freelists 1\)) N
+0 T (#) N
+0 T (storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(150) # () S 8 T () S 16 T (freelists 1\)) N
+0 T (/) N
+0 T (#) N
+0 T (# Comments are required ) S
+(on) K
+( the ) p
+(table) K
+( ) p
+(and) K
+( ) p
+(all) K
+( columns.) p n
+0 T (# Comments should be ) S
+(in) K
+( upper ) p
+(and) K
+( lower case, should be terminated ) p
+(by) K
+( a) p n
+(155) # (# period, ) S
+(and) K
+( cannot be longer than 255 bytes.) p n
+0 T (#) N
+0 T () S
+(comment) K
+( ) p
+(on) K
+( ) p
+(table) K
+( table_name ) p
+(is) K n
+0 T () S
+(') p
+(Table Alias: XXXX. Add more comment on the table, it can be up to 255 bytes long.) str
+(') p n
+0 T (/) N
+(160) # () S
+(comment) K
+( ) p
+(on) K
+( ) p
+(column) K
+( table_name.column_name ) p
+(is) K n
+0 T () S
+(') p
+(This is the comment on this column. A column comment is required.) str
+(') p n
+0 T (/) N
+0 T () S
+(comment) K
+( ) p
+(on) K
+( ) p
+(column) K
+( table_name.column_name ) p
+(is) K n
+0 T () S
+(') p
+(This is another comment on this column. A column comment is required.) str
+(') p n
+(165) # (/) N
+0 T (#) N
+0 T (# You may need ) S
+(to) K
+( ) p
+(create) K
+( other indexes ) p
+(for) K
+( performance reasons.) p n
+0 T (#) N
+0 T () S
+(create) K
+( ) p
+(index) K
+( table_name_n1 ) p
+(on) K
+( table_name \(column_name\)) p n
+(170) # (tablespace get_from_dba) N
+0 T () S
+(pctfree) K
+( 10) p n
+0 T (storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99) p n
+0 T () S 8 T (pctincrease 100 freelists 1\)) N
+0 T (/) N
+(175) # () S
+(create) K
+( ) p
+(index) K
+( table_name_n2 ) p
+(on) K
+( table_name \(column_name\)) p n
+0 T (tablespace get_from_dba) N
+0 T () S
+(pctfree) K
+( 10) p n
+0 T (storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99) p n
+0 T () S 8 T (pctincrease 100 freelists 1\)) N
+(180) # (/) N
+0 T (# ) N
+0 T (# if this ) S
+(table) K
+( requires a key assigned ) p
+(by) K
+( sequence, ) p
+(create) K
+( the sequence) p n
+0 T (#) N
+0 T () S
+(create) K
+( sequence table_name_pk_sq ) p
+(increment) K
+( ) p
+(by) K
+( 1 ) p
+(start) K
+( ) p
+(with) K
+( 1) p n
+(185) # (/) N
+0 T (# ) S
+(public) K
+( synonyms may be required) p n
+0 T (#) N
+0 T () S
+(create) K
+( ) p
+(public) K
+( ) p
+(synonym) K
+( table_name ) p
+(for) K
+( table_name) p n
+0 T (/) N
+(190) # () S
+(create) K
+( ) p
+(public) K
+( ) p
+(synonym) K
+( table_name_pk_sq ) p
+(for) K
+( table_name_pk_sq) p n
+0 T (/) N
+0 T (#) N
+(sqlcrtbl.sql) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/sqlinit.ps b/tests/gps-ref/sqlinit.ps
new file mode 100644
index 0000000..ff6f6cc
--- /dev/null
+++ b/tests/gps-ref/sqlinit.ps
@@ -0,0 +1,369 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (#) p n
+0 T (##############################################################################) N
+0 T (# Example INIT.ORA ) S
+(file) K n
+0 T () S
+(#) p n
+(5) # (# This ) S
+(file) K
+( ) p
+(is) K
+( provided ) p
+(by) K
+( Oracle Corporation ) p
+(to) K
+( help you customize) p n
+0 T (# your RDBMS installation ) S
+(for) K
+( your site. Important ) p
+(system) K
+( parameters) p n
+0 T (# are discussed, ) S
+(and) K
+( example settings given.) p n
+0 T (#) N
+0 T (# ) S
+(Some) K
+( parameter settings are ) p
+(generic) K
+( ) p
+(to) K
+( ) p
+(any) K
+( ) p
+(size) K
+( installation.) p n
+(10) # (# ) S
+(For) K
+( parameters that require different ) p
+(values) K
+( ) p
+(in) K
+( different ) p
+(size) K n
+0 T () S
+(# installations, three scenarios have been provided: SMALL, MEDIUM) p n
+0 T (# ) S
+(and) K
+( LARGE. ) p
+(Any) K
+( parameter that needs ) p
+(to) K
+( be tuned according ) p
+(to) K n
+0 T () S
+(# installation ) p
+(size) K
+( will have three settings, ) p
+(each) K
+( one commented) p n
+0 T (# according ) S
+(to) K
+( installation ) p
+(size) K
+(.) p n
+(15) # (#) N
+0 T (# ) S
+(Use) K
+( the following ) p
+(table) K
+( ) p
+(to) K
+( approximate the SGA ) p
+(size) K
+( needed ) p
+(for) K
+( the) p n
+0 T (# three scenarious provided ) S
+(in) K
+( this ) p
+(file) K
+(:) p n
+0 T (#) N
+0 T (# ) S
+(-------Installation/Database Size------) c n
+(20) # () S
+(# SMALL MEDIUM LARGE) p n
+0 T (# ) S
+(Block) K
+( 2K 4500K 6800K 17000K) p n
+0 T (# ) S
+(Size) K
+( 4K 5500K 8800K 21000K) p n
+0 T (#) N
+0 T (# ) S
+(To) K
+( ) p
+(set) K
+( up a ) p
+(database) K
+( that multiple instances will be ) p
+(using) K
+(, place) p n
+(25) # (# ) S
+(all) K
+( ) p
+(instance) K
+(-specific parameters ) p
+(in) K
+( one ) p
+(file) K
+(, ) p
+(and) K
+( ) p
+(then) K
+( have ) p
+(all) K n
+0 T () S
+(# ) p
+(of) K
+( these files point ) p
+(to) K
+( a master ) p
+(file) K
+( ) p
+(using) K
+( the IFILE command.) p n
+0 T (# This way, ) S
+(when) K
+( you ) p
+(change) K
+( a ) p
+(public) K n
+0 T () S
+(# parameter, it will automatically ) p
+(change) K
+( ) p
+(on) K
+( ) p
+(all) K
+( instances. This ) p
+(is) K n
+0 T () S
+(# necessary, since ) p
+(all) K
+( instances must ) p
+(run) K
+( ) p
+(with) K
+( the same value ) p
+(for) K
+( many) p n
+(30) # (# parameters. ) S
+(For) K
+( example, ) p
+(if) K
+( you choose ) p
+(to) K
+( ) p
+(use) K
+( ) p
+(private) K
+( ) p
+(rollback) K
+( segments,) p n
+0 T (# these must be specified ) S
+(in) K
+( different files, but since ) p
+(all) K
+( gc_*) p n
+0 T (# parameters must be the same ) S
+(on) K
+( ) p
+(all) K
+( instances, they should be ) p
+(in) K
+( one ) p
+(file) K
+(.) p n
+0 T (#) N
+0 T (# INSTRUCTIONS: Edit this ) S
+(file) K
+( ) p
+(and) K
+( the other INIT files it calls ) p
+(for) K n
+(35) # () S
+(# your site, either ) p
+(by) K
+( ) p
+(using) K
+( the ) p
+(values) K
+( provided here ) p
+(or) K
+( ) p
+(by) K
+( providing) p n
+0 T (# your ) S
+(own) K
+(. ) p
+(Then) K
+( place an IFILE= line ) p
+(into) K
+( ) p
+(each) K
+( ) p
+(instance) K
+(-specific) p n
+0 T (# INIT ) S
+(file) K
+( that points ) p
+(at) K
+( this ) p
+(file) K
+(.) p n
+0 T (###############################################################################) N
+0 T () N
+(40) # (db_name = oracle) N
+0 T (db_files = 20) N
+0 T (control_files = \(%RDBMS_FILES%\\ctl1orcl.ora\)) N
+0 T () N
+0 T (compatible = 7.3.0.0.0) N
+(45) # () N
+0 T (db_file_multiblock_read_count = 8) S 40 T () S 48 T () S 56 T () S 64 T ( # ) S
+(INITIAL) K n
+0 T () S
+(# db_file_multiblock_read_count = 8 # SMALL) p n
+0 T (# db_file_multiblock_read_count = 16 # MEDIUM) N
+0 T (# db_file_multiblock_read_count = 32 # LARGE) N
+(50) # () N
+0 T (db_block_buffers = 50) S 24 T () S 32 T () S 40 T ( # ) S
+(INITIAL) K n
+0 T () S
+(# db_block_buffers = 200 # SMALL) p n
+0 T (# db_block_buffers = 550 # MEDIUM) N
+0 T (# db_block_buffers = 3200 # LARGE) N
+(55) # () N
+0 T (shared_pool_size = 500000 # ) S
+(INITIAL) K n
+0 T () S
+(# shared_pool_size = 3500000 # SMALL) p n
+0 T (# shared_pool_size = 6000000 # MEDIUM) N
+0 T (# shared_pool_size = 9000000 # LARGE) N
+(60) # () N
+0 T (log_checkpoint_interval = 10000) N
+0 T () N
+0 T (processes = 50 # ) S
+(INITIAL) K n
+0 T () S
+(# processes = 50 # SMALL) p n
+(65) # (# processes = 100 # MEDIUM) N
+0 T (# processes = 200 # LARGE) N
+0 T () N
+0 T (dml_locks = 100 # ) S
+(INITIAL) K n
+0 T () S
+(# dml_locks = 100 # SMALL) p n
+(70) # (# dml_locks = 200 # MEDIUM) N
+(sqlinit.ora) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (# dml_locks = 500 # LARGE) p n
+0 T () N
+0 T (log_buffer = 1000 # ) S
+(INITIAL) K n
+0 T () S
+(# log_buffer = 8192 # SMALL) p n
+(75) # (# log_buffer = 32768 # MEDIUM) N
+0 T (# log_buffer = 163840 # LARGE) N
+0 T () N
+0 T (sequence_cache_entries = 10 # ) S
+(INITIAL) K n
+0 T () S
+(# sequence_cache_entries = 10 # SMALL) p n
+(80) # (# sequence_cache_entries = 30 # MEDIUM) N
+0 T (# sequence_cache_entries = 100 # LARGE) N
+0 T () N
+0 T (sequence_cache_hash_buckets = 10 # ) S
+(INITIAL) K n
+0 T () S
+(# sequence_cache_hash_buckets = 10 # SMALL) p n
+(85) # (# sequence_cache_hash_buckets = 23 # MEDIUM) N
+0 T (# sequence_cache_hash_buckets = 89 # LARGE) N
+0 T () N
+0 T (# audit_trail = ) S
+(true) K
+( # ) p
+(if) K
+( you want auditing) p n
+0 T (# timed_statistics = ) S
+(true) K
+( # ) p
+(if) K
+( you want timed ) p
+(statistics) K n
+(90) # () S
+(max_dump_file_size = 10240 # limit trace ) p
+(file) K
+( ) p
+(size) K
+( ) p
+(to) K
+( 5 Meg ) p
+(each) K n
+0 T () N
+0 T () S
+(# log_archive_start = ) p
+(true) K
+( # ) p
+(if) K
+( you want automatic archiving) p n
+0 T () N
+0 T (# ) S
+(define) K
+( directories ) p
+(to) K
+( store trace ) p
+(and) K
+( alert files) p n
+(95) # (background_dump_dest=%RDBMS73%\\TRACE) N
+0 T (user_dump_dest=%RDBMS73%\\TRACE) N
+0 T () N
+0 T (db_block_size = 2048) N
+0 T () N
+(100) # (snapshot_refresh_processes = 0) N
+0 T () N
+0 T () S
+(remote_login_passwordfile = shared) c n
+(sqlinit.ora) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/sqlpq92.ps b/tests/gps-ref/sqlpq92.ps
new file mode 100644
index 0000000..d4d271d
--- /dev/null
+++ b/tests/gps-ref/sqlpq92.ps
@@ -0,0 +1,31 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (SELECT H.emp_no, ) p n
+0 T ( H.hist_type,) N
+0 T ( ) S
+(count) K
+(\(*\) ) p n
+0 T (FROM emp_history H) N
+(5) # (GROUP BY H.emp_no, H.hist_type;) N
+(sqlpq92.sql) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/sqlspace.ps b/tests/gps-ref/sqlspace.ps
new file mode 100644
index 0000000..5dcf075
--- /dev/null
+++ b/tests/gps-ref/sqlspace.ps
@@ -0,0 +1,198 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (REM Script to check space left in database.) c n
+0 T (REM ) N
+0 T () S
+(DECLARE) K n
+0 T () S
+( ) p
+(CURSOR) K
+( tot_space ) p
+(IS) K n
+(5) # () S
+( ) p
+(SELECT) K
+( a.tablespace_name, ) p
+(sum) K
+(\(a.bytes\) ) p
+(FROM) K
+( dba_data_files a) p n
+0 T ( ) S
+(GROUP) K
+( ) p
+(BY) K
+( tablespace_name;) p n
+0 T ( tbl_tot ) S
+(VARCHAR2) K
+(\(50\);) p n
+0 T ( byt_tot ) S
+(NUMBER) K
+(\(13\);) p n
+0 T ( ) S
+(CURSOR) K
+( free_space ) p
+(IS) K n
+(10) # () S
+( ) p
+(SELECT) K
+( ) p
+(sum) K
+(\(b.bytes\) ) p
+(FROM) K
+( dba_free_space b) p n
+0 T ( ) S
+(WHERE) K
+( b.tablespace_name = tbl_tot) p n
+0 T ( ) S
+(GROUP) K
+( ) p
+(BY) K
+( b.tablespace_name;) p n
+0 T ( byt_free ) S
+(NUMBER) K
+(\(13\);) p n
+0 T ( pct_used ) S
+(NUMBER) K
+(\(3\);) p n
+(15) # () S
+(/* ) c n
+0 T ( * Here are some useless comments, inserted for testing a2ps) N
+0 T ( */) N
+0 T () S
+(BEGIN) K n
+0 T () S
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') p
+(TABLESPACE) str
+(',30,') p
+( ) str
+('\) || LPAD\(') p
+(Total Bytes) str
+(',17,') p
+( ) str
+('\) ||) p n
+0 T ( LPAD\(') S
+(Free Bytes) str
+(',17,') p
+( ) str
+('\)) p n
+(20) # ( || LPAD\(') S
+(% Used) str
+(',10,') p
+( ) str
+('\)\);) p n
+0 T ( DBMS_OUTPUT.PUT_LINE \(RPAD\(') S
+(-) str
+(',79,') p
+(-) str
+('\)\);) p n
+0 T ( ) S
+(LOOP) K n
+0 T () S
+( ) p
+(IF) K
+( ) p
+(NOT) K
+( tot_space%ISOPEN) p n
+0 T ( ) S
+(THEN) K n
+(25) # () S
+( ) p
+(OPEN) K
+( tot_space;) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+0 T ( ) S
+(FETCH) K
+( tot_space ) p
+(INTO) K n
+0 T () S
+( tbl_tot,) p n
+0 T ( byt_tot;) N
+(30) # ( ) S
+(IF) K
+( tot_space%FOUND) p n
+0 T ( ) S
+(THEN) K n
+0 T () S
+( ) p
+(OPEN) K
+( free_space;) p n
+0 T ( ) S
+(FETCH) K
+( free_space ) p
+(INTO) K
+( byt_free;) p n
+0 T ( ) S
+(IF) K
+( free_space%FOUND) p n
+(35) # ( ) S
+(THEN) K n
+0 T () S
+( pct_used := TRUNC\(\(\(1 - \(byt_free/byt_tot\)\) * 100\),0\);) p n
+0 T ( DBMS_OUTPUT.PUT_LINE \(RPAD\(tbl_tot,30,') S
+( ) str
+('\) || LPAD\(byt_tot,17,') p
+( ) str
+('\) || LP) p n
+0 T (AD\(byt_free,17,') S
+( ) str
+('\)) p n
+0 T ( || LPAD\(pct_used,10,') S
+( ) str
+('\)\);) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+(40) # ( ) S
+(CLOSE) K
+( free_space;) p n
+0 T ( ) S
+(ELSE) K n
+0 T () S
+( ) p
+(EXIT) K
+(;) p n
+0 T ( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+0 T ( ) S
+(END) K
+( ) p
+(LOOP) K
+(;) p n
+(45) # ( ) S
+(CLOSE) K
+( tot_space;) p n
+0 T () S
+(END) K
+(;) p n
+0 T (/) N
+(sqlspace.pkb) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/strange.ps b/tests/gps-ref/strange.ps
new file mode 100644
index 0000000..ffc56fe
--- /dev/null
+++ b/tests/gps-ref/strange.ps
@@ -0,0 +1,302 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (Topics:) p n
+0 T ( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+0 T ( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+0 T ( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+(5) # ( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+0 T () N
+0 T () N
+0 T (----------------------------------------------------------------------) N
+0 T () N
+(10) # () S
+(Date: Sat, 09 Aug 1997 17:57:56 +0200) C n
+0 T () S
+(From: ) K
+(Christian Gottschling <chg@pegasus.dvz.fh-aachen.de>) L n
+0 T () S
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+0 T () S
+(Message-ID: <33EC9384.B15C03F4@pegasus.dvz.fh-aachen.de>) c n
+0 T (References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>) N
+(15) # () N
+0 T () S
+(W.I.N. \(Holding\)LLC wrote:) p n
+0 T () N
+0 T (>) S
+( \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+0 T () S
+(>) p
+( \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+(20) # () S
+(>) p
+( \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+0 T () S
+(>) p
+( \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+0 T () S
+(>) p
+( \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+0 T () S
+(>) p
+( \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+0 T () S
+(>) p n
+(25) # (>) S
+( sergch@anet.donetsk.ua) k n
+0 T () S
+(>) p n
+0 T (>) S
+( \363\320\305\333\311\324\305!!!) k n
+0 T () N
+0 T () S
+(Yes! Indeed!) p n
+(30) # () N
+0 T (SCNR.) N
+0 T () N
+0 T ( --) N
+0 T (Christian Gottschling Datenverwurstungszentrale Juelich) N
+(35) # (... I'm sitting here all day, randomly pressing keys ...) N
+0 T () N
+0 T () N
+0 T () N
+0 T (------------------------------) N
+(40) # () N
+0 T () S
+(Date: 9 Aug 1997 12:25:33 -0400) C n
+0 T () S
+(From: ) K
+(brobin@freenet.columbus.oh.us \(Brian Robinson\)) L n
+0 T () S
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+0 T () S
+(Message-ID: <5si5lt$4cv@login.freenet.columbus.oh.us>) c n
+(45) # (References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33EC9384.B15C03) N
+0 T (F4@pegasus.dvz.fh-aachen.de>) N
+0 T () N
+0 T () S
+(Christian Gottschling \(chg@pegasus.dvz.fh-aachen.de\) wrote:) p n
+0 T (: W.I.N. \(Holding\)LLC wrote:) N
+0 T () N
+(50) # (: > \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) N
+0 T (: > \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) N
+0 T (: > \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) N
+0 T (: > \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) N
+0 T (: > \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) N
+(55) # (: > \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) N
+0 T (: >) N
+0 T (: > sergch@anet.donetsk.ua) N
+0 T (: >) N
+0 T (: > \363\320\305\333\311\324\305!!!) N
+(60) # () N
+0 T (: Yes! Indeed!) N
+0 T () N
+0 T (: SCNR.) N
+0 T () N
+(65) # (: --) N
+0 T (: Christian Gottschling Datenverwurstungszentrale Juelich) N
+0 T (: ... I'm sitting here all day, randomly pressing keys ...) N
+0 T () N
+0 T (..... uhh.... \256\316\256\350\256y1\330\322}? ;\)) N
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Brian Robinson) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(70) # (-- ) p n
+0 T (Brian Robinson | Sometimes its curious how much people are afraid of crazy) N
+0 T (Cols., Ohio | people. Who is to determine who is sane and crazy? I myself) N
+0 T (Student of WHS | am rather insane, some would say. Then again, im not the) N
+0 T (Maxim\\Starmind | psycho beating himself with a rubber chicken in the corner.) N
+(75) # () N
+0 T (------------------------------) N
+0 T () N
+0 T () S
+(Date: Sat, 09 Aug 1997 15:19:42 -0700) C n
+0 T () S
+(From: ) K
+(Andy Schwartz <andys@mail.stlnet.com>) L n
+(80) # () S
+(To: "W.I.N. \(Holding\)LLC" <sergch@anet.donetsk.ua>) C n
+0 T () S
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+0 T () S
+(Message-ID: <33ECECFE.5566@mail.stlnet.com>) c n
+0 T (References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>) N
+0 T () N
+(85) # () S
+(IMHO, I think you should use \323\320\305\303\311\301\314\311\323\324 instead of \320\322\317\307\322\301\315\315\311\322\317.) p n
+0 T () N
+0 T (.. Andy) N
+0 T () N
+0 T (W.I.N. \(Holding\)LLC wrote:) N
+(90) # (>) S
+( ) k n
+0 T () S
+(>) p
+( \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+0 T () S
+(>) p
+( \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+0 T () S
+(>) p
+( \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+0 T () S
+(>) p
+( \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+(95) # () S
+(>) p
+( \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+0 T () S
+(>) p
+( \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+0 T () S
+(>) p
+( ) k n
+0 T () S
+(>) p
+( sergch@anet.donetsk.ua) k n
+0 T () S
+(>) p
+( ) k n
+(100) # () S
+(>) p
+( \363\320\305\333\311\324\305!!!) k n
+0 T () N
+0 T () S
+(------------------------------) p n
+0 T () N
+0 T () S
+(Date: Sun, 10 Aug 1997 22:53:31 GMT) C n
+(105) # () S
+(From: ) K
+(ribo@mindspring.com \(Kevin Allegood\)) L n
+0 T () S
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+0 T () S
+(Message-ID: <5slgmt$g6@camel3.mindspring.com>) c n
+0 T (References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33ECECFE.5566@m) N
+0 T (ail.stlnet.com>) N
+0 T () N
+(110) # () S
+(Andy Schwartz <andys@mail.stlnet.com> let escape his/her/whatever's) p n
+0 T (keyboard:) N
+0 T () N
+0 T (>) S
+(IMHO, I think you should use \323\320\305\303\311\301\314\311\323\324 instead of \320\322\317\307\322\301\315\315\311\322\317.) k n
+0 T () N
+(115) # () S
+(It depends on your version of Notes. For 4.5X, I'd use \323\320\305\303\311\301\314\311\323\324, but) p n
+0 T (for earlier versions \320\322\317\307\322\301\315\315\311\322\317 works fine. Incedentally, although) N
+0 T (you can do it, I'd be careful about \304\317\325\323\324\322\317\312\323\324ing the SAP \323) N
+0 T (\320\317\323\314\305\304\325\300\335\311\315 unless your really know what you're doing.) N
+0 T () N
+(120) # (Kevin Allegood.) N
+0 T () N
+0 T (>) S
+(.. Andy) k n
+0 T () N
+0 T () S
+(>) p
+(W.I.N. \(Holding\)LLC wrote:) k n
+(125) # () S
+(>) p
+(> ) k n
+0 T () S
+(>) p
+(> \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+0 T () S
+(>) p
+(> \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+0 T () S
+(>) p
+(> \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+0 T () S
+(>) p
+(> \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+(130) # () S
+(>) p
+(> \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+0 T () S
+(>) p
+(> \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+0 T () S
+(>) p
+(> ) k n
+0 T () S
+(>) p
+(> sergch@anet.donetsk.ua) k n
+0 T () S
+(>) p
+(> ) k n
+(135) # () S
+(>) p
+(> \363\320\305\333\311\324\305!!!) k n
+0 T () N
+0 T () N
+0 T () N
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Kevin Allegood) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (------------------------------) p n
+(140) # () N
+0 T (End of forwarda004hb Digest) N
+0 T (***************************) N
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Kevin Allegood) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/symbol.ps b/tests/gps-ref/symbol.ps
new file mode 100644
index 0000000..e817cc7
--- /dev/null
+++ b/tests/gps-ref/symbol.ps
@@ -0,0 +1,621 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( 0, 0, 0 :) p
+(^@) sy
+() p 16 T ( 1, 1, 1 :) S
+(^A) sy
+() p 32 T ( 2, 2, 2 :) S
+(^B) sy
+() p 48 T ( 3, 3, 3 :) S
+(^C) sy n
+0 T () S
+( 4, 4, 4 :) p
+(^D) sy
+() p 16 T ( 5, 5, 5 :) S
+(^E) sy
+() p 32 T ( 6, 6, 6 :) S
+(^F) sy
+() p 48 T ( 7, 7, 7 :) S
+(^G) sy n
+0 T () S
+( 10, 8, 8 :) p
+(^H) sy
+() p 16 T ( 11, 9, 9 :) S
+() sy 32 T () S
+() p 40 T ( 12, 10, a :) N
+0 T () S 8 T ( 13, 11, b :) S
+(^K) sy n
+(5) # () S
+( 14, 12, c :) p n
+(symbol.pre) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) # () p 8 T ( 15, 13, d :) N
+0 T () S 8 T ( 16, 14, e :) S
+(^N) sy
+() p 24 T ( 17, 15, f :) S
+(^O) sy n
+0 T () S
+( 20, 16,10 :) p
+(^P) sy
+() p 16 T ( 21, 17,11 :) S
+(^Q) sy
+() p 32 T ( 22, 18,12 :) S
+(^R) sy
+() p 48 T ( 23, 19,13 :) S
+(^S) sy n
+0 T () S
+( 24, 20,14 :) p
+(^T) sy
+() p 16 T ( 25, 21,15 :) S
+(^U) sy
+() p 32 T ( 26, 22,16 :) S
+(^V) sy
+() p 48 T ( 27, 23,17 :) S
+(^W) sy n
+0 T () S
+( 30, 24,18 :) p
+(^X) sy
+() p 16 T ( 31, 25,19 :) S
+(^Y) sy
+() p 32 T ( 32, 26,1a :) S
+(^Z) sy
+() p 48 T ( 33, 27,1b :) S
+(^[) sy n
+(10) # () S
+( 34, 28,1c :) p
+(^\\) sy
+() p 16 T ( 35, 29,1d :) S
+(^]) sy
+() p 32 T ( 36, 30,1e :) S
+(^^) sy
+() p 48 T ( 37, 31,1f :) S
+(^_) sy n
+0 T () S
+( 40, 32,20 :) p
+( ) sy
+() p 16 T ( 41, 33,21 :) S
+(!) sy
+() p 32 T ( 42, 34,22 :) S
+(") sy
+() p 48 T ( 43, 35,23 :) S
+(#) sy n
+0 T () S
+( 44, 36,24 :) p
+($) sy
+() p 16 T ( 45, 37,25 :) S
+(%) sy
+() p 32 T ( 46, 38,26 :) S
+(&) sy
+() p 48 T ( 47, 39,27 :) S
+(') sy n
+0 T () S
+( 50, 40,28 :) p
+(\() sy
+() p 16 T ( 51, 41,29 :) S
+(\)) sy
+() p 32 T ( 52, 42,2a :) S
+(*) sy
+() p 48 T ( 53, 43,2b :) S
+(+) sy n
+0 T () S
+( 54, 44,2c :) p
+(,) sy
+() p 16 T ( 55, 45,2d :) S
+(-) sy
+() p 32 T ( 56, 46,2e :) S
+(.) sy
+() p 48 T ( 57, 47,2f :) S
+(/) sy n
+(15) # () S
+( 60, 48,30 :) p
+(0) sy
+() p 16 T ( 61, 49,31 :) S
+(1) sy
+() p 32 T ( 62, 50,32 :) S
+(2) sy
+() p 48 T ( 63, 51,33 :) S
+(3) sy n
+0 T () S
+( 64, 52,34 :) p
+(4) sy
+() p 16 T ( 65, 53,35 :) S
+(5) sy
+() p 32 T ( 66, 54,36 :) S
+(6) sy
+() p 48 T ( 67, 55,37 :) S
+(7) sy n
+0 T () S
+( 70, 56,38 :) p
+(8) sy
+() p 16 T ( 71, 57,39 :) S
+(9) sy
+() p 32 T ( 72, 58,3a :) S
+(:) sy
+() p 48 T ( 73, 59,3b :) S
+(;) sy n
+0 T () S
+( 74, 60,3c :) p
+(<) sy
+() p 16 T ( 75, 61,3d :) S
+(=) sy
+() p 32 T ( 76, 62,3e :) S
+(>) sy
+() p 48 T ( 77, 63,3f :) S
+(?) sy n
+0 T () S
+(100, 64,40 :) p
+(@) sy
+() p 16 T (101, 65,41 :) S
+(A) sy
+() p 32 T (102, 66,42 :) S
+(B) sy
+() p 48 T (103, 67,43 :) S
+(C) sy n
+(20) # () S
+(104, 68,44 :) p
+(D) sy
+() p 16 T (105, 69,45 :) S
+(E) sy
+() p 32 T (106, 70,46 :) S
+(F) sy
+() p 48 T (107, 71,47 :) S
+(G) sy n
+0 T () S
+(110, 72,48 :) p
+(H) sy
+() p 16 T (111, 73,49 :) S
+(I) sy
+() p 32 T (112, 74,4a :) S
+(J) sy
+() p 48 T (113, 75,4b :) S
+(K) sy n
+0 T () S
+(114, 76,4c :) p
+(L) sy
+() p 16 T (115, 77,4d :) S
+(M) sy
+() p 32 T (116, 78,4e :) S
+(N) sy
+() p 48 T (117, 79,4f :) S
+(O) sy n
+0 T () S
+(120, 80,50 :) p
+(P) sy
+() p 16 T (121, 81,51 :) S
+(Q) sy
+() p 32 T (122, 82,52 :) S
+(R) sy
+() p 48 T (123, 83,53 :) S
+(S) sy n
+0 T () S
+(124, 84,54 :) p
+(T) sy
+() p 16 T (125, 85,55 :) S
+(U) sy
+() p 32 T (126, 86,56 :) S
+(V) sy
+() p 48 T (127, 87,57 :) S
+(W) sy n
+(25) # () S
+(130, 88,58 :) p
+(X) sy
+() p 16 T (131, 89,59 :) S
+(Y) sy
+() p 32 T (132, 90,5a :) S
+(Z) sy
+() p 48 T (133, 91,5b :) S
+([) sy n
+0 T () S
+(134, 92,5c :) p
+(\\) sy
+() p 16 T (135, 93,5d :) S
+(]) sy
+() p 32 T (136, 94,5e :) S
+(^) sy
+() p 48 T (137, 95,5f :) S
+(_) sy n
+0 T () S
+(140, 96,60 :) p
+(`) sy
+() p 16 T (141, 97,61 :) S
+(a) sy
+() p 32 T (142, 98,62 :) S
+(b) sy
+() p 48 T (143, 99,63 :) S
+(c) sy n
+0 T () S
+(144,100,64 :) p
+(d) sy
+() p 16 T (145,101,65 :) S
+(e) sy
+() p 32 T (146,102,66 :) S
+(f) sy
+() p 48 T (147,103,67 :) S
+(g) sy n
+0 T () S
+(150,104,68 :) p
+(h) sy
+() p 16 T (151,105,69 :) S
+(i) sy
+() p 32 T (152,106,6a :) S
+(j) sy
+() p 48 T (153,107,6b :) S
+(k) sy n
+(30) # () S
+(154,108,6c :) p
+(l) sy
+() p 16 T (155,109,6d :) S
+(m) sy
+() p 32 T (156,110,6e :) S
+(n) sy
+() p 48 T (157,111,6f :) S
+(o) sy n
+0 T () S
+(160,112,70 :) p
+(p) sy
+() p 16 T (161,113,71 :) S
+(q) sy
+() p 32 T (162,114,72 :) S
+(r) sy
+() p 48 T (163,115,73 :) S
+(s) sy n
+0 T () S
+(164,116,74 :) p
+(t) sy
+() p 16 T (165,117,75 :) S
+(u) sy
+() p 32 T (166,118,76 :) S
+(v) sy
+() p 48 T (167,119,77 :) S
+(w) sy n
+0 T () S
+(170,120,78 :) p
+(x) sy
+() p 16 T (171,121,79 :) S
+(y) sy
+() p 32 T (172,122,7a :) S
+(z) sy
+() p 48 T (173,123,7b :) S
+({) sy n
+0 T () S
+(174,124,7c :) p
+(|) sy
+() p 16 T (175,125,7d :}) S 32 T (176,126,7e :) S
+(~) sy
+() p 48 T (177,127,7f :) S
+(^?) sy n
+(35) # () S
+(200,128,80 :) p
+(M-^@) sy
+() p 24 T (201,129,81 :) S
+(M-^A) sy
+() p 48 T (202,130,82 :) S
+(M-^B) sy
+() p 72 T (203,131,) N
+0 T (83 :) S
+(M-^C) sy n
+0 T () S
+(204,132,84 :) p
+(M-^D) sy
+() p 24 T (205,133,85 :) S
+(M-^E) sy
+() p 48 T (206,134,86 :) S
+(M-^F) sy
+() p 72 T (207,135,) N
+0 T (87 :) S
+(M-^G) sy n
+0 T () S
+(210,136,88 :) p
+(M-^H) sy
+() p 24 T (211,137,89 :) S
+(M-^I) sy
+() p 48 T (212,138,8a :) S
+(M-^J) sy
+() p 72 T (213,139,) N
+0 T (8b :) S
+(M-^K) sy n
+0 T () S
+(214,140,8c :) p
+(M-^L) sy
+() p 24 T (215,141,8d :) S
+(M-^M) sy
+() p 48 T (216,142,8e :) S
+(M-^N) sy
+() p 72 T (217,143,) N
+0 T (8f :) S
+(M-^O) sy n
+0 T () S
+(220,144,90 :) p
+(M-^P) sy
+() p 24 T (221,145,91 :) S
+(M-^Q) sy
+() p 48 T (222,146,92 :) S
+(M-^R) sy
+() p 72 T (223,147,) N
+0 T (93 :) S
+(M-^S) sy n
+(40) # () S
+(224,148,94 :) p
+(M-^T) sy
+() p 24 T (225,149,95 :) S
+(M-^U) sy
+() p 48 T (226,150,96 :) S
+(M-^V) sy
+() p 72 T (227,151,) N
+0 T (97 :) S
+(M-^W) sy n
+0 T () S
+(230,152,98 :) p
+(M-^X) sy
+() p 24 T (231,153,99 :) S
+(M-^Y) sy
+() p 48 T (232,154,9a :) S
+(M-^Z) sy
+() p 72 T (233,155,) N
+0 T (9b :) S
+(M-^[) sy n
+0 T () S
+(234,156,9c :) p
+(M-^\\) sy
+() p 24 T (235,157,9d :) S
+(M-^]) sy
+() p 48 T (236,158,9e :) S
+(M-^^) sy
+() p 72 T (237,159,) N
+0 T (9f :) S
+(M-^_) sy n
+0 T () S
+(240,160,a0 :) p
+(\240) sy
+() p 16 T (241,161,a1 :) S
+(\241) sy
+() p 32 T (242,162,a2 :) S
+(\242) sy
+() p 48 T (243,163,a3 :) S
+(\243) sy n
+0 T () S
+(244,164,a4 :) p
+(\244) sy
+() p 16 T (245,165,a5 :) S
+(\245) sy
+() p 32 T (246,166,a6 :) S
+(\246) sy
+() p 48 T (247,167,a7 :) S
+(\247) sy n
+(45) # () S
+(250,168,a8 :) p
+(\250) sy
+() p 16 T (251,169,a9 :) S
+(\251) sy
+() p 32 T (252,170,aa :) S
+(\252) sy
+() p 48 T (253,171,ab :) S
+(\253) sy n
+0 T () S
+(254,172,ac :) p
+(\254) sy
+() p 16 T (255,173,ad :) S
+(\255) sy
+() p 32 T (256,174,ae :) S
+(\256) sy
+() p 48 T (257,175,af :) S
+(\257) sy n
+0 T () S
+(260,176,b0 :) p
+(\260) sy
+() p 16 T (261,177,b1 :) S
+(\261) sy
+() p 32 T (262,178,b2 :) S
+(\262) sy
+() p 48 T (263,179,b3 :) S
+(\263) sy n
+0 T () S
+(264,180,b4 :) p
+(\264) sy
+() p 16 T (265,181,b5 :) S
+(\265) sy
+() p 32 T (266,182,b6 :) S
+(\266) sy
+() p 48 T (267,183,b7 :) S
+(\267) sy n
+0 T () S
+(270,184,b8 :) p
+(\270) sy
+() p 16 T (271,185,b9 :) S
+(\271) sy
+() p 32 T (272,186,ba :) S
+(\272) sy
+() p 48 T (273,187,bb :) S
+(\273) sy n
+(50) # () S
+(274,188,bc :) p
+(\274) sy
+() p 16 T (275,189,bd :) S
+(\275) sy
+() p 32 T (276,190,be :) S
+(\276) sy
+() p 48 T (277,191,bf :) S
+(\277) sy n
+0 T () S
+(300,192,c0 :) p
+(\300) sy
+() p 16 T (301,193,c1 :) S
+(\301) sy
+() p 32 T (302,194,c2 :) S
+(\302) sy
+() p 48 T (303,195,c3 :) S
+(\303) sy n
+0 T () S
+(304,196,c4 :) p
+(\304) sy
+() p 16 T (305,197,c5 :) S
+(\305) sy
+() p 32 T (306,198,c6 :) S
+(\306) sy
+() p 48 T (307,199,c7 :) S
+(\307) sy n
+0 T () S
+(310,200,c8 :) p
+(\310) sy
+() p 16 T (311,201,c9 :) S
+(\311) sy
+() p 32 T (312,202,ca :) S
+(\312) sy
+() p 48 T (313,203,cb :) S
+(\313) sy n
+0 T () S
+(314,204,cc :) p
+(\314) sy
+() p 16 T (315,205,cd :) S
+(\315) sy
+() p 32 T (316,206,ce :) S
+(\316) sy
+() p 48 T (317,207,cf :) S
+(\317) sy n
+(55) # () S
+(320,208,d0 :) p
+(\320) sy
+() p 16 T (321,209,d1 :) S
+(\321) sy
+() p 32 T (322,210,d2 :) S
+(\322) sy
+() p 48 T (323,211,d3 :) S
+(\323) sy n
+0 T () S
+(324,212,d4 :) p
+(\324) sy
+() p 16 T (325,213,d5 :) S
+(\325) sy
+() p 32 T (326,214,d6 :) S
+(\326) sy
+() p 48 T (327,215,d7 :) S
+(\327) sy n
+0 T () S
+(330,216,d8 :) p
+(\330) sy
+() p 16 T (331,217,d9 :) S
+(\331) sy
+() p 32 T (332,218,da :) S
+(\332) sy
+() p 48 T (333,219,db :) S
+(\333) sy n
+0 T () S
+(334,220,dc :) p
+(\334) sy
+() p 16 T (335,221,dd :) S
+(\335) sy
+() p 32 T (336,222,de :) S
+(\336) sy
+() p 48 T (337,223,df :) S
+(\337) sy n
+0 T () S
+(340,224,e0 :) p
+(\340) sy
+() p 16 T (341,225,e1 :) S
+(\341) sy
+() p 32 T (342,226,e2 :) S
+(\342) sy
+() p 48 T (343,227,e3 :) S
+(\343) sy n
+(60) # () S
+(344,228,e4 :) p
+(\344) sy
+() p 16 T (345,229,e5 :) S
+(\345) sy
+() p 32 T (346,230,e6 :) S
+(\346) sy
+() p 48 T (347,231,e7 :) S
+(\347) sy n
+0 T () S
+(350,232,e8 :) p
+(\350) sy
+() p 16 T (351,233,e9 :) S
+(\351) sy
+() p 32 T (352,234,ea :) S
+(\352) sy
+() p 48 T (353,235,eb :) S
+(\353) sy n
+0 T () S
+(354,236,ec :) p
+(\354) sy
+() p 16 T (355,237,ed :) S
+(\355) sy
+() p 32 T (356,238,ee :) S
+(\356) sy
+() p 48 T (357,239,ef :) S
+(\357) sy n
+0 T () S
+(360,240,f0 :) p
+(M-p) sy
+() p 16 T (361,241,f1 :) S
+(\361) sy
+() p 32 T (362,242,f2 :) S
+(\362) sy
+() p 48 T (363,243,f3 :) S
+(\363) sy n
+0 T () S
+(364,244,f4 :) p
+(\364) sy
+() p 16 T (365,245,f5 :) S
+(\365) sy
+() p 32 T (366,246,f6 :) S
+(\366) sy
+() p 48 T (367,247,f7 :) S
+(\367) sy n
+(65) # () S
+(370,248,f8 :) p
+(\370) sy
+() p 16 T (371,249,f9 :) S
+(\371) sy
+() p 32 T (372,250,fa :) S
+(\372) sy
+() p 48 T (373,251,fb :) S
+(\373) sy n
+0 T () S
+(374,252,fc :) p
+(\374) sy
+() p 16 T (375,253,fd :) S
+(\375) sy
+() p 32 T (376,254,fe :) S
+(\376) sy
+() p 48 T () N
+(symbol.pre) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/synopsys.ps b/tests/gps-ref/synopsys.ps
new file mode 100644
index 0000000..00b5ca7
--- /dev/null
+++ b/tests/gps-ref/synopsys.ps
@@ -0,0 +1,127 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (/* presentation */) c n
+0 T () S
+(company = ") p
+(Sorep) str
+(" ;) p n
+0 T (designer = ") S
+(Philippe LE VAN) str
+(";) p n
+0 T () N
+(5) # () S
+(/* alias communs */) c n
+0 T () S
+(alias) K
+( h history) p n
+0 T () N
+0 T () S
+(/* presentation generale */) c n
+0 T () S
+(view_background = ") p
+(black) str
+(";) p n
+(10) # () S
+(set_layer) K
+( pin_name_layer visible true) p n
+0 T () S
+(set_layer) K
+( pin_name_layer red 65535) p n
+0 T () S
+(set_layer) K
+( pin_name_layer green 0) p n
+0 T () S
+(set_layer) K
+( pin_name_layer blue 0) p n
+0 T () N
+(15) # () S
+(/* nom des bus pour un "change_names" */) c n
+0 T () S
+(bus_naming_style = ") p
+(%s\(%d\)) str
+(") p n
+0 T () N
+0 T () S
+(/* definition des libraries */) c n
+0 T () S
+(search_path={") p
+(/dtmref/ws/wskit/exploitation/erc32/V1.4.1/Global/SYNOPSYS/SYNOPSYS_1998.08) str
+("}) p n
+(20) # (library_fast = {") S
+(SC2RTP_BASIC_fast_5p5v_m55c.db) str
+("}) p n
+0 T (library_nom = {") S
+(SC2RTP_BASIC_nom_5p0v_25c.db) str
+("}) p n
+0 T (library_slow = {") S
+(SC2RTP_BASIC_slow_2p7v_145c.db) str
+("}) p n
+0 T (link_library = {") S
+(*) str
+("} + library_slow) p n
+0 T (target_library = library_slow) N
+(25) # (symbol_library = {") S
+(SC2RTP_BASIC.sdb) str
+("}) p n
+0 T () N
+0 T () S
+(/* ecriture d'une netliste vhdl */) c n
+0 T () S
+(vhdlout_use_packages = {IEEE.std_logic_1164,sc2rtp_basic.basic_vcomponents.all}) p n
+0 T (vhdlout_write_components = ") S
+(FALSE) str
+(") p n
+(30) # () N
+0 T () S
+(/* lecture de l'edif */) c n
+0 T () S
+(edifin_ground_net_property_name = ") p
+(INIT) str
+(") p n
+0 T (edifin_ground_net_property_value = ") S
+(0SF) str
+(") p n
+0 T ( ) N
+(35) # (edifin_power_net_property_name = ") S
+(INIT) str
+(") p n
+0 T (edifin_power_net_property_value = ") S
+(1SF) str
+(") p n
+0 T () N
+0 T () S
+(/* ecriture de l'edif \(pour qu'il ne retienne pas les info de schematic\) */) c n
+0 T () S
+(edifout_netlist_only = ") p
+(TRUE) str
+(") p n
+(40) # () N
+0 T () S
+(/* commande d'impression */) c n
+0 T () S
+(plot_command = ") p
+(lpr -Planteeq1) str
+(") p n
+0 T () N
+(synopsys.setup) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/tabulation.ps b/tests/gps-ref/tabulation.ps
new file mode 100644
index 0000000..0a2b3d2
--- /dev/null
+++ b/tests/gps-ref/tabulation.ps
@@ -0,0 +1,68 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () str n
+0 T (iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii) N
+0 T (iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii) N
+0 T () N
+0 T () S
+(\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253) sy n
+0 T (\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253) N
+(5) # () S
+(\\texttt{) p n
+0 T (................................................................................) N
+0 T (................................................................................) N
+0 T (................................................................................) N
+0 T (.........) N
+0 T (}) N
+0 T () N
+0 T () S
+( ^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) e n
+0 T (^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+0 T (^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+0 T (^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+(10) # () N
+0 T () S
+(1) p 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+0 T (1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T () N
+0 T () S
+(1) L 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+0 T (1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T () N
+(15) # () S
+(\\invisible{) p n
+0 T (1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+0 T (1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T (}) N
+0 T () N
+0 T () S
+(m) c 8 T (mm) S 16 T (mmm) S 24 T (mmmm) S 32 T (mmmmm) S 40 T (mmmmmm) S 48 T (mmmmmmm) S 56 T (mmmmmmmm) S 72 T (mmmmmmmm) N
+0 T (m) S 8 T (mmmmmmmmmmm) S 24 T (mmmmmmmmmmm) S 40 T (mmmmmmmmmmmm) N
+(20) # () N
+0 T () N
+0 T () S
+(\351) K 8 T (\351\351) S 16 T (\351\351\351) S 24 T (\351\351\351\351) S 32 T (\351\351\351\351\351) S 40 T (\351\351\351\351\351\351) S 48 T (\351\351\351\351\351\351\351) S 56 T (\351\351\351\351\351\351\351\351) S 72 T (\351\351\351\351\351\351\351\351) N
+0 T (\351) S 8 T (\351\351\351\351\351\351\351\351\351\351\351) S 24 T (\351\351\351\351\351\351\351\351\351\351\351) S 40 T (\351\351\351\351\351\351\351\351\351\351\351\351) N
+0 T () N
+(tabulation.pre) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/template.ps b/tests/gps-ref/template.ps
new file mode 100644
index 0000000..811a728
--- /dev/null
+++ b/tests/gps-ref/template.ps
@@ -0,0 +1,393 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (class) K
+( TEMPLATE2 ) p
+(inherit) K n
+0 T () N
+0 T () S
+( ARGUMENTS) p n
+0 T ( ) S
+(undefine) K n
+(5) # () S
+() p 8 T ( copy, consistent, is_equal, setup) N
+0 T ( ) S
+(end) K n
+0 T () N
+0 T () S
+( TEMPLATE2_LEX) p n
+0 T ( ) S
+(redefine) K n
+(10) # () S
+() p 8 T ( store_analyzer,) N
+0 T () S 8 T ( retrieve_analyzer) N
+0 T ( ) S
+(end) K n
+0 T () N
+0 T (creation) N
+(15) # () N
+0 T () S
+( make) p n
+0 T () N
+0 T () S
+(feature) K n
+0 T () N
+(20) # () S
+( root_line: TEMPLATE_CLAUSE;) p n
+0 T () N
+0 T ( analyzer_file_name: ) S
+(STRING) k
+( ) p
+(is) K
+( ") p
+(/inf/nana/infthes/demaille/eiffel/template2/lexical/template2_analyz) str n
+0 T (er) S
+(";) p n
+0 T () N
+0 T ( make ) S
+(is) K n
+(25) # () S
+( ) p
+(local) K n
+0 T () S
+() p 8 T ( text_name: ) S
+(STRING) k
+(;) p n
+0 T () S 8 T ( analyzer_file: RAW_FILE;) N
+0 T () S 8 T ( analyzer_needs_storing: ) S
+(BOOLEAN) k
+(;) p n
+0 T () S 8 T ( text_file: PLAIN_TEXT_FILE;) N
+(30) # () S 8 T ( argument_position: ) S
+(INTEGER) k n
+0 T () S
+( ) p
+(do) K n
+0 T () S
+() p 8 T ( ) S
+(if) K
+( argument_count ) p
+(\272) sy
+( 0 ) p
+(then) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(Usage: template2 file_name%N) str
+("\);) p n
+0 T () S 8 T ( ) S
+(else) K n
+(35) # () S
+() p 8 T ( !! root_line.make;) N
+0 T () S 8 T ( io.putstring \(Separator_line_message\);) N
+0 T () S 8 T ( io.putstring \(") S
+(TEMPLATE2) str
+("\);) p n
+0 T () S 8 T ( io.putstring \(") S
+( \(Version 1.0\).) str 48 T ( \(C\)) S
+("\);) p n
+0 T () S 8 T ( !! analyzer_file.make \(analyzer_file_name\);) N
+(40) # () S 8 T ( ) S
+(if) K
+( analyzer_file.exists ) p
+(then) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(%NRetrieving analyzer . . .) str
+("\);) p n
+0 T () S 8 T ( retrieve_analyzer \(analyzer_file_name\);) N
+0 T () S 8 T ( root_line.document.set_lexical \(analyzer\);) N
+0 T () S 8 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+(45) # () S 8 T ( ) S
+(else) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(%NBuilding analyzer ... ) str
+("\);) p n
+0 T () S 8 T ( build \(root_line.document\);) N
+0 T () S 8 T ( analyzer_needs_storing := ) S
+(true) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+(50) # () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( ) N
+0 T () S 8 T ( ) S
+(-- Test for left-recursion ?) c n
+0 T () S
+() p 8 T ( ) S
+(-- test_left_recursion;) c n
+0 T () S
+() p 8 T ( ) N
+(55) # () S 8 T ( text_name := argument \(1\);) N
+0 T () S 8 T ( !! text_file.make \(text_name\);) N
+0 T () S 8 T ( ) S
+(if) K
+( \() p
+(\330) sy
+( text_file.exists\) ) p
+(then) K n
+0 T () S
+() p 8 T ( io.putstring \(text_name\);) N
+0 T () S 8 T ( io.putstring \(") S
+(: No such file or directory%N) str
+("\);) p n
+(60) # () S 8 T ( ) S
+(else) K n
+0 T () S
+() p 8 T ( root_line.document.set_input_file \(text_name\);) N
+0 T () S 8 T ( root_line.document.get_token;) N
+0 T () S 8 T ( io.putstring \(") S
+(%NParsing document in file: ) str
+("\)) p n
+0 T () S 8 T ( io.putstring \(text_name\);) N
+(65) # () S 8 T ( io.putstring \(") S
+( ... ) str
+("\);) p n
+0 T () S 8 T ( root_line.parse;) N
+0 T () S 8 T ( ) S
+(if) K
+( root_line.parsed ) p
+(then) K n
+0 T () S
+() p 8 T () S 16 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+0 T () S 8 T () S 16 T ( io.putstring \(") S
+(%NParse tree ... %N) str
+("\);) p n
+(template.e) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(70) # () p 8 T () S 16 T ( root_line.display \(io.output\);) N
+0 T () S 8 T () S 16 T ( io.putstring \(") S
+(%NApplying semantics ... ) str
+("\);) p n
+0 T () S 8 T () S 16 T ( root_line.semantics;) N
+0 T () S 8 T () S 16 T ( io.putstring \(") S
+(DONE%N) str
+("\);) p n
+0 T () S 8 T ( ) S
+(else) K n
+(75) # () S
+() p 8 T () S 16 T ( io.putstring \(") S
+(%NSyntax error with document) str
+("\);) p n
+0 T () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( ) S
+(end) K n
+0 T () S
+() p 8 T ( ) S
+(if) K
+( analyzer_needs_storing ) p
+(then) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(%NStoring analyzer ... ) str
+("\);) p n
+(80) # () S 8 T ( ) S
+(-- store_analyzer \(analyzer_file_name\);) c n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(DONE%N) str
+("\);) p n
+0 T () S 8 T ( io.putstring \(Separator_line_message\);) N
+0 T () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( io.new_line;) N
+(85) # () S 8 T ( ) S
+(end) K
+(;) p n
+0 T ( ) S
+(end) K
+(; ) p
+(-- make) c n
+0 T () S
+( Separator_line_message: ) p
+(STRING) k
+( ) p
+(is) K
+( ") p
+(--------------------------------------------) str n
+0 T (-------------------------------%N) S
+(";) p n
+0 T () N
+0 T ( test_left_recursion ) S
+(is) K n
+(90) # () S
+() p 8 T ( ) S
+(-- Test root_line for left recursion.) c n
+0 T () S
+( ) p
+(local) K n
+0 T () S
+() p 8 T ( t_b: ) S
+(BOOLEAN) k
+(;) p n
+0 T ( ) S
+(do) K n
+0 T () S
+() p 8 T ( root_line.print_mode.put \() S
+(true) K
+(\);) p n
+(95) # () S 8 T ( root_line.expand_all;) N
+0 T () S 8 T ( t_b := ) S
+(\330) sy
+( root_line.left_recursion;) p n
+0 T () S 8 T ( root_line.check_recursion;) N
+0 T () S 8 T ( ) S
+(if) K
+( ) p
+(\330) sy
+( root_line.left_recursion.item ) p
+(then) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(No left recursion detected%N) str
+("\);) p n
+(100) # () S 8 T ( ) S
+(else) K n
+0 T () S
+() p 8 T ( io.putstring \(") S
+(Left recursive.%N) str
+("\);) p n
+0 T () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( ) N
+0 T ( ) S
+(end) K
+(; ) p
+(-- test_left_recursion) c n
+(105) # () N
+0 T () S
+( store_analyzer \(file_name: ) p
+(STRING) k
+(\) ) p
+(is) K n
+0 T () S
+() p 8 T ( ) S
+(-- Store `analyzer' in file named `file_name'.) c n
+0 T () S
+( ) p
+(require) K
+( ) p
+(else) K n
+0 T () S
+() p 8 T ( initialized: initialized) N
+(110) # ( ) S
+(local) K n
+0 T () S
+() p 8 T ( store_file: RAW_FILE) N
+0 T ( ) S
+(do) K n
+0 T () S
+() p 8 T ( ) S
+(if) K
+( analyzer ) p
+(\272) sy
+( ) p
+(Void) K
+( ) p
+(then) K n
+0 T () S
+() p 8 T ( !! analyzer.make) N
+(115) # () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( !! store_file.make_open_write \(file_name\);) N
+0 T () S 8 T ( analyzer.basic_store \(store_file\);) N
+0 T () S 8 T ( store_file.close;) N
+0 T ( ) S
+(end) K
+(; ) p
+(-- store_analyzer) c n
+(120) # () N
+0 T () S
+( retrieve_analyzer \(file_name: ) p
+(STRING) k
+(\) ) p
+(is) K n
+0 T () S
+() p 8 T ( ) S
+(-- Retrieve `analyzer' from file named `file_name'.) c n
+0 T () S
+( ) p
+(local) K n
+0 T () S
+() p 8 T ( retrieved_file: RAW_FILE) N
+(125) # ( ) S
+(do) K n
+0 T () S
+() p 8 T ( ) S
+(if) K
+( analyzer ) p
+(\272) sy
+( ) p
+(Void) K
+( ) p
+(then) K n
+0 T () S
+() p 8 T ( !! analyzer.make) N
+0 T () S 8 T ( ) S
+(end) K
+(;) p n
+0 T () S 8 T ( !! retrieved_file.make_open_read \(file_name\);) N
+(130) # () S 8 T ( analyzer ?) S
+(\272) sy
+( analyzer.retrieved \(retrieved_file\);) p n
+0 T () S 8 T ( retrieved_file.close;) N
+0 T ( ) S
+(end) K
+(; ) p
+(-- store_analyzer_feature) c n
+0 T () N
+0 T () S
+(end) K
+( ) p
+(-- class TEMPLATE2) c n
+(template.e) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/typing.ps b/tests/gps-ref/typing.ps
new file mode 100644
index 0000000..3a822f3
--- /dev/null
+++ b/tests/gps-ref/typing.ps
@@ -0,0 +1,698 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (//------------------------------------------------------------------+) c n
+0 T (// MARIE Yves Caseau |) N
+0 T (// typing.cl |) N
+0 T (// |) N
+(5) # (// Moteur Algebrique pour la Resolution d'Inferences Elementaires |) N
+0 T (// Copyright \(C\) 1986-97 by Y. CASEAU. All Rights Reserved |) N
+0 T (//------------------------------------------------------------------+) N
+0 T () N
+0 T (//-------------------------------------------------------------------) N
+(10) # (//This file contains:) N
+0 T (//a lot of useful stuff for manipulating algebraic terms) N
+0 T (//-------------------------------------------------------------------) N
+0 T () N
+0 T () S
+(//*******************************************************************) C n
+(15) # (//* Part 1: get_range/get_domain *) N
+0 T (//* Part 2: Utility methods for compilation *) N
+0 T (//* Part 3: Inversion of Properties *) N
+0 T (//*******************************************************************) N
+0 T () N
+(20) # (//*******************************************************************) N
+0 T (//* Part 1: get_range/get_domain *) N
+0 T (//*******************************************************************) N
+0 T () N
+0 T () S
+(// a small range inference algorithm, to improve the system) c n
+(25) # (//) N
+0 T () S
+(get_range\(self:abstract_relation,x:type\) : type) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(case) K
+( self) p n
+0 T ( \(phi x, ) N
+0 T ( composition get_range\(self.r1,) N
+(30) # ( get_range\(self.r2, x\)\),) N
+0 T ( ands get_range\(self.r1, x\) ^) N
+0 T ( get_range\(self.r2, x\),) N
+0 T ( ors get_range\(self.r1, x\) ) S
+(\310) sy n
+0 T () S
+( get_range\(self.r2, x\),) p n
+(35) # ( psi \() S
+(if) K
+( \(self.op ) p
+(\316) sy
+( class\) self.op) p n
+0 T ( ) S
+(else) K
+( extract_range\(self.op,) p n
+0 T ( list\(get_range\(self.r1, x\),) N
+0 T ( get_range\(self.r2, x\)\)\)\),) N
+0 T ( array \() S
+(if) K
+( self.multivalued? member\(self.range\) ) p
+(else) K
+( self.range\),) p n
+(40) # ( property \() S
+(if) K
+( \(self ) p
+(\272) sy
+( Id\) x ) p
+(else) K
+( extract_range\(self, list\(x\)\)\), ) p n
+0 T ( product self.ens, ) N
+0 T ( annotation get_range\(self.v.definition, x\),) N
+0 T ( connotation get_range\(self.r, x\),) N
+0 T ( denotation \() S
+(if) K
+( unknown?\(definition, self.v\)) p n
+(45) # ( self.v.range) N
+0 T ( ) S
+(else) K
+( get_range\(self.v.definition,) p n
+0 T ( x\)\),) N
+0 T ( property_inverse ) N
+0 T ( get_domain\(self.r, x\),) N
+(50) # ( any error\(") S
+(error: range is not defined for ~S\(~S\)) str
+(", self,) p n
+0 T ( owner\(self\)\)\)\) ) N
+0 T () N
+0 T () S
+(// a similar domain inference algorithm) c n
+0 T (//) N
+(55) # () S
+(get_domain\(self:abstract_relation,x:type\) : type) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(case) K
+( self) p n
+0 T ( \(phi x, ) N
+0 T ( composition get_domain\(self.r2,) N
+0 T ( get_domain\(self.r1,) N
+(60) # ( x\)\),) N
+0 T ( ands get_domain\(self.r1, x\) ^ ) N
+0 T ( get_domain\(self.r2, x\),) N
+0 T ( ors get_domain\(self.r1, x\) ) S
+(\310) sy n
+0 T () S
+( get_domain\(self.r2, x\),) p n
+(65) # ( property \() S
+(if) K
+( \(self ) p
+(\272) sy
+( Id\) x) p n
+0 T ( ) S
+(else) K
+( ) p
+(let) K
+( y := ) p
+(\306) sy
+( ) p
+(in) K
+( ) p n
+0 T ( \() S
+(for) K
+( r ) p
+(in) K
+( self.restrictions ) p n
+0 T ( \() S
+(if) K
+( \(self.multivalued? | x ^ r.range\)) p n
+0 T ( y :U domain!\(r\)\),) N
+(70) # ( y\)\),) N
+(typing.cl) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T ( property_inverse ) p n
+0 T ( get_range\(self.r, x\),) N
+0 T ( product \() S
+(if) K
+( known?\(BASE\) BASE ) p
+(else) K
+( any\),) p n
+0 T ( psi \() S
+(if) K
+( inv?\(self\)) p n
+(75) # ( get_range\(inverse!\(self\), x\)) N
+0 T ( ) S
+(else) K
+( domain!\(self.r1\) ^ domain!\(self.r2\)\),) p n
+0 T ( psi get_domain\(self.r1, x\) ^) N
+0 T ( get_domain\(self.r2, x\),) N
+0 T ( denotation get_domain\(self.v.definition, x\),) N
+(80) # ( any domain!\(self\)\)\)) N
+0 T () N
+0 T () S
+(// we extend range_type to take the type of arguments into account.) c n
+0 T (//) N
+0 T () S
+(extract_range\(self:property,l:list\) : type) p n
+(85) # ( ) S
+(\256) sy
+( \() p
+(let) K
+( %first := l[1],) p n
+0 T ( %rest := \(copy\(l\) << 1\),) N
+0 T ( prop := Optimize/restriction!\(self, l\),) N
+0 T ( %res := \() S
+(case) K
+( prop \(restriction prop.range, any self.range\)\) ) p
+(in) K
+( ) p n
+0 T ( \() S
+(if) K
+( self.multivalued? member\(%res\) ) p
+(else) K
+( %res\)\) ) p n
+(90) # (extract_range\(self:property_operator,l:list\) : type) N
+0 T ( ) S
+(\256) sy
+( extract_range\(self.op, l\) ) p n
+0 T () N
+0 T () S
+(// A small range inference algorithm, to improve the system.) c n
+0 T (// \(x X y\) is the signature of the input pair) N
+(95) # (//) N
+0 T () S
+(get_range\(self:derivative,x:type,y:type\) : type) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(case) K
+( self) p n
+0 T ( \(Tone y, ) N
+0 T ( Tinv x,) N
+(100) # ( Tphi get_domain\(self.e1, x, y\),) N
+0 T ( compr get_range\(self.r1,) N
+0 T ( get_range\(self.e2, x, y\)\),) N
+0 T ( compl get_range\(self.e1, x, y\),) N
+0 T ( Tand get_range\(self.e1, x, y\) ^) N
+(105) # ( get_range\(self.r2, any\),) N
+0 T ( Tunion get_range\(self.e1, x, y\) ) S
+(\310) sy n
+0 T () S
+( get_range\(self.e2, x, y\),) p n
+0 T ( Tpsi extract_range\(self.op,) N
+0 T ( list\(get_range\(self.e1, x, y\),) N
+(110) # ( get_range\(self.r2,) N
+0 T ( get_domain\(self.e1, x, y\)\)\)) N
+0 T (\),) N
+0 T ( Tannotation2) N
+0 T ( get_range\(self.e1, x, y\),) N
+0 T ( Tannotation1) N
+(115) # ( get_range\(self.v.definition, any\),) N
+0 T ( Tconnotation2) N
+0 T ( get_range\(self.r,) N
+0 T ( get_domain\(self.e1, x, y\)\),) N
+0 T ( Tconnotation1) N
+(120) # ( get_range\(self.e1, x, y\),) N
+0 T ( Tif get_range\(self.r1,) N
+0 T ( get_domain\(self.e1, x, y\)\) ) S
+(\310) sy n
+0 T () S
+( get_range\(self.r2,) p n
+0 T ( get_domain\(self.e1, x, y\)\),) N
+(125) # ( Tdenotation get_range\(self.e1, x, y\),) N
+0 T ( any error\(") S
+(error: get_range is not defined for ~S \(~S\)) str
+(", self,) p n
+0 T ( owner\(self\)\)\)\) ) N
+0 T () N
+0 T () S
+(// A small domain inference algorithm, to improve the system.) c n
+(130) # (// \(x X y\) is the signature of the input pair) N
+0 T (//) N
+0 T () S
+(get_domain\(self:derivative,x:type,y:type\) : type) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(case) K
+( self) p n
+0 T ( \(Tone x, ) N
+(135) # ( Tinv y,) N
+0 T ( Tphi get_domain\(self.e1, x, y\),) N
+0 T ( compr get_domain\(self.e2, x, y\),) N
+0 T ( compl get_domain\(self.r2,) N
+0 T ( get_domain\(self.e1, x, y\)\),) N
+(typing.cl) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(140) # ( Tand get_domain\(self.e1, x, y\) ^) p n
+0 T ( get_domain\(self.r2, any\),) N
+0 T ( Tunion get_domain\(self.e1, x, y\) ) S
+(\310) sy n
+0 T () S
+( get_domain\(self.e2, x, y\),) p n
+0 T ( Tpsi get_domain\(self.e1, x, y\) ^) N
+(145) # ( get_domain\(self.r2, any\),) N
+0 T ( Tannotation2) N
+0 T ( get_domain\(self.e1, x, y\),) N
+0 T ( Tannotation1) N
+0 T ( get_domain\(self.e1, x, y\) ^) N
+(150) # ( get_domain\(self.v.definition, any\),) N
+0 T ( Tconnotation2) N
+0 T ( get_domain\(self.v.definition, any\),) N
+0 T ( Tconnotation1) N
+0 T ( get_domain\(self.e1, x, y\),) N
+(155) # ( Tdenotation get_domain\(self.e1, x, y\),) N
+0 T ( Tif get_domain\(self.e1, x, y\),) N
+0 T ( any error\(") S
+(error: get_domain is not defined for ~S \(~S\)) str
+(", self,) p n
+0 T ( owner\(self\)\)\)\) ) N
+0 T () N
+(160) # () S
+(//*******************************************************************) C n
+0 T (//* Part 2: Utility methods for compilation *) N
+0 T (//*******************************************************************) N
+0 T () S
+(// a protected substitution) c n
+0 T (//) N
+(165) # () S
+(Logic/cpsubst\(self:any,x:any,y:any\) : any) p n
+0 T ( ) S
+(\256) sy
+( substitution\(instruction_copy\(self\), x, y\)) p n
+0 T () N
+0 T () S
+(// instruction copy with fresh local variables) c n
+0 T (//) N
+(170) # () S
+(Logic/cpfresh\(self:any\) : any) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(let) K
+( l := bound_variables\(self\),) p n
+0 T ( x := instruction_copy\(self\) ) S
+(in) K
+( ) p n
+0 T ( \() S
+(for) K
+( y ) p
+(in) K
+( l x := substitution\(x, y, Variable\(pname ) p
+(\272) sy
+( y.pname\)\), x\)\) ) p n
+0 T () N
+(175) # () S
+(// make a copy with fresh variable + a substitution) c n
+0 T (//) N
+0 T () S
+(cpfresh\(self:any,x1:Variable,x2:Variable\) : any) p n
+0 T ( ) S
+(\256) sy
+( substitution\(cpfresh\(self\), x1, x2\)) p n
+0 T () N
+(180) # () S
+(// make a new two variable conclusion) c n
+0 T (//) N
+0 T () S
+(cpfresh\(self:any,x1:Variable,x2:Variable,y1:Variable,y2:Variable\) : any) p n
+0 T ( ) S
+(\256) sy
+( substitution\(substitution\(cpfresh\(self\), x1, x2\), y1, y2\)) p n
+0 T () N
+(185) # () S
+(// we create so many binary messages ...) c n
+0 T (//) N
+0 T () S
+(Logic/message!\(x:any,p:property,y:any\) : Call ) p
+(\256) sy
+( Call\(p, list\(x, y\)\)) p n
+0 T () N
+0 T (Logic/make_a_and\(self:list\) : any) N
+(190) # ( ) S
+(\256) sy
+( \() p
+(if) K
+( \(size\(self\) ) p
+(\272) sy
+( 1\) self[1] ) p
+(else) K
+( And\(args ) p
+(\272) sy
+( self\)\)) p n
+0 T () N
+0 T () S
+(//*******************************************************************) C n
+0 T (//* Part 3: Inversion of Properties *) N
+0 T (//*******************************************************************) N
+(195) # () S
+(// now we van define the inversion of a psi ------------------------) c n
+0 T (//) N
+0 T (// a psi term is usually non inversible.) N
+0 T (// two exceptions are interesting:) N
+0 T (// - the second subterm is a constant \(a constant is always placed) N
+(200) # (// in the second place\) and we have an addition or a multiplication) N
+0 T (// - the two subterm are inversible and the operation is a mapping) N
+0 T (//) N
+0 T () S
+(inv?\(self:psi\) : boolean) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(let) K
+( %d := description[self.op] ) p
+(in) K n
+(205) # () S
+( \(\(%d ) p
+(\272) sy
+( group_operation &) p n
+0 T ( \(inv?\(self.r1\) & self.r2 ) S
+(\316) sy
+( product\)\) | ) p n
+0 T ( \(\(%d ) S
+(\272) sy
+( monoid |) p n
+0 T ( \(%d ) S
+(\272) sy
+( binary_operation & ) p n
+0 T ( known?\(ternary_inverse_of[self.op]\)\)\) & ) N
+(typing.cl) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(210) # ( \(\(inv?\(self.r1\) & const?\(self.r2\)\) |) p n
+0 T ( \(inv?\(self.r2\) & const?\(self.r1\)\)\)\)\)\)) N
+0 T () N
+0 T () S
+(// this is only called if the psi is inversible) c n
+0 T (//) N
+(215) # () S
+(inverse!\(self:psi\) : any) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(let) K
+( %o := self.op,) p n
+0 T ( t1 := self.r1,) N
+0 T ( t2 := self.r2 ) S
+(in) K n
+0 T () S
+( \() p
+(if) K
+( \(description[%o] ) p
+(\272) sy
+( group_operation\)) p n
+(220) # ( compose\(inverse!\(t1\), ) N
+0 T ( psify\(%o, Id,) N
+0 T ( compose\(function_inverse[%o],) N
+0 T ( t2\)\)\)) N
+0 T ( ) S
+(else) K
+( ) p
+(if) K
+( \(description[%o] ) p
+(\272) sy
+( monoid\) ) p n
+(225) # ( \() S
+(if) K
+( const?\(t2\) ) p n
+0 T ( compose\(inverse!\(t1\),) N
+0 T ( compose\(psify\(ternary_inverse[%o],) N
+0 T ( Id, t2\),) N
+0 T ( phi\(op ) S
+(\272) sy
+( ) p n
+(230) # ( comparison_inverse[%o],) N
+0 T ( r1 ) S
+(\272) sy
+( Id,) p n
+0 T ( r2 ) S
+(\272) sy
+( t2\)\)\)) p n
+0 T ( ) S
+(else) K
+( compose\(inverse!\(t2\),) p n
+0 T ( compose\(psify\(ternary_inverse[%o],) N
+(235) # ( Id, t1\),) N
+0 T ( phi\(op ) S
+(\272) sy
+( ) p n
+0 T ( comparison_inverse[%o],) N
+0 T ( r1 ) S
+(\272) sy
+( Id,) p n
+0 T ( r2 ) S
+(\272) sy
+( t1\)\)\)\)) p n
+(240) # ( ) S
+(else) K
+( ) p
+(if) K
+( known?\(ternary_inverse_of[%o]\)) p n
+0 T ( \() S
+(if) K
+( const?\(t2\)) p n
+0 T ( compose\(inverse!\(t1\),) N
+0 T ( psify\(ternary_inverse_of[%o],) N
+0 T ( Id, t2\)\)) N
+(245) # ( ) S
+(else) K
+( compose\(inverse!\(t2\), psify\(%o, t1, Id\)\)\) ) p n
+0 T ( ) S
+(else) K
+( ) p
+(if) K
+( \(description[%o] ) p
+(\272) sy
+( mapping\)) p n
+0 T ( ands\(r1 ) S
+(\272) sy
+( ) p n
+0 T ( compose\(inverse!\(t1\),) N
+0 T ( projection1[%o]\),) N
+(250) # ( r2 ) S
+(\272) sy n
+0 T () S
+( compose\(inverse!\(t2\),) p n
+0 T ( projection2[%o]\)\)\)\)) N
+0 T () N
+0 T () S
+(// check if a relation can be inversed without trouble) c n
+(255) # (//) N
+0 T () S
+(inv?\(self:relation\) : boolean) p n
+0 T ( ) S
+(\256) sy
+( \(known?\(inverse, self\) |) p n
+0 T ( \() S
+(case) K
+( self ) p n
+0 T ( \(relation finite?\(self.domain\), ) N
+(260) # ( property ) S
+(\330) sy
+(\({ r ) p
+(in) K
+( self.restrictions | ) p n
+0 T ( ) S
+(\330) sy
+(\(finite?\(domain!\(r\)\)\)}\)\)\)\)) p n
+0 T (inverse!\(self:relation\) : relation) N
+0 T ( ) S
+(\256) sy
+( \() p
+(let) K
+( r1 := get\(inverse, self\) ) p
+(in) K n
+0 T () S
+( ) p
+(case) K
+( r1) p n
+(265) # ( \(relation r1,) N
+0 T ( any property_inverse\(r ) S
+(\272) sy
+( self\)\)\)) p n
+0 T () N
+0 T () S
+(// a constant expression is either a constant or an expression involving) c n
+0 T (// constants) N
+(270) # (//) N
+0 T () S
+(const?\(self:abstract_relation\) : boolean) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(case) K
+( self) p n
+0 T ( \(constant true, ) N
+0 T ( composition const?\(self.r2\),) N
+(275) # ( psi \(const?\(self.r1\) &) N
+0 T ( const?\(self.r2\)\)\)\)) N
+0 T () N
+0 T () S
+(//*******************************************************************) C n
+0 T (//* Part 4: Algebra Canonical Injection *) N
+(typing.cl) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(280) # (//*******************************************************************) C n
+0 T () N
+0 T () S
+(domain!\(r:relation\) : type ) p
+(\256) sy
+( r.domain) p n
+0 T () N
+0 T () S
+(// a property is an abstract relation ----------------------------------) c n
+(285) # (// "inversion" is straightforward, we create a message) N
+0 T (//) N
+0 T () S
+(inversion\(self:property,x:any,y:Variable\) : any) p n
+0 T ( ) S
+(\256) sy
+( \() p
+(if) K
+( self.multivalued?) p n
+0 T ( Call\(selector ) S
+(\272) sy
+( ) p
+(\316) sy
+(, args ) p
+(\272) sy
+( list\(y, inversion!\(self, x\)\)\) ) p n
+(290) # ( ) S
+(else) K
+( Call\(selector ) p
+(\272) sy
+( ) p
+(\272) sy
+(, args ) p
+(\272) sy
+( list\(y, inversion!\(self, x\)\)\)\)) p n
+0 T (inversion!\(self:property,x:any\) : any) N
+0 T ( ) S
+(\256) sy
+( \() p
+(if) K
+( \(self ) p
+(\272) sy
+( Id\) x ) p
+(else) K
+( Call\(selector ) p
+(\272) sy
+( self, args ) p
+(\272) sy
+( list\(x\)\)\)) p n
+0 T () N
+0 T () S
+(// an extensional relation) c n
+(295) # (//) N
+0 T () S
+(inversion\(self:array,x:any,y:Variable\) : any) p n
+0 T ( ) S
+(\256) sy
+( Call\(selector ) p
+(\272) sy
+( ) p
+(\272) sy
+(, args ) p
+(\272) sy
+( list\(y, inversion!\(self, x\)\)\)) p n
+0 T (inversion!\(self:array,x:any\) : any) N
+0 T ( ) S
+(\256) sy
+( Call\(selector ) p
+(\272) sy
+( nth, args ) p
+(\272) sy
+( list\(self, x\)\)) p n
+(300) # () N
+(typing.cl) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/vrcaml.ps b/tests/gps-ref/vrcaml.ps
new file mode 100644
index 0000000..bb34432
--- /dev/null
+++ b/tests/gps-ref/vrcaml.ps
@@ -0,0 +1,454 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (\(**************************************************************************\)) c n
+0 T (\(* Creation and manipulation of VRML objects *\)) N
+0 T (\(**************************************************************************\)) N
+0 T () N
+(5) # () S
+(#) p
+(open) K
+( ") p
+(VRcaML) str
+(";;) p n
+0 T (#) S
+(open) K
+( ") p
+(default) str
+(";;) p n
+0 T (#) S
+(open) K
+( ") p
+(exceptions) str
+(";;) p n
+0 T (#) S
+(open) K
+( ") p
+(basic_types) str
+(";;) p n
+0 T (#) S
+(open) K
+( ") p
+(font) str
+(";;) p n
+(10) # (#) S
+(open) K
+( ") p
+(fonts) str
+(";;) p n
+0 T (#) S
+(open) K
+( ") p
+(colors) str
+(";;) p n
+0 T () N
+0 T () N
+0 T () N
+(15) # () N
+0 T () S
+(\(**************************************************************************\)) c n
+0 T (\(* Creation of VRML objects *\)) N
+0 T (\(**************************************************************************\)) N
+0 T () N
+(20) # (\(* New empty referential **************************************************\)) N
+0 T () N
+0 T (\(* new_referential: vrml_object *\)) N
+0 T () S
+(let) K
+( new_referential = default_vrml_object ;;) p n
+0 T () N
+(25) # () N
+0 T () S
+(\(* New VRML object ********************************************************\)) c n
+0 T () N
+0 T (\(* new_vrml_object :) N
+0 T ( vrml_positionable list -> vrml_object list -> vect3D -> rotation) N
+(30) # (-> vect3D -> frame -> bool -> anchor -> billboard -> collision) N
+0 T (-> vrml_object *\)) N
+0 T () S
+(let) K
+( new_vrml_object objects children position rotation scale) p n
+0 T ( frame unique anchor billboard collision =) N
+0 T ( { objects = objects ;) N
+(35) # ( children = children ;) N
+0 T ( position = position ;) N
+0 T ( rotation = rotation ;) N
+0 T ( scale = scale ;) N
+0 T ( frame = frame ;) N
+(40) # ( unique = unique ;) N
+0 T ( anchor = anchor ;) N
+0 T ( billboard = billboard ;) N
+0 T ( collision = collision }) N
+0 T (;;) N
+(45) # () N
+0 T () N
+0 T () S
+(\(**************************************************************************\)) c n
+0 T (\(* Setting fields *\)) N
+0 T (\(**************************************************************************\)) N
+(50) # () N
+0 T (\(* set_objects : vrml_object -> vrml_positionable list -> vrml_object *\)) N
+0 T () S
+(let) K
+( setf_objects ) p
+(object) K
+( objects =) p n
+0 T ( new_vrml_object objects ) S
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+(55) # ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(let) K
+( set_objects = setf_objects ;;) p n
+(60) # () N
+0 T () S
+(\(* set_children : vrml_object -> vrml_object list -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_children ) p
+(object) K
+( children =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+(65) # ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(let) K
+( set_children = setf_children ;;) p n
+(70) # () N
+(vrcaml.ml) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (\(* setf_position : vrml_object -> float -> float -> float -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_position ) p
+(object) K
+( position =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+(75) # ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(\(* setf_rotation :) c n
+(80) # ( vrml_object -> float -> float -> float -> float -> vrml_object *\)) N
+0 T () S
+(let) K
+( setf_rotation ) p
+(object) K
+( rotation =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( rotation ) S
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+0 T ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+(85) # ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(\(* setf_scale : vrml_object -> float -> float -> float -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_scale ) p
+(object) K
+( scale =) p n
+(90) # ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation scale ) p
+(object) K
+(.frame) p n
+0 T ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+(95) # () N
+0 T () S
+(\(* setf_frame : vrml_object -> frame -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_frame ) p
+(object) K
+( frame =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale frame) p n
+(100) # ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(let) K
+( set_frame = setf_frame ;;) p n
+(105) # () N
+0 T () S
+(\(* setf_unique : vrml_object -> bool -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_unique ) p
+(object) K
+( unique =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+(110) # ( unique ) S
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(let) K
+( set_unique = setf_unique ;;) p n
+(115) # () N
+0 T () S
+(\(* setf_anchor : vrml_object -> anchor -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_anchor ) p
+(object) K
+( anchor =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+(120) # ( ) S
+(object) K
+(.unique anchor ) p
+(object) K
+(.billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+0 T (;;) N
+0 T () N
+0 T () S
+(\(* setf_billboard : vrml_object -> billboard -> vrml_object *\)) c n
+(125) # () S
+(let) K
+( setf_billboard ) p
+(object) K
+( billboard =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+0 T ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+0 T ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor billboard) p n
+0 T ( ) S
+(object) K
+(.collision) p n
+(130) # (;;) N
+0 T () N
+0 T () S
+(\(* setf_collision : vrml_object -> collision -> vrml_object *\)) c n
+0 T () S
+(let) K
+( setf_collision ) p
+(object) K
+( collision =) p n
+0 T ( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+(135) # ( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+0 T ( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+0 T ( collision) N
+0 T (;;) N
+(vrcaml.ml) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/gps-ref/wide.ps b/tests/gps-ref/wide.ps
new file mode 100644
index 0000000..e8a7882
--- /dev/null
+++ b/tests/gps-ref/wide.ps
@@ -0,0 +1,144 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p 8 T (This is a test for the coverage of the whole ascii) N
+0 T () S 8 T (char set \(from 0 to 255\)) N
+0 T (--------------------------------------------------------------) N
+0 T ( 0, 0, 0 :^@) S 16 T ( 1, 1, 1 :^A) S 32 T ( 2, 2, 2 :^B) S 48 T ( 3, 3, 3 :^C) N
+(5) # ( 4, 4, 4 :^D) S 16 T ( 5, 5, 5 :^E) S 32 T ( 6, 6, 6 :^F) S 48 T ( 7, 7, 7 :^G) N
+0 T ( 10, 8, 8 :^H) S 16 T ( 11, 9, 9 :) S 32 T () S 40 T ( 12, 10, a :) N
+0 T () S 8 T ( 13, 11, b :^K) N
+0 T ( 14, 12, c :) N
+(wide.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p 8 T ( 15, 13, d :) N
+0 T () S 8 T ( 16, 14, e :^N) S 24 T ( 17, 15, f :^O) N
+(10) # ( 20, 16,10 :^P) S 16 T ( 21, 17,11 :^Q) S 32 T ( 22, 18,12 :^R) S 48 T ( 23, 19,13 :^S) N
+0 T ( 24, 20,14 :^T) S 16 T ( 25, 21,15 :^U) S 32 T ( 26, 22,16 :^V) S 48 T ( 27, 23,17 :^W) N
+0 T ( 30, 24,18 :^X) S 16 T ( 31, 25,19 :^Y) S 32 T ( 32, 26,1a :^Z) S 48 T ( 33, 27,1b :^[) N
+0 T ( 34, 28,1c :^\\) S 16 T ( 35, 29,1d :^]) S 32 T ( 36, 30,1e :^^) S 48 T ( 37, 31,1f :^_) N
+0 T ( 40, 32,20 : ) S 16 T ( 41, 33,21 :!) S 32 T ( 42, 34,22 :") S 48 T ( 43, 35,23 :#) N
+(15) # ( 44, 36,24 :$) S 16 T ( 45, 37,25 :%) S 32 T ( 46, 38,26 :&) S 48 T ( 47, 39,27 :') N
+0 T ( 50, 40,28 :\() S 16 T ( 51, 41,29 :\)) S 32 T ( 52, 42,2a :*) S 48 T ( 53, 43,2b :+) N
+0 T ( 54, 44,2c :,) S 16 T ( 55, 45,2d :-) S 32 T ( 56, 46,2e :.) S 48 T ( 57, 47,2f :/) N
+0 T ( 60, 48,30 :0) S 16 T ( 61, 49,31 :1) S 32 T ( 62, 50,32 :2) S 48 T ( 63, 51,33 :3) N
+0 T ( 64, 52,34 :4) S 16 T ( 65, 53,35 :5) S 32 T ( 66, 54,36 :6) S 48 T ( 67, 55,37 :7) N
+(20) # ( 70, 56,38 :8) S 16 T ( 71, 57,39 :9) S 32 T ( 72, 58,3a ::) S 48 T ( 73, 59,3b :;) N
+0 T ( 74, 60,3c :<) S 16 T ( 75, 61,3d :=) S 32 T ( 76, 62,3e :>) S 48 T ( 77, 63,3f :?) N
+0 T (100, 64,40 :@) S 16 T (101, 65,41 :A) S 32 T (102, 66,42 :B) S 48 T (103, 67,43 :C) N
+0 T (104, 68,44 :D) S 16 T (105, 69,45 :E) S 32 T (106, 70,46 :F) S 48 T (107, 71,47 :G) N
+0 T (110, 72,48 :H) S 16 T (111, 73,49 :I) S 32 T (112, 74,4a :J) S 48 T (113, 75,4b :K) N
+(25) # (114, 76,4c :L) S 16 T (115, 77,4d :M) S 32 T (116, 78,4e :N) S 48 T (117, 79,4f :O) N
+0 T (120, 80,50 :P) S 16 T (121, 81,51 :Q) S 32 T (122, 82,52 :R) S 48 T (123, 83,53 :S) N
+0 T (124, 84,54 :T) S 16 T (125, 85,55 :U) S 32 T (126, 86,56 :V) S 48 T (127, 87,57 :W) N
+0 T (130, 88,58 :X) S 16 T (131, 89,59 :Y) S 32 T (132, 90,5a :Z) S 48 T (133, 91,5b :[) N
+0 T (134, 92,5c :\\) S 16 T (135, 93,5d :]) S 32 T (136, 94,5e :^) S 48 T (137, 95,5f :_) N
+(30) # (140, 96,60 :`) S 16 T (141, 97,61 :a) S 32 T (142, 98,62 :b) S 48 T (143, 99,63 :c) N
+0 T (144,100,64 :d) S 16 T (145,101,65 :e) S 32 T (146,102,66 :f) S 48 T (147,103,67 :g) N
+0 T (150,104,68 :h) S 16 T (151,105,69 :i) S 32 T (152,106,6a :j) S 48 T (153,107,6b :k) N
+0 T (154,108,6c :l) S 16 T (155,109,6d :m) S 32 T (156,110,6e :n) S 48 T (157,111,6f :o) N
+0 T (160,112,70 :p) S 16 T (161,113,71 :q) S 32 T (162,114,72 :r) S 48 T (163,115,73 :s) N
+(35) # (164,116,74 :t) S 16 T (165,117,75 :u) S 32 T (166,118,76 :v) S 48 T (167,119,77 :w) N
+0 T (170,120,78 :x) S 16 T (171,121,79 :y) S 32 T (172,122,7a :z) S 48 T (173,123,7b :{) N
+0 T (174,124,7c :|) S 16 T (175,125,7d :}) S 32 T (176,126,7e :~) S 48 T (177,127,7f :^?) N
+0 T (200,128,80 :M-^@) S 24 T (201,129,81 :M-^A) S 48 T (202,130,82 :M-^B) S 72 T (203,131,) N
+0 T (83 :M-^C) N
+0 T (204,132,84 :M-^D) S 24 T (205,133,85 :M-^E) S 48 T (206,134,86 :M-^F) S 72 T (207,135,) N
+0 T (87 :M-^G) N
+(40) # (210,136,88 :M-^H) S 24 T (211,137,89 :M-^I) S 48 T (212,138,8a :M-^J) S 72 T (213,139,) N
+0 T (8b :M-^K) N
+0 T (214,140,8c :M-^L) S 24 T (215,141,8d :M-^M) S 48 T (216,142,8e :M-^N) S 72 T (217,143,) N
+0 T (8f :M-^O) N
+0 T (220,144,90 :M-^P) S 24 T (221,145,91 :M-^Q) S 48 T (222,146,92 :M-^R) S 72 T (223,147,) N
+0 T (93 :M-^S) N
+0 T (224,148,94 :M-^T) S 24 T (225,149,95 :M-^U) S 48 T (226,150,96 :M-^V) S 72 T (227,151,) N
+0 T (97 :M-^W) N
+0 T (230,152,98 :M-^X) S 24 T (231,153,99 :M-^Y) S 48 T (232,154,9a :M-^Z) S 72 T (233,155,) N
+0 T (9b :M-^[) N
+(45) # (234,156,9c :M-^\\) S 24 T (235,157,9d :M-^]) S 48 T (236,158,9e :M-^^) S 72 T (237,159,) N
+0 T (9f :M-^_) N
+0 T (240,160,a0 :\240) S 16 T (241,161,a1 :\241) S 32 T (242,162,a2 :\242) S 48 T (243,163,a3 :\243) N
+0 T (244,164,a4 :\244) S 16 T (245,165,a5 :\245) S 32 T (246,166,a6 :\246) S 48 T (247,167,a7 :\247) N
+0 T (250,168,a8 :\250) S 16 T (251,169,a9 :\251) S 32 T (252,170,aa :\252) S 48 T (253,171,ab :\253) N
+0 T (254,172,ac :\254) S 16 T (255,173,ad :\255) S 32 T (256,174,ae :\256) S 48 T (257,175,af :\257) N
+(50) # (260,176,b0 :\260) S 16 T (261,177,b1 :\261) S 32 T (262,178,b2 :\262) S 48 T (263,179,b3 :\263) N
+0 T (264,180,b4 :\264) S 16 T (265,181,b5 :\265) S 32 T (266,182,b6 :\266) S 48 T (267,183,b7 :\267) N
+0 T (270,184,b8 :\270) S 16 T (271,185,b9 :\271) S 32 T (272,186,ba :\272) S 48 T (273,187,bb :\273) N
+0 T (274,188,bc :\274) S 16 T (275,189,bd :\275) S 32 T (276,190,be :\276) S 48 T (277,191,bf :\277) N
+0 T (300,192,c0 :\300) S 16 T (301,193,c1 :\301) S 32 T (302,194,c2 :\302) S 48 T (303,195,c3 :\303) N
+(55) # (304,196,c4 :\304) S 16 T (305,197,c5 :\305) S 32 T (306,198,c6 :\306) S 48 T (307,199,c7 :\307) N
+0 T (310,200,c8 :\310) S 16 T (311,201,c9 :\311) S 32 T (312,202,ca :\312) S 48 T (313,203,cb :\313) N
+0 T (314,204,cc :\314) S 16 T (315,205,cd :\315) S 32 T (316,206,ce :\316) S 48 T (317,207,cf :\317) N
+0 T (320,208,d0 :\320) S 16 T (321,209,d1 :\321) S 32 T (322,210,d2 :\322) S 48 T (323,211,d3 :\323) N
+0 T (324,212,d4 :\324) S 16 T (325,213,d5 :\325) S 32 T (326,214,d6 :\326) S 48 T (327,215,d7 :\327) N
+(60) # (330,216,d8 :\330) S 16 T (331,217,d9 :\331) S 32 T (332,218,da :\332) S 48 T (333,219,db :\333) N
+0 T (334,220,dc :\334) S 16 T (335,221,dd :\335) S 32 T (336,222,de :\336) S 48 T (337,223,df :\337) N
+0 T (340,224,e0 :\340) S 16 T (341,225,e1 :\341) S 32 T (342,226,e2 :\342) S 48 T (343,227,e3 :\343) N
+0 T (344,228,e4 :\344) S 16 T (345,229,e5 :\345) S 32 T (346,230,e6 :\346) S 48 T (347,231,e7 :\347) N
+0 T (350,232,e8 :\350) S 16 T (351,233,e9 :\351) S 32 T (352,234,ea :\352) S 48 T (353,235,eb :\353) N
+(65) # (354,236,ec :\354) S 16 T (355,237,ed :\355) S 32 T (356,238,ee :\356) S 48 T (357,239,ef :\357) N
+0 T (360,240,f0 :\360) S 16 T (361,241,f1 :\361) S 32 T (362,242,f2 :\362) S 48 T (363,243,f3 :\363) N
+0 T (364,244,f4 :\364) S 16 T (365,245,f5 :\365) S 32 T (366,246,f6 :\366) S 48 T (367,247,f7 :\367) N
+0 T (370,248,f8 :\370) S 16 T (371,249,f9 :\371) S 32 T (372,250,fa :\372) S 48 T (373,251,fb :\373) N
+0 T (374,252,fc :\374) S 16 T (375,253,fd :\375) S 32 T (376,254,fe :\376) S 48 T (377,255,ff :\377) N
+(wide.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.431713 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(70) # () p n
+0 T (=============================================================) N
+(wide.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/guess-1.tst b/tests/guess-1.tst
new file mode 100755
index 0000000..c847b6e
--- /dev/null
+++ b/tests/guess-1.tst
@@ -0,0 +1,41 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program tries most common options of the program
+
+# This is were you installed the tested version of the program
+# (and the directories test, test-ps and diff)
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+pairs="includeres:perl
+psmandup:sh
+run-help:zsh
+strange.mail:mail
+ehandler:ps"
+
+for pair in $pairs
+do
+ # What are the filename and its type
+ file=`echo $pair | sed "s/:.*//"g`
+ lang=`echo $pair | sed "s/[^:]*://"g`
+
+ # Check that a2ps agrees
+ res=`$CHK --guess $TST_DIR/$file | sed -e 's/[^(]*(//g' | sed -e 's/)[^)]*//g'`
+ if test "$res" != $lang; then
+ has_failed=yes;
+ cant_recognize="$cant_recognize $lang"
+ fi
+done
+
+# Understandable report of the problems
+if test x$has_failed = xyes; then
+ echo "Your /etc/magic file seems a bit junky."
+ echo "It is unable to recognize the type of$cant_recognize files"
+ echo "You might run into bad guesses with automatic pretty-printing"
+ echo "-- Please note that this is not an error from a2ps."
+ echo "-- Don't be worried by this failure, nor should you report it"
+fi
+
+exit 0
diff --git a/tests/guess-2.tst b/tests/guess-2.tst
new file mode 100755
index 0000000..cd2f7ea
--- /dev/null
+++ b/tests/guess-2.tst
@@ -0,0 +1,58 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# guess2.tst
+# Check that a2ps is able to use file(1) on stdin.
+# Do _not_ report an error if a2ps failed to recognize PostScript files
+# when file itself fails. But display a big warning though.
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+# Get the type verdict from a2ps
+get_type='sed -e s/[^(]*(//g;s/)[^)]*//g'
+
+# Check that guesses are OK for stdin filename
+# No argument, no content
+res=`echo | $CHK --guess --stdin=foo.ps | $get_type` || exit 1
+test "$res" = ps || exit 1
+
+# Argument is -, no content
+res=`echo | $CHK --guess --stdin=foo.ps - | $get_type` || exit 1
+test "$res" = ps || exit 1
+
+# No arg, no specified title, no content
+res=`echo | $CHK --guess | $get_type` || exit 1
+test "$res" = plain || exit 1
+
+# No arg, no specified title, a ps content
+# This test relies upon a good file(1) (i.e. a good etc/magic).
+res=`cat $TST_DIR/ehandler | $CHK --guess | $get_type` || exit 1
+if test "$res" = ps; then :; else
+ # We have failed to recognize a ps file. Is it because of file(1)?
+ set -- `$CHK --guess -vtools $TST_DIR/ehandler 2>&1 | grep '^file(1)'`
+ case "$3$4" in
+ PostScript|postscript)
+ # a2ps is truly responsible
+ exit 1
+ ;;
+
+ *)
+ # a2ps is not responsible
+ exec 1>&2
+ echo "*****************************************************************"
+ echo "* Your file(1) is sadly broken. It does not recognize PostScript"
+ echo "* files. You may have unexpected results such as pretty printing"
+ echo "* of the _source_ of your PostScript documents."
+ echo "* To avoid this problem ask your system administrator to update"
+ echo "* etc/magic, so that running"
+ echo "* file $TST_DIR/ehandler"
+ echo "* correctly answers \`PostScript document'"
+ echo "*****************************************************************"
+ # Consider the test is succesful
+ exit 0
+ ;;
+ esac
+fi
+
+exit 0
diff --git a/tests/inline.tst b/tests/inline.tst
new file mode 100755
index 0000000..6bf370a
--- /dev/null
+++ b/tests/inline.tst
@@ -0,0 +1,32 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program verifies that any inline function is static.
+# This test is meant to avoid problems I had on IRIX.
+
+: ${SRCDIR=.}
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Get the guilty lines in *.c files
+# Omit strfime.c and confg.c, coz' their inlines are safe.
+# Exclude the word inlined.
+res=`(cd $top_srcdir && fgrep 'inline' src/*.c lib/*.c) |
+ egrep -v '__inline|static|inlined|lib/(confg|strftime)\.c' |
+ sort -u`
+if test -n "$res"; then
+ echo "The following files use non static inline:"
+ echo "$res"
+ exit 1
+fi
+
+# No inline allowed in a header.
+res=`(cd $top_srcdir && fgrep 'inline' src/*.h lib/*.h) | sort -u`
+if test -n "$res"; then
+ echo "The following headers use inline:"
+ echo "$res"
+ exit 1
+fi
+
+exit 0
diff --git a/tests/inout-1.tst b/tests/inout-1.tst
new file mode 100755
index 0000000..b7a6e17
--- /dev/null
+++ b/tests/inout-1.tst
@@ -0,0 +1,27 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps correctly reads stdin, and
+# writes on stdout. In particular, we check both with -Eplain
+# specified, and without (i.e., -E alone).
+
+: ${SRCDIR=.}
+
+# failure?
+fail=0
+
+# The options to run with
+OPT="-o- -"
+
+# The testing file
+IN_NAME=report.pre
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# 1. Read stdin, produce on stdout, specify "plain"
+nlines=`cat $TST_FILE | $CHK $OPT | wc -l | sed 's/[ \t]//g'`
+test $? = 0 || fail=1
+test $nlines != 0 || fail=1
+
+exit $fail
diff --git a/tests/inout-2.tst b/tests/inout-2.tst
new file mode 100755
index 0000000..ea58337
--- /dev/null
+++ b/tests/inout-2.tst
@@ -0,0 +1,27 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps correctly reads stdin, and
+# writes on stdout. In particular, we check both with -Eplain
+# specified, and without (i.e., -E alone).
+
+: ${SRCDIR=.}
+
+# failure?
+fail=0
+
+# The options to run with
+OPT="-o- -"
+
+# The testing file
+IN_NAME=prosamp.pre
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# 2. Read stdin, produce on stdout, specify "pre"
+nlines=`cat $TST_FILE | $CHK $OPT -Epre | wc -l | sed 's/[ \t]//g'`
+test $? = 0 || fail=1
+test $nlines != 0 || fail=1
+
+exit $fail
diff --git a/tests/inout-3.tst b/tests/inout-3.tst
new file mode 100755
index 0000000..1c13b78
--- /dev/null
+++ b/tests/inout-3.tst
@@ -0,0 +1,27 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps correctly reads stdin, and
+# writes on stdout. In particular, we check both with -Eplain
+# specified, and without (i.e., -E alone).
+
+: ${SRCDIR=.}
+
+# failure?
+fail=0
+
+# The options to run with
+OPT="-o- -"
+
+# The testing file
+IN_NAME=report.pre
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# 3. Read stdin, produce on stdout, set automatic ssh selection on
+nlines=`cat $TST_FILE | $CHK $OPT -E | wc -l | sed 's/[ \t]//g'`
+test $? = 0 || fail=1
+test $nlines != 0 || fail=1
+
+exit $fail
diff --git a/tests/options-1.tst b/tests/options-1.tst
new file mode 100755
index 0000000..6c6aa94
--- /dev/null
+++ b/tests/options-1.tst
@@ -0,0 +1,25 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Test if the basic options work, and produce on stdout only.
+
+. ./defs || exit 1
+
+tmp=$tmpdir/opt-1
+
+for p in --version --help --list=features --list=printers --list=options \
+ --list=media --list=style-sheets --list=delegations \
+ --list=macro-meta-sequences --list=encodings --list=user-options \
+ --list=prologues --list=ppd;
+do
+ # There should be nothing on stderr */
+ $verbose "Running a2ps $p"
+ # I used to run this test:
+ #err=`$CHK $p 2>&1 >/dev/null`
+ #test "x$err" = x
+ # but it seems that many shells are not able to redirect fd 2 like this.
+ $CHK $p >/dev/null 2>$tmp
+ test "x`cat $tmp`" = x
+done
+
+exit 0
diff --git a/tests/pages-1.tst b/tests/pages-1.tst
new file mode 100755
index 0000000..3e76961
--- /dev/null
+++ b/tests/pages-1.tst
@@ -0,0 +1,35 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps handles correctly the page ranges
+
+: ${SRCDIR=.}
+
+# The options to run with
+# There are 7 pages to print formfeed.txt. Use it twice to test
+# Page selection of several files.
+# Do not use compact mode to check that the pages are anyway correctly
+# generated
+# Get the first 2, the last 2, and 1 in the middle (one of each file)
+# And one which is far too big
+OPT="-C2mq --compact=no -a-2,4,7-8,13-,99"
+
+# The testing file
+IN_NAME=formfeed.txt
+
+# Outputs
+OUT_NAME=pages-1.ps
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Run the test
+$CHK $OPT $TST_FILE $TST_FILE -P awkout > $CHK_FILE || exit 1
+if test -f $REF_FILE; then :; else
+ $REF $OPT $TST_FILE $TST_FILE -P awkout > $REF_FILE || exit 1
+fi
+
+# Return the verdict
+cmp $REF_FILE $CHK_FILE 2> /dev/null
+
+exit 0
diff --git a/tests/pages-2.tst b/tests/pages-2.tst
new file mode 100755
index 0000000..ff135e7
--- /dev/null
+++ b/tests/pages-2.tst
@@ -0,0 +1,22 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps handles correctly the page ranges
+# Check that invalid values are rejected.
+
+: ${SRCDIR=.}
+
+# The testing file
+IN_NAME=formfeed.txt
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+# Now check that some invalid values are rejected
+$CHK $FILE -o- --pages=1-2d > /dev/null 2>&1 && exit 1
+$CHK $FILE -o- --pages=tocd > /dev/null 2>&1 && exit 1
+$CHK $FILE -o- --pages=1,d > /dev/null 2>&1 && exit 1
+
+# Check the behavior when -a is reset
+$CHK $FILE -o- --pages=1-2 --pages < /dev/null > /dev/null 2>&1 || exit 1
+exit 0
diff --git a/tests/params.tst b/tests/params.tst
new file mode 100755
index 0000000..28d1db1
--- /dev/null
+++ b/tests/params.tst
@@ -0,0 +1,38 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program verifies that the use of PARAMS in consistent
+
+: ${SRCDIR=.}
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+fail=0
+
+cd $top_srcdir
+srcfiles=`echo lib/*.[chily] src/*.[chily]`
+
+# Get all the files that define PARAMS or __P
+res=`\
+grep -l '#[\t ]*define[\t ]*PARAMS' $srcfiles;\
+grep -l '#[\t ]*define[\t ]*__P' $srcfiles`
+
+# These files _must_ check for PROTOTYPES
+for i in $res;
+do
+ case $i in
+ # Don't check obstack.h which has a macro starting with __P
+ *obstack.h)
+ ;;
+
+ *)
+ if grep -s PROTOTYPES $i; then :; else
+ echo "$i defines PARAMS without checking PROTOTYPES";
+ fail=1
+ fi
+ ;;
+ esac
+done
+
+exit $fail
diff --git a/tests/po.tst b/tests/po.tst
new file mode 100755
index 0000000..f0692cb
--- /dev/null
+++ b/tests/po.tst
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+: ${SRCDIR=.}
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+for file in `(cd $top_srcdir && fgrep -l '_(' lib/*.c src/*.c)`
+do
+ if fgrep "$file" $top_srcdir/po/POTFILES.in >/dev/null 2>&1; then :; else
+ echo "Did not see $file in POTFILES.in."
+ failure=1
+ fi
+done
+
+exit $failure
diff --git a/tests/printers.tst b/tests/printers.tst
new file mode 100755
index 0000000..b7b828d
--- /dev/null
+++ b/tests/printers.tst
@@ -0,0 +1,11 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# The DefaultPrinter is not defined in a2ps-test.cfg, but that's
+# no reason to dump!
+
+. ./defs || exit 1
+
+(echo | $CHK -d 2>&1) | grep "^a2ps:" >&5 || exit 1
+
+exit 0
diff --git a/tests/prolog-1.tst b/tests/prolog-1.tst
new file mode 100755
index 0000000..b002da2
--- /dev/null
+++ b/tests/prolog-1.tst
@@ -0,0 +1,21 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Check that the prologues behave well (no missing files)
+
+: ${SRCDIR=.}
+
+# Option to run a2ps with
+OPT="-Esh"
+
+# The testing file
+IN_NAME=formfeed.txt
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+for p in bold bw color gray gray2 matrix diff
+do
+ $verbose "Running prologue $p"
+ $CHK --prologue=$p $OPT $TST_FILE -o/dev/null
+done
diff --git a/tests/prolog-2.tst b/tests/prolog-2.tst
new file mode 100755
index 0000000..5cbaa6e
--- /dev/null
+++ b/tests/prolog-2.tst
@@ -0,0 +1,31 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Compare two prologues for -1 and -4 (used in align.tst)
+: ${SRCDIR=.}
+
+# Option to run a2ps with
+OPT="-Eplain -Pawkin"
+
+# The testing file
+IN_NAME=formfeed.txt
+
+# Set up other vars
+. $SRCDIR/defs || exit 1
+
+for nup in 1 4
+do
+ # Checked and reference outputs
+ ref_file=$REF_DIR/prolog-${nup}.ps
+ chk_file=$CHK_DIR/prolog-${nup}.ps
+
+ $verbose "Running a2ps -$nup $OPT $TST_FILE"
+ $CHK -$nup $OPT $TST_FILE >$chk_file 2>&5
+ if test ! -f $ref_file; then
+ $verbose "Running ref-a2ps -$nup $OPT $TST_FILE"
+ $REF -$nup $OPT $TST_FILE >$ref_file 2>&5
+ fi
+ cmp -s $ref_file $chk_file
+done
+
+exit $failure
diff --git a/tests/ps-ref/AppDelegate.ps b/tests/ps-ref/AppDelegate.ps
new file mode 100644
index 0000000..94b3e3f
--- /dev/null
+++ b/tests/ps-ref/AppDelegate.ps
@@ -0,0 +1,242 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+(#import) K
+( ") p
+(AppDelegate.h) str
+(") p n
+() N
+(#import) K
+( <foundation/NSArray.h>) p n
+(#import) K
+( <dbkit/DBValue.h>) p n
+() N
+(@implementation) K
+( AppDelegate) p n
+() N
+(// --------------------- Constants) c n
+() p n
+(#define) K
+( N_FIELDS) p 24 T () S 32 T (\(8\)) N
+() N
+(// --------------------- Global variables) c n
+() p n
+(NSString) N
+( *AppDelegateNewSetNotificationName = @") S
+(AppDelegateNewSetNotification) str
+(",) p n
+( ) S 8 T () S
+(// This is the name of the notification sent out when a new) c n
+() p 8 T () S
+(// field set has been selected for manipulation.) c n
+( *AppDelegateNewFieldNotificationName = @") p
+(AppDelegateNewSetNotification) str
+(";) p n
+( ) S 8 T () S
+(// This is the name of the notification sent out when a new) c n
+() p 8 T () S
+(// field has been selected for manipulation.) c n
+( ) p n
+(// --------------------- Class variables) c n
+() p n
+(static) K
+( NSMutableArray) p n
+() S 8 T (*classDefaultSet = nil;) N
+() S 8 T () N
+(// --------------------- Methods) c n
+() p n
+(+ initize) K n
+({) p n
+( ) S
+(// This method will be called automatically prior to any) c n
+( ) p
+(// other to this class.) c n
+( ) p n
+( ) S
+(int) k
+( ) p n
+( ) S 8 T (i;) N
+() S 8 T () N
+( ) S
+(// Create an array to hold the actual field objects.) c n
+( classDefaultSet = [[NSMutableArray array] retain];) p n
+( ) S 8 T () S 16 T ( ) N
+( ) N
+( ) S
+(return) K
+( ) p
+(self) K
+(;) p n
+( ) S 8 T () S 16 T ( ) N
+(} ) S
+(// initize) c n
+( ) p n
+(- \(id <FieldSet>\)fieldSet) K n
+({) p n
+( ) S
+(// This method returns an object \(conforming to the FieldSet) c n
+( ) p
+(// protocol\) which is being manipulated by this application. ) c n
+( ) p n
+( ) S
+(// If we don't have one yet...) c n
+( ) p
+(if) K
+( \(!myFieldSet\)) p n
+( {) N
+( ) S 8 T () S
+(// Just adopt the default one for this class.) c n
+() p 8 T ([) S
+(self) K
+( setFieldSet:\() p
+(id) k
+(\)classDefaultSet];) p n
+( }) N
+( ) N
+( ) S
+(return) K
+( myFieldSet;) p n
+( ) N
+(} ) S
+(// fieldSet) c n
+() p n
+(- \(void\)setFieldSet:\(id <FieldSet>\)newValue) K n
+({) p n
+( ) S
+(// This method sets the field set being manipulated to the one given.) c n
+( ) p
+(// If the new set differs from the old, the AppDelegateNewSet) c n
+( ) p
+(// notification will be posted informing watchers of the change.) c n
+(AppDelegate.m) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p n
+( ) S
+(// If the new field is the same as the old..) c n
+( ) p
+(if) K
+( \(newValue EQ myFieldSet\)) p n
+( {) N
+( ) S 8 T () S
+(return) K
+(;) p 16 T () S
+(// do nothing) c n
+( } ) p n
+( ) N
+( ) S
+(// Release the old value and adopt the new.) c n
+( [newValue retain];) p n
+( ) N
+( ) S
+(// Post a notification of the change.) c n
+( [[NotificationCenter defaultCenter]) p n
+( ) S 8 T (postNotificationName:AppDelegateNewSetNotificationName) N
+() S 8 T (object:myFieldSet];) N
+( ) N
+(} ) S
+(// setFieldSet:) c n
+() p n
+(- \(Field *\)selectedField) K n
+({) p n
+( ) S
+(// This method returns the field from our field set) c n
+( ) p
+(// which is currently considered selected.) c n
+( ) p n
+( ) S
+(// If we don't currently have a selected field...) c n
+( ) p
+(if) K
+( \(!mySelectedField\)) p n
+( {) N
+( ) S 8 T () S
+(// Adopt the first field in our set.) c n
+() p 8 T ([) S
+(self) K
+( setSelectedField:[[) p
+(self) K
+( fieldSet] fieldAtIndex:0]];) p n
+( }) N
+( ) N
+( ) S
+(return) K
+( mySelectedField;) p n
+( ) N
+(} ) S
+(// selectedField) c n
+() p n
+(- \(void\)setSelectedField:\(Field *\)newValue) K n
+({) p n
+( ) S
+(// This method causes the given field to be taken as the active one.) c n
+( ) p
+(// If the new field differs from the old, the AppDelegateNewField ) c n
+( ) p
+(// notification will be posted informing watchers of the change.) c n
+( ) p n
+( ) S
+(// If the new field is the same as the old..) c n
+( ) p
+(if) K
+( \(newValue EQ mySelectedField\)) p n
+( {) N
+( ) S 8 T () S
+(return) K
+(;) p 16 T () S
+(// do nothing) c n
+( } ) p n
+( ) N
+( ) S
+(// Release the old value and adopt the new.) c n
+( [newValue retain];) p n
+( ) N
+( ) S
+(// Post a notification of the change.) c n
+( [[NotificationCenter defaultCenter]) p n
+( ) S 8 T (postNotificationName:AppDelegateNewFieldNotificationName ) N
+() S 8 T (object:mySelectedField];) N
+( ) N
+(} ) S
+(// setSelectedField:) c n
+() p n
+(@end) K n
+(AppDelegate.m) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/InsertBlock.ps b/tests/ps-ref/InsertBlock.ps
new file mode 100644
index 0000000..b26e681
--- /dev/null
+++ b/tests/ps-ref/InsertBlock.ps
@@ -0,0 +1,129 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(/* This code is part of Freenet. It is distributed under the GNU General) c n
+( * Public License, version 3 \(or at your option any later version\). See) N
+( * http://www.gnu.org/ for further details of the GPL. */) N
+(package) K
+( freenet.client;) p n
+() N
+(import) K
+( freenet.keys.FreenetURI;) p n
+(import) K
+( freenet.support.api.Bucket;) p n
+() N
+(/**) C n
+( * Class to contain everything needed for an insert.) N
+( */) N
+(public) K
+( ) p
+(class) K
+( ) p
+(InsertBlock) L
+( {) p n
+() N
+() S 8 T () S
+(private) K
+( ) p
+(final) K
+( Bucket data;) p n
+() S 8 T () S
+(private) K
+( ) p
+(boolean) k
+( isFreed;) p n
+() S 8 T () S
+(public) K
+( ) p
+(final) K
+( FreenetURI desiredURI;) p n
+() S 8 T () S
+(public) K
+( ) p
+(final) K
+( ClientMetadata clientMetadata;) p n
+() S 8 T () N
+() S 8 T () S
+(public) K
+( InsertBlock\(Bucket data, ClientMetadata metadata, FreenetURI desi) p n
+(redURI\) {) N
+() S 8 T () S 16 T () S
+(if) K
+(\(data == ) p
+(null) k
+(\) ) p
+(throw) K
+( ) p
+(new) K
+( NullPointerException\(\);) p n
+() S 8 T () S 16 T (this.data = data;) N
+() S 8 T () S 16 T (this.isFreed = ) S
+(false) k
+(;) p n
+() S 8 T () S 16 T () S
+(if) K
+(\(metadata == ) p
+(null) k
+(\)) p n
+() S 8 T () S 16 T () S 24 T (clientMetadata = ) S
+(new) K
+( ClientMetadata\(\);) p n
+() S 8 T () S 16 T () S
+(else) K n
+() p 8 T () S 16 T () S 24 T (clientMetadata = metadata;) N
+() S 8 T () S 16 T (this.desiredURI = desiredURI;) N
+() S 8 T (}) N
+() S 8 T () N
+() S 8 T () S
+(public) K
+( Bucket getData\(\) {) p n
+() S 8 T () S 16 T () S
+(return) K
+( \(isFreed ? ) p
+(null) k
+( : data\);) p n
+() S 8 T (}) N
+() S 8 T () N
+() S 8 T () S
+(public) K
+( ) p
+(void) k
+( free\(\){) p n
+() S 8 T () S 16 T () S
+(synchronized) K
+( \() p
+(this) k
+(\) {) p n
+() S 8 T () S 16 T () S 24 T () S
+(if) K
+(\(isFreed\) ) p
+(return) K
+(;) p n
+() S 8 T () S 16 T () S 24 T (isFreed = ) S
+(true) k
+(;) p n
+() S 8 T () S 16 T (}) N
+() S 8 T () S 16 T (data.free\(\);) N
+() S 8 T (}) N
+(}) N
+(InsertBlock.java) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/ShellNewDummyHook.ps b/tests/ps-ref/ShellNewDummyHook.ps
new file mode 100644
index 0000000..891edbb
--- /dev/null
+++ b/tests/ps-ref/ShellNewDummyHook.ps
@@ -0,0 +1,229 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+({-----------------------------------------------------------------------------) c n
+(The contents of this file are subject to the GNU General Public License) N
+(Version 1.1 or later \(the "License"\); you may not use this file except in) N
+(compliance with the License. You may obtain a copy of the License at) N
+(http://www.gnu.org/copyleft/gpl.html) N
+() N
+(Software distributed under the License is distributed on an "AS IS" basis,) N
+(WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for) N
+(the specific language governing rights and limitations under the License.) N
+() N
+(The Initial Developer of the Original Code is Michael Elsdrfer.) N
+(All Rights Reserved.) N
+() N
+(You may retrieve the latest version of this file at the NTFS Link Homepage) N
+(located at http://www.elsdoerfer.net/ntfslink/) N
+() N
+(Please note:) N
+(This is /not/ a real shell extension. We use this fake COM object factory to) N
+(register the "ShellNew" menu items. It's just the easiest way to do this,) N
+(because the Delphi RTL will automatically call the UpdateRegistry\(\) method if) N
+(a client calls DllRegisterServer.) N
+(-----------------------------------------------------------------------------}) N
+() p n
+(unit) K
+( ) p
+(ShellNewDummyHook) L
+(;) p n
+() N
+(interface) l n
+() p n
+(uses) K n
+( Windows, ComObj, ActiveX;) p n
+() N
+(type) K n
+( TShellNewDummyHook = class\(TComObject) p
+(\(* no interfaces needed, it's a fake! *\)) C
+(\)) p n
+( ) S
+(end) K
+(;) p n
+() N
+( TShellNewDummyFactory = class\(TComObjectFactory\)) N
+( public) N
+( ) S
+(procedure) K
+( ) p
+(UpdateRegistry) l
+(\(Register: ) p
+(Boolean) k
+(\); override;) p n
+( ) S
+(end) K
+(;) p n
+() N
+(implementation) N
+() N
+(uses) K n
+( ComServ, SysUtils, JclRegistry;) p n
+() N
+({ TShellNewDummyFactory }) c n
+() p n
+(procedure) K
+( ) p
+(TShellNewDummyFactory.UpdateRegistry) l
+(\(Register: ) p
+(Boolean) k
+(\);) p n
+() N
+( ) S
+(procedure) K
+( ) p
+(CreateShellNewStructure) l
+(\(FileExtKey, FileClassKey,) p n
+( DllFunctionName, ItemCaption: ) S
+(string) k
+(; IconIndex: ) p
+(Integer) k
+(\);) p n
+( ) S
+(begin) K n
+( // Create the ) p
+(file) K
+( extension key + the "ShellNew" key) p n
+( CreateRegKey\(FileExtKey, '', FileClassKey, HKEY_CLASSES_ROOT\);) N
+( CreateRegKey\(FileExtKey + ') S
+(\\ShellNew) str
+(', ') p
+(Command) str
+(',) p n
+( ') S
+(rundll32.exe ") str
+(' + ComServer.ServerFileName + ') p
+(",) str
+(' +) p n
+( DLLFunctionName + ') S
+( %1) str
+(',) p n
+( HKEY_CLASSES_ROOT\);) N
+( // Create the ) S
+(file) K
+( class key, + the the icon ) p
+(and) K
+( a command sub-key) p n
+( CreateRegKey\(FileClassKey, '', ItemCaption, HKEY_CLASSES_ROOT\);) N
+( CreateRegKey\(FileClassKey + ') S
+(\\DefaultIcon) str
+(', '',) p n
+( ComServer.ServerFileName + ') S
+(,) str
+(' + IntToStr\(IconIndex\),) p n
+( HKEY_CLASSES_ROOT\);) N
+( CreateRegKey\(FileClassKey + ') S
+(\\Shell\\Open\\Command) str
+(', '', ') p
+(.) str
+(',) p n
+( HKEY_CLASSES_ROOT\);) N
+( ) S
+(end) K
+(;) p n
+() N
+(ShellNewDummyHook.pas) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(const) K n
+( HARDLINK_FILEEXT_KEY = ') p
+(.ntfs-hardlink) str
+(';) p n
+( HARDLINK_FILECLASS_KEY = ') S
+(NTFSLink.Hardlink) str
+(';) p n
+( JUNCTION_FILEEXT_KEY = ') S
+(.ntfs-junction) str
+(';) p n
+( JUNCTION_FILECLASS_KEY = ') S
+(NTFSLink.Junction) str
+(';) p n
+(begin) K n
+( ) p
+(if) K
+( Register ) p
+(then) K n
+( ) p
+(begin) K n
+( CreateShellNewStructure\(HARDLINK_FILEEXT_KEY, HARDLINK_FILECLASS_KEY,) p n
+( ') S
+(NewHardlinkDlg) str
+(', ') p
+(NTFS Hardlink) str
+(', 0\);) p n
+( CreateShellNewStructure\(JUNCTION_FILEEXT_KEY, JUNCTION_FILECLASS_KEY,) N
+( ') S
+(NewJunctionDlg) str
+(', ') p
+(NTFS Junction Point) str
+(', 1\);) p n
+( ) S
+(end) K
+( ) p
+(else) K n
+( ) p
+(begin) K n
+( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, HARDLINK_FILEEXT_KEY\); except ) p
+(end) K
+(;) p n
+( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, HARDLINK_FILECLASS_KEY\); except ) S
+(end) K
+(;) p n
+( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, JUNCTION_FILEEXT_KEY\); except ) S
+(end) K
+(;) p n
+( try RegDeleteKeyTree\(HKEY_CLASSES_ROOT, JUNCTION_FILECLASS_KEY\); except ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+(;) p n
+( ) N
+( // *NO* inherited call here, it would just make unnecessary registry entries) N
+(end) K
+(;) p n
+() N
+(initialization) N
+( TShellNewDummyFactory.Create\(ComServer, TShellNewDummyHook, GUID_NULL, '', '',) N
+( ciMultiInstance, tmApartment\);) N
+() N
+(end) K
+(.) p n
+(ShellNewDummyHook.pas) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/a2ps.ps b/tests/ps-ref/a2ps.ps
new file mode 100644
index 0000000..87d46f0
--- /dev/null
+++ b/tests/ps-ref/a2ps.ps
@@ -0,0 +1,174 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+() N
+() N
+(A2PS\(1L\) Misc. Reference Manual Pages A2PS\(1L\)) N
+() N
+() N
+() N
+(NAME) K n
+( a2ps - formats an ascii file for printing on a postscript) p n
+( printer) N
+() N
+(SYNOPSIS) K n
+( ) p
+(a2ps) K
+( [ ) p
+(global) K
+( ) p
+(options) K
+( ] [ ) p
+(positional) K
+( ) p
+(options) K
+( ] [ ) p
+(file1) k
+( [) p n
+( ) S
+(positional) K
+( ) p
+(options) K
+( ] ] ) p
+(file2) k
+( ... ] ]) p n
+() N
+(DESCRIPTION) K n
+( ) p
+(a2ps) k
+( formats each named file for printing in a postscript) p n
+( printer; if no file is given, ) S
+(a2ps) k
+( reads from the standard) p n
+( input. The output is sent to the printer or to stdout or to) N
+( a file. The format used is nice and compact: normally two) N
+( pages on each physical page, borders surrounding pages,) N
+( headers with useful information \(page number, printing date,) N
+( file name or supplied header\), line numbering, keyword) N
+( highlighting, symbol substitution etc. This is very useful) N
+( for making archive listings of programs.) N
+() N
+( ) S
+(Global) K
+( ) p
+(options) K n
+( Global options offered by ) p
+(a2ps) k
+( are the following:) p n
+() N
+( ) S
+(-?) K
+( ) p
+(-h) K
+( Print usage information.) p n
+() N
+( ) S
+(-a) K
+( Use alternative paper size. In general defined to be) p n
+( US letter. \(see -V\).) N
+() N
+( ) S
+(-b) K
+( Force printing binary files. By default, binary files) p n
+( printing is stopped before second page \(see -nb) N
+( option\).) N
+() N
+( ) S
+(-c) K
+( Compact mode for a sequence of files. This option) p n
+( allows the printing of two files in the same physical) N
+( page: last page of the first file in the left \(or up\)) N
+( side and first page of the second file in the right) N
+( \(or down\) side. This option is valid only for twinpage) N
+( mode \(two pages per physical page\).) N
+() N
+( ) S
+(-f) K
+( Fold lines too large to be printed inside the borders) p n
+( \(default option\). Max line size depends on format and) N
+( font size used and whether line numbering has been) N
+( suppressed.) N
+() N
+( ) S
+(-h) K
+( Print usage information.) p n
+() N
+( ) S
+(-I) K
+(file) k n
+( Use the specified file as the postscript prologue for) p n
+( a2ps.) N
+() N
+( ) S
+(-i) K
+( Interpret TAB, BS and FF characters \(default option\).) p n
+( TAB is replaced by enough spaces to reach next tab) N
+( stop while BS and FF have their meanings.) N
+() N
+() N
+() N
+(SunOS 5.5 Last change: 9 August 1996 1) N
+() N
+(Some weird characters that exists out there are:) N
+() N
+(a2ps.man) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(- O plus: ) p
+(\305) sy
+( and ) p
+(\305) sy n
+() p n
+(- Copyright: ) S
+(\343) sy n
+() p n
+(- Plus or minus: ) S
+(\261) sy n
+() p n
+(- Greater than or equal to: ) S
+(\263) sy n
+() p n
+(- Less than or equal to: ) S
+(\243) sy n
+() p n
+(- Another form of ) S
+(underlining.) k
+(a2ps.man) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/al1-3.ps b/tests/ps-ref/al1-3.ps
new file mode 100644
index 0000000..ebee7f2
--- /dev/null
+++ b/tests/ps-ref/al1-3.ps
@@ -0,0 +1,80 @@
+%%Page: (1-3) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (1) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (*) 2
+% Empty Page
+showpage
+%%Page: (*) 3
+% Empty Page
+showpage
+%%Page: (1-3) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (4) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (4) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/al1-page.ps b/tests/ps-ref/al1-page.ps
new file mode 100644
index 0000000..fe298cc
--- /dev/null
+++ b/tests/ps-ref/al1-page.ps
@@ -0,0 +1,74 @@
+%%Page: (1-3) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (1) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (1-3) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (2) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (2) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/al1-rank.ps b/tests/ps-ref/al1-rank.ps
new file mode 100644
index 0000000..fe298cc
--- /dev/null
+++ b/tests/ps-ref/al1-rank.ps
@@ -0,0 +1,74 @@
+%%Page: (1-3) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (1) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (1-3) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (2) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (2) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/al1-sheet.ps b/tests/ps-ref/al1-sheet.ps
new file mode 100644
index 0000000..3f3f526
--- /dev/null
+++ b/tests/ps-ref/al1-sheet.ps
@@ -0,0 +1,77 @@
+%%Page: (1-3) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (1) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (*) 2
+% Empty Page
+showpage
+%%Page: (1-3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (3) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (3) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/al1-virtual.ps b/tests/ps-ref/al1-virtual.ps
new file mode 100644
index 0000000..755029d
--- /dev/null
+++ b/tests/ps-ref/al1-virtual.ps
@@ -0,0 +1,74 @@
+%%Page: (1-3,1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (1) title
+border
+/v 2 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (1) title
+border
+/v 3 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 1) p n
+(3-pages.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2-3) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 2) p n
+(3-pages.txt) (right) (2) title
+border
+/v 1 store
+/x0 x v get 2.300369 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Page 3) p n
+(3-pages.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/bookie.ps b/tests/ps-ref/bookie.ps
new file mode 100644
index 0000000..dfc31ca
--- /dev/null
+++ b/tests/ps-ref/bookie.ps
@@ -0,0 +1,295 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(/* ########################################################################) c n
+() N
+() S 8 T () S 16 T () S 24 T ( Bookie.idl) N
+() N
+( This program is free software; you can redistribute it and/or modify) N
+( it under the terms of the GNU General Public License as published by) N
+( the Free Software Foundation; either version 3, or \(at your option\)) N
+( any later version.) N
+() N
+( \(c\) Copyright 1999 Bob Phillips) N
+() N
+( ######################################################################## */) N
+() p n
+(#include) K
+( <IncludedIdl.idl>) p n
+() N
+(#define) K
+( FIVE_BUCKS 5.00) p n
+() N
+(module) K
+( Bookie {) p n
+() N
+(// For now, we will cheat on the date, time,) c n
+(// and location. Eventually, we want to make) N
+(// these real objects.) N
+(typedef) K
+( ) p
+(string) k
+( Date;) p n
+(typedef) K
+( ) p
+(string) k
+( Time;) p n
+(typedef) K
+( ) p
+(string) k
+( Location;) p n
+() N
+(exception) K
+( NoBet {};) p n
+(exception) K
+( EmptyBetList{};) p n
+() N
+() S 8 T () S
+(# pragma) K
+( MindlessJunk) p n
+() N
+(// PointSpread is a bit of a hack. We need to be able to express the) c n
+(// 1/2 point push-eliminator What we will do is create an object that) N
+(// can be initialized with a float/double. Any non-zero part of the) N
+(// fraction will be rounded \(up or down\) to 1/2 -- the implementation) N
+(// will probably represent it as a short int \(16-bit, so, allowing 1) N
+(// bit to serve as the 1/2 fraction and 1 to serve as a sign, we have) N
+(// 14 bit spreads. Even in basketball, that isn't going to happen) N
+(// anytime soon :^\)) N
+() p n
+( ) S
+(interface) K
+( PointSpread {) p n
+() S 8 T () S
+(// Attributes would be the logical way to) c n
+( ) p
+(// do this, but the example is short on) c n
+( ) p
+(// methods... So we need to have some methods.) c n
+() p 8 T () S
+(void) k
+( ) p
+(SetSpread) l
+(\() p
+(in) K
+( ) p
+(float) k
+( spread\);) p n
+() S 8 T () S
+(float) k
+( ) p
+(GetSpread) l
+(\() p
+(void) k
+(\);) p n
+( };) N
+() N
+(// Same sort of thing with currency. We want a Fixed representation) c n
+(// So we allow any float in. We output a Float for other purposes.) N
+(// We can later add all sorts of operations.) N
+() p n
+( ) S
+(interface) K
+( Currency {) p n
+() S 8 T () S
+(attribute) K
+( ) p
+(float) k
+( amount;) p n
+( };) N
+() N
+() N
+(const) K
+( ) p
+(float) k
+( NICKEL_BET FIVE_BUCKS;) p n
+(const) K
+( ) p
+(float) k
+( DIME_BET 10.00;) p n
+() N
+( ) S
+(interface) K
+( Team {) p n
+( ) S
+(readonly) K
+( ) p
+(attribute) K
+( ) p
+(string) k
+( name; ) p
+(// No need to change this) c n
+( ) p
+(attribute) K
+( ) p
+(unsigned) k
+( ) p
+(long) k
+( wins;) p n
+( ) S
+(attribute) K
+( ) p
+(unsigned) k
+( ) p
+(long) k
+( losses;) p n
+( };) N
+() N
+(bookie.idl) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(interface) K
+( Game {) p n
+( ) S
+(attribute) K
+( Date date;) p n
+( ) S
+(attribute) K
+( Time time;) p n
+( ) S
+(attribute) K
+( Location location;) p n
+( }) N
+() N
+( ) S
+(interface) K
+( Bet {) p n
+() S 8 T () S
+(// If an attribute ever changes, we need to create a new Bet.) c n
+() p 8 T () S
+(// This allows for record keeping if we integrate persistent) c n
+() p 8 T () S
+(// storage -- we have a record of every bet ever made.) c n
+() p 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Game game;) p n
+() S 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Team team;) p n
+() S 8 T () S
+(readonly) K
+( ) p
+(attribute) K
+( Currency amount;) p n
+( };) N
+() N
+(typedef) K
+( ) p
+(sequence) k
+(<Bet> BetList;) p n
+() N
+( ) S
+(interface) K
+( Customer {) p n
+( ) S
+(readonly) K
+( ) p
+(attribute) K
+( ) p
+(string) k
+( name;) p n
+( ) S
+(attribute) K
+( ) p
+(boolean) k
+( PaidUp;) p n
+( ) S
+(void) k
+( ) p
+(AddToBetList) l
+( \() p
+(in) K
+( Bet bet\);) p n
+( ) S
+(void) k
+( ) p
+(DelFromBetList) l
+( \() p
+(in) K
+( Bet bet\)) p n
+() S 8 T () S
+(raises) K
+( \(NoBet\);) p n
+( ) S
+(void) k
+( ) p
+(SetBetlist) l
+( \() p
+(in) K
+( BetList list\);) p n
+( ) S
+(oneway) K
+( ) p
+(void) k
+( ) p
+(ClearBetList) l
+( \() p
+(void) k
+(\);) p n
+( ) S
+(void) k
+( ) p
+(FindBet) l
+(\() p
+(inout) K
+( Bet bet\) ) p
+(// Need to show an inout...) c n
+() p 8 T () S
+(raises) K
+(\(NoBet\);) p n
+( ) S
+(void) k
+( ) p
+(GetBetList) l
+(\() p
+(out) K
+( BetList list\) ) p
+(// Need to show an out param...) c n
+() p 8 T () S
+(raises) K
+( \(EmptyBetList\);) p n
+( };) N
+(};) N
+(bookie.idl) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/configure.ps b/tests/ps-ref/configure.ps
new file mode 100644
index 0000000..28f7f1c
--- /dev/null
+++ b/tests/ps-ref/configure.ps
@@ -0,0 +1,30 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(AC_INIT) K n
+(AC_FATAL) S
+(\([You are not supposed to run this file]\)) p
+(dnl) k
+( Kill the empty line.) c n
+(AC_OUTPUT) K
+(configure.in) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/confirm.ps b/tests/ps-ref/confirm.ps
new file mode 100644
index 0000000..a4454a7
--- /dev/null
+++ b/tests/ps-ref/confirm.ps
@@ -0,0 +1,103 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+() N
+(MODULE) K
+( Confirm ) p
+(EXPORTS) K
+( Main;) p n
+() N
+(IMPORT) K
+( Trestle, VBT, TextVBT, RigidVBT, ButtonVBT, BorderedVBT, HVSplit;) p n
+(IMPORT) K
+( PaintOp, Pixmap, Axis;) p n
+(IMPORT) K
+( ConfirmVBT;) p n
+() N
+(PROCEDURE) K
+( Yes \(self: ButtonVBT.T; ) p
+(READONLY) K
+( cd: VBT.MouseRec\) =) p n
+( ) S
+(BEGIN) K n
+( Trestle.Delete\(main\);) p n
+( ) S
+(END) K
+( Yes;) p n
+() N
+(PROCEDURE) K
+( QuitAction \(self: ButtonVBT.T; ) p
+(READONLY) K
+( cd: VBT.MouseRec\) =) p n
+( ) S
+(VAR) K n
+( msg := ") p
+(Do you really wish to quit?) str
+(";) p n
+( confirm := ConfirmVBT.New\(msg, Yes\);) N
+( ) S
+(BEGIN) K n
+( Trestle.Install\(confirm\)) p n
+( ) S
+(END) K
+( QuitAction;) p n
+() N
+(CONST) K n
+( \(*) p
+( sizes for the RigidVBT ) c
+(*\)) p n
+( horz = 30.0;) N
+( vert = 10.0; \(*) S
+( size in millimeters ) c
+(*\)) p n
+( \(*) S
+( border size for text and button ) c
+(*\)) p n
+( bsize = 1.5; \(*) S
+( size in millimeters ) c
+(*\)) p n
+() N
+(VAR) K n
+( blue := PaintOp.FromRGB\(0.0, 0.0, 1.0\);) p n
+( green := PaintOp.FromRGB\(0.0, 1.0, 0.0\);) N
+( text := RigidVBT.FromHV\(TextVBT.New\(") S
+(Confirm demo) str
+("\), horz, vert\);) p n
+( top := BorderedVBT.New\() N
+( text, size := bsize, op := blue, txt := Pixmap.Solid\);) N
+( button := ButtonVBT.New\(TextVBT.New\(") S
+(Quit) str
+("\), QuitAction\);) p n
+( bottom := BorderedVBT.New\() N
+( button, size := bsize, op := green, txt := Pixmap.Gray\);) N
+( main := HVSplit.Cons\(Axis.T.Ver, top, bottom\);) N
+() N
+(BEGIN) K n
+( Trestle.Install\(main\);) p n
+( Trestle.AwaitDelete\(main\)) N
+(END) K
+( Confirm.) p n
+() N
+() N
+(confirm.m3) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/cut.ps b/tests/ps-ref/cut.ps
new file mode 100644
index 0000000..f783126
--- /dev/null
+++ b/tests/ps-ref/cut.ps
@@ -0,0 +1,55 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.722639 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () str n
+0 T (iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii) N
+0 T () N
+0 T () S
+(\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253) sy n
+(5) # () S
+(\\texttt{) p n
+0 T (..........................................................................) N
+0 T (}) N
+0 T () N
+0 T () S
+( ^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) e n
+(10) # () N
+0 T () S
+(1) p 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T () N
+0 T () S
+(1) L 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T () N
+(15) # () S
+(\\invisible{) p n
+0 T (1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+0 T (}) N
+0 T () N
+0 T () S
+(m) c 8 T (mm) S 16 T (mmm) S 24 T (mmmm) S 32 T (mmmmm) S 40 T (mmmmmm) S 48 T (mmmmmmm) S 56 T (mmmmmmmm) S 72 T (mm) N
+(20) # () N
+0 T () N
+0 T () S
+(\351) K 8 T (\351\351) S 16 T (\351\351\351) S 24 T (\351\351\351\351) S 32 T (\351\351\351\351\351) S 40 T (\351\351\351\351\351\351) S 48 T (\351\351\351\351\351\351\351) S 56 T (\351\351\351\351\351\351\351\351) S 72 T (\351\351) N
+0 T () N
+(tabulation.pre) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/del.ps b/tests/ps-ref/del.ps
new file mode 100644
index 0000000..d86bac9
--- /dev/null
+++ b/tests/ps-ref/del.ps
@@ -0,0 +1 @@
+OK
diff --git a/tests/ps-ref/ehandler.ps b/tests/ps-ref/ehandler.ps
new file mode 100644
index 0000000..9d595ac
--- /dev/null
+++ b/tests/ps-ref/ehandler.ps
@@ -0,0 +1,387 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(%!ps) C n
+(% lib/ehandler.ps -- Downloaded Error Break-page handler) c n
+(% GOVERNMENT END USERS: See Notice file in TranScript library directory) N
+(% -- probably /usr/lib/ps/Notice) N
+(% -- code follows this line --) N
+(% assumes serverloop password is the default one) N
+(/$brkpage ) p
+(where) K n
+({) p
+(pop) K
+(\() p
+(Error Handler in place - not loaded again\\n) str
+(\)print flush stop}) p n
+({serverdict ) S
+(begin) K
+( statusdict ) p
+(begin) K
+( 0000 checkpassword) p n
+( {\() S
+(Error Handler downloaded.\\n) str
+(\)print flush 0000 exitserver}) p n
+( {\() S
+(Bad Password on loading error handler!!!\\n) str
+(\)print flush stop}) p
+(ifelse) K n
+(}) p
+(ifelse) K n
+(/$brkpage 64 ) p
+(dict) K
+( ) p
+(def) K
+( $brkpage ) p
+(begin) K n
+(/prnt) p n
+( {) S
+(dup) K
+( type/stringtype ne{=string cvs}) p
+(if) K
+( ) p
+(dup) K
+( ) p
+(length) K
+( 6 ) p
+(mul) K
+(/tx ) p
+(exch) K
+( ) p
+(def) K
+(/ty 10 ) p
+(def) K n
+( currentpoint/toy ) p
+(exch) K
+( ) p
+(def) K
+(/tox ) p
+(exch) K
+( ) p
+(def) K
+( 1 ) p
+(setgray) K
+( ) p
+(newpath) K n
+( tox toy 2 ) p
+(sub) K
+( ) p
+(moveto) K
+( 0 ty ) p
+(rlineto) K
+( tx 0 ) p
+(rlineto) K
+( 0 ty ) p
+(neg) K
+( ) p
+(rlineto) K n
+( ) p
+(closepath) K
+( ) p
+(fill) K
+( tox toy ) p
+(moveto) K
+( 0 ) p
+(setgray) K
+( ) p
+(show) K
+(}) p
+(bind) K
+( ) p
+(def) K n
+(/nl) L
+({currentpoint ) p
+(exch) K
+( ) p
+(pop) K
+( lmargin ) p
+(exch) K
+( ) p
+(moveto) K
+( 0 -10 ) p
+(rmoveto) K
+(}) p
+(def) K n
+(/=={/cp 0 ) p
+(def) K
+( typeprint nl}) p
+(def) K n
+(/typeprint) L
+({) p
+(dup) K
+( type exec}readonly ) p
+(def) K n
+(/lmargin 72 ) p
+(def) K n
+(/rmargin 72 ) p
+(def) K n
+(/tprint) p n
+( {) S
+(dup) K
+( ) p
+(length) K
+( cp ) p
+(add) K
+( rmargin ) p
+(gt) K
+({nl/cp 0 ) p
+(def) K
+(}) p
+(if) K n
+( ) p
+(dup) K
+( ) p
+(length) K
+( cp ) p
+(add) K
+(/cp ) p
+(exch) K
+( ) p
+(def) K
+( prnt}readonly ) p
+(def) K n
+(/cvsprint) L
+({=string cvs tprint\() p
+( ) str
+(\)tprint}readonly ) p
+(def) K n
+(/integertype) L
+({cvsprint}readonly ) p
+(def) K n
+(/realtype) L
+({cvsprint}readonly ) p
+(def) K n
+(/booleantype) L
+({cvsprint}readonly ) p
+(def) K n
+(/operatortype) L
+({\() p
+(--) str
+(\)tprint =string cvs tprint\() p
+(-- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/marktype) L
+({) p
+(pop) K
+(\() p
+(-mark- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/dicttype) L
+({) p
+(pop) K
+(\() p
+(-dictionary- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/nulltype) L
+({) p
+(pop) K
+(\() p
+(-null- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/filetype) L
+({) p
+(pop) K
+(\() p
+(-filestream- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/savetype) L
+({) p
+(pop) K
+(\() p
+(-savelevel- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/fonttype) L
+({) p
+(pop) K
+(\() p
+(-fontid- ) str
+(\)tprint}readonly ) p
+(def) K n
+(/nametype) L
+({) p
+(dup) K
+( xcheck not{\() p
+(/) str
+(\)tprint}) p
+(if) K
+( cvsprint}readonly ) p
+(def) K n
+(/stringtype) p n
+( {) S
+(dup) K
+( rcheck{\() p
+(\\\() str
+(\)tprint tprint\() p
+(\\\)) str
+(\)tprint}{) p
+(pop) K
+(\() p
+(-string- ) str
+(\)tprint}) p
+(ifelse) K n
+( }readonly ) p
+(def) K n
+(/arraytype) p n
+( {) S
+(dup) K
+( rcheck{) p
+(dup) K
+( xcheck) p n
+( {\() S
+({) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(}) str
+(\)tprint}) p n
+( {\() S
+([) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(]) str
+(\)tprint}) p
+(ifelse) K
+(}{) p
+(pop) K
+(\() p
+(-array- ) str
+(\)tprint}) p
+(ifelse) K n
+( }readonly ) p
+(def) K n
+(/packedarraytype) p n
+( {) S
+(dup) K
+( rcheck{) p
+(dup) K
+( xcheck) p n
+( {\() S
+({) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(}) str
+(\)tprint}) p n
+( {\() S
+([) str
+(\)tprint{typeprint}) p
+(forall) K
+(\() p
+(]) str
+(\)tprint}) p
+(ifelse) K
+(}{) p
+(pop) K
+(\() p
+(-packedarray- ) str
+(\)tprint}) p
+(ifelse) K n
+( }readonly ) p
+(def) K n
+(/courier/Courier ) p
+(findfont) K
+( 10 ) p
+(scalefont) K
+( ) p
+(def) K n
+(end) S
+( ) p
+(%$brkpage) c n
+(errordict/handleerror) p n
+( {systemdict ) S
+(begin) K
+( $error ) p
+(begin) K
+( $brkpage ) p
+(begin) K
+( newerror) p n
+( {/newerror ) S
+(false) k
+( store) p n
+( vmstatus ) S
+(pop) K
+( ) p
+(pop) K
+( 0 ne{grestoreall}) p
+(if) K
+( initgraphics courier ) p
+(setfont) K n
+( lmargin 720 ) p
+(moveto) K
+(\() p
+(ERROR: ) str
+(\)prnt errorname prnt) p n
+( nl\() S
+(OFFENDING COMMAND: ) str
+(\)prnt/command load prnt) p n
+( $error/ostack) N
+( ) S
+(known) K
+({nl nl\() p
+(STACK:) str
+(\)prnt nl nl $error/ostack ) p
+(get) K
+( aload ) p
+(length) K
+({==}repeat}) p
+(if) K n
+( systemdict/) p
+(showpage) K
+( ) p
+(get) K
+( exec\() p
+(%%[ Error: ) str
+(\)print) p n
+( errorname =print\() S
+(; OffendingCommand: ) str
+(\)print/command) p n
+( load =print\() S
+( ]%%) str
+(\)= flush}) p
+(if) K
+( ) p
+(end) K
+( ) p
+(end) K
+( ) p
+(end) K
+(}) p n
+(dup) K
+( 0 systemdict ) p
+(put) K
+( ) p
+(dup) K
+( 4 $brkpage ) p
+(put) K
+( ) p
+(bind) K
+( readonly ) p
+(put) K n
+(ehandler) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/encoding.ps b/tests/ps-ref/encoding.ps
new file mode 100644
index 0000000..63a75e0
--- /dev/null
+++ b/tests/ps-ref/encoding.ps
@@ -0,0 +1,3225 @@
+%!PS-Adobe-3.0
+%%Title: a2ps output
+%%For: Somebody
+%%Creator: a version of a2ps
+%%CreationDate: once upon a time
+%%BoundingBox: 24 24 571 818
+%%DocumentData: Clean7Bit
+%%Orientation: Landscape
+%%Pages: 2
+%%PageOrder: Ascend
+%%DocumentMedia: A4 595 842 0 () ()
+%%DocumentNeededResources: font Courier
+%%+ font Courier-Bold
+%%+ font Helvetica
+%%+ font Helvetica-Bold
+%%+ font Symbol
+%%+ font Times-Bold
+%%+ font Times-Roman
+%%DocumentProcessColors: Black Blue Green Red
+%%DocumentSuppliedResources: procset a2ps-color-prolog
+%%+ encoding ASCIIEncoding
+%%+ encoding HPRomanEncoding
+%%+ encoding IBM-CP437Encoding
+%%+ encoding IBM-CP850Encoding
+%%+ encoding ISO-8859-10Encoding
+%%+ encoding ISO-8859-1Encoding
+%%+ encoding ISO-8859-2Encoding
+%%+ encoding ISO-8859-3Encoding
+%%+ encoding ISO-8859-4Encoding
+%%+ encoding ISO-8859-9Encoding
+%%+ encoding MS-CP1250Encoding
+%%+ encoding MacintoshEncoding
+%%+ font Courier-Bold-Ogonki
+%%+ font Courier-Ogonki
+%%+ font Helvetica-Bold-Ogonki
+%%+ font PCFont
+%%+ font Times-Roman-Ogonki
+%%EndComments
+/a2psdict 200 dict def
+a2psdict begin
+%%BeginProlog
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Check PostScript language level.
+/languagelevel where {
+ pop /gs_languagelevel languagelevel def
+} {
+ /gs_languagelevel 1 def
+} ifelse
+
+% EPSF import as in the Red Book
+/BeginInclude {
+ /b4_Inc_state save def % Save state for cleanup
+ /dict_count countdictstack def % Count objects on dict stack
+ /op_count count 1 sub def % Count objects on operand stack
+ userdict begin
+ 0 setgray 0 setlinecap
+ 1 setlinewidth 0 setlinejoin
+ 10 setmiterlimit [ ] 0 setdash newpath
+ gs_languagelevel 1 ne {
+ false setstrokeadjust false setoverprint
+ } if
+} bind def
+
+/EndInclude {
+ count op_count sub { pos } repeat % Clean up stacks
+ countdictstack dict_count sub { end } repeat
+ b4_Inc_state restore
+} bind def
+
+/BeginEPSF {
+ BeginInclude
+ /showpage { } def
+} bind def
+
+/EndEPSF {
+ EndInclude
+} bind def
+
+% Page prefeed
+/page_prefeed { % bool -> -
+ statusdict /prefeed known {
+ statusdict exch /prefeed exch put
+ } {
+ pop
+ } ifelse
+} bind def
+
+/deffont {
+ findfont exch scalefont def
+} bind def
+
+/reencode_font {
+ findfont reencode 2 copy definefont pop def
+} bind def
+
+% Function c-show (str => -)
+% centers text only according to x axis.
+/c-show {
+ dup stringwidth pop
+ 2 div neg 0 rmoveto
+ show
+} bind def
+
+% Function l-show (str => -)
+% prints texts so that it ends at currentpoint
+/l-show {
+ dup stringwidth pop neg
+ 0
+ rmoveto show
+} bind def
+
+% center-fit show (str w => -)
+% show centered, and scale currentfont so that the width is less than w
+/cfshow {
+ exch dup stringwidth pop
+ % If the title is too big, try to make it smaller
+ 3 2 roll 2 copy
+ gt
+ { % if, i.e. too big
+ exch div
+ currentfont exch scalefont setfont
+ } { % ifelse
+ pop pop
+ }
+ ifelse
+ c-show % center title
+} bind def
+
+% Return the y size of the current font
+% - => fontsize
+/currentfontsize {
+ currentfont /FontMatrix get 3 get 1000 mul
+} bind def
+
+% reencode the font
+% <encoding-vector> <fontdict> -> <newfontdict>
+/reencode { %def
+ dup length 5 add dict begin
+ { %forall
+ % <vector> <key> <val>
+ 1 index /FID ne
+ { def }{ pop pop } ifelse
+ } forall
+ /Encoding exch def % -
+
+ % Use the font's bounding box to determine the ascent, descent,
+ % and overall height; don't forget that these values have to be
+ % transformed using the font's matrix.
+ % We use `load' because sometimes BBox is executable, sometimes not.
+ % Since we need 4 numbers an not an array avoid BBox from being executed
+ /FontBBox load aload pop
+ FontMatrix transform /Ascent exch def pop
+ FontMatrix transform /Descent exch def pop
+ /FontHeight Ascent Descent sub def
+
+ % Get the underline position and thickness if they're defined.
+ % Use 1 if they are not defined.
+ currentdict /FontInfo 2 copy known
+ { get
+ /UnderlinePosition 2 copy % <FontInfo> /UP <FontInfo> /UP
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+
+ /UnderlineThickness 2 copy % <FontInfo> /UT <FontInfo> /UT
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+ pop % -
+ }{ pop pop
+ } ifelse
+
+ currentdict
+ end
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+
+% -------- Some routines to enlight plain b/w printings ---------
+
+% Underline
+% width --
+/dounderline {
+ currentpoint
+ gsave
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ 0 rlineto
+ stroke
+ grestore
+} bind def
+
+% Underline a string
+% string --
+/dounderlinestring {
+ stringwidth pop
+ dounderline
+} bind def
+
+/UL {
+ /ul exch store
+} bind def
+
+% Draw a box of WIDTH wrt current font
+% width --
+/dobox {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ stroke
+ grestore
+} bind def
+
+/BX {
+ /bx exch store
+} bind def
+
+% Box a string
+% string --
+/doboxstring {
+ stringwidth pop
+ dobox
+} bind def
+
+%
+% ------------- Color routines ---------------
+%
+/FG /setrgbcolor load def
+
+% Draw the background
+% width --
+/dobackground {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ bgcolor aload pop setrgbcolor
+ fill
+ grestore
+} bind def
+
+% Draw bg for a string
+% string --
+/dobackgroundstring {
+ stringwidth pop
+ dobackground
+} bind def
+
+
+/BG {
+ dup /bg exch store
+ { mark 4 1 roll ] /bgcolor exch store } if
+} bind def
+
+
+/Show {
+ bg { dup dobackgroundstring } if
+ ul { dup dounderlinestring } if
+ bx { dup doboxstring } if
+ show
+} bind def
+
+% Function T(ab), jumps to the n-th tabulation in the current line
+/T {
+ cw mul x0 add
+ bg { dup currentpoint pop sub dobackground } if
+ ul { dup currentpoint pop sub dounderline } if
+ bx { dup currentpoint pop sub dobox } if
+ y0 moveto
+} bind def
+
+% Function n: move to the next line
+/n {
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+% Function N: show and move to the next line
+/N {
+ Show
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+/S {
+ Show
+} bind def
+
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Function title: prints page header.
+% <ct> <rt> <lt> are passed as argument
+/title {
+ % 1. Draw the background
+ x v get y v get moveto
+ 0 setgray
+ gsave
+ 0 th 2 div neg rmoveto
+ th setlinewidth
+ 0.5 0.5 1 setrgbcolor
+ pw 0 rlineto stroke
+ grestore
+ % 2. Border it
+ gsave
+ 0.7 setlinewidth
+ pw 0 rlineto
+ 0 th neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+ % stk: ct rt lt
+ x v get y v get th sub 1 add moveto
+%%IncludeResource: font Helvetica
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ % 3. The left title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ fnfs 0.8 mul hm rmoveto
+ show % left title
+ grestore
+ exch
+ % stk: ct ltw rt
+ % 4. the right title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ dup
+ pw exch stringwidth pop fnfs 0.8 mul add sub
+ hm
+ rmoveto
+ show % right title
+ grestore
+ % stk: ct ltw rtw
+ % 5. the center title
+ gsave
+ pw 3 1 roll
+ % stk: ct pw ltw rtw
+ 3 copy
+ % Move to the center of the left room
+ sub add 2 div hm rmoveto
+ % What is the available space in here?
+ add sub fnfs 0.8 mul sub fnfs 0.8 mul sub
+ % stk: ct space_left
+%%IncludeResource: font Helvetica-Bold
+ fHelvetica-Bold fnfs scalefont setfont
+ 1 setgray
+ cfshow
+ grestore
+} bind def
+
+% Function border: prints virtual page border
+/border { %def
+ gsave % print four sides
+ 0 setgray
+ x v get y v get moveto
+ 0.7 setlinewidth % of the square
+ pw 0 rlineto
+ 0 ph neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+} bind def
+
+% Function water: prints a water mark in background
+/water { %def
+ gsave
+ scx scy moveto rotate
+%%IncludeResource: font Times-Bold
+ fTimes-Bold 100 scalefont setfont
+ .97 setgray
+ dup stringwidth pop 2 div neg -50 rmoveto
+ show
+ grestore
+} bind def
+
+% Function rhead: prints the right header
+/rhead { %def
+ lx ly moveto
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ l-show
+} bind def
+
+% Function footer (cf rf lf -> -)
+/footer {
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ dx dy moveto
+ show
+
+ snx sny moveto
+ l-show
+
+ fnx fny moveto
+ c-show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+%%BeginResource: procset a2ps-color-prolog 2.0 1
+
+%% Definition of the color faces.
+/p {
+ 0 0 0 FG
+ false BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/sy {
+ 0 0 0 FG
+ false BG
+ fSymbol bfs scalefont setfont
+ Show
+} bind def
+
+/k {
+ false BG
+ false UL
+ false BX
+ 0 0 0.9 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/K {
+ false BG
+ false UL
+ false BX
+ 0 0 0.8 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/c {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/C {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/l {
+ 0 0 0 FG
+ 0.8 0.8 0 true BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/L {
+ 0 0 0 FG
+ 1 1 0 true BG
+ false UL
+ false BX
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/str {
+ false BG
+ false UL
+ false BX
+ 0 0.5 0 FG
+ fTimes-Roman bfs scalefont setfont
+ Show
+} bind def
+
+/e{
+ 1 0 0 true BG
+ false UL
+ true BX
+ 1 1 1 FG
+ fHelvetica-Bold bfs scalefont setfont
+ Show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul 2 div neg 0 rmoveto
+ f# setfont
+ 0.8 0.1 0.1 FG
+ c-show
+ grestore
+} bind def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%IncludeResource: font Courier
+%%IncludeResource: font Courier-Bold
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Symbol
+%%BeginResource: encoding ISO-8859-1Encoding
+/ISO-8859-1Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section
+/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
+/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet
+/cedilla /onesuperior /ordmasculine /guillemotright /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
+%%EndResource
+%%BeginResource: encoding ASCIIEncoding
+/ASCIIEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+] def
+%%EndResource
+%%BeginResource: encoding ISO-8859-2Encoding
+/ISO-8859-2Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section
+/dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent
+/degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron
+/cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Dbar /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%%BeginResource: encoding ISO-8859-3Encoding
+/ISO-8859-3Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /Hstroke /breve /sterling /currency /yen /Hcircumflex /section
+/dieresis /Idotaccent /Scedilla /Gbreve /Jcircumflex /hyphen /registered /Zdotaccent
+/degree /hstroke /twosuperior /threesuperior /acute /mu /hcircumflex /bullet
+/cedilla /dotlessi /scedilla /gbreve /jcircumflex /onehalf /threequarters /zdotaccent
+/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Cdotaccent /Ccircumflex /Ccedilla
+/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis
+/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Gdotaccent /Odieresis /multiply
+/Gcircumflex /Ugrave /Uacute /Ucircumflex /Udieresis /Ubreve /Scircumflex /germandbls
+/agrave /aacute /acircumflex /atilde /adieresis /cdotaccent /ccircumflex /ccedilla
+/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
+/eth /ntilde /ograve /oacute /ocircumflex /gdotaccent /odieresis /divide
+/gcircumflex /ugrave /uacute /ucircumflex /udieresis /ubreve /scircumflex /dotaccent
+] def
+%%EndResource
+%%BeginResource: encoding ISO-8859-4Encoding
+/ISO-8859-4Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /Aogonek /kra /Rcedilla /currency /Itilde /Lcedilla /section
+/dieresis /Scaron /Emacron /Gcedilla /Tbar /hyphen /Zcaron /macron
+/degree /aogonek /ogonek /rcedilla /acute /itilde /lcedilla /caron
+/cedilla /scaron /emacron /gcedilla /tbar /Eng /zcaron /eng
+/Amacron /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Iogonek
+/Ccaron /Eacute /Eogonek /Edieresis /Edotaccent /Iacute /Icircumflex /Imacron
+/Eth /Ncedilla /Omacron /Kcedilla /Ocircumflex /Otilde /Odieresis /multiply
+/Oslash /Uogonek /Uacute /Ucircumflex /Udieresis /Utilde /Umacron /germandbls
+/amacron /aacute /acircumflex /atilde /adieresis /aring /ae /iogonek
+/ccaron /eacute /eogonek /edieresis /edotaccent /iacute /icircumflex /imacron
+/dbar /ncedilla /omacron /kcedilla /ocircumflex /otilde /odieresis /divide
+/oslash /uogonek /uacute /ucircumflex /udieresis /utilde /umacron /dotaccent
+] def
+%%EndResource
+%%BeginResource: encoding ISO-8859-9Encoding
+/ISO-8859-9Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section
+/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
+/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet
+/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown
+/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis
+/Gbreve /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
+/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Idotaccent /Scedilla /germandbls
+/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
+/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
+/gbreve /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide
+/oslash /ugrave /uacute /ucircumflex /udieresis /dotlessi /scedilla /ydieresis
+] def
+%%EndResource
+%%BeginResource: encoding ISO-8859-10Encoding
+/ISO-8859-10Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /Aogonek /Emacron /Gcedilla /Imacron /Itilde /Kcedilla /Lcedilla
+/acute /Rcedilla /Scaron /Tbar /Zcaron /hyphen /kra /Eng
+/Dbar /aogonek /emacron /gcedilla /imacron /itilde /kcedilla /lcedilla
+/nacute /rcedilla /scaron /tbar /zcaron /section /germandbls /eng
+/Amacron /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Iogonek
+/Ccaron /Eacute /Eogonek /Edieresis /Edotaccent /Iacute /Icircumflex /Idieresis
+/Dbar /Ncedilla /Omacron /Oacute /Ocircumflex /Otilde /Odieresis /Utilde
+/Oslash /Uogonek /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /Umacron
+/amacron /aacute /acircumflex /atilde /adieresis /aring /ae /iogonek
+/ccaron /eacute /eogonek /edieresis /edotaccent /iacute /icircumflex /idieresis
+/eth /ncedilla /omacron /oacute /ocircumflex /otilde /odieresis /utilde
+/oslash /uogonek /uacute /ucircumflex /udieresis /yacute /thorn /umacron
+] def
+%%EndResource
+%%BeginResource: encoding MS-CP1250Encoding
+/MS-CP1250Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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
+/.notdef /.notdef /quotesinglbase /.notdef /quotedblbase /ellipsis /dagger /daggerdbl
+/.notdef /perthousand /Scaron /guilsinglleft /Sacute /Tcaron /Zcaron /Zacute
+/.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash
+/.notdef /trademark /scaron /guilsinglright /sacute /tcaron /zcaron /zacute
+/space /caron /breve /Lslash /currency /Aogonek /brokenbar /section
+/dieresis /copyright /Scedilla /guillemotleft /logicalnot /hyphen /registered /Zdotaccent
+/degree /plusminus /ogonek /lslash /acute /mu /paragraph /bullet
+/cedilla /aogonek /scedilla /guillemotright /Ydieresis /hungarumlaut /Lcaron /zdotaccent
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Eth /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%%BeginResource: encoding IBM-CP850Encoding
+/IBM-CP850Encoding [
+/.notdef /.notdef /.notdef /heart /diamond /club /spade /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /paragraph /section /.notdef /.notdef
+/arrowup /arrowdown /.notdef /.notdef /.notdef /arrowboth /.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 /asciicircum /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
+/Ccedilla /udieresis /eacute /acircumflex /adieresis /agrave /aring /ccedilla
+/ecircumflex /edieresis /egrave /idieresis /icircumflex /igrave /Adieresis /Aring
+/Eacute /ae /AE /ocircumflex /odieresis /ograve /ucircumflex /ugrave
+/ydieresis /Odieresis /Udieresis /cent /sterling /yen /.notdef /florin
+/aacute /iacute /oacute /uacute /ntilde /Ntilde /ordfeminine /degree
+/questiondown /.notdef /logicalnot /onehalf /onequarter /exclamdown /guillemotleft /guillemotright
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/alpha /germandbls /Gamma /pi /Sigma /sigma /mu /tau
+/phi /theta /Omega /delta /infinity /oslash /epsilon /intersection
+/equivalence /plusminus /greaterequal /lessequal /integraltp /integralbt /divide /approxequal
+/degree /dotaccent /dotaccent /radical /.notdef /twosuperior /.notdef /.notdef
+] def
+%%EndResource
+%%BeginResource: encoding IBM-CP437Encoding
+/IBM-CP437Encoding [
+/null /Wsmiley /Bsmiley /heart /diamond /club /spade /Bbullet
+/Wbullet /Bcircle /Wcircle /male /female /quarternote /sixteenthnote /sun
+/pointerright /pointerleft /Varrowboth /exclamdbl /paragraph /section /cursorblock /floor
+/arrowup /arrowdown /arrowright /arrowleft /smallLLsingle /arrowboth /pointerup /pointerdown
+/blank /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+/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 /asciicircum /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 /brokenbar /braceright /asciitilde /Delta
+/Ccedilla /udieresis /eacute /acircumflex /adieresis /agrave /aring /ccedilla
+/ecircumflex /edieresis /egrave /idieresis /icircumflex /igrave /Adieresis /Aring
+/Eacute /ae /AE /ocircumflex /odieresis /ograve /ucircumflex /ugrave
+/ydieresis /Odieresis /Udieresis /cent /sterling /yen /point /integral
+/aacute /iacute /oacute /uacute /ntilde /Ntilde /aunder /ounder
+/questiondown /smallULsingle /smallURsingle /half /quarter /exclamdown /lessdbl /greaterdbl
+/lightbox /mediumbox /darkbox /Vsingle /VsingleTleftsingle /VsingleTleftdbl /VdblTleftsingle /VdblURsingle
+/VsingleURdbl /VdblTleftdbl /Vdbl /VdblURdbl /VdblLRdbl /VdblLRsingle /VsingleLRdbl /VsingleURsingle
+/VsingleLLsingle /HsingleTupsingle /HsingleTdownsingle /VsingleTrightsingle /Hsingle /VsingleXsingle /VsingleTrightdbl /VdblTrightsingle
+/VdblLLdbl /VdblULdbl /HdblTupdbl /HdblTdowndbl /VdblTrightdbl /Hdbl /VdblXdbl /HdblTupsingle
+/HsingleTupdbl /HdblTdownsingle /HsingleTdowndbl /VdblLLsingle /VsingleLLdbl /VsingleULdbl /VdblULsingle /VdblXsingle
+/VsingleXdbl /VsingleLRsingle /VsingleULsingle /allblack /botblack /leftblack /rightblack /topblack
+/alpha /beta /Gamma /pi /Sigma /sigma /mu /tau
+/Phi /theta /Omega /delta /infinity /phi /element /intersection
+/equivalence /plusminus /greaterequal /lessequal /integraltp /integralbt /divide /approxequal
+/degree /bullet /dotmath /radical /eta /squared /block /blank
+] def
+%%EndResource
+%%BeginResource: encoding HPRomanEncoding
+/HPRomanEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /asciicircum /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
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /Agrave /Acircumflex /Egrave /Ecircumflex /Edieresis /Icircumflex /Idieresis
+/acute /grave /circumflex /dieresis /tilde /Ugrave /Ucircumflex /sterling
+/macron /Yacute /yacute /degree /Ccedilla /ccedilla /Ntilde /ntilde
+/exclamdown /questiondown /currency /sterling /yen /section /florin /cent
+/acircumflex /ecircumflex /ocircumflex /ucircumflex /aacute /eacute /oacute /uacute
+/agrave /egrave /ograve /ugrave /adieresis /edieresis /odieresis /udieresis
+/Aring /icircumflex /Oslash /AE /aring /iacute /oslash /ae
+/Adieresis /igrave /Odieresis /Udieresis /Eacute /idieresis /germandbls /Ocircumflex
+/Aacute /Atilde /atilde /Eth /eth /Iacute /Igrave /Oacute
+/Ograve /Otilde /otilde /Scaron /scaron /Uacute /Ydieresis /ydieresis
+/Thorn /thorn /periodcentered /mu /paragraph /threequarters /emdash /onequarter
+/onehalf /ordfeminine /ordmasculine /guillemotleft /filledbox /guillemotright /plusminus /.notdef
+] def
+%%EndResource
+%%BeginResource: encoding MacintoshEncoding
+/MacintoshEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /asciicircum /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
+/Adieresis /Aring /Ccedilla /Eacute /Ntilde /Odieresis /Udieresis /aacute
+/agrave /acircumflex /adieresis /atilde /aring /ccedilla /eacute /egrave
+/ecircumflex /edieresis /iacute /igrave /icircumflex /idieresis /ntilde /oacute
+/ograve /ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex /udieresis
+/dagger /degree /cent /sterling /section /bullet /paragraph /germandbls
+/registered /copyright /trademark /acute /dieresis /notequal /AE /Oslash
+/infinity /plusminus /lessequal /greaterequal /yen /mu /partialdiff /Sigma
+/product /pi /integral /ordfeminine /ordmasculine /Omega /ae /oslash
+/questiondown /exclamdown /logicalnot /radical /florin /approxequal /Delta /guillemotleft
+/guillemotright /ellipsis /space /Agrave /Atilde /Otilde /OE /oe
+/endash /emdash /quotedblleft /quotedblright /quoteleft /quoteright /divide /lozenge
+/ydieresis /Ydieresis /fraction /currency /guilsinglleft /guilsinglright /fi /fl
+/daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute
+/Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex
+/.notdef /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde
+/macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
+] def
+%%EndResource
+%%BeginResource: font Courier-Bold-Ogonki
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding OgonkiEncoding
+/OgonkiEncoding [
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /quotesingle
+/quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl /endash /dagger
+/daggerdbl /periodcentered /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright /guillemotright
+/ellipsis /perthousand /questiondown /grave /circumflex /tilde /macron /ring
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /emdash /AE /ordfeminine /Oslash /OE /ordmasculine /ae
+/dotlessi /oslash /oe /threesuperior /thorn /twosuperior /threequarters /Eth
+/trademark /registered /onequarter /Thorn /logicalnot /plusminus /minus /onesuperior
+/copyright /mu /eth /brokenbar /onehalf /dotlessj /Euro /.notdef
+/space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section
+/dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent
+/degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron
+/cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent
+% 300
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Eth /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding StandardEncoding
+/StandardEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /section
+/currency /quotesingle /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl
+/.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet
+/quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /.notdef /questiondown
+% 300
+/.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
+/emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef
+/Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef
+/.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef
+/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
+] def
+%%EndResource
+%!
+% Add composite (i.e. accented) characters to any font
+% By J. Chroboczek <jec@dcs.ed.ac.uk>
+%
+% -- code follows this line --
+%%BeginResource: procset compose 0.8 0
+% Copyright (c) 1996-1999 by J. Chroboczek
+% This code may be distributed under the terms of the
+% GNU Public License, either version 3 of the license, or (at your
+% option) any later version.
+/makeCompositeDict 20 dict def
+makeCompositeDict begin
+/nameUnique { % name nameUnique namexxxxxx
+ dup length exch 1 index string cvs % length (name)
+ 1 index 12 add string dup % length (name) (...) (...)
+ 3 2 roll 0 exch putinterval % length (name...)
+ dup 3 2 roll
+ rand 12 string cvs
+ putinterval
+} bind def
+
+/doMakeComposite
+{
+ /compositeChars exch def
+ /targetEncoding exch def
+ /baseEncoding exch def
+ /newfontname exch def
+ /oldfontname exch def
+ /oldfont oldfontname findfont def
+ /newfont 20 dict def
+ /oldFontMatrix oldfont /FontMatrix get def
+ /oldFontBBox oldfont /FontBBox get cvlit def
+ /oldfontcopy oldfont length dict def
+
+ newfont begin
+ /FontType 3 def
+ /PaintType 0 def % not used
+ /FontMatrix [0.001 0 0 0.001 0 0] def
+ /FontBBox
+ [
+ oldFontBBox 0 get oldFontBBox 1 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ oldFontBBox 2 get oldFontBBox 3 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ ] cvx def
+
+ /StrokeWidth 0 def % not used
+
+ /Encoding targetEncoding def
+
+ /Decoding 256 dict def % invert base encoding vector
+ Decoding begin
+ 0 1 255
+ { dup baseEncoding exch get exch def } bind for
+ end
+
+ newfont /compositeChars compositeChars put
+
+ /FontName newfontname def
+
+% make a copy of the original font, reencoding it
+ oldfont
+ oldfontcopy begin
+ {1 index /FID ne
+ {def}
+ {pop pop} ifelse
+ } bind forall
+ end
+ oldfontcopy /Encoding baseEncoding put
+ oldfontname nameUnique oldfontcopy definefont
+ 1000 scalefont /OriginalFont exch def
+
+ /BuildChar % newfont n BuildChar -
+ {
+ exch begin % n
+ /OriginalFont load setfont
+ /Encoding load exch get % glyphName
+ /compositeChars load dup
+ 2 index known % glyphName compositeChars known-p
+ { 1 index get % glyphName [ 65 x y 129 ]
+ dup 0 get ( ) dup % glyphName [...] 65 ( ) ( )
+ 0 3 index put % glyphName [...] 65 (A)
+ dup stringwidth setcharwidth
+ 0 0 moveto
+ show pop % glyphName [...]
+ dup 1 get 1 index 2 get % glyphName [...] x y
+ moveto % glyphName [...]
+ 3 get ( ) dup 3 2 roll % glyphName ( ) ( ) 129
+ 0 exch put % glyphName (')
+ show % glyphName
+ }
+ { pop
+ /Decoding load % glyphName Decoding
+ dup 2 index known % glyphName Decoding known-p
+ { exch get }
+ { pop pop 0 } ifelse % n'
+ ( ) dup 0 3 index put dup % n' (A) (A)
+ stringwidth setcharwidth
+ 0 0 moveto
+ show % n'
+ } ifelse
+ pop
+ end
+ } bind def
+ end % newfont
+ newfontname newfont definefont pop
+} def % doMakeComposite
+
+/fillEuro { % w h --
+ gsave exch 1000 div exch 1000 div scale
+ 955.852 232.172 moveto
+ 904.495 180.815 lineto
+ 829.454 117.848 734.626 83.333 636.667 83.333 curveto
+ 406.667 83.333 220 270 220 500 curveto
+ 220 730 406.667 916.667 636.667 916.667 curveto
+ 759.831 916.667 876.684 862.177 955.852 767.828 curveto
+ 988.474 855.291 lineto
+ 894.851 947.996 768.422 1000 636.667 1000 curveto
+ 360.667 1000 136.667 776 136.667 500 curveto
+ 136.667 224 360.667 0 636.667 0 curveto
+ 753.23 0 866.13 40.725 955.852 115.135 curveto
+ closepath fill
+
+ 869.037 541.667 moveto
+ 901.025 625 lineto
+ 31.989 625 lineto
+ 0 541.667 lineto
+ closepath fill
+
+ 805.059 375 moveto
+ 837.048 458.333 lineto
+ 31.989 458.333 lineto
+ 0 375 lineto
+ closepath fill
+ grestore
+} bind def
+
+/makeEuroCharstring { % w h -- charstring
+ [ /pop cvx % w h mark pop
+ 3 index 0 0 0 % w h mark pop w 0 0 0
+ 7 index 7 index /setcachedevice cvx
+ % w h mark pop w 0 0 0 w h setcachedevice
+ 10 index 10 index /fillEuro load /exec cvx ]
+ cvx bind 3 1 roll pop pop
+} def
+
+/doEurifyFont { % oldname newname --
+ exch
+ findfont dup dup % newname dict dict dict
+ /FontMatrix get matrix invertmatrix % newname dict dict m
+ {} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
+ 0 0 moveto
+ (5) stringwidth pop % newname dict w
+ (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ 3 2 roll % newname w h dict
+
+ dup length dict dup 3 1 roll begin % newname w h newdict
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ CharStrings dup length 1 add dict dup 3 1 roll begin % newnamew h newdict newdict'
+ {def} forall
+ /Euro % newname w h newdict newdict' /Euro
+ 4 index 4 index makeEuroCharstring def
+ end % newname w h newdict newdict'
+ /CharStrings exch def
+ end
+ 3 1 roll pop pop % newname dict
+ definefont pop
+} bind def
+
+end % makeCompositeDict
+
+% oldfontname newfontname baseEncoding targetEncoding compositeChars --
+/makeComposite
+{
+ makeCompositeDict begin doMakeComposite end
+} bind def
+
+% oldfontname newfontname
+/eurifyFont
+{
+ makeCompositeDict begin doEurifyFont end
+} bind def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: font Courier-Bold-Ogonki
+/Courier-Bold /Courier-Bold-Ogonki OgonkiEncoding StandardEncoding 111 dict
+dup /Agrave [65 -50 123 27] put
+dup /Aring [65 -10 123 31] put
+dup /Atilde [65 -30 123 29] put
+dup /Ecircumflex [69 0 123 28] put
+dup /Egrave [69 0 123 27] put
+dup /Gcaron [71 10 123 183] put
+dup /Idieresis [73 0 123 168] put
+dup /Igrave [73 0 123 27] put
+dup /Ntilde [78 0 123 29] put
+dup /Ograve [79 0 123 27] put
+dup /Otilde [79 0 123 29] put
+dup /Ucircumflex [85 0 123 28] put
+dup /Ugrave [85 -30 123 27] put
+dup /Ydieresis [89 0 123 168] put
+dup /agrave [97 -30 0 27] put
+dup /aring [97 0 0 31] put
+dup /atilde [97 0 0 29] put
+dup /ecircumflex [101 0 0 28] put
+dup /egrave [101 0 0 27] put
+dup /gcaron [103 -40 0 183] put
+dup /idieresis [136 -40 0 168] put
+dup /igrave [136 0 0 27] put
+dup /ntilde [110 0 0 29] put
+dup /ograve [111 0 0 27] put
+dup /otilde [111 0 0 29] put
+dup /ucircumflex [117 -20 0 28] put
+dup /ugrave [117 -30 0 27] put
+dup /ydieresis [121 10 0 168] put
+dup /abreve [97 0 0 162] put
+dup /Abreve [65 0 130 162] put
+dup /amacron [97 0 0 30] put
+dup /Amacron [65 0 130 30] put
+dup /Aogonek [65 200 0 178] put
+dup /aogonek [97 200 0 178] put
+dup /cacute [99 0 0 180] put
+dup /Cacute [67 0 130 180] put
+dup /ccaron [99 18 0 183] put
+dup /Ccaron [67 18 130 183] put
+dup /ccircumflex [99 18 0 28] put
+dup /Ccircumflex [67 18 130 28] put
+dup /cdotaccent [99 0 0 255] put
+dup /Cdotaccent [67 0 130 255] put
+dup /dbar [100 200 250 173] put
+dup /Dbar [208 0 0 160] put
+dup /Dcaron [68 0 130 183] put
+dup /dcaron [100 30 195 183] put
+dup /ecaron [101 0 0 183] put
+dup /Ecaron [69 0 130 183] put
+dup /edotaccent [101 0 0 255] put
+dup /Edotaccent [69 0 130 255] put
+dup /emacron [101 0 0 30] put
+dup /Emacron [69 0 130 30] put
+dup /Eogonek [69 0 0 178] put
+dup /eogonek [101 0 0 178] put
+dup /gacute [103 0 0 180] put
+dup /gbreve [103 0 0 162] put
+dup /Gbreve [71 18 130 162] put
+dup /gcircumflex [103 0 0 28] put
+dup /Gcircumflex [71 18 130 28] put
+dup /gdotaccent [103 0 0 255] put
+dup /Gdotaccent [71 18 130 255] put
+dup /hcircumflex [104 -20 195 28] put
+dup /Hcircumflex [72 0 130 28] put
+dup /Iogonek [73 20 0 178] put
+dup /iogonek [105 20 0 178] put
+dup /Idotaccent [73 0 130 255] put
+dup /imacron [136 0 0 30] put
+dup /Imacron [73 0 130 30] put
+dup /itilde [136 0 0 29] put
+dup /Itilde [73 0 130 29] put
+dup /Jcircumflex [74 85 130 28] put
+dup /Lacute [76 -100 130 180] put
+dup /lacute [108 -20 195 180] put
+dup /Lcaron [76 -100 130 183] put
+dup /lcaron [108 0 195 183] put
+dup /nacute [110 0 0 180] put
+dup /Nacute [78 0 130 180] put
+dup /ncaron [110 0 0 183] put
+dup /Ncaron [78 0 130 183] put
+dup /ohungarumlaut [111 0 0 189] put
+dup /Ohungarumlaut [79 0 130 189] put
+dup /omacron [111 0 0 30] put
+dup /Omacron [79 0 130 30] put
+dup /racute [114 0 0 180] put
+dup /Racute [82 0 130 180] put
+dup /rcaron [114 0 0 183] put
+dup /Rcaron [82 0 130 183] put
+dup /sacute [115 0 0 180] put
+dup /Sacute [83 0 130 180] put
+dup /scircumflex [115 0 0 28] put
+dup /Scircumflex [83 0 130 28] put
+dup /tcaron [116 0 107 183] put
+dup /Tcaron [84 0 130 183] put
+dup /Tcedilla [84 0 0 184] put
+dup /tcedilla [116 0 0 184] put
+dup /ubreve [117 0 0 162] put
+dup /Ubreve [85 0 130 162] put
+dup /uhungarumlaut [117 0 0 189] put
+dup /Uhungarumlaut [85 0 130 189] put
+dup /umacron [117 0 0 30] put
+dup /Umacron [85 0 130 30] put
+dup /uogonek [117 109 0 178] put
+dup /Uogonek [85 5 23 178] put
+dup /uring [117 0 0 31] put
+dup /Uring [85 0 130 31] put
+dup /utilde [117 0 0 29] put
+dup /Utilde [85 0 130 29] put
+dup /zacute [122 0 0 180] put
+dup /Zacute [90 0 130 180] put
+dup /zdotaccent [122 0 0 255] put
+dup /Zdotaccent [90 0 130 255] put
+makeComposite
+%%EndResource
+
+%%EndResource
+%%BeginResource: font Courier-Ogonki
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding OgonkiEncoding
+/OgonkiEncoding [
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /quotesingle
+/quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl /endash /dagger
+/daggerdbl /periodcentered /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright /guillemotright
+/ellipsis /perthousand /questiondown /grave /circumflex /tilde /macron /ring
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /emdash /AE /ordfeminine /Oslash /OE /ordmasculine /ae
+/dotlessi /oslash /oe /threesuperior /thorn /twosuperior /threequarters /Eth
+/trademark /registered /onequarter /Thorn /logicalnot /plusminus /minus /onesuperior
+/copyright /mu /eth /brokenbar /onehalf /dotlessj /Euro /.notdef
+/space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section
+/dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent
+/degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron
+/cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent
+% 300
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Eth /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding StandardEncoding
+/StandardEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /section
+/currency /quotesingle /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl
+/.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet
+/quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /.notdef /questiondown
+% 300
+/.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
+/emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef
+/Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef
+/.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef
+/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
+] def
+%%EndResource
+%!
+% Add composite (i.e. accented) characters to any font
+% By J. Chroboczek <jec@dcs.ed.ac.uk>
+%
+% -- code follows this line --
+%%BeginResource: procset compose 0.8 0
+% Copyright (c) 1996-1999 by J. Chroboczek
+% This code may be distributed under the terms of the
+% GNU Public License, either version 3 of the license, or (at your
+% option) any later version.
+/makeCompositeDict 20 dict def
+makeCompositeDict begin
+/nameUnique { % name nameUnique namexxxxxx
+ dup length exch 1 index string cvs % length (name)
+ 1 index 12 add string dup % length (name) (...) (...)
+ 3 2 roll 0 exch putinterval % length (name...)
+ dup 3 2 roll
+ rand 12 string cvs
+ putinterval
+} bind def
+
+/doMakeComposite
+{
+ /compositeChars exch def
+ /targetEncoding exch def
+ /baseEncoding exch def
+ /newfontname exch def
+ /oldfontname exch def
+ /oldfont oldfontname findfont def
+ /newfont 20 dict def
+ /oldFontMatrix oldfont /FontMatrix get def
+ /oldFontBBox oldfont /FontBBox get cvlit def
+ /oldfontcopy oldfont length dict def
+
+ newfont begin
+ /FontType 3 def
+ /PaintType 0 def % not used
+ /FontMatrix [0.001 0 0 0.001 0 0] def
+ /FontBBox
+ [
+ oldFontBBox 0 get oldFontBBox 1 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ oldFontBBox 2 get oldFontBBox 3 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ ] cvx def
+
+ /StrokeWidth 0 def % not used
+
+ /Encoding targetEncoding def
+
+ /Decoding 256 dict def % invert base encoding vector
+ Decoding begin
+ 0 1 255
+ { dup baseEncoding exch get exch def } bind for
+ end
+
+ newfont /compositeChars compositeChars put
+
+ /FontName newfontname def
+
+% make a copy of the original font, reencoding it
+ oldfont
+ oldfontcopy begin
+ {1 index /FID ne
+ {def}
+ {pop pop} ifelse
+ } bind forall
+ end
+ oldfontcopy /Encoding baseEncoding put
+ oldfontname nameUnique oldfontcopy definefont
+ 1000 scalefont /OriginalFont exch def
+
+ /BuildChar % newfont n BuildChar -
+ {
+ exch begin % n
+ /OriginalFont load setfont
+ /Encoding load exch get % glyphName
+ /compositeChars load dup
+ 2 index known % glyphName compositeChars known-p
+ { 1 index get % glyphName [ 65 x y 129 ]
+ dup 0 get ( ) dup % glyphName [...] 65 ( ) ( )
+ 0 3 index put % glyphName [...] 65 (A)
+ dup stringwidth setcharwidth
+ 0 0 moveto
+ show pop % glyphName [...]
+ dup 1 get 1 index 2 get % glyphName [...] x y
+ moveto % glyphName [...]
+ 3 get ( ) dup 3 2 roll % glyphName ( ) ( ) 129
+ 0 exch put % glyphName (')
+ show % glyphName
+ }
+ { pop
+ /Decoding load % glyphName Decoding
+ dup 2 index known % glyphName Decoding known-p
+ { exch get }
+ { pop pop 0 } ifelse % n'
+ ( ) dup 0 3 index put dup % n' (A) (A)
+ stringwidth setcharwidth
+ 0 0 moveto
+ show % n'
+ } ifelse
+ pop
+ end
+ } bind def
+ end % newfont
+ newfontname newfont definefont pop
+} def % doMakeComposite
+
+/fillEuro { % w h --
+ gsave exch 1000 div exch 1000 div scale
+ 955.852 232.172 moveto
+ 904.495 180.815 lineto
+ 829.454 117.848 734.626 83.333 636.667 83.333 curveto
+ 406.667 83.333 220 270 220 500 curveto
+ 220 730 406.667 916.667 636.667 916.667 curveto
+ 759.831 916.667 876.684 862.177 955.852 767.828 curveto
+ 988.474 855.291 lineto
+ 894.851 947.996 768.422 1000 636.667 1000 curveto
+ 360.667 1000 136.667 776 136.667 500 curveto
+ 136.667 224 360.667 0 636.667 0 curveto
+ 753.23 0 866.13 40.725 955.852 115.135 curveto
+ closepath fill
+
+ 869.037 541.667 moveto
+ 901.025 625 lineto
+ 31.989 625 lineto
+ 0 541.667 lineto
+ closepath fill
+
+ 805.059 375 moveto
+ 837.048 458.333 lineto
+ 31.989 458.333 lineto
+ 0 375 lineto
+ closepath fill
+ grestore
+} bind def
+
+/makeEuroCharstring { % w h -- charstring
+ [ /pop cvx % w h mark pop
+ 3 index 0 0 0 % w h mark pop w 0 0 0
+ 7 index 7 index /setcachedevice cvx
+ % w h mark pop w 0 0 0 w h setcachedevice
+ 10 index 10 index /fillEuro load /exec cvx ]
+ cvx bind 3 1 roll pop pop
+} def
+
+/doEurifyFont { % oldname newname --
+ exch
+ findfont dup dup % newname dict dict dict
+ /FontMatrix get matrix invertmatrix % newname dict dict m
+ {} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
+ 0 0 moveto
+ (5) stringwidth pop % newname dict w
+ (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ 3 2 roll % newname w h dict
+
+ dup length dict dup 3 1 roll begin % newname w h newdict
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ CharStrings dup length 1 add dict dup 3 1 roll begin % newnamew h newdict newdict'
+ {def} forall
+ /Euro % newname w h newdict newdict' /Euro
+ 4 index 4 index makeEuroCharstring def
+ end % newname w h newdict newdict'
+ /CharStrings exch def
+ end
+ 3 1 roll pop pop % newname dict
+ definefont pop
+} bind def
+
+end % makeCompositeDict
+
+% oldfontname newfontname baseEncoding targetEncoding compositeChars --
+/makeComposite
+{
+ makeCompositeDict begin doMakeComposite end
+} bind def
+
+% oldfontname newfontname
+/eurifyFont
+{
+ makeCompositeDict begin doEurifyFont end
+} bind def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: font Courier-Ogonki
+/Courier /Courier-Ogonki OgonkiEncoding StandardEncoding 111 dict
+dup /Agrave [65 -30 121 27] put
+dup /Aring [65 -15 126 31] put
+dup /Atilde [65 0 126 29] put
+dup /Ecircumflex [69 0 121 28] put
+dup /Egrave [69 0 121 27] put
+dup /Gcaron [71 0 136 183] put
+dup /Idieresis [73 0 136 168] put
+dup /Igrave [73 0 121 27] put
+dup /Ntilde [78 0 126 29] put
+dup /Ograve [79 0 121 27] put
+dup /Otilde [79 0 126 29] put
+dup /Ucircumflex [85 0 121 28] put
+dup /Ugrave [85 -30 121 27] put
+dup /Ydieresis [89 0 136 168] put
+dup /agrave [97 0 0 27] put
+dup /aring [97 0 0 31] put
+dup /atilde [97 0 0 29] put
+dup /ecircumflex [101 0 0 28] put
+dup /egrave [101 0 0 27] put
+dup /gcaron [103 -30 0 183] put
+dup /idieresis [136 -30 0 168] put
+dup /igrave [136 -30 0 27] put
+dup /ntilde [110 0 0 29] put
+dup /ograve [111 0 0 27] put
+dup /otilde [111 0 0 29] put
+dup /ucircumflex [117 -10 0 28] put
+dup /ugrave [117 -30 0 27] put
+dup /ydieresis [121 -10 0 168] put
+dup /abreve [97 0 0 162] put
+dup /Abreve [65 0 133 162] put
+dup /amacron [97 0 0 30] put
+dup /Amacron [65 0 133 30] put
+dup /Aogonek [65 200 0 178] put
+dup /aogonek [97 200 0 178] put
+dup /cacute [99 17 0 180] put
+dup /Cacute [67 30 133 180] put
+dup /ccaron [99 17 0 183] put
+dup /Ccaron [67 30 133 183] put
+dup /ccircumflex [99 17 2 28] put
+dup /Ccircumflex [67 30 133 28] put
+dup /cdotaccent [99 0 0 255] put
+dup /Cdotaccent [67 30 133 255] put
+dup /dbar [100 200 250 173] put
+dup /Dbar [208 0 0 160] put
+dup /Dcaron [68 0 133 183] put
+dup /dcaron [100 17 156 183] put
+dup /ecaron [101 0 0 183] put
+dup /Ecaron [69 0 133 183] put
+dup /edotaccent [101 0 0 255] put
+dup /Edotaccent [69 0 133 255] put
+dup /Emacron [69 0 133 30] put
+dup /emacron [101 17 0 30] put
+dup /Eogonek [69 100 0 178] put
+dup /eogonek [101 100 0 178] put
+dup /gacute [103 0 0 180] put
+dup /gbreve [103 0 0 162] put
+dup /Gbreve [71 30 133 162] put
+dup /gcircumflex [103 0 0 28] put
+dup /Gcircumflex [71 30 133 28] put
+dup /gdotaccent [103 0 0 255] put
+dup /Gdotaccent [71 0 133 255] put
+dup /Hcircumflex [72 0 133 28] put
+dup /hcircumflex [104 0 164 28] put
+dup /Idotaccent [73 0 133 255] put
+dup /imacron [136 0 0 30] put
+dup /Imacron [73 0 133 30] put
+dup /iogonek [105 20 0 178] put
+dup /Iogonek [73 20 0 178] put
+dup /itilde [136 0 0 29] put
+dup /Itilde [73 0 133 29] put
+dup /Jcircumflex [74 100 133 28] put
+dup /Lacute [76 -100 133 180] put
+dup /lacute [108 -12 147 180] put
+dup /Lcaron [76 -100 133 183] put
+dup /lcaron [108 -12 144 183] put
+dup /nacute [110 0 0 180] put
+dup /Nacute [78 0 133 180] put
+dup /ncaron [110 0 0 183] put
+dup /Ncaron [78 0 133 183] put
+dup /ohungarumlaut [111 0 0 189] put
+dup /Ohungarumlaut [79 0 133 189] put
+dup /omacron [111 0 0 30] put
+dup /Omacron [79 0 133 30] put
+dup /racute [114 0 0 180] put
+dup /Racute [82 0 133 180] put
+dup /rcaron [114 0 0 183] put
+dup /Rcaron [82 0 133 183] put
+dup /sacute [115 0 0 180] put
+dup /Sacute [83 0 133 180] put
+dup /scircumflex [115 0 0 28] put
+dup /Scircumflex [83 0 133 28] put
+dup /tcaron [116 -77 92 183] put
+dup /Tcaron [84 0 133 183] put
+dup /Tcedilla [84 0 0 184] put
+dup /tcedilla [116 0 0 184] put
+dup /ubreve [117 0 0 162] put
+dup /Ubreve [85 0 133 162] put
+dup /uhungarumlaut [117 0 0 189] put
+dup /Uhungarumlaut [85 0 133 189] put
+dup /umacron [117 0 0 30] put
+dup /Umacron [85 0 133 30] put
+dup /uogonek [117 120 0 178] put
+dup /Uogonek [85 5 20 178] put
+dup /uring [117 0 0 31] put
+dup /Uring [85 0 133 31] put
+dup /utilde [117 0 0 29] put
+dup /Utilde [85 0 133 29] put
+dup /zacute [122 0 0 180] put
+dup /Zacute [90 0 133 180] put
+dup /zdotaccent [122 0 0 255] put
+dup /Zdotaccent [90 0 133 255] put
+makeComposite
+%%EndResource
+
+%%EndResource
+%%BeginResource: font Helvetica-Bold-Ogonki
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding OgonkiEncoding
+/OgonkiEncoding [
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /quotesingle
+/quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl /endash /dagger
+/daggerdbl /periodcentered /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright /guillemotright
+/ellipsis /perthousand /questiondown /grave /circumflex /tilde /macron /ring
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /emdash /AE /ordfeminine /Oslash /OE /ordmasculine /ae
+/dotlessi /oslash /oe /threesuperior /thorn /twosuperior /threequarters /Eth
+/trademark /registered /onequarter /Thorn /logicalnot /plusminus /minus /onesuperior
+/copyright /mu /eth /brokenbar /onehalf /dotlessj /Euro /.notdef
+/space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section
+/dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent
+/degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron
+/cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent
+% 300
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Eth /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding StandardEncoding
+/StandardEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /section
+/currency /quotesingle /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl
+/.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet
+/quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /.notdef /questiondown
+% 300
+/.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
+/emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef
+/Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef
+/.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef
+/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
+] def
+%%EndResource
+%!
+% Add composite (i.e. accented) characters to any font
+% By J. Chroboczek <jec@dcs.ed.ac.uk>
+%
+% -- code follows this line --
+%%BeginResource: procset compose 0.8 0
+% Copyright (c) 1996-1999 by J. Chroboczek
+% This code may be distributed under the terms of the
+% GNU Public License, either version 3 of the license, or (at your
+% option) any later version.
+/makeCompositeDict 20 dict def
+makeCompositeDict begin
+/nameUnique { % name nameUnique namexxxxxx
+ dup length exch 1 index string cvs % length (name)
+ 1 index 12 add string dup % length (name) (...) (...)
+ 3 2 roll 0 exch putinterval % length (name...)
+ dup 3 2 roll
+ rand 12 string cvs
+ putinterval
+} bind def
+
+/doMakeComposite
+{
+ /compositeChars exch def
+ /targetEncoding exch def
+ /baseEncoding exch def
+ /newfontname exch def
+ /oldfontname exch def
+ /oldfont oldfontname findfont def
+ /newfont 20 dict def
+ /oldFontMatrix oldfont /FontMatrix get def
+ /oldFontBBox oldfont /FontBBox get cvlit def
+ /oldfontcopy oldfont length dict def
+
+ newfont begin
+ /FontType 3 def
+ /PaintType 0 def % not used
+ /FontMatrix [0.001 0 0 0.001 0 0] def
+ /FontBBox
+ [
+ oldFontBBox 0 get oldFontBBox 1 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ oldFontBBox 2 get oldFontBBox 3 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ ] cvx def
+
+ /StrokeWidth 0 def % not used
+
+ /Encoding targetEncoding def
+
+ /Decoding 256 dict def % invert base encoding vector
+ Decoding begin
+ 0 1 255
+ { dup baseEncoding exch get exch def } bind for
+ end
+
+ newfont /compositeChars compositeChars put
+
+ /FontName newfontname def
+
+% make a copy of the original font, reencoding it
+ oldfont
+ oldfontcopy begin
+ {1 index /FID ne
+ {def}
+ {pop pop} ifelse
+ } bind forall
+ end
+ oldfontcopy /Encoding baseEncoding put
+ oldfontname nameUnique oldfontcopy definefont
+ 1000 scalefont /OriginalFont exch def
+
+ /BuildChar % newfont n BuildChar -
+ {
+ exch begin % n
+ /OriginalFont load setfont
+ /Encoding load exch get % glyphName
+ /compositeChars load dup
+ 2 index known % glyphName compositeChars known-p
+ { 1 index get % glyphName [ 65 x y 129 ]
+ dup 0 get ( ) dup % glyphName [...] 65 ( ) ( )
+ 0 3 index put % glyphName [...] 65 (A)
+ dup stringwidth setcharwidth
+ 0 0 moveto
+ show pop % glyphName [...]
+ dup 1 get 1 index 2 get % glyphName [...] x y
+ moveto % glyphName [...]
+ 3 get ( ) dup 3 2 roll % glyphName ( ) ( ) 129
+ 0 exch put % glyphName (')
+ show % glyphName
+ }
+ { pop
+ /Decoding load % glyphName Decoding
+ dup 2 index known % glyphName Decoding known-p
+ { exch get }
+ { pop pop 0 } ifelse % n'
+ ( ) dup 0 3 index put dup % n' (A) (A)
+ stringwidth setcharwidth
+ 0 0 moveto
+ show % n'
+ } ifelse
+ pop
+ end
+ } bind def
+ end % newfont
+ newfontname newfont definefont pop
+} def % doMakeComposite
+
+/fillEuro { % w h --
+ gsave exch 1000 div exch 1000 div scale
+ 955.852 232.172 moveto
+ 904.495 180.815 lineto
+ 829.454 117.848 734.626 83.333 636.667 83.333 curveto
+ 406.667 83.333 220 270 220 500 curveto
+ 220 730 406.667 916.667 636.667 916.667 curveto
+ 759.831 916.667 876.684 862.177 955.852 767.828 curveto
+ 988.474 855.291 lineto
+ 894.851 947.996 768.422 1000 636.667 1000 curveto
+ 360.667 1000 136.667 776 136.667 500 curveto
+ 136.667 224 360.667 0 636.667 0 curveto
+ 753.23 0 866.13 40.725 955.852 115.135 curveto
+ closepath fill
+
+ 869.037 541.667 moveto
+ 901.025 625 lineto
+ 31.989 625 lineto
+ 0 541.667 lineto
+ closepath fill
+
+ 805.059 375 moveto
+ 837.048 458.333 lineto
+ 31.989 458.333 lineto
+ 0 375 lineto
+ closepath fill
+ grestore
+} bind def
+
+/makeEuroCharstring { % w h -- charstring
+ [ /pop cvx % w h mark pop
+ 3 index 0 0 0 % w h mark pop w 0 0 0
+ 7 index 7 index /setcachedevice cvx
+ % w h mark pop w 0 0 0 w h setcachedevice
+ 10 index 10 index /fillEuro load /exec cvx ]
+ cvx bind 3 1 roll pop pop
+} def
+
+/doEurifyFont { % oldname newname --
+ exch
+ findfont dup dup % newname dict dict dict
+ /FontMatrix get matrix invertmatrix % newname dict dict m
+ {} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
+ 0 0 moveto
+ (5) stringwidth pop % newname dict w
+ (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ 3 2 roll % newname w h dict
+
+ dup length dict dup 3 1 roll begin % newname w h newdict
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ CharStrings dup length 1 add dict dup 3 1 roll begin % newnamew h newdict newdict'
+ {def} forall
+ /Euro % newname w h newdict newdict' /Euro
+ 4 index 4 index makeEuroCharstring def
+ end % newname w h newdict newdict'
+ /CharStrings exch def
+ end
+ 3 1 roll pop pop % newname dict
+ definefont pop
+} bind def
+
+end % makeCompositeDict
+
+% oldfontname newfontname baseEncoding targetEncoding compositeChars --
+/makeComposite
+{
+ makeCompositeDict begin doMakeComposite end
+} bind def
+
+% oldfontname newfontname
+/eurifyFont
+{
+ makeCompositeDict begin doEurifyFont end
+} bind def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: font Helvetica-Bold-Ogonki
+/Helvetica-Bold /Helvetica-Bold-Ogonki OgonkiEncoding StandardEncoding 83 dict
+dup /Ydieresis [89 167 191 168] put
+dup /ydieresis [121 111 0 168] put
+dup /Ucircumflex [85 197 191 28] put
+dup /Ugrave [85 197 191 27] put
+dup /ucircumflex [117 139 0 28] put
+dup /ugrave [117 139 0 27] put
+dup /Idieresis [73 -27 191 168] put
+dup /Igrave [73 -27 191 27] put
+dup /idieresis [136 -27 0 168] put
+dup /igrave [136 -27 0 27] put
+dup /Ecircumflex [69 188 191 28] put
+dup /Egrave [69 188 191 27] put
+dup /ecircumflex [101 111 0 28] put
+dup /egrave [101 111 0 27] put
+dup /Agrave [65 197 191 27] put
+dup /agrave [97 111 0 27] put
+dup /Ograve [79 222 191 27] put
+dup /ograve [111 139 0 27] put
+dup /Atilde [65 197 191 29] put
+dup /atilde [97 111 0 29] put
+dup /Ntilde [78 200 191 29] put
+dup /ntilde [110 146 0 29] put
+dup /Otilde [79 222 191 29] put
+dup /otilde [111 139 0 29] put
+dup /Aring [65 197 191 31] put
+dup /aring [97 111 0 31] put
+dup /abreve [97 111 0 162] put
+dup /Abreve [65 194 202 162] put
+dup /aogonek [97 270 0 178] put
+dup /Aogonek [65 444 0 178] put
+dup /cacute [99 111 0 180] put
+dup /Cacute [67 194 193 180] put
+dup /ccaron [99 122 0 183] put
+dup /Ccaron [67 210 191 183] put
+dup /dbar [100 302 298 173] put
+dup /Dbar [208 0 0 160] put
+dup /dcaron [100 493 73 39] put
+dup /Dcaron [68 194 190 183] put
+dup /ecaron [101 111 0 183] put
+dup /Ecaron [69 167 190 183] put
+dup /edotaccent [101 103 0 255] put
+dup /Edotaccent [69 188 191 255] put
+dup /eogonek [101 150 0 178] put
+dup /Eogonek [69 290 0 178] put
+dup /gbreve [103 139 0 162] put
+dup /Gbreve [71 222 191 162] put
+dup /Idotaccent [73 -27 191 255] put
+dup /iogonek [105 -39 0 178] put
+dup /Iogonek [73 -30 0 178] put
+dup /lacute [108 -7 193 180] put
+dup /Lacute [76 139 193 180] put
+dup /lcaron [108 155 73 39] put
+dup /Lcaron [76 161 73 39] put
+dup /nacute [110 159 0 180] put
+dup /Nacute [78 231 193 180] put
+dup /ncaron [110 111 0 183] put
+dup /Ncaron [78 194 215 183] put
+dup /ohungarumlaut [111 139 0 189] put
+dup /Ohungarumlaut [79 222 191 189] put
+dup /racute [114 48 0 180] put
+dup /Racute [82 231 193 180] put
+dup /rcaron [114 28 0 183] put
+dup /Rcaron [82 194 190 183] put
+dup /sacute [115 111 0 180] put
+dup /Sacute [83 167 193 180] put
+dup /scedilla [115 111 0 184] put
+dup /Scedilla [83 167 0 184] put
+dup /tcaron [116 249 0 39] put
+dup /Tcaron [84 139 190 183] put
+dup /tcedilla [116 86 0 184] put
+dup /Tcedilla [84 197 0 184] put
+dup /uhungarumlaut [117 139 0 189] put
+dup /Uhungarumlaut [85 197 191 189] put
+dup /uring [117 139 0 31] put
+dup /Uring [85 194 190 31] put
+dup /umacron [117 139 0 30] put
+dup /Umacron [85 199 191 30] put
+dup /uogonek [117 286 0 178] put
+dup /Uogonek [85 260 0 178] put
+dup /zacute [122 103 0 180] put
+dup /Zacute [90 139 193 180] put
+dup /zdotaccent [122 83 0 255] put
+dup /Zdotaccent [90 139 206 255] put
+makeComposite
+%%EndResource
+
+%%EndResource
+%%BeginResource: font PCFont
+%!PS-AdobeFont-1.0 -*- PostScript -*-
+%%Copyright: (c) 1996 Johannes Goldynia <Johannes.Goldynia@pdts.at>
+
+% pcfont.pfa - Type 3 font providing support for line drawing PC encoding
+%
+% Copyright (c) 1996 Johannes Goldynia <Johannes.Goldynia@pdts.at>
+%
+% 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+23 dict dup begin
+ /FontMatrix [.001 0 0 .00112 0 0] def
+ /FontType 3 def
+ /FontBBox [0 -200 600 800] def
+ /Notice (PCfont 1991) def
+ /FullName (PCfont) def
+ /FontName /PCfont def
+ /isFixedPitch true def
+ /Encoding
+ [
+ /null /Wsmiley /Bsmiley /heart /diamond /club /spade /Bbullet
+ /Wbullet /Bcircle /Wcircle /male /female /quarternote /sixteenthnote
+ /sun /pointerright /pointerleft /Varrowboth /exclamdbl /paragraph
+ /section /cursorblock /floor /arrowup /arrowdown /arrowright
+ /arrowleft /smallLLsingle /arrowboth /pointerup /pointerdown /blank
+ /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
+ /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 /asciicircum /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 /brokenbar /braceright /asciitilde /Delta /Ccedilla
+ /udieresis /eacute /acircumflex /adieresis /agrave /aring /ccedilla
+ /ecircumflex /edieresis /egrave /idieresis /icircumflex /igrave
+ /Adieresis /Aring /Eacute /ae /AE /ocircumflex /odieresis /ograve
+ /ucircumflex /ugrave /ydieresis /Odieresis /Udieresis /cent /sterling
+ /yen /point /integral /aacute /iacute /oacute /uacute /ntilde /Ntilde
+ /aunder /ounder /questiondown /smallULsingle /smallURsingle /half
+ /quarter /exclamdown /lessdbl /greaterdbl /lightbox /mediumbox
+ /darkbox /Vsingle /VsingleTleftsingle /VsingleTleftdbl
+ /VdblTleftsingle /VdblURsingle /VsingleURdbl /VdblTleftdbl /Vdbl
+ /VdblURdbl /VdblLRdbl /VdblLRsingle /VsingleLRdbl /VsingleURsingle
+ /VsingleLLsingle /HsingleTupsingle /HsingleTdownsingle
+ /VsingleTrightsingle /Hsingle /VsingleXsingle /VsingleTrightdbl
+ /VdblTrightsingle /VdblLLdbl /VdblULdbl /HdblTupdbl /HdblTdowndbl
+ /VdblTrightdbl /Hdbl /VdblXdbl /HdblTupsingle /HsingleTupdbl
+ /HdblTdownsingle /HsingleTdowndbl /VdblLLsingle /VsingleLLdbl
+ /VsingleULdbl /VdblULsingle /VdblXsingle /VsingleXdbl /VsingleLRsingle
+ /VsingleULsingle /allblack /botblack /leftblack /rightblack /topblack
+ /alpha /beta /Gamma /pi /Sigma /sigma /mu /tau /Phi /theta /Omega
+ /delta /infinity /phi /element /intersection /equivalence /plusminus
+ /greaterequal /lessequal /integraltp /integralbt /divide /approxequal
+ /degree /bullet /dotmath /radical /eta /squared /block /blank
+ ]
+ def % /Encoding
+ /_uC { 0 0 moveto /Courier findfont 1000 scalefont setfont show } def
+ /_uS { 0 0 moveto /Symbol findfont 1000 scalefont setfont show } def
+ /dotless_i { newpath 110 20 moveto 490 20 lineto 300 20 moveto 300 400 lineto 150 400 lineto 22 setlinewidth 1 setlinecap stroke } def
+ /squash { 1 dict begin /cr exch def save 1 .75 scale cr _uC restore end } def
+ /lt {lineto} def
+ /mt {moveto} def
+ /a {arc} def
+ /an {arcn} def
+ /cp {closepath} def
+ /slw {setlinewidth} def
+ /slc {setlinecap} def
+ /CharacterDefs 255 dict def
+ CharacterDefs begin
+ /null { 0 598 mt 230 598 lt 184 460 lt 0 460 lt cp 92 0 mt 92 184 lt 230 184 lt 368 598 lt 598 598 lt 598 460 lt 377.2 460 lt 230 0 lt cp fill } def
+ /Wsmiley { 300 300 275 0 360 a 370 230 mt 300 300 100 315 225 an 20 slw 1 slc stroke 230 370 25 0 360 a fill 370 370 25 0 360 a fill } def
+ /Bsmiley { 300 300 275 0 360 a 352.5 247.5 mt 370 230 25 135 315 an 300 300 125 315 225 an 230 230 25 225 45 an 300 300 75 225 315 a 230 335 mt 230 370 50 270 -90 an 370 370 50 270 -90 an eofill } def
+ /heart {(\251) _uS} def
+ /diamond {(\250) _uS} def
+ /club {(\247) _uS} def
+ /spade {(\252) _uS} def
+ /Bbullet { (\267) _uC } def
+ /Wbullet { 0 -200 mt 600 -200 lt 600 800 lt 0 800 lt 0 -200 lt 300 300 100 225 585 a eofill } def
+ /Bcircle { 300 300 100 225 585 a 20 slw stroke } def
+ /Wcircle { 0 -200 mt 600 -200 lt 600 800 lt 0 800 lt 0 -200 lt 300 300 125 225 585 a 300 300 75 225 585 a eofill } def
+ /male { newpath 300 200 200 70 -290 arcn 575 625 lineto 575 500 moveto 575 625 lineto 450 625 lineto 20 slw 1 setlinecap stroke } def
+ /female { newpath 300 400 200 270 -90 arcn 300 0 lineto 150 100 moveto 450 100 lineto 20 slw 1 setlinecap stroke } def
+ /quarternote { save 1 .5 scale 200 400 100 0 360 arc fill restore 290 200 moveto 290 658 lineto 430 840 230 235 270 arc 20 slw 0 setlinecap 290 610 lineto gsave fill grestore stroke } def
+ /sixteenthnote { save 1 .5 scale 200 400 100 0 360 arc 330 200 moveto 340 200 100 0 360 arc fill restore
+ 290 200 moveto 290 658 lineto 430 840 230 235 270 arc 430 610 moveto 430 790 230 270 235 arcn 430 610 moveto 430 100 lineto 20 slw 1 setlinecap stroke } def
+ /sun { newpath 300 300 150 270 -90 arcn 300 0 lineto 180 180 moveto 100 100 lineto 150 300 moveto 25 300 lineto 180 420 moveto 100 500 lineto 300 450 moveto 300 600 lineto 420 420 moveto 500 500 lineto 450 300 moveto 575 300 lineto 420 180 moveto 500 100 lineto 20 slw 1 setlinecap stroke } def
+ /pointerright { 600 750 450 270 210 an 600 -150 450 150 90 an fill } def
+ /pointerleft { 150 750 450 330 270 an 150 -150 450 90 30 an fill } def
+ /Varrowboth { 300 700 mt 550 500 lt 350 500 lt 350 200 lt 550 200 lt 300 0 lt 50 200 lt 250 200 lt 250 500 lt 50 500 lt cp fill } def
+ /exclamdbl { save -100 0 translate (!) _uC 200 0 translate (!) _uC restore } def
+ /paragraph { (\266) _uC }
+ def
+ /section { (\247) _uC } def
+ /cursorblock { 50 -100 mt 550 -100 lt 550 200 lt 50 200 lt cp fill } def
+ /floor { 300 700 mt 550 500 lt 350 500 lt 350 200 lt 550 200 lt 300 0 lt 50 200 lt 250 200 lt 250 500 lt 50 500 lt cp fill 0 0 mt 600 0 lt 20 slw stroke } def
+ /arrowup { 300 700 mt 550 500 lt 350 500 lt 350 0 lt 250 0 lt 250 500 lt 50 500 lt cp fill } def
+ /arrowdown { 300 0 mt 550 200 lt 350 200 lt 350 700 lt 250 700 lt 250 200 lt 50 200 lt cp fill } def
+ /arrowright { 50 300 mt 550 300 lt 300 400 lt 550 300 mt 300 200 lt 1 slc 25 slw stroke } def
+ /arrowleft { 550 300 mt 50 300 lt 300 400 lt 50 300 mt 300 200 lt 1 slc 25 slw stroke } def
+ /smallLLsingle { 100 400 mt 100 275 lt 500 275 lt 20 slw stroke } def
+ /arrowboth { 550 300 mt 50 300 lt 200 400 lt 50 300 mt 200 200 lt 550 300 mt 400 400 lt 550 300 mt 400 200 lt 1 slc 20 slw stroke } def
+ /pointerup { 50 50 mt 300 600 lt 550 50 lt cp fill } def
+ /pointerdown { 0 550 mt 300 50 lt 550 550 lt cp fill } def
+ /blank {} def
+ /exclam { (!) _uC } def
+ /quotedbl { (") _uC } def
+ /numbersign { (#) _uC } def
+ /dollar { ($) _uC } def
+ /percent { (%) _uC } def
+ /ampersand {(&) _uC} def
+ /quotesingle {(') _uC} def
+ /parenleft { (\050) _uC } def
+ /parenright { (\051) _uC } def
+ /asterisk { (*) _uC } def
+ /plus { (+) _uC } def
+ /comma { (,) _uC } def
+ /hyphen { (-) _uC } def
+ /period { (.) _uC } def
+ /slash { (/) _uC } def
+ /zero { (0) _uC } def
+ /one { (1) _uC } def
+ /two { (2) _uC } def
+ /three { (3) _uC } def
+ /four { (4) _uC } def
+ /five { (5) _uC } def
+ /six { (6) _uC } def
+ /seven { (7) _uC } def
+ /eight { (8) _uC } def
+ /nine { (9) _uC } def
+ /colon { (:) _uC } def
+ /semicolon { (;) _uC } def
+ /less { (<) _uC } def
+ /equal { (=) _uC } def
+ /greater { (>) _uC } def
+ /question { (?) _uC } def
+ /at { (@) _uC } def
+ /A { (A) _uC } def
+ /B { (B) _uC } def
+ /C { (C) _uC } def
+ /D { (D) _uC } def
+ /E { (E) _uC } def
+ /F { (F) _uC } def
+ /G { (G) _uC } def
+ /H { (H) _uC } def
+ /I { (I) _uC } def
+ /J { (J) _uC } def
+ /K { (K) _uC } def
+ /L { (L) _uC } def
+ /M { (M) _uC } def
+ /N { (N) _uC } def
+ /O { (O) _uC } def
+ /P { (P) _uC } def
+ /Q { (Q) _uC } def
+ /R { (R) _uC } def
+ /S { (S) _uC } def
+ /T { (T) _uC } def
+ /U { (U) _uC } def
+ /V { (V) _uC } def
+ /W { (W) _uC } def
+ /X { (X) _uC } def
+ /Y { (Y) _uC } def
+ /Z { (Z) _uC } def
+ /bracketleft { ([) _uC } def
+ /backslash { (\\) _uC } def
+ /bracketright { (]) _uC } def
+ /asciicircum { (^) _uC } def
+ /underscore { 0 -200 mt 600 -200 lt 20 slw stroke } def
+ /quoteleft { (`) _uC } def
+ /a { (a) _uC } def
+ /b { (b) _uC } def
+ /c { (c) _uC } def
+ /d { (d) _uC } def
+ /e { (e) _uC } def
+ /f { (f) _uC } def
+ /g { (g) _uC } def
+ /h { (h) _uC } def
+ /i { (i) _uC } def
+ /j { (j) _uC } def
+ /k { (k) _uC } def
+ /l { (l) _uC } def
+ /m { (m) _uC } def
+ /n { (n) _uC } def
+ /o { (o) _uC } def
+ /p { (p) _uC } def
+ /q { (q) _uC } def
+ /r { (r) _uC } def
+ /s { (s) _uC } def
+ /t { (t) _uC } def
+ /u { (u) _uC } def
+ /v { (v) _uC } def
+ /w { (w) _uC } def
+ /x { (x) _uC } def
+ /y { (y) _uC } def
+ /z { (z) _uC } def
+ /braceleft { ({) _uC } def
+ /brokenbar { (|) _uC } def
+ /braceright { (}) _uC } def
+ /asciitilde { (~) _uC } def
+ /Delta { 50 0 mt 50 200 lt 300 500 lt 550 200 lt 550 0 lt cp 0 setlinejoin 20 slw stroke } def
+ /Ccedilla { (C) _uC (\313) _uC } def
+ /udieresis { (u) _uC (\310) _uC } def
+ /eacute { (e) _uC (\302) _uC } def
+ /acircumflex { (a) _uC (\303) _uC } def
+ /adieresis { (a) _uC (\310) _uC } def
+ /agrave { (a) _uC (\301) _uC } def
+ /aring { (a) _uC (\312) _uC } def
+ /ccedilla { (c) _uC (\313) _uC } def
+ /ecircumflex { (e) _uC (\303) _uC } def
+ /edieresis { (e) _uC (\310) _uC } def
+ /egrave { (e) _uC (\301) _uC } def
+ /idieresis { dotless_i (\310) _uC } def
+ /icircumflex { dotless_i (\303) _uC } def
+ /igrave { dotless_i (\301) _uC } def
+ /Adieresis { (A) squash (\310) _uC } def
+ /Aring { (A) squash (\312) _uC } def
+ /Eacute { (E) squash (\302) _uC } def
+ /ae { save .6 1 scale -75 0 translate (a) _uC 360 0 translate (e) _uC restore } def
+ /AE { 120 540 moveto 480 540 lineto 480 420 lineto 300 540 moveto 300 20 lineto 250 20 moveto 500 20 lineto 500 160 lineto 250 540 moveto 80 20 lineto 30 20 moveto 180 20 lineto 170 280 moveto 400 280 lineto 400 240 moveto 400 320 lineto 20 slw 1 setlinecap stroke } def
+ /ocircumflex { (o) _uC (\303) _uC } def
+ /odieresis { (o) _uC (\310) _uC } def
+ /ograve { (o) _uC (\301) _uC } def
+ /ucircumflex { (u) _uC (\303) _uC } def
+ /ugrave { (u) _uC (\301) _uC } def
+ /ydieresis { (y) _uC (\310) _uC } def
+ /Odieresis { (O) squash (\310) _uC } def
+ /Udieresis { (U) squash (\310) _uC } def
+ /cent { (\242) _uC } def
+ /sterling { (\243) _uC } def
+ /yen { (\245) _uC } def
+ /point { save .6 1 scale (P) _uC .5 .5 scale 1000 0 translate (t) _uC restore } def
+ /integral { save 1 .75 scale (\362) _uS restore } def
+ /aacute { (a) _uC (\302) _uC } def
+ /iacute { dotless_i (\302) _uC } def
+ /oacute { (o) _uC (\302) _uC } def
+ /uacute { (u) _uC (\302) _uC } def
+ /ntilde { (n) _uC (\304) _uC } def
+ /Ntilde { (N) squash (\304) _uC } def
+ /aunder { save 175 200 translate .6 .6 scale (a) _uC 100 -200 mt 500 -200 lt 20 slw stroke restore } def
+ /ounder { save 175 200 translate .6 .6 scale (o) _uC 100 -200 mt 500 -200 lt 20 slw stroke restore } def
+ /questiondown { (\277) _uC } def
+ /smallULsingle { 25 100 mt 25 300 lt 575 300 lt 20 slw stroke } def
+ /smallURsingle { 25 300 mt 575 300 lt 575 100 lt 20 slw stroke } def
+ /half { save .5 .5 scale 0 600 translate (1) _uC
+ 500 -600 translate (2) _uC restore 50 0 moveto 500 600 lineto 10 slw 1 setlinecap stroke } def
+ /quarter { save .5 .5 scale 0 600 translate (1) _uC 500 -600 translate (4) _uC restore 50 0 moveto 500 600 lineto
+ 10 slw 1 setlinecap stroke } def
+ /exclamdown { (\241) _uC } def
+ /lessdbl { (\253) _uC } def
+ /greaterdbl { (\273) _uC } def
+ /lightbox { 2 dict begin 50 85 600 { /col exch def -150 71 800 { /row exch def col row 5 0 360 arc fill } for } for end } def
+ /mediumbox { 2 dict begin 50 85 600 { /col exch def -150 71 800 { /row exch def col row 15 0 360 arc fill } for } for end } def
+ /darkbox { 2 dict begin 50 85 600 { /col exch def -150 71 800 { /row exch def col row 25 0 360 arc fill } for } for end } def
+ /Vsingle { 300 -205 mt 300 805 lt 20 slw stroke } def
+ /VsingleTleftsingle { 300 -205 mt 300 805 lt 0 300 mt 300 300 lt 20 slw stroke } def
+ /VsingleTleftdbl { 300 -205 mt 300 805 lt 0 400 mt 300 400 lt 0 200 mt 300 200 lt 20 slw stroke } def
+ /VdblTleftsingle { 200 -205 mt 200 805 lt 400 -205 mt 400 805 lt 0 300 mt 200 300 lt 20 slw stroke } def
+ /VdblURsingle { 0 300 mt 400 300 lt 400 -205 lt 200 300 mt 200 -205 lt 20 slw stroke } def
+ /VsingleURdbl { 300 -205 mt 300 400 lt 0 400 lt 0 200 mt 300 200 lt 20 slw stroke } def
+ /VdblTleftdbl { 400 -205 mt 400 805 lt 200 -205 mt 200 200 lt 0 200 lt 0 400 mt 200 400 lt 200 805 lt 20 slw stroke } def
+ /Vdbl { 400 -205 mt 400 805 lt 200 -205 mt 200 805 lt 20 slw stroke } def
+ /VdblURdbl { 400 -205 mt 400 400 lt 0 400 lt 0 200 mt 200 200 lt 200 -205 lt 20 slw stroke } def
+ /VdblLRdbl { 200 805 mt 200 400 lt 0 400 lt 400 805 mt 400 200 lt 0 200 lt 20 slw stroke } def
+ /VdblLRsingle { 200 805 mt 200 300 lt 400 805 mt 400 300 lt 0 300 lt 20 slw stroke } def
+ /VsingleLRdbl { 300 805 mt 300 200 lt 0 200 lt 0 400 mt 300 400 lt 20 slw stroke } def
+ /VsingleURsingle { 300 -205 mt 300 300 lt 0 300 lt 20 slw stroke } def
+ /VsingleLLsingle { 300 805 mt 300 300 lt 600 300 lt 20 slw stroke } def
+ /HsingleTupsingle { 0 300 mt 600 300 lt 300 300 mt 300 805 lt 20 slw stroke } def
+ /HsingleTdownsingle { 0 300 mt 600 300 lt 300 300 mt 300 -205 lt 20 slw stroke } def
+ /VsingleTrightsingle { 300 -205 mt 300 805 lt 300 300 mt 600 300 lt 20 slw stroke } def
+ /Hsingle { 0 300 mt 600 300 lt 20 slw stroke } def
+ /VsingleXsingle { 300 -205 mt 300 805 lt 0 300 mt 600 300 lt 20 slw stroke } def
+ /VsingleTrightdbl { 300 -205 mt 300 805 lt 300 200 mt 600 200 lt 300 400 mt 600 400 lt 20 slw stroke } def
+ /VdblTrightsingle { 400 -205 mt 400 805 lt 200 -205 mt 200 805 lt 400 300 mt 600 300 lt 20 slw stroke } def
+ /VdblLLdbl { 400 805 mt 400 400 lt 600 400 lt 200 805 mt 200 200 lt 600 200 lt 20 slw stroke } def
+ /VdblULdbl { 400 -205 mt 400 200 lt 600 200 lt 200 -205 mt 200 400 lt 600 400 lt 20 slw stroke } def
+ /HdblTupdbl { 0 200 mt 600 200 lt 0 400 mt 200 400 lt 200 805 lt 400 805 mt 400 400 lt 600 400 lt 20 slw stroke } def
+ /HdblTdowndbl { 0 400 mt 600 400 lt 0 200 mt 200 200 lt 200 -205 lt 400 -205 mt 400 200 lt 600 200 lt 20 slw stroke } def
+ /VdblTrightdbl { 200 -205 mt 200 805 lt 400 -205 mt 400 200 lt 600 200 lt 600 400 mt
+ 400 400 lt 400 805 lt 20 slw stroke } def
+ /Hdbl { 0 200 mt 600 200 lt 0 400 mt 600 400 lt 20 slw stroke } def
+ /VdblXdbl { 400 -205 mt 400 200 lt 600 200 lt 600 400 mt 400 400 lt 400 805 lt 200 -205 mt 200 200 lt 0 200 lt
+ 0 400 mt 200 400 lt 200 805 lt 20 slw stroke } def
+ /HdblTupsingle { 0 200 mt 600 200 lt 0 400 mt 600 400 lt 300 400 mt 300 805 lt 20 slw stroke } def
+ /HsingleTupdbl { 0 300 mt 600 300 lt 200 300 mt 200 805 lt
+ 400 300 mt 400 805 lt 20 slw stroke } def
+ /HdblTdownsingle { 0 200 mt 600 200 lt 0 400 mt 600 400 lt 300 200 mt 300 -205 lt 20 slw stroke } def
+ /HsingleTdowndbl { 0 300 mt 600 300 lt 200 300 mt 200 -205 lt
+ 400 300 mt 400 -205 lt 20 slw stroke } def
+ /VdblLLsingle { 200 805 mt 200 300 lt 600 300 lt 400 805 mt 400 300 lt 20 slw stroke } def
+ /VsingleLLdbl { 300 805 mt 300 200 lt 600 200 lt 300 400 mt 600 400 lt 20 slw stroke } def
+ /VsingleULdbl { 300 -205 mt 300 400 lt 600 400 lt 300 200 mt 600 200 lt 20 slw stroke } def
+ /VdblULsingle { 200 -205 mt 200 300 lt 600 300 lt 400 -205 mt 400 300 lt 20 slw stroke } def
+ /VdblXsingle { 400 -205 mt 400 805 lt 200 -205 mt 200 805 lt 0 300 mt 600 300 lt 20 slw stroke } def
+ /VsingleXdbl { 300 -205 mt 300 805 lt 0 200 mt 600 200 lt 0 400 mt 600 400 lt 20 slw stroke } def
+ /VsingleLRsingle { 0 300 mt 300 300 lt 300 805 lt 20 slw stroke } def
+ /VsingleULsingle { 300 -205 mt 300 300 lt 600 300 lt 20 slw stroke } def
+ /allblack { 0 -205 mt 600 -205 lt 600 805 lt 0 805 lt cp fill } def
+ /botblack { 0 -205 mt 600 -205 lt 600 300 lt 0 300 lt cp fill } def
+ /leftblack { 0 -205 mt 300 -205 lt 300 805 lt 0 805 lt cp fill } def
+ /rightblack { 300 -205 mt 600 -205 lt 600 805 lt 300 805 lt cp fill } def
+ /topblack { 0 300 mt 600 300 lt 600 805 lt 0 805 lt cp fill } def
+ /alpha { save .8 .8 scale (\141) _uS restore } def
+ /beta { save .9 1 scale (\373) _uC restore } def
+ /Gamma { save .8 .8 scale (\107) _uS restore } def
+ /pi { save .8 .8 scale (\160) _uS restore } def
+ /Sigma { save .8 .8 scale (\123) _uS restore } def
+ /sigma { save .8 .8 scale (\163) _uS restore } def
+ /mu { save .8 .8 scale (\155) _uS restore } def
+ /tau { save .8 .8 scale (\164) _uS restore } def
+ /Phi { save .75 1 scale (\106) _uS restore } def
+ /theta { save .8 .8 scale (\161) _uS restore } def
+ /Omega { save .6 .9 scale (\127) _uS restore } def
+ /delta { save .8 .8 scale (\144) _uS restore } def
+ /infinity { save .75 1 scale (\245) _uS restore } def
+ /phi { save .8 .7 scale (\146) _uS restore } def
+ /element { save .8 .8 scale (\316) _uS restore } def
+ /intersection { save .5 .8 scale (\307) _uS restore } def
+ /equivalence {(\272) _uS} def
+ /plusminus {(\261) _uS} def
+ /greaterequal {(\263) _uS} def
+ /lessequal {(\243) _uS} def
+ /integraltp { save .75 .75 scale (\363) _uS restore } def
+ /integralbt { save .75 .75 scale (\365) _uS restore } def
+ /divide {(\270) _uS} def
+ /approxequal {(\273) _uS} def
+ /degree {(\260) _uS} def
+ /bullet {(\267) _uS} def
+ /dotmath {(\327) _uS} def
+ /radical { 100 300 mt 150 350 lt 350 0 lt 550 600 lt 25 slw stroke } def
+ /eta { save .8 .8 scale (\150) _uS restore } def
+ /squared { save 100 350 translate
+ .45 .45 scale (2) _uC restore } def
+ /block { 50 0 mt 50 400 lt 550 400 lt 550 0 lt fill } def
+ /blank {} def
+ end
+
+ /BuildChar {
+ 600 0
+ 0 -200 600 800
+ setcachedevice
+ exch begin
+ Encoding exch get
+ CharacterDefs exch get
+ exec
+ end
+ } def
+
+ /UniqueID 847667 def
+end
+/PCFont exch definefont pop
+%%EndResource
+%%BeginResource: font Times-Roman-Ogonki
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding OgonkiEncoding
+/OgonkiEncoding [
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /quotesingle
+/quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl /endash /dagger
+/daggerdbl /periodcentered /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright /guillemotright
+/ellipsis /perthousand /questiondown /grave /circumflex /tilde /macron /ring
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash
+/zero /one /two /three /four /five /six /seven
+/eight /nine /colon /semicolon /less /equal /greater /question
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /emdash /AE /ordfeminine /Oslash /OE /ordmasculine /ae
+/dotlessi /oslash /oe /threesuperior /thorn /twosuperior /threequarters /Eth
+/trademark /registered /onequarter /Thorn /logicalnot /plusminus /minus /onesuperior
+/copyright /mu /eth /brokenbar /onehalf /dotlessj /Euro /.notdef
+/space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section
+/dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent
+/degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron
+/cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent
+% 300
+/Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla
+/Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron
+/Eth /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply
+/Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls
+/racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla
+/ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron
+/dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide
+/rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent
+] def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: encoding StandardEncoding
+/StandardEncoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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
+% 100
+/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 /asciicircum /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 /asciitilde /.notdef
+% 200
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /exclamdown /cent /sterling /fraction /yen /florin /section
+/currency /quotesingle /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi /fl
+/.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet
+/quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /.notdef /questiondown
+% 300
+/.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
+/emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef
+/Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef
+/.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef
+/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
+] def
+%%EndResource
+%!
+% Add composite (i.e. accented) characters to any font
+% By J. Chroboczek <jec@dcs.ed.ac.uk>
+%
+% -- code follows this line --
+%%BeginResource: procset compose 0.8 0
+% Copyright (c) 1996-1999 by J. Chroboczek
+% This code may be distributed under the terms of the
+% GNU Public License, either version 3 of the license, or (at your
+% option) any later version.
+/makeCompositeDict 20 dict def
+makeCompositeDict begin
+/nameUnique { % name nameUnique namexxxxxx
+ dup length exch 1 index string cvs % length (name)
+ 1 index 12 add string dup % length (name) (...) (...)
+ 3 2 roll 0 exch putinterval % length (name...)
+ dup 3 2 roll
+ rand 12 string cvs
+ putinterval
+} bind def
+
+/doMakeComposite
+{
+ /compositeChars exch def
+ /targetEncoding exch def
+ /baseEncoding exch def
+ /newfontname exch def
+ /oldfontname exch def
+ /oldfont oldfontname findfont def
+ /newfont 20 dict def
+ /oldFontMatrix oldfont /FontMatrix get def
+ /oldFontBBox oldfont /FontBBox get cvlit def
+ /oldfontcopy oldfont length dict def
+
+ newfont begin
+ /FontType 3 def
+ /PaintType 0 def % not used
+ /FontMatrix [0.001 0 0 0.001 0 0] def
+ /FontBBox
+ [
+ oldFontBBox 0 get oldFontBBox 1 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ oldFontBBox 2 get oldFontBBox 3 get
+ oldFontMatrix transform
+ [1000 0 0 1000 0 0] transform
+ ] cvx def
+
+ /StrokeWidth 0 def % not used
+
+ /Encoding targetEncoding def
+
+ /Decoding 256 dict def % invert base encoding vector
+ Decoding begin
+ 0 1 255
+ { dup baseEncoding exch get exch def } bind for
+ end
+
+ newfont /compositeChars compositeChars put
+
+ /FontName newfontname def
+
+% make a copy of the original font, reencoding it
+ oldfont
+ oldfontcopy begin
+ {1 index /FID ne
+ {def}
+ {pop pop} ifelse
+ } bind forall
+ end
+ oldfontcopy /Encoding baseEncoding put
+ oldfontname nameUnique oldfontcopy definefont
+ 1000 scalefont /OriginalFont exch def
+
+ /BuildChar % newfont n BuildChar -
+ {
+ exch begin % n
+ /OriginalFont load setfont
+ /Encoding load exch get % glyphName
+ /compositeChars load dup
+ 2 index known % glyphName compositeChars known-p
+ { 1 index get % glyphName [ 65 x y 129 ]
+ dup 0 get ( ) dup % glyphName [...] 65 ( ) ( )
+ 0 3 index put % glyphName [...] 65 (A)
+ dup stringwidth setcharwidth
+ 0 0 moveto
+ show pop % glyphName [...]
+ dup 1 get 1 index 2 get % glyphName [...] x y
+ moveto % glyphName [...]
+ 3 get ( ) dup 3 2 roll % glyphName ( ) ( ) 129
+ 0 exch put % glyphName (')
+ show % glyphName
+ }
+ { pop
+ /Decoding load % glyphName Decoding
+ dup 2 index known % glyphName Decoding known-p
+ { exch get }
+ { pop pop 0 } ifelse % n'
+ ( ) dup 0 3 index put dup % n' (A) (A)
+ stringwidth setcharwidth
+ 0 0 moveto
+ show % n'
+ } ifelse
+ pop
+ end
+ } bind def
+ end % newfont
+ newfontname newfont definefont pop
+} def % doMakeComposite
+
+/fillEuro { % w h --
+ gsave exch 1000 div exch 1000 div scale
+ 955.852 232.172 moveto
+ 904.495 180.815 lineto
+ 829.454 117.848 734.626 83.333 636.667 83.333 curveto
+ 406.667 83.333 220 270 220 500 curveto
+ 220 730 406.667 916.667 636.667 916.667 curveto
+ 759.831 916.667 876.684 862.177 955.852 767.828 curveto
+ 988.474 855.291 lineto
+ 894.851 947.996 768.422 1000 636.667 1000 curveto
+ 360.667 1000 136.667 776 136.667 500 curveto
+ 136.667 224 360.667 0 636.667 0 curveto
+ 753.23 0 866.13 40.725 955.852 115.135 curveto
+ closepath fill
+
+ 869.037 541.667 moveto
+ 901.025 625 lineto
+ 31.989 625 lineto
+ 0 541.667 lineto
+ closepath fill
+
+ 805.059 375 moveto
+ 837.048 458.333 lineto
+ 31.989 458.333 lineto
+ 0 375 lineto
+ closepath fill
+ grestore
+} bind def
+
+/makeEuroCharstring { % w h -- charstring
+ [ /pop cvx % w h mark pop
+ 3 index 0 0 0 % w h mark pop w 0 0 0
+ 7 index 7 index /setcachedevice cvx
+ % w h mark pop w 0 0 0 w h setcachedevice
+ 10 index 10 index /fillEuro load /exec cvx ]
+ cvx bind 3 1 roll pop pop
+} def
+
+/doEurifyFont { % oldname newname --
+ exch
+ findfont dup dup % newname dict dict dict
+ /FontMatrix get matrix invertmatrix % newname dict dict m
+ {} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
+ 0 0 moveto
+ (5) stringwidth pop % newname dict w
+ (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ 3 2 roll % newname w h dict
+
+ dup length dict dup 3 1 roll begin % newname w h newdict
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ CharStrings dup length 1 add dict dup 3 1 roll begin % newnamew h newdict newdict'
+ {def} forall
+ /Euro % newname w h newdict newdict' /Euro
+ 4 index 4 index makeEuroCharstring def
+ end % newname w h newdict newdict'
+ /CharStrings exch def
+ end
+ 3 1 roll pop pop % newname dict
+ definefont pop
+} bind def
+
+end % makeCompositeDict
+
+% oldfontname newfontname baseEncoding targetEncoding compositeChars --
+/makeComposite
+{
+ makeCompositeDict begin doMakeComposite end
+} bind def
+
+% oldfontname newfontname
+/eurifyFont
+{
+ makeCompositeDict begin doEurifyFont end
+} bind def
+%%EndResource
+%!
+% Automatically generated by the Ogonkify package
+% Do not modify
+% -- code follows this line --
+%%BeginResource: font Times-Roman-Ogonki
+/Times-Roman /Times-Roman-Ogonki OgonkiEncoding StandardEncoding 83 dict
+dup /Agrave [65 195 212 27] put
+dup /Aring [65 185 187 31] put
+dup /Atilde [65 195 212 29] put
+dup /Ecircumflex [69 139 212 28] put
+dup /Egrave [69 139 212 27] put
+dup /Idieresis [73 0 212 168] put
+dup /Igrave [73 0 212 27] put
+dup /Ntilde [78 195 212 29] put
+dup /Ograve [79 195 212 27] put
+dup /Otilde [79 195 212 29] put
+dup /Ucircumflex [85 195 212 28] put
+dup /Ugrave [85 195 212 27] put
+dup /Ydieresis [89 195 212 168] put
+dup /agrave [97 56 0 27] put
+dup /aring [97 56 0 31] put
+dup /atilde [97 56 0 29] put
+dup /ecircumflex [101 56 0 28] put
+dup /egrave [101 56 0 27] put
+dup /idieresis [136 -27 0 168] put
+dup /igrave [136 -27 0 27] put
+dup /ntilde [110 84 0 29] put
+dup /ograve [111 84 0 27] put
+dup /otilde [111 84 0 29] put
+dup /ucircumflex [117 84 0 28] put
+dup /ugrave [117 84 0 27] put
+dup /ydieresis [121 84 0 168] put
+dup /abreve [97 55 0 162] put
+dup /Abreve [65 194 223 162] put
+dup /aogonek [97 209 0 178] put
+dup /Aogonek [65 465 0 178] put
+dup /cacute [99 70 0 180] put
+dup /Cacute [67 212 212 180] put
+dup /ccaron [99 69 0 183] put
+dup /Ccaron [67 196 212 183] put
+dup /dbar [100 200 300 173] put
+dup /Dbar [208 0 0 160] put
+dup /dcaron [100 426 75 39] put
+dup /Dcaron [68 194 216 183] put
+dup /ecaron [101 55 0 183] put
+dup /Ecaron [69 139 214 183] put
+dup /edotaccent [101 61 0 255] put
+dup /Edotaccent [69 154 212 255] put
+dup /eogonek [101 142 9 178] put
+dup /Eogonek [69 320 0 178] put
+dup /gbreve [103 84 0 162] put
+dup /Gbreve [71 195 212 162] put
+dup /Idotaccent [73 0 212 255] put
+dup /iogonek [105 12 0 178] put
+dup /Iogonek [73 67 0 178] put
+dup /lacute [108 -5 216 180] put
+dup /Lacute [76 139 216 180] put
+dup /lcaron [108 192 75 39] put
+dup /Lcaron [76 250 52 39] put
+dup /nacute [110 90 0 180] put
+dup /Nacute [78 190 212 180] put
+dup /ncaron [110 83 0 183] put
+dup /Ncaron [78 194 214 183] put
+dup /ohungarumlaut [111 83 0 189] put
+dup /Ohungarumlaut [79 194 214 189] put
+dup /racute [114 22 0 180] put
+dup /Racute [82 210 216 180] put
+dup /rcaron [114 0 0 183] put
+dup /Rcaron [82 167 216 183] put
+dup /sacute [115 20 0 180] put
+dup /Sacute [83 100 212 180] put
+dup /scedilla [115 28 0 184] put
+dup /Scedilla [83 112 0 184] put
+dup /tcedilla [116 53 0 184] put
+dup /Tcedilla [84 197 0 184] put
+dup /tcaron [116 214 0 39] put
+dup /Tcaron [84 139 216 183] put
+dup /uhungarumlaut [117 83 0 189] put
+dup /Uhungarumlaut [85 194 214 189] put
+dup /umacron [117 81 0 30] put
+dup /Umacron [85 205 212 30] put
+dup /uogonek [117 236 5 178] put
+dup /Uogonek [85 287 5 178] put
+dup /uring [117 83 0 31] put
+dup /Uring [85 194 179 31] put
+dup /zacute [122 60 0 180] put
+dup /Zacute [90 120 212 180] put
+dup /zdotaccent [122 50 0 255] put
+dup /Zdotaccent [90 140 212 255] put
+makeComposite
+%%EndResource
+
+%%EndResource
+% Initialize page description variables.
+/sh 595 def
+/sw 842 def
+/llx 24 def
+/urx 818 def
+/ury 571 def
+/lly 24 def
+/#copies 1 def
+/th 15.000000 def
+/fnfs 11 def
+/bfs 7.542439 def
+/cw 4.525463 def
+
+% Dictionary for ASCII support
+/asciidict 4 dict begin
+ /fCourier ASCIIEncoding /Courier reencode_font
+ /fCourier-Bold ASCIIEncoding /Courier-Bold reencode_font
+ /fHelvetica-Bold ASCIIEncoding /Helvetica-Bold reencode_font
+ /fTimes-Roman ASCIIEncoding /Times-Roman reencode_font
+currentdict end def
+% Dictionary for HPRoman support
+/hpdict 4 dict begin
+ /fCourier HPRomanEncoding /Courier reencode_font
+ /fCourier-Bold HPRomanEncoding /Courier-Bold reencode_font
+ /fHelvetica-Bold HPRomanEncoding /Helvetica-Bold reencode_font
+ /fTimes-Roman HPRomanEncoding /Times-Roman reencode_font
+currentdict end def
+% Dictionary for IBM-CP437 support
+/ibm-cp437dict 4 dict begin
+ /fCourier IBM-CP437Encoding /PCFont reencode_font
+ /fCourier-Bold IBM-CP437Encoding /PCFont reencode_font
+ /fHelvetica-Bold IBM-CP437Encoding /PCFont reencode_font
+ /fTimes-Roman IBM-CP437Encoding /PCFont reencode_font
+currentdict end def
+% Dictionary for IBM-CP850 support
+/ibm-cp850dict 4 dict begin
+ /fCourier IBM-CP850Encoding /Courier reencode_font
+ /fCourier-Bold IBM-CP850Encoding /Courier-Bold reencode_font
+ /fHelvetica-Bold IBM-CP850Encoding /Helvetica-Bold reencode_font
+ /fTimes-Roman IBM-CP850Encoding /Times-Roman reencode_font
+currentdict end def
+% Dictionary for ISO-8859-1 support
+/iso1dict 6 dict begin
+ /fCourier ISO-8859-1Encoding /Courier reencode_font
+ /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font
+ /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font
+ /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font
+ /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font
+ /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_font
+currentdict end def
+% Dictionary for ISO-8859-10 support
+/iso10dict 4 dict begin
+ /fCourier ISO-8859-10Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold ISO-8859-10Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold ISO-8859-10Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman ISO-8859-10Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+% Dictionary for ISO-8859-2 support
+/iso2dict 4 dict begin
+ /fCourier ISO-8859-2Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold ISO-8859-2Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold ISO-8859-2Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman ISO-8859-2Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+% Dictionary for ISO-8859-3 support
+/iso3dict 4 dict begin
+ /fCourier ISO-8859-3Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold ISO-8859-3Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold ISO-8859-3Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman ISO-8859-3Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+% Dictionary for ISO-8859-4 support
+/iso4dict 4 dict begin
+ /fCourier ISO-8859-4Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold ISO-8859-4Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold ISO-8859-4Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman ISO-8859-4Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+% Dictionary for ISO-8859-9 support
+/iso9dict 4 dict begin
+ /fCourier ISO-8859-9Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold ISO-8859-9Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold ISO-8859-9Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman ISO-8859-9Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+% Dictionary for Macintosh support
+/macdict 4 dict begin
+ /fCourier MacintoshEncoding /Courier reencode_font
+ /fCourier-Bold MacintoshEncoding /Courier-Bold reencode_font
+ /fHelvetica-Bold MacintoshEncoding /Helvetica-Bold reencode_font
+ /fTimes-Roman MacintoshEncoding /Times-Roman reencode_font
+currentdict end def
+% Dictionary for MS-CP1250 support
+/ms-cp1250dict 4 dict begin
+ /fCourier MS-CP1250Encoding /Courier-Ogonki reencode_font
+ /fCourier-Bold MS-CP1250Encoding /Courier-Bold-Ogonki reencode_font
+ /fHelvetica-Bold MS-CP1250Encoding /Helvetica-Bold-Ogonki reencode_font
+ /fTimes-Roman MS-CP1250Encoding /Times-Roman-Ogonki reencode_font
+currentdict end def
+/bgcolor [ 0 0 0 ] def
+/bg false def
+/ul false def
+/bx false def
+% The font for line numbering
+/f# /Helvetica findfont bfs .6 mul scalefont def
+/fSymbol /Symbol findfont def
+/hm fnfs 0.25 mul def
+/pw
+ cw 86.400000 mul
+def
+/ph
+ 503.080648 th add
+def
+/pmw urx llx sub pw 2 mul sub 1 div def
+/pmh 0 def
+/v 0 def
+/x [
+ 0
+ dup pmw add pw add
+] def
+/y [
+ pmh ph add 0 mul ph add
+ dup
+] def
+/scx sw 2 div def
+/scy sh 2 div def
+/snx urx def
+/sny lly 2 add def
+/dx llx def
+/dy sny def
+/fnx scx def
+/fny dy def
+/lx snx def
+/ly ury fnfs 0.8 mul sub def
+/sx 5 def
+/tab 8 def
+/x0 0 def
+/y0 0 def
+%%EndSetup
+
+%%Page: (1-2) 1
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (ascii) L n
+end % of iso1dict
+asciidict begin
+0 T () L
+(This is a pure ASCII file, written to test the ASCII encoding) p n
+0 T (in a2ps. Character with the high bit set, \(such as M-i, M-`, M-t, M-o\)) N
+(5) # (are not printable, and are escaped.) N
+0 T () N
+0 T () S
+(latin1) L n
+end % of asciidict
+iso1dict begin
+0 T () L
+(Ceci est un texte en fran\347ais accentu\351, comme dans ao\373t, ou) p n
+(10) # (d\351cembre, et non pas ao\371t et d\350cembre...) N
+0 T () N
+0 T () S
+(latin2) L n
+end % of iso1dict
+iso2dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+(15) # (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T () S
+(DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) K n
+0 T () S
+(KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) p n
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+(20) # (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+0 T () N
+0 T () S
+(latin3) L n
+end % of iso2dict
+iso3dict begin
+(25) # () L
+(dokM-1d DOKM-!D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+0 T (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wskaM-<nik WSKA\254NIK mo\277na MO\257NA dokM-1d) N
+0 T (DOKM-!D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) N
+0 T () S
+(KI\246\306 mr\363wka MR\323WKA wskaM-<nik WSKA\254NIK mo\277na MO\257NA dokM-1d DOKM-!D pami\352tasz) k n
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+(30) # () S
+(MR\323WKA wskaM-<nik WSKA\254NIK mo\277na MO\257NA dokM-1d DOKM-!D pami\352tasz PAMI\312TASZ) p n
+0 T (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wskaM-<nik WSKA\254NIK mo\277na MO\257NA) N
+0 T () N
+0 T () S
+(latin4) L n
+end % of iso3dict
+iso4dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie) p n
+0 T (GAM-&NIE kiM-6\346 KIM-&\306 mrM-swka MRM-SWKA wskaM-<nik WSKAM-,NIK moM-?na MO\257NA dok) N
+0 T (\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346) N
+0 T (KIM-&\306 mrM-swka MRM-SWKA wskaM-<nik WSKAM-,NIK moM-?na MO\257NA dok\261d DOK\241D pami\352ta) N
+0 T (sz) N
+(40) # (PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346 KIM-&\306 mrM-swka) N
+0 T (MRM-SWKA wskaM-<nik WSKAM-,NIK moM-?na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346 KIM-&\306 mrM-swka MRM-SWKA) N
+0 T (wskaM-<nik WSKAM-,NIK moM-?na MO\257NA) N
+0 T () N
+(45) # () S
+(latin5) L n
+end % of iso4dict
+iso9dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+0 T (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) N
+(50) # (KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) N
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+(55) # () N
+0 T () S
+(latin6) L n
+end % of iso9dict
+iso10dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie) p n
+0 T (GAM-&NIE kiM-6\346 KIM-&\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK moM-?na MOM-/NA dok\261d) N
+(60) # (DOK\241D pami\352tasz PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346) N
+0 T (KIM-&\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK moM-?na MOM-/NA dok\261d DOK\241D pami\352tasz) N
+0 T (PAMI\312TASZ M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346 KIM-&\306 mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK moM-?na MOM-/NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (M-3awka M-#AWKA na\346pa\346 NA\306PA\306 gaM-6nie GAM-&NIE kiM-6\346 KIM-&\306 mr\363wka MR\323WKA) N
+(65) # (wska\274nik WSKA\254NIK moM-?na MOM-/NA) N
+0 T () N
+end % of iso10dict
+iso1dict begin
+(encoding.pre) (right) (1) title
+end % of iso1dict
+iso10dict begin
+border
+/v 1 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+end % of iso10dict
+iso1dict begin
+(encoding.pre) (right) (1) title
+end % of iso1dict
+iso10dict begin
+border
+grestore
+end % of iso10dict
+iso1dict begin
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3-4) 2
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+end % of iso1dict
+iso10dict begin
+/v 0 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(90) # (CP1250) L n
+end % of iso10dict
+ms-cp1250dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+0 T (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) N
+(95) # (KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) N
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+(100) # () N
+0 T () S
+(ibmpc) L n
+end % of ms-cp1250dict
+ibm-cp850dict begin
+0 T () L
+(dokM-1d DOK\241D pamiM-jtasz PAMIM-JTASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie) p n
+0 T (GA\246NIE kiM-6\346 KI\246M-F mrM-swka MRM-SWKA wskaM-<nik WSKA\254NIK moM-?na MO\257NA dokM-1d) N
+(105) # (DOK\241D pamiM-jtasz PAMIM-JTASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE ki) N
+0 T (M-6\346) N
+0 T (KI\246M-F mrM-swka MRM-SWKA wskaM-<nik WSKA\254NIK moM-?na MO\257NA dokM-1d DOK\241D pamiM-j) N
+0 T (tasz) N
+0 T (PAMIM-JTASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE kiM-6\346 KI\246M-F mrM-sw) N
+0 T (ka) N
+0 T (MRM-SWKA wskaM-<nik WSKA\254NIK moM-?na MO\257NA dokM-1d DOK\241D pamiM-jtasz PAMIM-JTASZ) N
+0 T (M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE kiM-6\346 KI\246M-F mrM-swka MRM-SWKA) N
+(110) # (wskaM-<nik WSKA\254NIK moM-?na MO\257NA) N
+0 T () N
+0 T () S
+(pcg) L n
+end % of ibm-cp850dict
+ibm-cp437dict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+(115) # (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) N
+0 T (KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) N
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+(120) # (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+0 T () N
+end % of ibm-cp437dict
+iso1dict begin
+(encoding.pre) (right) (2) title
+end % of iso1dict
+ibm-cp437dict begin
+border
+/v 1 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (Hp) L n
+end % of ibm-cp437dict
+hpdict begin
+(125) # () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie) p n
+0 T (GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346) N
+0 T (KI\246\306 mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) N
+0 T (PAMI\312TASZ \263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka) N
+(130) # (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (\263awka \243AWKA na\346pa\346 NA\306PA\306 ga\266nie GA\246NIE ki\266\346 KI\246\306 mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+0 T () N
+0 T () S
+(Mac) L n
+end % of hpdict
+macdict begin
+0 T () L
+(dok\261d DOK\241D pami\352tasz PAMI\312TASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie) p n
+0 T (GA\246NIE kiM-6\346 KI\246M-F mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d) N
+0 T (DOK\241D pami\352tasz PAMI\312TASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE kiM-6\346) N
+0 T (KI\246M-F mr\363wka MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz) N
+(140) # (PAMI\312TASZ M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE kiM-6\346 KI\246M-F mr\363wka) N
+0 T (MR\323WKA wska\274nik WSKA\254NIK mo\277na MO\257NA dok\261d DOK\241D pami\352tasz PAMI\312TASZ) N
+0 T (M-3awka \243AWKA na\346pa\346 NAM-FPAM-F gaM-6nie GA\246NIE kiM-6\346 KI\246M-F mr\363wka MR\323WKA) N
+0 T (wska\274nik WSKA\254NIK mo\277na MO\257NA) N
+0 T () N
+end % of macdict
+iso1dict begin
+(encoding.pre) (right) (2) title
+end % of iso1dict
+macdict begin
+border
+grestore
+end % of macdict
+iso1dict begin
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/eplv_chkr.ps b/tests/ps-ref/eplv_chkr.ps
new file mode 100644
index 0000000..df9a36d
--- /dev/null
+++ b/tests/ps-ref/eplv_chkr.ps
@@ -0,0 +1,113 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(// This module checks for BDVL deasserting when BEPVL is asserted.) c n
+() p n
+(module) K
+( epvl_chkr\(clk, bpvl, bepvl, bdvl, stop\);) p n
+( ) S
+(input) K
+( clk;) p n
+( ) S
+(input) K
+( bpvl;) p n
+( ) S
+(input) K
+( bepvl;) p n
+( ) S
+(input) K
+( bdvl;) p n
+( ) S
+(input) K
+( stop; ) p
+(// $stop \(or $finish if BATCH\) on error) c n
+() p n
+(`ifdef) k
+( JUST_COUNT_PACKETS) p n
+( ) S
+(// Do nothing) c n
+(`else) k n
+( ) p
+(integer) K
+( status;) p n
+(`endif) k
+( ) p
+(// ifdef JUST_COUNT_PACKETS) c n
+() p n
+( ) S
+(always) K
+( @\() p
+(posedge) K
+( clk\) ) p
+(begin) K n
+( ) p
+(if) K
+( \(!bpvl && bepvl && bdvl\) ) p
+(begin) K n
+( $display\(") p
+(%%E-%M, %0t BDVL cannot be deasserted with BEPVL) str
+(",) p n
+( $time\);) N
+( ) S
+(if) K
+( \(stop\) ) p
+(begin) K n
+( #1000) p n
+(`ifdef) k
+( JUST_CHECK_COUNTS) p n
+( ) S
+(// Do nothing) c n
+(`else) k n
+( status = $check_counts;) p n
+(`endif) k
+( ) p
+(// !ifdef JUST_CHECK_COUNTS) c n
+( $display\(") p
+(%%I-%M, %0t Stopping simulation on error!) str
+(", $time\);) p n
+(`ifdef) k
+( BATCH) p n
+( $finish;) N
+(`else) k n
+( $stop;) p n
+(`endif) k
+( ) p
+(// !ifdef BATCH) c n
+( ) p
+(end) K
+( ) p
+(// if \(backplane.stop_on_error\)) c n
+() p n
+( ) S
+(end) K
+( ) p
+(// if \(!bpvl && bepvl && bdvl\)) c n
+( ) p
+(end) K
+( ) p
+(// always @ \(posedge clk\)) c n
+() p n
+(endmodule) K
+( ) p
+(// epvl_chkr) c n
+(eplv_chkr.v) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/essai2.ps b/tests/ps-ref/essai2.ps
new file mode 100644
index 0000000..bb44335
--- /dev/null
+++ b/tests/ps-ref/essai2.ps
@@ -0,0 +1,340 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(set options ") p
+(-I/inf/erebe/bdstag/sigbench/release/Schema/include) str
+(";) p n
+(set ) S
+(schema) K
+( sigrel;) p n
+(set ) S
+(base) K
+( sigrelb;) p n
+() N
+(set ) S
+(application ) K
+(Index_lineaire;) L n
+() p n
+(name) K
+( Nt_rem_oid:Tt_rem_oid;) p n
+(name) K
+( Ns_rem_oid:set \(Tt_rem_oid\);) p n
+(name) K
+( No_JS_feuilleA:C_Feuille;) p n
+(name) K
+( No_JS_feuilleB:C_Feuille;) p n
+(name) K
+( Ns_JS_jointure_cles:set \(tuple \(cleA:string, cleB:string\)\);) p n
+(function) K n
+(F_JS_big_theta \(Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid\):boolean;) p n
+( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_big_theta \(Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid\):boolean) p n
+({) N
+(/* test si "a intersecte b \(sens strict\)" */) c n
+( ) p
+(return) K
+( \(\(Pt_a.Ai_xmin < Pt_b.Ai_xmax\)) p n
+() S 8 T ( && \(Pt_a.Ai_ymin < Pt_b.Ai_ymax\)) N
+() S 8 T ( && \(Pt_a.Ai_xmax > Pt_b.Ai_xmin\) && \(Pt_a.Ai_ymax > Pt_b.Ai_ymin\)\);) N
+(};) N
+(function) K n
+(F_JS_existe_cle \(Pc_cleA:string, Pc_cleB:string\):boolean;) p n
+( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_existe_cle \(Pc_cleA:string, Pc_cleB:string\):boolean) p n
+({) N
+(#include) K
+( ") p
+(varextbis.h) str
+(") p n
+() N
+( Handle poign_root, poign_objet_final, *poign_cle;) N
+( Scan *scan_index;) N
+( Predicate *predicat;) N
+( ) S
+(void) k
+( *index_id;) p n
+( ) S
+(o2) K
+( string cle = ") p
+(index-racine) str
+(";) p n
+() N
+(/************** Fermeture du scan index et retour ******/) c n
+( o2_col_scan_close \(scan_index\);) p n
+(/*printf\("sortie F_Lecture_index\\n"\);*/) c n
+( printf \(") p
+( ===> feuille %s ok ...\\n) str
+(", Pc_cleA + Pc_cleB\);) p n
+( ) S
+(return) K
+( true;) p n
+(};) N
+() N
+(function) K n
+(F_JS_get_quadrant \(Pc_cle:string, Pt_rem:Tt_rem_oid\):Tt_rem_oid;) p n
+( ) S
+(function) K
+( ) p
+(body) K
+( F_JS_get_quadrant \(Pc_cle:string,) p n
+() S 8 T () S 16 T () S 24 T () S 32 T ( Pt_rem:Tt_rem_oid\):Tt_rem_oid) N
+({) N
+( ) S
+(o2) K
+( integer dx = \(Pt_rem.Ai_xmax - Pt_rem.Ai_xmin\) / 2;) p n
+( ) S
+(o2) K
+( integer dy = \(Pt_rem.Ai_ymax - Pt_rem.Ai_ymin\) / 2;) p n
+( ) S
+(o2) K
+( integer i;) p n
+( ) S
+(for) K
+( \(i = 0; i < count \(Pc_cle\); i++\)) p n
+( {) N
+( ) S
+(switch) K
+( \(Pc_cle[i]\)) p n
+() S 8 T ({) N
+() S 8 T () S
+(default) K
+(:) p n
+() S 8 T ( printf \(") S
+(Nom de feuille \(%s\) erronee !!!\\n) str
+(", Pc_cle\);) p n
+() S 8 T (}) N
+( dx = dx / 2;) N
+( dy = dy / 2;) N
+( }) N
+( ) S
+(return) K
+( \(Pt_rem\);) p n
+(};) N
+() N
+() N
+(function) K
+( F_JS_join_f \(Pc_cleA:string,) p n
+() S 8 T () S 16 T ( Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid\);) N
+(function) K
+( ) p
+(body) K n
+(F_JS_join_f \(Pc_cleA:string,) p n
+() S 8 T ( Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid\)) N
+(essai2.o2c) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+({) p n
+(#include) K
+( ") p
+(varextbis.h) str
+(") p 24 T () S 32 T () S
+(/* contexte general */) c n
+() p n
+( printf \(") S
+(tente \(%s,%s\) ...) str
+(", Pc_cleA, Pc_cleB\);) p n
+( ) S
+(if) K
+( \(F_JS_small_theta \(Pt_remA, Pt_remB\)\)) p n
+( {) N
+( printf \(") S
+(===> ok) str
+("\);) p n
+( Ns_JS_jointure_cles += set \(tuple \(cleA: Pc_cleA, cleB:Pc_cleB\)\);) N
+( }) N
+( printf \(") S
+(\\n) str
+("\);) p n
+( ) S
+(return) K
+(;) p n
+(};) N
+(;) N
+() N
+(program) K
+( private) p n
+(P_JS_Lance_jointure \(Pc_quad_linA:string, Pc_quad_linB:string\)) N
+( ) S
+(in) K
+( ) p
+(application ) K
+(Index_lineaire;) L n
+( ) p
+(transaction body ) K
+(P_JS_Lance_jointure \(Pc_quad_linA:string,) L n
+() S 8 T () S 16 T () S 24 T () S 32 T () S 40 T ( Pc_quad_linB:string\)) N
+( ) S
+( in application ) K
+(Index_lineaire) L n
+( {) p n
+(#include) K
+( ") p
+(varextbis.h) str
+(") p n
+() N
+( ) S
+(o2) K
+( Tt_def_index t_def_idxA;) p n
+( ) S
+(o2) K
+( Tt_def_index t_def_idxB;) p n
+( ) S
+(o2) K
+( Tt_def_index def_idx;) p n
+() N
+( ) S
+(o2) K
+( Tt_rem_oid t_remA;) p n
+( ) S
+(o2) K
+( Tt_rem_oid t_remB;) p n
+() N
+( };) N
+() N
+(program) K
+( ) p
+(public) K n
+(P_JS_select \(Pc_noeud:string\)) p n
+( ) S
+(in) K
+( ) p
+(application ) K
+(Index_lineaire;) L n
+( ) p
+(transaction body ) K
+(P_JS_select \(Pc_noeud:string\)) L n
+( ) S
+( in application ) K
+(Index_lineaire) L n
+( {) p n
+( ) S
+(o2) K
+( set \(C_Feuille\) Tree = set \(\);) p n
+( ) S
+(o2) K
+( C_Feuille f = nil;) p n
+( ) S
+(o2) K
+( integer reso2q = 0;) p n
+( ) S
+(o2) K
+( Tt_rem_oid rem, quadrant;) p n
+( ) S
+(o2) K
+( set \(Tt_rem_oid\) Resultat = set \(\);) p n
+( ) S
+(o2) K
+( Tt_rem_oid Po_objet = Nt_rem_oid;) p n
+( ) S
+(o2) K
+( Tt_def_index Po_index, idx;) p n
+( ) S
+(for) K
+( \(idx ) p
+(in) K
+( Nt_indexes.Al_def_index\)) p n
+() S 8 T ( ) S
+(if) K
+( \(idx.Ao_index == No_quad_lin01\)) p n
+() S 8 T ( Po_index = idx;) N
+() N
+(/* Recuperation des feuilles de l'arbre */) c n
+( reso2q = ) p
+(o2query) K
+( \(Tree, ") p
+(select f from f in $1) str
+(", Po_index.Ao_index\);) p n
+( ) S
+(if) K
+( \(reso2q\)) p n
+() S 8 T ( {) N
+() S 8 T ( printf \(") S
+(Index vide ou inexistant ...!!!) str
+("\);) p n
+(/* return set\(\);*/) c n
+() p 8 T ( ) S
+(abort) K
+(;) p n
+() S 8 T ( }) N
+() N
+( ) S
+(for) K
+( \(f ) p
+(in) K
+( Tree\)) p n
+( ) S
+(if) K
+( \(F_JS_small_theta \(Po_objet, rem\)) p n
+( Resultat += set \(rem\);) N
+( Ns_rem_oid = Resultat;) N
+(/*return Resultat;*/) c n
+( };) p n
+() N
+(commit) K
+(;) p n
+(essai2.o2c) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(quit) K
+(;) p n
+(essai2.o2c) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/ex1.ps b/tests/ps-ref/ex1.ps
new file mode 100644
index 0000000..962b4b2
--- /dev/null
+++ b/tests/ps-ref/ex1.ps
@@ -0,0 +1,120 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(-- file: .../asn1specs/ex1.asn1) c n
+(--) N
+(-- This is an example ASN.1 module used in the documentation) N
+(--) N
+(-- MS 92) N
+(--) N
+(-- Initial checkin.) N
+(--) N
+(-- Revision 1.2 1997/02/16 20:25:22 rj) N
+(-- check-in of a few cosmetic changes) N
+(--) N
+(-- Revision 1.1 1994/10/08 05:41:32 rj) N
+(-- initial check-in.) N
+(--) N
+() p n
+(EX1 ) S
+(DEFINITIONS) K
+( ::=) p n
+(BEGIN) K n
+() p n
+(anOidVal ) S
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( ::= { ) p
+(joint-iso-ccitt) k
+( 40 foobar\(29\) }) p n
+(theSameOidVal ) S
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( ::= { 2 40 29 }) p n
+(anIntVal ) S
+(INTEGER) K
+( ::= 1) p n
+(aBoolVal ) S
+(BOOLEAN) K
+( ::= ) p
+(TRUE) K n
+() p n
+() N
+(NULL) K
+( ::= identifier ) p
+(END) K n
+() p n
+(T1 ::= ) S
+(SEQUENCE) K n
+({) p n
+( ) S
+(INTEGER) K
+( ) p
+(OPTIONAL) K
+(,) p n
+( ) S
+(OCTET) K
+( ) p
+(STRING) K
+( ) p
+(OPTIONAL) K
+(,) p n
+( ) S
+(ENUMERATED) K
+( { a\(0\), b\(1\), c\(2\) },) p n
+( ) S
+(SEQUENCE) K
+( ) p
+(OF) K
+( ) p
+(INTEGER) K
+(,) p n
+( ) S
+(SEQUENCE) K
+( { id ) p
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+(, value ) p
+(OCTET) K
+( ) p
+(STRING) K
+( },) p n
+( ) S
+(CHOICE) K
+( { ) p
+(INTEGER) K
+(, ) p
+(OBJECT) K
+( ) p
+(IDENTIFIER) K
+( }) p n
+( DESCRIPTION ") S
+(This is a string with a quote "" in it.) str
+(") p n
+(}) N
+() N
+(END) K n
+(ex1.asn1) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/ex_PSGETRS.ps b/tests/ps-ref/ex_PSGETRS.ps
new file mode 100644
index 0000000..aefbbe1
--- /dev/null
+++ b/tests/ps-ref/ex_PSGETRS.ps
@@ -0,0 +1,638 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(! Gilles GRASSEAU \(CNRS/IDRIS - France\) <Gilles.Grasseau@idris.fr> - Nov. 1996) c n
+() p n
+(program) K
+( ) p
+(test_psgetrs) L n
+(!-------------------------------------------------------------------) c n
+(! Description : ) N
+(! Exemple de factorisation LU puis de resolution du systeme : ) N
+(! A * x = b , ou A est une matrice \(5,5\). ) N
+(!) N
+(! Principe :) N
+(! Les matrice/vecteurs A, x et b sont globaux et les matrices/ ) N
+(! vecteurs dist_a, dist_x et dist_b sont respectivement les ) N
+(! matrices/vecteurs distribuees sur la grille de proc. 2x2. ) N
+(! La repartition de la matrice se fait par blocs cycliques 2x2 ) N
+(! \(2 elements par ligne et 2 elements par colonne - ) N
+(! voir Exemple de repartition d'une matrice\). ) N
+(! La repartition des vecteurs se fait par blocs cycliques 2x1 ) N
+(! \(le processeur logique \(0,0\) possede les blocs {x\(1:2\) ,x\(5\)} ) N
+(! et le processeur logique \(1,0\) possede le bloc x\(3:4\) \). ) N
+(!) N
+(! Algorithme :) N
+(! 1 - Initialisation du BLACS et autres.) N
+(! 2 - Distribution de la matrice A et du vecteur x vers les blocs ) N
+(! locaux dist_a et dist_x de chaque processeur logique.) N
+(! \(voir Distribution de matrice\) ) N
+(! On a simule la situation ou seul le processeur \(0,0\) possede ) N
+(! la matrice et les vecteurs globaux A, x et b. ) N
+(! 3 - Factorisation LU et resolution.) N
+(! 4 - Recuperation et impression des resultats par le processeur) N
+(! logique \(0,0\).) N
+(!) N
+(! Remarque :) N
+(! 1 - Le tableau de travail 'work' a ete dimensionne a la valeur) N
+(! donnee par INITBUFF pour psgetrs \( > au buffer de psgetrf\).) N
+(! 2 - La liste des pivots locaux 'dist_piv' est dimensionnee a ) N
+(! 'n_max' + 'rb_size'.) N
+(!) N
+(!-------------------------------------------------------------------) N
+( ) p
+(implicit) K
+( ) p
+(none) K n
+() p n
+( ) S
+(integer) K
+( :: pe, npes ) p
+(! Identificateur du processeur et) c n
+( ) p
+(! nombre de processeurs physiques.) c n
+() p n
+( ) S
+(integer) K
+(, ) p
+(parameter) K
+(:: nprow=2, npcol=2 ) p
+(! Grille de proc. logiques.) c n
+( ) p
+(integer) K
+( :: prow, pcol ) p
+(! Coord. de mon proc. logique) c n
+() p n
+( ) S
+(integer) K
+( :: icntxt ) p
+(! Contexte \(grille de procs\)) c n
+( ) p
+(integer) K
+(, ) p
+(dimension) K
+(\(8\) :: desc_a ) p
+(! Descripteur de la matrice.) c n
+( ) p
+(integer) K
+(, ) p
+(dimension) K
+(\(8\) :: desc_x ) p
+(! Descripteur des vecteurs.) c n
+() p n
+( ) S
+(integer) K
+(, ) p
+(parameter) K
+( :: n=5 ) p
+(! Ordre matrices/vecteurs.) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n,n\) :: a ) p
+(! Matrice globale a.) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n\) :: x ) p
+(! Vecteur resultat x\(global\)) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n\) :: b ) p
+(! Vecteur b \(global\)) c n
+() p n
+( ) S
+(integer) K
+(, ) p
+(parameter) K
+( :: n_max=3 ) p
+(! Dim. des matrices/vecteurs) c n
+( ) p
+(! locaux.) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max,n_max\):: dist_a ) p
+(! Matrice locale.) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max\) :: dist_x ) p
+(! Vecteur local.) c n
+( ) p
+(real) K
+(, ) p
+(dimension) K
+(\(n_max\) :: dist_b ) p
+(! Vecteur local.) c n
+() p n
+( ) S
+(integer) K
+(, ) p
+(parameter) K
+( :: rb_size=2, & ) p
+(! Taille des blocs lignes ) c n
+( cb_size=2 ) p
+(! et colonnes.) c n
+() p n
+( ) S
+(integer) K
+(, ) p
+(dimension) K
+(\(n_max+rb_size\):: dist_piv ) p
+(! Vecteur local des) c n
+( ) p
+(! pivots.) c n
+() p n
+(ex_PSGETRS.f90) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(integer) K
+( :: info, i, j) p n
+() N
+( ) S
+(data) K
+( a/ 0.5, 0.0, 2.3, 0.0,-2.6, & ) p
+(! Coefficients de la matrice ) c n
+( 0.0, 0.5,-1.4, 0.0,-0.7, & ) p
+(! globale A.) c n
+( 2.3,-1.4, 0.5, 0.0, 0.0, &) p n
+( 0.0, 0.0, 0.0, 1.0, 0.0, &) N
+( -2.6,-0.7, 0.0, 0.0, 0.5/ ) N
+() N
+( ) S
+(data) K
+( b/-2.1, 0.3, 1.5, 0.0,-1.5/ ) p
+(! Coefficients du vecteur global) c n
+() p n
+() N
+( ) S
+(integer) K
+(,) p
+(parameter) K
+(:: minb=rb_size, maxb=minb ) p
+(! Calcul de l'espace ) c n
+( ) p
+(integer) K
+(,) p
+(parameter) K
+(:: minp=nprow, maxd=n ) p
+(! de travail) c n
+( ) p
+(integer) K
+(,) p
+(parameter) K
+(:: wsize=2*maxb*\(\(\(maxd/minb\)/minp\)*maxb+maxb\)*8) p n
+( ) S
+(real) K
+(, ) p
+(dimension) K
+(\(wsize/8\) :: work) p n
+() N
+(! Initialisation BLACS et autres.) c n
+(!--------------------------------------) N
+( ) p
+(call) K
+( ) p
+(initbuff) l
+(\(work,wsize\) ) p
+(! Init. des buffers internes au PBLAS) c n
+( ) p
+(call) K
+( ) p
+(blacs_pinfo) l
+(\(pe, npes\) ) p
+(! Init. mon PE, nbre de procs physiques) c n
+( ) p
+(call) K
+( ) p
+(blacs_gridinit) l
+(\(icntxt, & ) p
+(! Init. Grille de proc. logiques.) c n
+( ') p
+(C) str
+(', nprow, npcol\)) p n
+() N
+( ) S
+(call) K
+( ) p
+(blacs_gridinfo) l
+(\(icntxt, & ) p
+(! Mes coord. dans la grille ) c n
+( nprow, npcol, prow, pcol\) ) p
+(! de processeurs logiques.) c n
+() p n
+( ) S
+(call) K
+( ) p
+(descinit) l
+(\(desc_a, n, n, & ) p
+(! Init. descripteur de la ) c n
+( rb_size, cb_size, 0, 0, & ) p
+(! matrice a) c n
+( icntxt, n_max, info\)) p n
+( ) S
+(if) K
+( \(info) p
+(.lt.) K
+(0\) ) p
+(stop) K
+( ') p
+(descinit) str
+(') p n
+() N
+( ) S
+(call) K
+( ) p
+(descinit) l
+(\(desc_x, n, 1, & ) p
+(! Init. descripteur du vecteur x) c n
+( rb_size, 1, 0, 0, &) p n
+( icntxt, n_max, info\) &) N
+( ) S
+(if) K
+( \(info) p
+(.lt.) K
+(0\) ) p
+(stop) K
+( ') p
+(descinit) str
+(') p n
+() N
+(! Distribution de la matrice 'a' vers la matrice distribuee 'dist_a'.) c n
+(!--------------------------------------------------------------------) N
+( ) p
+(call) K
+( ) p
+(distribue) l
+(\(icntxt, a, n, dist_a, n_max, prow, pcol\)) p n
+() N
+(! Distribution du vecteur 'b' sur le vecteur distribue 'dist_b'.) c n
+(!------------------------------------------------------------------) N
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(.and.) K
+(\(pcol==0\)\) ) p
+(then) K n
+( dist_b\(1:2\) = b\(1:2\) ) p
+(! copie de b\(1:2\) dans proc\(0,0\)) c n
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\(icntxt,2,1, & ) p
+(! b\(3:5\) envoie au proc \(1,0\)) c n
+( b\(3\),n,1,0\) ) p n
+( dist_b\(3\) = b\(5\) ) S
+(! copie de b\(5\) dans proc \(0,0\)) c n
+( ) p
+(end) K
+( ) p
+(if) K n
+( ) p
+(if) K
+( \(\(prow==1\)) p
+(.and.) K
+(\(pcol==0\)\) ) p
+(then) K n
+( ) p
+(call) K
+( ) p
+(sgerv2d) l
+(\(icntxt, 2,1, dist_b\(1\), & ) p
+(! reception b\(3:5\) dans ) c n
+( n_max, 0, 0\) ) p
+(! dist_b\(1:2\).) c n
+( ) p
+(end) K
+( ) p
+(if) K n
+() p n
+(! Calculs) c n
+(!----------------------------------) N
+( ) p
+(call) K
+( ) p
+(PSGETRF) l
+(\(n, n, dist_a, 1, 1, desc_a, &) p n
+( dist_piv, info\)) N
+( ) S
+(if) K
+( \(info /= 0\) ) p
+(print) K
+( *,') p
+(Erreur dans la factorisation : ) str
+(',info) p n
+() N
+( ) S
+(call) K
+( ) p
+(PSGETRS) l
+(\( ') p
+(N) str
+(', n, 1, dist_a, 1, 1, desc_a, &) p n
+( dist_piv, dist_b, 1, 1, desc_x, info\)) N
+( ) S
+(if) K
+( \(info /= 0\) ) p
+(print) K
+( *,') p
+(Erreur dans la resolution : ) str
+(',info) p n
+() N
+(! Recuperation des resultats 'dist_b' -> 'x') c n
+(!----------------------------------------------) N
+( ) p
+(if) K
+( \(\(prow==1\)) p
+(.and.) K
+(\(pcol==0\)\) ) p
+(then) K n
+(ex_PSGETRS.f90) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\(icntxt,2,1,dist_b\(1\), & ) p
+(! envoie de dist_b\(1:2\) ) c n
+( n_max, 0, 0\) ) p
+(! au proc \(0,0\)) c n
+( ) p
+(end) K
+( ) p
+(if) K n
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(.and.) K
+(\(pcol==0\)\) ) p
+(then) K n
+( x\(1:2\) = dist_b\(1:2\) ) p
+(! copie de dist_b\(1:2\) dans proc\(0,0\)) c n
+( ) p
+(call) K
+( ) p
+(sgerv2d) l
+(\(icntxt,2,1, & ) p
+(! reception dist_b\(1:2\) dans x\(3:4\)) c n
+( x\(3\), n, 1, 0\)) p n
+( x\(5\) = dist_b\(3\) ) S
+(! copie de dist_b\(3\) dans proc \(0,0\)) c n
+( ) p
+(end) K
+( ) p
+(if) K n
+() p n
+(! Impression des resultats) c n
+(!-----------------------------) N
+( ) p
+(if) K
+( \(\(prow==0\)) p
+(.and.) K
+(\(pcol==0\)\) ) p
+(then) K n
+( ) p
+(write) K
+(\(6,*\) ') p
+( resultats :) str
+(') p n
+( ) S
+(write) K
+(\(6,') p
+(\(1x,5F5.1\)) str
+('\) \(x\(j\),j=1,n\)) p n
+( ) S
+(end) K
+( ) p
+(if) K n
+() p n
+(end) K
+( program) p n
+() N
+(!--------------------------------------------------------------------) c n
+(! Distribution de la matrice 'x' vers la matrice distribuee 'dist_x'.) N
+(!--------------------------------------------------------------------) N
+(subroutine) K
+( ) p
+(distribue) L
+(\( icntxt, x, n, dist_x, n_max, prow, pcol\)) p n
+( ) S
+(implicit) K
+( ) p
+(none) K n
+( ) p
+(integer) K
+( :: icntxt ) p
+(! Contexte \(grille de procs\)) c n
+( ) p
+(integer) K
+( :: n ) p
+(! Ordre de la matrice X) c n
+( ) p
+(integer) K
+( :: n_max ) p
+(! Ordre de la matrice locale.) c n
+( ) p
+(real) K
+(,) p
+(dimension) K
+(\(n,n\):: x ) p
+(! Matrice globale X.) c n
+( ) p
+(real) K
+(,) p
+(dimension) K
+(\(n_max,n_max\):: dist_x ) p
+(! Matrice locale.) c n
+( ) p
+(integer) K
+( :: prow, pcol ) p
+(! Coord. de mon proc. logique) c n
+() p n
+( ) S
+(if) K
+( \(\(prow == 0\) ) p
+(.and.) K
+( \(pcol == 0\)\) ) p
+(then) K
+( ) p
+(! Emission par le ) c n
+( ) p
+(! processeur \(0,0\)) c n
+( ) p
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(1,3\), n, 0, 1\)) p n
+( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(3,1\), n, 1, 0\)) p n
+( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,2, x\(3,3\), n, 1, 1\)) p n
+( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 2,1, x\(3,5\), n, 1, 0\)) p n
+( ) S
+(call) K
+( ) p
+(sgesd2d) l
+(\( icntxt, 1,2, x\(5,3\), n, 0, 1\)) p n
+( ) S
+(end) K
+( ) p
+(if) K n
+() p n
+( ) S
+(if) K
+( \(\(prow == 0\) ) p
+(.and.) K
+( \(pcol == 0\)\) ) p
+(then) K
+( ) p
+(! Copie des blocs ) c n
+( dist_x\(1:2,1:2\) = x\(1:2,1:2\) ) p
+(! appartenant au proc\(0,0\)) c n
+( dist_x\(1:2,3\) = x\(1:2,5\)) p n
+( dist_x\(3,1:2\) = x\(5,1:2\)) N
+( dist_x\(3,3\) = x\(5,5\)) N
+( ) S
+(end) K
+( ) p
+(if) K n
+( ) p
+(! Reception par les ) c n
+( ) p
+(if) K
+( \(\(prow == 0\) ) p
+(.and.) K
+( \(pcol == 1\)\) ) p
+(then) K
+( ) p
+(! autres processeurs.) c n
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+( ) S
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 1,2, dist_x\(3,1\), n_max, 0, 0\)) p n
+( ) S
+(end) K
+( ) p
+(if) K n
+( ) p
+(if) K
+( \(\(prow == 1\) ) p
+(.and.) K
+( \(pcol == 0\)\) ) p
+(then) K n
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+( ) S
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,1, dist_x\(1,3\), n_max, 0, 0\)) p n
+( ) S
+(end) K
+( ) p
+(if) K n
+( ) p
+(if) K
+( \(\(prow == 1\) ) p
+(.and.) K
+( \(pcol == 1\)\) ) p
+(then) K n
+( ) p
+(call) K
+( ) p
+(SGERV2D) l
+(\( icntxt, 2,2, dist_x\(1,1\), n_max, 0, 0\)) p n
+( ) S
+(end) K
+( ) p
+(if) K n
+() p n
+(end) K
+( ) p
+(subroutine) K
+( ) p
+(distribue) L n
+(ex_PSGETRS.f90) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/formfeed.ps b/tests/ps-ref/formfeed.ps
new file mode 100644
index 0000000..9440d63
--- /dev/null
+++ b/tests/ps-ref/formfeed.ps
@@ -0,0 +1,153 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(1) p n
+() N
+(formfeed.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(2) p n
+() N
+(formfeed.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+(formfeed.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) p n
+(formfeed.txt) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+(formfeed.txt) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(6) p n
+(formfeed.txt) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(7) p n
+(formfeed.txt) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/ftp2.ps b/tests/ps-ref/ftp2.ps
new file mode 100644
index 0000000..9b53a52
--- /dev/null
+++ b/tests/ps-ref/ftp2.ps
@@ -0,0 +1,1080 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(/* ) c n
+( * File Transfer Protocol ) N
+( * ) N
+( * Promela \(Protocol Meta Language\) ) N
+( * ) N
+( * J-Ph Cottin 12/96 \(inspired by Gerard J. Holzmann\) ) N
+( */) S
+( ) p n
+( ) N
+( ) N
+(/* ) c n
+( * Global Definitions ) N
+( */) S
+( ) p n
+( ) N
+(#define) K
+( LOSS 0 ) p
+(/* message loss */) c
+( ) p n
+(#define) K
+( DUPS 0 ) p
+(/* duplicate msgs */) c
+( ) p n
+(#define) K
+( QSZ 2 ) p
+(/* queue size */) c
+( ) p n
+( ) N
+(mtype) K
+( = { ) p n
+( red, white, blue, ) N
+( abort, ) S
+(accept) K
+(, ack, sync_ack, close, connect, ) p n
+( create, data, eof, open, reject, sync, transfer, ) N
+( FATAL, NON_FATAL, COMPLETE ) N
+( } ) N
+( ) N
+( ) N
+(/*chan use_to_pres[2] = [QSZ] of {byte}; ) c n
+(chan pres_to_use[2] = [QSZ] of {byte}; ) N
+(chan pres_to_ses[2] = [QSZ] of {byte}; ) N
+( ) N
+(chan ses_to_pres[2] = [QSZ] of {byte,byte}; ) N
+(chan ses_to_flow[2] = [QSZ] of {byte,byte}; ) N
+(chan flow_to_ses[2] = [QSZ] of {byte,byte}; ) N
+(chan dll_to_flow[2] = [QSZ] of {byte,byte}; ) N
+(chan flow_to_dll[2] = [QSZ] of {byte,byte}; ) N
+( ) N
+(chan ses_to_fsrv[2] = [QSZ] of {byte}; ) N
+(chan fsrv_to_ses[2] = [QSZ] of {byte}; */) N
+( ) p n
+(chan) k
+( use_to_pres[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+(chan) k
+( pres_to_use[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+(chan) k
+( pres_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+( ) N
+(chan) k
+( ses_to_pres[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+(chan) k
+( ses_to_flow[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+(chan) k
+( flow_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+(chan) k
+( dll_to_flow[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+(chan) k
+( flow_to_dll[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(,) p
+(byte) k
+(}; ) p n
+( ) N
+(chan) k
+( ses_to_fsrv[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+(chan) k
+( fsrv_to_ses[2] = [QSZ] ) p
+(of) K
+( {) p
+(mtype) K
+(}; ) p n
+( ) N
+(/* ) c n
+( * User Layer Validation Model ) N
+( */) S
+( ) p n
+( ) N
+(proctype) K
+( userprc \( ) p
+(bit) k
+( n\) ) p n
+({ ) N
+( use_to_pres[n]!transfer; ) N
+( ) S
+(if) K
+( ) p n
+( :: pres_to_use[n]?) S
+(accept) K
+( -> ) p
+(goto) K
+( Done ) p n
+( :: pres_to_use[n]?reject -> ) S
+(goto) K
+( Done ) p n
+( :: use_to_pres[n]!abort -> ) S
+(goto) K
+( Aborted ) p n
+( ) S
+(fi) K
+(; ) p n
+(Aborted: ) N
+( ) S
+(if) K
+( ) p n
+( :: pres_to_use[n]?) S
+(accept) K
+( -> ) p
+(goto) K
+( Done ) p n
+(ftp2.pml) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( :: pres_to_use[n]?reject -> ) p
+(goto) K
+( Done ) p n
+( ) S
+(fi) K
+(; ) p n
+(Done: ) N
+( ) S
+(skip) K
+( ) p n
+( } ) N
+( ) N
+( ) N
+(/* ) c n
+( * Presentation Layer Validation Model ) N
+( */) S
+( ) p n
+( ) N
+(proctype) K
+( present\() p
+(bit) k
+( n\) ) p n
+({ ) N
+( ) S
+(byte) k
+( status, uabort; ) p n
+( ) N
+(endIDLE: ) N
+( ) S
+(do) K
+( ) p n
+( :: use_to_pres[n]?transfer -> ) N
+( uabort = 0; ) N
+( ) S
+(break) K
+( ) p n
+( :: use_to_pres[n]?abort -> ) N
+( ) S
+(skip) K
+( ) p n
+( ) S
+(od) K
+(; ) p n
+( ) N
+(TRANSFER: ) N
+( pres_to_ses[n]!transfer; ) N
+( ) S
+(do) K
+( ) p n
+( :: use_to_pres[n]?abort -> ) N
+( ) S
+(if) K
+( ) p n
+( :: \(!uabort\) -> ) N
+( uabort = 1; ) N
+( pres_to_ses[n]!abort ) N
+( :: \(uabort\) -> ) N
+( ) S
+(assert) K
+(\(1+1!=2\) ) p n
+( ) S
+(fi) K
+( ) p n
+( :: ses_to_pres[n]?) S
+(accept) K
+(,0 -> ) p n
+( ) S
+(goto) K
+( DONE) p n
+( :: ses_to_pres[n]?reject\(status\) ->) N
+( ) S
+(if) K
+( ) p n
+( :: \(status == FATAL || uabort\) -> ) N
+( ) S
+(goto) K
+( FAIL ) p n
+( :: \(status == NON_FATAL && !uabort\) -> ) N
+( ) S
+(goto) K
+( TRANSFER ) p n
+( ) S
+(fi) K
+( ) p n
+( ) S
+(od) K
+( ;) p n
+( ) N
+(DONE: ) N
+( pres_to_use[n]!) S
+(accept) K
+(; ) p n
+( ) S
+(goto) K
+( endIDLE; ) p n
+(FAIL: ) N
+( pres_to_use[n]!reject; ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( } ) N
+( ) N
+(/* ) c n
+( * Session Layer Validation Model ) N
+( */) S
+( ) p n
+( ) N
+( ) N
+(proctype) K
+( session \() p
+(bit) k
+( n\) ) p n
+({ ) N
+( ) S
+(bit) k
+( toggle; ) p n
+( ) S
+(byte) k
+( type, status; ) p n
+( ) N
+(endIDLE: ) N
+( ) S
+(do) K
+( ) p n
+(ftp2.pml) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( :: pres_to_ses[n]?type -> ) p n
+( ) S
+(if) K
+( ) p n
+( :: \(type == transfer\) -> ) N
+( ) S
+(goto) K
+( DATA_OUT ) p n
+( :: \(type != transfer\) ) S
+(/* ignore */) c
+( ) p n
+( ) S
+(fi) K
+( ) p n
+( :: flow_to_ses[n]?type, 0 -> ) N
+( ) S
+(if) K
+( ) p n
+( :: \(type == connect\) -> ) N
+( ) S
+(goto) K
+( DATA_IN ) p n
+( :: \(type != connect\) ) S
+(/* ignore */) c
+( ) p n
+( ) S
+(fi) K
+( ) p n
+( ) S
+(od) K
+(; ) p n
+( ) N
+(DATA_IN: ) S
+(/* 1. prepare local file fsrver */) c
+( ) p n
+( ses_to_fsrv[n]!create; ) N
+( ) S
+(do) K
+( ) p n
+( :: fsrv_to_ses[n]?reject -> ) N
+( ses_to_flow[n]!reject,0; ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( :: fsrv_to_ses[n]?) S
+(accept) K
+( -> ) p n
+( ses_to_flow[n]!) S
+(accept) K
+(,0; ) p n
+( ) S
+(break) K
+( ) p n
+( ) S
+(od) K
+(; ) p n
+( ) S
+(/* 2. Receive the data, upto eof */) c
+( ) p n
+( ) S
+(do) K
+( ) p n
+( :: flow_to_ses[n]?data,0 -> ) N
+( ses_to_fsrv[n]!data ) N
+( :: flow_to_ses[n]?eof,0 -> ) N
+( ses_to_fsrv[n]!eof; ) N
+( ) S
+(break) K
+( ) p n
+( :: pres_to_ses[n]?transfer -> ) N
+( ses_to_pres[n]!reject\(NON_FATAL\) ) N
+( :: flow_to_ses[n]?close,0 -> ) S
+(/* remote user aborted */) c
+( ) p n
+( ses_to_fsrv[n]!close; ) N
+( ) S
+(break) K
+( ) p n
+( :: ) S
+(timeout) K
+( -> ) p
+(/* got disconnect */) c
+( ) p n
+( ses_to_fsrv[n]!close; ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( ) S
+(od) K
+(; ) p n
+( ) S
+(/* 3. Close the connection */) c
+( ) p n
+( ses_to_flow[n]!close,0; ) N
+( ) S
+(goto) K
+( endIDLE; ) p n
+( ) N
+(DATA_OUT: ) S
+(/* 1. prepare local file fsver */) c
+( ) p n
+( ses_to_fsrv[n]!open; ) N
+( ) S
+(if) K
+( ) p n
+( :: fsrv_to_ses[n]?reject -> ) N
+( ses_to_pres[n]!reject\(FATAL\); ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( :: fsrv_to_ses[n]?) S
+(accept) K
+( -> ) p n
+( ) S
+(skip) K
+( ) p n
+( ) S
+(fi) K
+(; ) p n
+( ) S
+(/* 2. Initialize flow control */) c
+( ) p n
+( ses_to_flow[n]!sync,toggle; ) N
+( ) S
+(do) K
+( ) p n
+( :: ) S
+(atomic) K
+( { ) p n
+( flow_to_ses[n]?sync_ack,type -> ) N
+( ) S
+(if) K
+( ) p n
+( :: \(type!= toggle\) ) N
+( :: \(type == toggle\) -> ) S
+(break) K
+( ) p n
+( ) S
+(fi) K
+( ) p n
+( } ) N
+( :: ) S
+(timeout) K
+( -> ) p n
+( ses_to_fsrv[n]!close; ) N
+( ses_to_pres[n]!reject\(FATAL\); ) N
+(ftp2.pml) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(goto) K
+( endIDLE ) p n
+(od) K
+(; ) p n
+( toggle = 1 - toggle; ) N
+( ) S
+(/* 3. Prepare remote file fsrver */) c
+( ) p n
+( ses_to_flow[n]!connect,0; ) N
+( ) S
+(if) K
+( ) p n
+( :: flow_to_ses[n]?reject,0 -> ) N
+( ses_to_fsrv[n]!close; ) N
+( ses_to_pres[n]!reject\(FATAL\); ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( :: flow_to_ses[n]?connect,0 -> ) N
+( ses_to_fsrv[n]!close; ) N
+( ses_to_pres[n]!reject\(NON_FATAL\); ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+( :: flow_to_ses[n]?) S
+(accept) K
+(,0 -> ) p n
+( ) S
+(skip) K
+( ) p n
+( :: ) S
+(timeout) K
+( -> ) p n
+( ses_to_fsrv[n]!close; ) N
+( ses_to_pres[n]!reject\(FATAL\); ) N
+( ) S
+(goto) K
+( endIDLE ) p n
+(fi) K
+(; ) p n
+( ) S
+(/* 4. Transmit the data, upto eof*/) c
+( ) p n
+(do) K
+( ) p n
+( :: fsrv_to_ses[n]?data -> ) N
+( ses_to_flow[n]!data,0 ) N
+( :: fsrv_to_ses[n]?eof -> ) N
+( ses_to_flow[n]!eof,0; ) N
+( status = COMPLETE; ) N
+( ) S
+(break) K
+( ) p n
+( :: pres_to_ses[n]?abort -> ) S
+(/* local user aborted */) c n
+( ses_to_fsrv[n]!close;) p n
+( ses_to_flow[n]!close,0;) N
+( status = FATAL;) N
+( ) S
+(break) K n
+(od) S
+(; ) p n
+( ) S
+(/* 5. Close the connexion */) c
+( ) p n
+(do) K
+( ) p n
+( :: pres_to_ses[n]?abort ) S
+(/* ignore */) c
+( ) p n
+( :: flow_to_ses[n]?close,0 -> ) N
+( ) S
+(if) K
+( ) p n
+( :: \(status == COMPLETE\) -> ) N
+( ses_to_pres[n]!) S
+(accept) K
+(,0 ) p n
+( :: \(status != COMPLETE\) -> ) N
+( ses_to_pres[n]!reject\(status\) ) N
+( ) S
+(fi) K
+(; ) p n
+( ) S
+(break) K
+( ) p n
+( :: ) S
+(timeout) K
+( -> ) p n
+( ses_to_pres[n]!reject\(FATAL\); ) N
+( ) S
+(break) K
+( ) p n
+( ) S
+(od) K
+(; ) p n
+( ) S
+(goto) K
+( endIDLE ) p n
+( ) N
+(} ) N
+( ) N
+(/* ) c n
+( * File Server Validation Model ) N
+( */) S
+( ) p n
+( ) N
+(proctype) K
+( fserver \() p
+(bit) k
+( n\) ) p n
+({ ) N
+( end: ) N
+( ) S
+(do) K
+( ) p n
+( :: ses_to_fsrv[n]?create -> ) S
+(/* incoming */) c
+( ) p n
+( ) S
+(if) K
+( ) p n
+( :: fsrv_to_ses[n]!reject ) N
+( :: fsrv_to_ses[n]!) S
+(accept) K
+( -> ) p n
+(ftp2.pml) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(do) K
+( ) p n
+( :: ses_to_fsrv[n]?data ) N
+( :: ses_to_fsrv[n]?eof -> ) S
+(break) K
+( ) p n
+( :: ses_to_fsrv[n]?close -> ) S
+(break) K
+( ) p n
+( ) S
+(od) K
+( ) p n
+( ) S
+(fi) K
+( ) p n
+( :: ses_to_fsrv[n]?open -> ) S
+(/* outgoing */) c
+( ) p n
+( ) S
+(if) K
+( ) p n
+( :: fsrv_to_ses[n]!reject ) N
+( :: fsrv_to_ses[n]!) S
+(accept) K
+( -> ) p n
+( ) S
+(do) K
+( ) p n
+( :: fsrv_to_ses[n]!data ) N
+( :: fsrv_to_ses[n]!eof -> ) S
+(break) K
+( ) p n
+( :: ses_to_fsrv[n]?close -> ) S
+(break) K
+( ) p n
+( ) S
+(od) K
+( ) p n
+( ) S
+(fi) K
+( ) p n
+( ) S
+(od) K
+( ) p n
+(} ) N
+( ) N
+(/* ) c n
+( * Flow Control Laer Validation Model ) N
+( */) S
+( ) p n
+( ) N
+(#define) K
+( true 1 ) p n
+(#define) K
+( false 0 ) p n
+( ) N
+(#define) K
+( M 4 ) p
+(/* range sequence numbers */) c
+( ) p n
+(#define) K
+( W 2 ) p
+(/* window size : M/2 */) c
+( ) p n
+( ) N
+(proctype) K
+( fc\() p
+(bit) k
+( n\) ) p n
+({ ) N
+( ) S
+(bool) k
+( busy[M]; ) p
+(/* outstanding messages */) c
+( ) p n
+( ) S
+(byte) k
+( q; ) p
+(/* seq# oldest unacked msg */) c
+( ) p n
+( ) S
+(byte) k
+( m; ) p
+(/* seq# last msg received */) c
+( ) p n
+( ) S
+(byte) k
+( s; ) p
+(/* seq# next msg to send */) c
+( ) p n
+( ) S
+(byte) k
+( window; ) p
+(/* nr of outstanding msgs */) c
+( ) p n
+( ) S
+(byte) k
+( type; ) p
+(/* msg type */) c
+( ) p n
+( ) S
+(bit) k
+( received[M]; ) p
+(/* receiver housekeeping */) c
+( ) p n
+( ) S
+(bit) k
+( x; ) p
+(/* scratch variable */) c
+( ) p n
+( ) S
+(byte) k
+( p; ) p
+(/* seq# of last msg acked */) c
+( ) p n
+( ) S
+(byte) k
+( I_buf[M], O_buf[M]; ) p
+(/* message buffers */) c
+( ) p n
+( ) N
+( ) S
+(/* sender part */) c
+( ) p n
+( end: ) N
+( ) S
+(do) K
+( ) p n
+( :: ) S
+(atomic) K
+( { ) p n
+( \(window < W && ) S
+(len) K
+( \(ses_to_flow [n]\) > 0 ) p n
+( && ) S
+(len) K
+( \(flow_to_dll[n]\) < QSZ \) -> ) p n
+( ses_to_flow[n]?type,x; ) N
+( window = window +1; ) N
+( busy[s]= true; ) N
+( O_buf[s] = type; ) N
+( flow_to_dll[n]!type, s; ) N
+( ) S
+(if) K
+( ) p n
+( :: \(type != sync\) -> ) N
+( s = \(s+1\) %M ) N
+( :: \(type == sync\) -> ) N
+( window = 0; ) N
+( s = M; ) N
+( ) S
+(do) K
+( ) p n
+( :: \(s > 0\) -> ) N
+( s= s - 1; ) N
+( busy[s] = false ) N
+( :: \(s == 0\) -> ) S
+(break) K
+( ) p n
+( ) S
+(od) K
+( ) p n
+( ) S
+(fi) K
+( ) p n
+(ftp2.pml) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( } ) p n
+( :: ) S
+(atomic) K
+( { ) p n
+( \(window > 0 && busy[q] == false\) -> ) N
+( window = window -1; ) N
+( q = \(q+1\) %M ) N
+( } ) N
+(#if) K
+( DUPS ) p n
+( :: ) S
+(atomic) K
+( { ) p n
+( \() S
+(len) K
+(\(flow_to_dll[n]\) < QSZ ) p n
+( && window >0 && busy[q] == true\) -> ) N
+( flow_to_dll[n]! O_buf[q], q ) N
+( } ) N
+(#endif) K
+( ) p n
+( :: ) S
+(atomic) K
+( { ) p n
+( \() S
+(timeout) K
+( && ) p
+(len) K
+(\(flow_to_dll[n]\) < QSZ ) p n
+( && window >0 && busy[q] == true\) -> ) N
+( flow_to_dll[n]! O_buf[q], q ) N
+( } ) N
+(/* receiver part */) c
+( ) p n
+(#if) K
+( LOSS ) p n
+( :: dll_to_flow[n]?type,m ) S
+(/* lose any message */) c
+( ) p n
+(#endif) K
+( ) p n
+( :: dll_to_flow[n]?type,m -> ) N
+( ) S
+(if) K
+( ) p n
+( :: ) S
+(atomic) K
+({ ) p n
+( \(type == ack\) -> ) N
+( busy[m] = false ) N
+( } ) N
+( :: ) S
+(atomic) K
+({ ) p n
+( \(type == sync\) -> ) N
+( m = 0;) N
+( ) S
+(do) K n
+( :: \(m < M\) ->) p n
+( received[m] = 0;) N
+( m = m + 1) N
+() S 8 T () S 16 T () S 24 T ( :: \(m == M\) ->) N
+( ) S
+(break) K n
+( ) p
+(od) K
+( ) p n
+( }; ) N
+( flow_to_dll[n]!sync_ack,0) N
+() S 8 T ( :: \(type == sync_ack\) ->) N
+( flow_to_ses[n]!sync_ack,0) N
+() S 8 T ( :: \(type != ack && type != sync && type != sync_ack\) ->) N
+( ) S
+(if) K n
+( :: ) p
+(atomic) K
+( {) p n
+( \(received[m] == true\) ->) N
+( x = \(\(0 < p-m && p-m<= W\)) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( || \(0 < p-m-M && p-m-M <=W\)\)};) N
+( ) S
+(if) K
+( ) p n
+( :: \(x\) -> flow_to_dll[n]!ack,m) N
+() S 8 T () S 16 T () S 24 T ( :: \(!x\) ) S
+(/* else skip */) c
+( ) p n
+( ) S
+(fi) K n
+() p 8 T () S 16 T ( :: ) S
+(atomic) K
+( {) p n
+( \(received[m] == false\) ->) N
+( I_buf[m] = type;) N
+( received[m] = true;) N
+( received[\(m-W+M\)%M] = false) N
+() S 8 T () S 16 T () S 24 T () S 32 T (}) N
+( ) S
+(fi) K n
+( ) p
+(fi) K n
+() p n
+( :: \(received[p] == true && ) S
+(len) K
+(\(flow_to_ses[n]\)<QSZ) p n
+( && ) S
+(len) K
+(\(flow_to_dll[n]\)<QSZ \) ->) p n
+( flow_to_ses[n]!I_buf[p],0;) N
+( flow_to_dll[n]!ack,p;) N
+( p = \(p+1\) % M) N
+(ftp2.pml) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(od) K n
+( }) p n
+() N
+(/*) c n
+( * Datalink Layer Validation Model) N
+( */) N
+() p n
+(proctype) K
+( data_link \(\)) p n
+({) N
+(byte) k
+( type, seq;) p n
+() N
+(end:) N
+( ) S
+(do) K n
+() p 8 T ( :: flow_to_dll[0]?type,seq ->) N
+( ) S
+(if) K n
+( :: dll_to_flow[1]!type,seq) p n
+() S 8 T () S 16 T ( :: ) S
+(skip) K
+( ) p
+(/* lose message */) c n
+( ) p
+(fi) K n
+( :: flow_to_dll[1]?type,seq ->) p n
+( ) S
+(if) K n
+( :: dll_to_flow[0]!type,seq) p n
+() S 8 T () S 16 T ( :: ) S
+(skip) K
+( ) p
+(/* lose message */) c n
+( ) p
+(fi) K n
+( ) p
+(od) K n
+(}) p n
+() N
+(/* ) c n
+( * Main Program ) N
+( */) S
+( ) p n
+( ) N
+(/*init ) c n
+( { ) N
+( atomic { ) N
+( run userprc\(0\); run userprc\(1\); ) N
+( run present\(0\); run present\(1\); ) N
+( run session\(0\); run session\(1\); ) N
+( run fserver\(0\); run fserver\(1\); ) N
+( run fc\(0\); run fc\(1\); ) N
+( run data_link\(\) ) N
+( } ) N
+( } ) N
+( */) N
+() p n
+(init) K
+( ) p n
+( { ) N
+( ) S
+(atomic) K
+( { ) p n
+( ) S
+(run) K
+( userprc\(0\); ) p n
+( ) S
+(run) K
+( present\(0\); ) p n
+( ) S
+(run) K
+( session\(0\); ) p n
+( ) S
+(run) K
+( fserver\(0\); ) p n
+( ) S
+(run) K
+( fc\(0\); ) p n
+( ) S
+(run) K
+( data_link\(\);) p n
+( ) S
+(run) K
+( fc\(1\); ) p n
+( ) S
+(run) K
+( fserver\(1\); ) p n
+( ) S
+(run) K
+( session\(1\); ) p n
+( ) S
+(run) K
+( present\(1\); ) p n
+( ) S
+(run) K
+( userprc\(1\); ) p n
+( } ) N
+( } ) N
+(ftp2.pml) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/includeres.ps b/tests/ps-ref/includeres.ps
new file mode 100644
index 0000000..7f6a656
--- /dev/null
+++ b/tests/ps-ref/includeres.ps
@@ -0,0 +1,219 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#!/usr/local/bin/perl) c n
+(eval) K
+( ') p
+(exec perl -S $0 "$@") str
+(') p n
+() S 8 T () S
+(if) K
+( $running_under_some_shell;) p n
+() N
+(# includeres: include resources in PostScript file) c n
+(#) N
+(# Copyright \(C\) Angus J. C. Duggan 1991-1995) N
+(# See file LICENSE for details.) N
+() p n
+($prog = \($0 =~ ) S
+(s) K
+(=.*/==\);) p n
+() N
+(%extn = \(") S
+(font) str
+(", ") p
+(.pfa) str
+(", ") p
+(file) str
+(", ") p
+(.ps) str
+(", ") p
+(procset) str
+(", ") p
+(.ps) str
+(", ) p
+(# resource extns) c n
+() p 8 T ( ") S
+(pattern) str
+(", ") p
+(.pat) str
+(", ") p
+(form) str
+(", ") p
+(.frm) str
+(", ") p
+(encoding) str
+(", ") p
+(.enc) str
+("\);) p n
+(%type = \(") S
+(%%BeginFile:) str
+(", ") p
+(file) str
+(", ") p
+(%%BeginProcSet:) str
+(", ") p
+(procset) str
+(",) p n
+() S 8 T ( ") S
+(%%BeginFont:) str
+(", ") p
+(font) str
+("\); ) p
+(# resource types) c n
+() p n
+(=head1 NAME) C n
+() N
+( foo - script which blah ) N
+() N
+(=cut) N
+() p n
+() N
+(sub) K
+( ) p
+(filename) L
+( {) p 16 T () S 24 T () S 32 T () S
+(# make filename for resource in @_) c n
+( ) p
+(local) K
+(\($name\);) p n
+( ) S
+(foreach) K
+( \(@_\) {) p 24 T () S 32 T () S
+(# sanitise name) c n
+( ) p
+(s) K
+(/[!\(\)\\$\\#*&\\\\\\|\\`\\'\\"\\~\\{\\}\\[\\]\\<\\>\\?]//g;) p n
+( $name .= $_;) N
+( }) N
+( $name =~ ) S
+(s) K
+(@.*/@@;) p 24 T () S 32 T () S
+(# drop directories) c n
+( ) p
+(die) K
+( ") p
+(Filename not found for resource ) str
+(", ) p
+(join) K
+(\(") p
+( ) str
+(", @_\), ") p
+(\\n) str
+(") p n
+( ) S
+(if) K
+( $name =~ /^$/;) p n
+( $name;) N
+(}) N
+() N
+(while) K
+( \(<>\) {) p n
+( ) S
+(if) K
+( \(/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/\) {) p n
+( ) S
+(local) K
+(\($comment, @res\) = ) p
+(split) K
+(\(/\\s+/\);) p n
+( ) S
+(local) K
+(\($type\) = ) p
+(defined) K
+(\($type{$comment}\) ? $type{$comment} : ) p
+(shift) K
+(\(@res\);) p n
+( ) S
+(local) K
+(\($name\) = ) p
+(&filename) l
+(\(@res\);) p n
+( ) S
+(local) K
+(\($inc\) = ") p
+(/inf/soft/infthes/demaille/include/psutils) str
+("; ) p
+(# system include directory) c n
+( ) p
+(if) K
+( \() p
+(open) K
+(\(RES, $name\) || ) p
+(open) K
+(\(RES, ") p
+($name$extn{$type}) str
+("\) ||) p n
+() S 8 T ( ) S
+(open) K
+(\(RES, ") p
+($inc/$name) str
+("\) || ) p
+(open) K
+(\(RES, ") p
+($inc/$name$extn{$type}) str
+("\)\) {) p n
+() S 8 T ( ) S
+(while) K
+( \(<RES>\) {) p n
+() S 8 T ( ) S
+(print) K
+( $_;) p n
+() S 8 T ( }) N
+() S 8 T ( ) S
+(close) K
+(\(RES\);) p n
+( } ) S
+(else) K
+( {) p n
+() S 8 T ( ) S
+(print) K
+( ") p
+(%%IncludeResource: ) str
+(", ) p
+(join) K
+(\(") p
+( ) str
+(", $type, @res\), ") p
+(\\n) str
+(";) p n
+() S 8 T ( ) S
+(print) K
+( STDERR ") p
+(Resource $name not found\\n) str
+(";) p n
+( }) N
+( } ) S
+(else) K
+( {) p n
+( ) S
+(print) K
+( $_;) p n
+( }) N
+(}) N
+() N
+(=head1 SEE ALSO) C n
+() N
+(blah blah. This is pod documentation.) N
+(blah blah) N
+(includeres) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/mofibida.ps b/tests/ps-ref/mofibida.ps
new file mode 100644
index 0000000..9de1678
--- /dev/null
+++ b/tests/ps-ref/mofibida.ps
@@ -0,0 +1,166 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#!/usr/pd/bin/runhugs) C n
+({- A sample Haskell file -}) c n
+(module) K
+( Test) p n
+(where) K n
+(import) S
+( ) p
+(qualified) K
+( Monad) p n
+(import) K
+( Prelude ) p
+(hiding) K
+( \(zip3\)) p n
+() N
+({-#specialise qsort :: [String]->[String] #-}) C
+( ) p
+(-- a pragma) c n
+() p n
+(-- Quicksort) c n
+(qsort :: Ord a => [a] -> [a] -- type annotation) C n
+(qsort ) p
+([]) K
+( = ) p
+([]) K n
+(qsort \(x) p
+(:) K
+(xs\) = qsort elts_lt_x ++ ) p
+([) K
+(x) p
+(]) K
+( ++ qsort elts_greq_x) p n
+( ) S
+(where) K n
+( elts_lt_x = ) p
+([) K
+(y | y <- xs, y < x) p
+(]) K n
+( elts_greq_x = ) p
+([) K
+(y | y <- xs, y >= x) p
+(]) K n
+() p n
+(-- Fibbonacci sequence) c n
+(fib = 1 ) p
+(:) K
+( 1 ) p
+(:) K
+( ) p
+([) K
+( a+b | \(a,b\) <- zip fib \(tail fib\) ) p
+(]) K n
+() p n
+(-- Binary tree) c n
+(data) K
+( Tree a = Branch \(Tree a\) \(Tree a\) | Leaf a) p n
+() N
+(-- State monad from "http://haskell.org/tutorial/monads.html") c n
+(-- note that ">>=" should not be prited as ">\\geq") N
+(data) K
+( S = Tree String) p n
+(data) K
+( SM a = SM \(S ) p
+(->) K
+( \(a,S\)\) ) p
+(-- The monadic type) c n
+(instance) K
+( Monad SM ) p
+(where) K n
+( ) p
+(-- defines state propagation) c n
+( SM c1 >>= fc2 = SM \(\\s0 ) p
+(->) K
+( ) p
+(let) K
+( \(r,s1\) = c1 s0) p n
+( SM c2 = fc2 r ) S
+(in) K n
+( c2 s1\)) p n
+( return k = SM \(\\s ) S
+(->) K
+( \(k,s\)\)) p n
+() N
+(leap = \\n ) S
+(->) K
+( \( \(n ) p
+(`mod`) K
+( 4 == 0\)&&\(n ) p
+(`mod`) K
+( 100 > 0\) || \(n ) p
+(`mod`) K
+( 400 == 0\)\)) p n
+() N
+(a<->b = a ++ ") S
+(<->) str
+(" ++ b ) p
+(-- <-> is a new binary operator) c n
+() p n
+(infixr) K
+( 7 <-> ) p
+(-- infix declaration can be anywhere in the module) c n
+() p n
+(-- dark corners of Haskell syntax are not pretty-printed correctly:) c n
+(if) K
+(\345' = True ) p
+(-- characters outside ASCII are allowed,) c n
+(\(<=\253\) ) p
+(::) K
+( String) p
+(->) K
+(String) p
+(->) K
+(String ) p
+(-- <=\253 is a valid operator name,) c n
+(a <=\253 b = a++") p
+(<=<<) str
+("++b) p n
+(a |-- b = a++") S
+(|--) str
+("++b ) p
+(-- operator names can even inlude double dash,) c n
+( ) p
+(-- but many compilers will confuse it with a comment) c n
+(data) K
+( Pair = String ) p
+(:::) K
+( String ) p
+(-- ::: is a valid constructor) c n
+(\(x,) p
+(hiding) K
+(,) p
+(qualified) K
+(\) = \(0,0,0\) ) p
+(-- not actually reserved words) c n
+(string_with_gaps = ") p
+(Hel\\ \\lo,\\HTwo\\) str n
+( \\rld) S
+("++) p
+([) K
+('\\33') p
+(]) K
+( ) p
+(-- the value is "Hello,\\tworld!") c n
+(mofibida.hs) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/mtvplot.ps b/tests/ps-ref/mtvplot.ps
new file mode 100644
index 0000000..86220e2
--- /dev/null
+++ b/tests/ps-ref/mtvplot.ps
@@ -0,0 +1,76 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(## usage mtvplot\(input,titles,filename\)) c n
+(##) N
+(## Outpluts graphs in MTV 1.4.1 curve2d format.) N
+(##) N
+(## input: is a matrix with the ordinate in the first column,) N
+(## each successive column is a separate curve to plot) N
+(## on the SEPARATE axes.) N
+(## titles: a list of string titles for each plot) N
+(## filename: the file to store the mtv file in) N
+() p n
+(function) K
+( mtvplot\(input,titles,filename\)) p n
+( file=fopen\(filename,") S
+(w) str
+("\);) p n
+() N
+() N
+( ) S
+(for) K
+( g=\(1:columns\(input\)-1\)) p n
+( fprintf\(file,") S
+(%s\\n) str
+(",") p
+($DATA=Curve2d) str
+("\);) p n
+( fprintf\(file,") S
+(%s %s %s\\n) str
+(",") p
+(%toplabel=\\") str
+(",titles\(g,:\),") p
+(\\") str
+("\);) p n
+( fprintf\(file,") S
+(%s\\n) str
+(",") p
+(% linetype=1) str
+("\);) p n
+( ) S
+(for) K
+( x=1:rows\(input\)) p n
+( fprintf\(file,") S
+(%f %f\\n) str
+(",input\(x,1\),input\(x,g+1\)\);) p n
+( ) S
+(endfor) K n
+( ) p
+(endfor) K n
+( fclose\(file\)) p n
+(endfunction) K n
+() p n
+( ) N
+( ) S
+(mtvplot.octave) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/mutex.ps b/tests/ps-ref/mutex.ps
new file mode 100644
index 0000000..a891b61
--- /dev/null
+++ b/tests/ps-ref/mutex.ps
@@ -0,0 +1,142 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(# Mutual exclusion -- for use with module sched) c n
+() p n
+(# A mutex has two pieces of state -- a 'locked' bit and a queue.) c n
+(# When the mutex is not locked, the queue is empty.) N
+(# Otherwise, the queue contains 0 or more \(function, argument\) pairs) N
+(# representing functions \(or methods\) waiting to acquire the lock.) N
+(# When the mutex is unlocked while the queue is not empty,) N
+(# the first queue entry is removed and its function\(argument\) pair called,) N
+(# implying it now has the lock.) N
+(#) N
+(# Of course, no multi-threading is implied -- hence the funny interface) N
+(# for lock, where a function is called once the lock is aquired.) N
+(#) N
+(class) K
+( mutex:) p n
+() S 8 T () S
+(#) c n
+() p 8 T () S
+(# Create a new mutex -- initially unlocked) c n
+() p 8 T () S
+(#) c n
+() p 8 T () S
+(def) K
+( __init__\(self\):) p n
+() S 8 T () S 16 T (self.locked = 0) N
+() S 8 T () S 16 T (self.queue = []) N
+() S 8 T () S
+(#) c n
+() p 8 T () S
+(# Test the locked bit of the mutex) c n
+() p 8 T () S
+(#) c n
+() p 8 T () S
+(def) K
+( test\(self\):) p n
+() S 8 T () S 16 T () S
+(return) K
+( self.locked) p n
+() S 8 T () S
+(#) c n
+() p 8 T () S
+(# Atomic test-and-set -- grab the lock if it is not set,) c n
+() p 8 T () S
+(# return true if it succeeded) c n
+() p 8 T () S
+(#) c n
+() p 8 T () S
+(def) K
+( testandset\(self\):) p n
+() S 8 T () S 16 T () S
+(if) K
+( ) p
+(not) K
+( self.locked:) p n
+() S 8 T () S 16 T () S 24 T (self.locked = 1) N
+() S 8 T () S 16 T () S 24 T () S
+(return) K
+( 1) p n
+() S 8 T () S 16 T () S
+(else) K
+(:) p n
+() S 8 T () S 16 T () S 24 T () S
+(return) K
+( 0) p n
+() S 8 T () S
+(#) c n
+() p 8 T () S
+(# Lock a mutex, call the function with supplied argument) c n
+() p 8 T () S
+(# when it is acquired.) c n
+() p 8 T () S
+(# If the mutex is already locked, place function and argument) c n
+() p 8 T () S
+(# in the queue.) c n
+() p 8 T () S
+(#) c n
+() p 8 T () S
+(def) K
+( lock\(self, function, argument\):) p n
+() S 8 T () S 16 T (""") S
+(Take it.) str
+(""") p n
+() S 8 T () S 16 T () S
+(if) K
+( self.testandset\(\):) p n
+() S 8 T () S 16 T () S 24 T (function\(argument\)) N
+() S 8 T () S 16 T () S
+(else) K
+(:) p n
+() S 8 T () S 16 T () S 24 T (self.queue.append\(\(function, argument\)\)) N
+() S 8 T () S
+(#) c n
+() p 8 T () S
+(# Unlock a mutex. If the queue is not empty, call the next) c n
+() p 8 T () S
+(# function with its argument.) c n
+() p 8 T () S
+(#) c n
+() p 8 T () S
+(def) K
+( unlock\(self\):) p n
+() S 8 T () S 16 T (""") S
+(Release.) str
+(""") p n
+() S 8 T () S 16 T () S
+(if) K
+( self.queue:) p n
+() S 8 T () S 16 T () S 24 T (function, argument = self.queue[0]) N
+() S 8 T () S 16 T () S 24 T () S
+(del) K
+( self.queue[0]) p n
+() S 8 T () S 16 T () S 24 T (function\(argument\)) N
+() S 8 T () S 16 T () S
+(else) K
+(:) p n
+() S 8 T () S 16 T () S 24 T (self.locked = 0) N
+() S 8 T () S
+(#) c n
+(mutex.py) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/pages-1.ps b/tests/ps-ref/pages-1.ps
new file mode 100644
index 0000000..5f5ba09
--- /dev/null
+++ b/tests/ps-ref/pages-1.ps
@@ -0,0 +1,116 @@
+%%Page: (1-2) 1
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (1) p n
+0 T () N
+(formfeed.txt) (right) (1) title
+border
+/v 1 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (2) p n
+0 T () N
+(formfeed.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6-7) 2
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(5) # (5) p n
+(formfeed.txt) (right) (2) title
+border
+/v 1 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (7) p n
+(formfeed.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5-6) 3
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (1) p n
+0 T () N
+(formfeed.txt) (right) (3) title
+border
+/v 1 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (6) p n
+(formfeed.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 4
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.198801 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (7) p n
+(formfeed.txt) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/pi.ps b/tests/ps-ref/pi.ps
new file mode 100644
index 0000000..0fa13f1
--- /dev/null
+++ b/tests/ps-ref/pi.ps
@@ -0,0 +1,149 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(/*) c n
+( This is a program to determine the distribution of digits in the) N
+( fraction part of PI. It will look at the first scale digits.) N
+() N
+( The results are left in the global variable digits.) N
+( digits[0] is the number of 0's in PI.) N
+() N
+( This program requires the math library.) N
+(*/) N
+() p n
+(define) K
+( ) p
+(pi) L
+( \(\) {) p n
+( ) S
+(auto) K
+( ix, pi, save_scale, work;) p n
+() N
+( save_scale = ) S
+(scale) K
+(;) p n
+( ) S
+(scale) K
+( += 5;) p n
+( ) S
+(print) K
+( ") p
+(\\n\\nCalculating PI to ) str
+(",) p
+(scale) K
+(,") p
+( digits. Please wait . . .) str
+(";) p n
+( pi = 4*a\(1\);) N
+( ) S
+(scale) K
+( -= 5;) p n
+( work = pi;) N
+() N
+( ) S
+(print) K
+( ") p
+(\\nCounting digits. . .) str
+(";) p n
+( ) S
+(for) K
+( \(ix = 0; ix < 10; ix++\) digits[ix] = 0;) p n
+() N
+( ) S
+(/* Extract the One's digit from pi. */) c n
+( ) p
+(scale) K
+( = 0;) p n
+( one_digit = work / 1;) N
+() N
+( ) S
+(for) K
+( \(ix = save_scale; ix > 0; ix--\) {) p n
+() N
+( ) S
+(/* Remove the One's digit and multiply by 10. */) c n
+( ) p
+(scale) K
+( = ix;) p n
+( work = \(work - one_digit\) / 1 * 10;) N
+() N
+( ) S
+(/* Extract the One's digit. */) c n
+( ) p
+(scale) K
+( = 0;) p n
+( one_digit = work / 1;) N
+() N
+( digits[one_digit] += 1;) N
+( }) N
+() N
+( ) S
+(/* Restore the scale. */) c n
+( ) p
+(scale) K
+( = save_scale;) p n
+() N
+( ) S
+(/* Report. */) c n
+( ) p
+(print) K
+( ") p
+(\\n\\n) str
+(") p n
+( ) S
+(print) K
+( ") p
+(PI to ) str
+(", ) p
+(scale) K
+(, ") p
+( digits is:\\n) str
+(", pi/1, ") p
+(\\n\\n) str
+(") p n
+( ) S
+(print) K
+( ") p
+(The frequency of the digits are:\\n) str
+(") p n
+( ) S
+(for) K
+( \(ix = 0; ix < 10; ix++\) {) p n
+( ) S
+(print) K
+( ") p
+( ) str
+(", ix, ") p
+( - ) str
+(", digits[ix], ") p
+( times\\n) str
+(") p n
+( }) N
+() N
+( ) S
+(print) K
+( ") p
+(\\n\\n) str
+(") p n
+(}) N
+(pi.b) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/polkaIDL.ps b/tests/ps-ref/polkaIDL.ps
new file mode 100644
index 0000000..8e73023
--- /dev/null
+++ b/tests/ps-ref/polkaIDL.ps
@@ -0,0 +1,366 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#ifndef) K
+( __polkaIDL_hh__) p n
+(#define) K
+( __polkaIDL_hh__) p n
+() N
+(#include) K
+( <omniORB2/CORBA.h>) p n
+() N
+(#include) K
+( <polkaTypes.hh>) p n
+(_CORBA_MODULE polka {) N
+(_CORBA_MODULE_PUBLIC) N
+() N
+(#ifndef) K
+( __polka_loader__) p n
+(#define) K
+( __polka_loader__) p n
+( ) S
+(class) K
+( loader;) p n
+( ) S
+(typedef) K
+( loader* loader_ptr;) p n
+( ) S
+(typedef) K
+( loader_ptr loaderRef;) p n
+() N
+( ) S
+(class) K
+( loader_Helper {) p n
+( ) S
+(public) K
+(:) p n
+( ) S
+(static) K
+( loader_ptr _nil\(\);) p n
+( ) S
+(static) K
+( CORBA::Boolean is_nil\(loader_ptr p\);) p n
+( ) S
+(static) K
+( ) p
+(void) k
+( release\(loader_ptr p\);) p n
+( ) S
+(static) K
+( loader_ptr unmarshalObjRef\(MemBufferedStream &s\);) p n
+( };) N
+( ) S
+(typedef) K
+( _CORBA_ObjRef_Var<loader,loader_Helper> loader_var;) p n
+() N
+(#endif) K n
+(#define) S
+( polka_loader_IntfRepoID ") p
+(IDL:polka/loader:1.0) str
+(") p n
+() N
+( ) S
+(class) K
+( _sk_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+( ) S
+(public) K
+(:) p n
+() N
+( _sk_loader\(\) {}) N
+( _sk_loader\() S
+(const) K
+( omniORB::objectKey& k\);) p n
+( ) S
+(virtual) K
+( ~_sk_loader\(\) {}) p n
+( loader_ptr _this\(\) { ) S
+(return) K
+( loader::_duplicate\() p
+(this) K
+(\); }) p n
+( ) S
+(void) k
+( _obj_is_ready\(CORBA::BOA_ptr boa\) { boa->obj_is_ready\() p
+(this) K
+(\); }) p n
+() N
+( ) S
+(protected) K
+(:) p n
+( ) S
+(virtual) K
+( ) p
+(void) k
+( *_widenFromTheMostDerivedIntf\() p
+(const) K
+( ) p
+(char) k
+( *repoId\) {) p n
+( ) S
+(return) K
+( loader::_widenFromTheMostDerivedIntf\(repoId\);) p n
+( }) N
+( ) S
+(private) K
+(:) p n
+( _sk_loader \() S
+(const) K
+( _sk_loader&\);) p n
+( _sk_loader &) S
+(operator) K
+(=\() p
+(const) K
+( _sk_loader&\);) p n
+( };) N
+() N
+( ) S
+(class) K
+( _proxy_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+( ) S
+(private) K
+(:) p n
+() N
+( _proxy_loader \() S
+(const) K
+( _proxy_loader&\);) p n
+( _proxy_loader &) S
+(operator) K
+(=\() p
+(const) K
+( _proxy_loader&\);) p n
+( };) N
+() N
+( ) S
+(class) K
+( _nil_loader : ) p
+(public) K
+( ) p
+(virtual) K
+( loader {) p n
+( ) S
+(public) K
+(:) p n
+( _nil_loader\(\) { ) S
+(this) K
+(->PR_setobj\(0\); }) p n
+( ) S
+(virtual) K
+( ~_nil_loader\(\) {}) p n
+( ) S
+(void) k
+( dump \( \){) p n
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( ) p
+(return) K
+(;) p n
+( }) N
+() N
+( polkaStatus enregistreServeur \( ) S
+(const) K
+( ) p
+(char) k
+( * name \){) p n
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( polkaStatus _result = 0;) p n
+(polkaIDL.hh) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(return) K
+( _result;) p n
+( }) N
+() N
+( polkaStatus enregistreClient \( ) S
+(const) K
+( ) p
+(char) k
+( * name, CORBA::Long & numSerie \)) p n
+({) N
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( polkaStatus _result = 0;) p n
+( ) S
+(return) K
+( _result;) p n
+( }) N
+() N
+( polkaStatus supprimeServeur \( ) S
+(const) K
+( ) p
+(char) k
+( * name \){) p n
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( polkaStatus _result = 0;) p n
+( ) S
+(return) K
+( _result;) p n
+( }) N
+() N
+( polkaStatus supprimeClient \( ) S
+(const) K
+( ) p
+(char) k
+( * name, CORBA::Long numSerie \){) p n
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( polkaStatus _result = 0;) p n
+( ) S
+(return) K
+( _result;) p n
+( }) N
+() N
+( ) S
+(void) k
+( terminaisonClient \( \){) p n
+( ) S
+(throw) K
+( CORBA::BAD_OPERATION\(0,CORBA::COMPLETED_NO\);) p n
+( ) S
+(// never reach here! Dummy return to keep some compilers happy.) c n
+( ) p
+(return) K
+(;) p n
+( }) N
+() N
+( ) S
+(protected) K
+(:) p n
+( ) S
+(virtual) K
+( ) p
+(void) k
+( *_widenFromTheMostDerivedIntf\() p
+(const) K
+( ) p
+(char) k
+( *repoId\) {) p n
+( ) S
+(return) K
+( loader::_widenFromTheMostDerivedIntf\(repoId\);) p n
+( }) N
+( };) N
+() N
+( ) S
+(class) K
+( loader_proxyObjectFactory : ) p
+(public) K
+( proxyObjectFactory {) p n
+( ) S
+(public) K
+(:) p n
+( loader_proxyObjectFactory \(\) {}) N
+( ) S
+(virtual) K
+( ~loader_proxyObjectFactory \(\) {}) p n
+( ) S
+(virtual) K
+( ) p
+(const) K
+( ) p
+(char) k
+( *irRepoId\(\) ) p
+(const) K
+(;) p n
+( ) S
+(virtual) K
+( CORBA::Object_ptr newProxyObject\(Rope *r,CORBA::Octet *key,size_t ke) p n
+(ysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release\);) N
+( ) S
+(virtual) K
+( CORBA::Boolean is_a\() p
+(const) K
+( ) p
+(char) k
+( *base_repoId\) ) p
+(const) K
+(;) p n
+( ) S
+(static) K
+( polka::loader_ptr _nil\(\) {) p n
+( ) S
+(if) K
+( \(!__nil_loader\) {) p n
+( __nil_loader = ) S
+(new) K
+( polka::_nil_loader;) p n
+( }) N
+( ) S
+(return) K
+( __nil_loader;) p n
+( }) N
+( ) S
+(private) K
+(:) p n
+( ) S
+(static) K
+( polka::loader_ptr __nil_loader;) p n
+( };) N
+(};) N
+() N
+(#endif) K
+( ) p
+(// __polkaIDL_hh__) c n
+(polkaIDL.hh) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/prolog-1.ps b/tests/ps-ref/prolog-1.ps
new file mode 100644
index 0000000..daf9315
--- /dev/null
+++ b/tests/ps-ref/prolog-1.ps
@@ -0,0 +1,610 @@
+%!PS-Adobe-3.0
+%%Title: a2ps output
+%%For: Somebody
+%%Creator: a version of a2ps
+%%CreationDate: once upon a time
+%%BoundingBox: 24 24 571 818
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%Pages: 7
+%%PageOrder: Ascend
+%%DocumentMedia: A4 595 842 0 () ()
+%%DocumentNeededResources: font Courier
+%%+ font Courier-Bold
+%%+ font Helvetica
+%%+ font Helvetica-Bold
+%%+ font Symbol
+%%+ font Times-Bold
+%%+ font Times-Roman
+%%DocumentProcessColors: Black Blue Green Red
+%%DocumentSuppliedResources: procset a2ps-color-prolog
+%%+ encoding ISO-8859-1Encoding
+%%EndComments
+/a2psdict 200 dict def
+a2psdict begin
+%%BeginProlog
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Check PostScript language level.
+/languagelevel where {
+ pop /gs_languagelevel languagelevel def
+} {
+ /gs_languagelevel 1 def
+} ifelse
+
+% EPSF import as in the Red Book
+/BeginInclude {
+ /b4_Inc_state save def % Save state for cleanup
+ /dict_count countdictstack def % Count objects on dict stack
+ /op_count count 1 sub def % Count objects on operand stack
+ userdict begin
+ 0 setgray 0 setlinecap
+ 1 setlinewidth 0 setlinejoin
+ 10 setmiterlimit [ ] 0 setdash newpath
+ gs_languagelevel 1 ne {
+ false setstrokeadjust false setoverprint
+ } if
+} bind def
+
+/EndInclude {
+ count op_count sub { pos } repeat % Clean up stacks
+ countdictstack dict_count sub { end } repeat
+ b4_Inc_state restore
+} bind def
+
+/BeginEPSF {
+ BeginInclude
+ /showpage { } def
+} bind def
+
+/EndEPSF {
+ EndInclude
+} bind def
+
+% Page prefeed
+/page_prefeed { % bool -> -
+ statusdict /prefeed known {
+ statusdict exch /prefeed exch put
+ } {
+ pop
+ } ifelse
+} bind def
+
+/deffont {
+ findfont exch scalefont def
+} bind def
+
+/reencode_font {
+ findfont reencode 2 copy definefont pop def
+} bind def
+
+% Function c-show (str => -)
+% centers text only according to x axis.
+/c-show {
+ dup stringwidth pop
+ 2 div neg 0 rmoveto
+ show
+} bind def
+
+% Function l-show (str => -)
+% prints texts so that it ends at currentpoint
+/l-show {
+ dup stringwidth pop neg
+ 0
+ rmoveto show
+} bind def
+
+% center-fit show (str w => -)
+% show centered, and scale currentfont so that the width is less than w
+/cfshow {
+ exch dup stringwidth pop
+ % If the title is too big, try to make it smaller
+ 3 2 roll 2 copy
+ gt
+ { % if, i.e. too big
+ exch div
+ currentfont exch scalefont setfont
+ } { % ifelse
+ pop pop
+ }
+ ifelse
+ c-show % center title
+} bind def
+
+% Return the y size of the current font
+% - => fontsize
+/currentfontsize {
+ currentfont /FontMatrix get 3 get 1000 mul
+} bind def
+
+% reencode the font
+% <encoding-vector> <fontdict> -> <newfontdict>
+/reencode { %def
+ dup length 5 add dict begin
+ { %forall
+ % <vector> <key> <val>
+ 1 index /FID ne
+ { def }{ pop pop } ifelse
+ } forall
+ /Encoding exch def % -
+
+ % Use the font's bounding box to determine the ascent, descent,
+ % and overall height; don't forget that these values have to be
+ % transformed using the font's matrix.
+ % We use `load' because sometimes BBox is executable, sometimes not.
+ % Since we need 4 numbers an not an array avoid BBox from being executed
+ /FontBBox load aload pop
+ FontMatrix transform /Ascent exch def pop
+ FontMatrix transform /Descent exch def pop
+ /FontHeight Ascent Descent sub def
+
+ % Get the underline position and thickness if they're defined.
+ % Use 1 if they are not defined.
+ currentdict /FontInfo 2 copy known
+ { get
+ /UnderlinePosition 2 copy % <FontInfo> /UP <FontInfo> /UP
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+
+ /UnderlineThickness 2 copy % <FontInfo> /UT <FontInfo> /UT
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+ pop % -
+ }{ pop pop
+ } ifelse
+
+ currentdict
+ end
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+
+% -------- Some routines to enlight plain b/w printings ---------
+
+% Underline
+% width --
+/dounderline {
+ currentpoint
+ gsave
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ 0 rlineto
+ stroke
+ grestore
+} bind def
+
+% Underline a string
+% string --
+/dounderlinestring {
+ stringwidth pop
+ dounderline
+} bind def
+
+/UL {
+ /ul exch store
+} bind def
+
+% Draw a box of WIDTH wrt current font
+% width --
+/dobox {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ stroke
+ grestore
+} bind def
+
+/BX {
+ /bx exch store
+} bind def
+
+% Box a string
+% string --
+/doboxstring {
+ stringwidth pop
+ dobox
+} bind def
+
+%
+% ------------- Color routines ---------------
+%
+/FG /setrgbcolor load def
+
+% Draw the background
+% width --
+/dobackground {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ bgcolor aload pop setrgbcolor
+ fill
+ grestore
+} bind def
+
+% Draw bg for a string
+% string --
+/dobackgroundstring {
+ stringwidth pop
+ dobackground
+} bind def
+
+
+/BG {
+ dup /bg exch store
+ { mark 4 1 roll ] /bgcolor exch store } if
+} bind def
+
+
+/Show {
+ bg { dup dobackgroundstring } if
+ ul { dup dounderlinestring } if
+ bx { dup doboxstring } if
+ show
+} bind def
+
+% Function T(ab), jumps to the n-th tabulation in the current line
+/T {
+ cw mul x0 add
+ bg { dup currentpoint pop sub dobackground } if
+ ul { dup currentpoint pop sub dounderline } if
+ bx { dup currentpoint pop sub dobox } if
+ y0 moveto
+} bind def
+
+% Function n: move to the next line
+/n {
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+% Function N: show and move to the next line
+/N {
+ Show
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+/S {
+ Show
+} bind def
+
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Function title: prints page header.
+% <ct> <rt> <lt> are passed as argument
+/title {
+ % 1. Draw the background
+ x v get y v get moveto
+ 0 setgray
+ gsave
+ 0 th 2 div neg rmoveto
+ th setlinewidth
+ 0.5 0.5 1 setrgbcolor
+ pw 0 rlineto stroke
+ grestore
+ % 2. Border it
+ gsave
+ 0.7 setlinewidth
+ pw 0 rlineto
+ 0 th neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+ % stk: ct rt lt
+ x v get y v get th sub 1 add moveto
+%%IncludeResource: font Helvetica
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ % 3. The left title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ fnfs 0.8 mul hm rmoveto
+ show % left title
+ grestore
+ exch
+ % stk: ct ltw rt
+ % 4. the right title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ dup
+ pw exch stringwidth pop fnfs 0.8 mul add sub
+ hm
+ rmoveto
+ show % right title
+ grestore
+ % stk: ct ltw rtw
+ % 5. the center title
+ gsave
+ pw 3 1 roll
+ % stk: ct pw ltw rtw
+ 3 copy
+ % Move to the center of the left room
+ sub add 2 div hm rmoveto
+ % What is the available space in here?
+ add sub fnfs 0.8 mul sub fnfs 0.8 mul sub
+ % stk: ct space_left
+%%IncludeResource: font Helvetica-Bold
+ fHelvetica-Bold fnfs scalefont setfont
+ 1 setgray
+ cfshow
+ grestore
+} bind def
+
+% Function border: prints virtual page border
+/border { %def
+ gsave % print four sides
+ 0 setgray
+ x v get y v get moveto
+ 0.7 setlinewidth % of the square
+ pw 0 rlineto
+ 0 ph neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+} bind def
+
+% Function water: prints a water mark in background
+/water { %def
+ gsave
+ scx scy moveto rotate
+%%IncludeResource: font Times-Bold
+ fTimes-Bold 100 scalefont setfont
+ .97 setgray
+ dup stringwidth pop 2 div neg -50 rmoveto
+ show
+ grestore
+} bind def
+
+% Function rhead: prints the right header
+/rhead { %def
+ lx ly moveto
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ l-show
+} bind def
+
+% Function footer (cf rf lf -> -)
+/footer {
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ dx dy moveto
+ show
+
+ snx sny moveto
+ l-show
+
+ fnx fny moveto
+ c-show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+%%BeginResource: procset a2ps-color-prolog 2.0 1
+
+%% Definition of the color faces.
+/p {
+ 0 0 0 FG
+ false BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/sy {
+ 0 0 0 FG
+ false BG
+ fSymbol bfs scalefont setfont
+ Show
+} bind def
+
+/k {
+ false BG
+ false UL
+ false BX
+ 0 0 0.9 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/K {
+ false BG
+ false UL
+ false BX
+ 0 0 0.8 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/c {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/C {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/l {
+ 0 0 0 FG
+ 0.8 0.8 0 true BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/L {
+ 0 0 0 FG
+ 1 1 0 true BG
+ false UL
+ false BX
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/str {
+ false BG
+ false UL
+ false BX
+ 0 0.5 0 FG
+ fTimes-Roman bfs scalefont setfont
+ Show
+} bind def
+
+/e{
+ 1 0 0 true BG
+ false UL
+ true BX
+ 1 1 1 FG
+ fHelvetica-Bold bfs scalefont setfont
+ Show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul 2 div neg 0 rmoveto
+ f# setfont
+ 0.8 0.1 0.1 FG
+ c-show
+ grestore
+} bind def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%IncludeResource: font Courier
+%%IncludeResource: font Courier-Bold
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Symbol
+%%BeginResource: encoding ISO-8859-1Encoding
+/ISO-8859-1Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section
+/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
+/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet
+/cedilla /onesuperior /ordmasculine /guillemotright /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
+%%EndResource
+% Initialize page description variables.
+/sh 842 def
+/sw 595 def
+/llx 24 def
+/urx 571 def
+/ury 818 def
+/lly 24 def
+/#copies 1 def
+/th 20.000000 def
+/fnfs 15 def
+/bfs 11.199836 def
+/cw 6.719901 def
+
+% Dictionary for ISO-8859-1 support
+/iso1dict 6 dict begin
+ /fCourier ISO-8859-1Encoding /Courier reencode_font
+ /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font
+ /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font
+ /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font
+ /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font
+ /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_font
+currentdict end def
+/bgcolor [ 0 0 0 ] def
+/bg false def
+/ul false def
+/bx false def
+% The font for line numbering
+/f# /Helvetica findfont bfs .6 mul scalefont def
+/fSymbol /Symbol findfont def
+/hm fnfs 0.25 mul def
+/pw
+ cw 81.400000 mul
+def
+/ph
+ 747.029046 th add
+def
+/pmw 0 def
+/pmh 0 def
+/v 0 def
+/x [
+ 0
+] def
+/y [
+ pmh ph add 0 mul ph add
+] def
+/scx sw 2 div def
+/scy sh 2 div def
+/snx urx def
+/sny lly 2 add def
+/dx llx def
+/dy sny def
+/fnx scx def
+/fny dy def
+/lx snx def
+/ly ury fnfs 0.8 mul sub def
+/sx 0 def
+/tab 8 def
+/x0 0 def
+/y0 0 def
+%%EndSetup
diff --git a/tests/ps-ref/prolog-4.ps b/tests/ps-ref/prolog-4.ps
new file mode 100644
index 0000000..bc783b2
--- /dev/null
+++ b/tests/ps-ref/prolog-4.ps
@@ -0,0 +1,616 @@
+%!PS-Adobe-3.0
+%%Title: a2ps output
+%%For: Somebody
+%%Creator: a version of a2ps
+%%CreationDate: once upon a time
+%%BoundingBox: 24 24 571 818
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%Pages: 2
+%%PageOrder: Ascend
+%%DocumentMedia: A4 595 842 0 () ()
+%%DocumentNeededResources: font Courier
+%%+ font Courier-Bold
+%%+ font Helvetica
+%%+ font Helvetica-Bold
+%%+ font Symbol
+%%+ font Times-Bold
+%%+ font Times-Roman
+%%DocumentProcessColors: Black Blue Green Red
+%%DocumentSuppliedResources: procset a2ps-color-prolog
+%%+ encoding ISO-8859-1Encoding
+%%EndComments
+/a2psdict 200 dict def
+a2psdict begin
+%%BeginProlog
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Check PostScript language level.
+/languagelevel where {
+ pop /gs_languagelevel languagelevel def
+} {
+ /gs_languagelevel 1 def
+} ifelse
+
+% EPSF import as in the Red Book
+/BeginInclude {
+ /b4_Inc_state save def % Save state for cleanup
+ /dict_count countdictstack def % Count objects on dict stack
+ /op_count count 1 sub def % Count objects on operand stack
+ userdict begin
+ 0 setgray 0 setlinecap
+ 1 setlinewidth 0 setlinejoin
+ 10 setmiterlimit [ ] 0 setdash newpath
+ gs_languagelevel 1 ne {
+ false setstrokeadjust false setoverprint
+ } if
+} bind def
+
+/EndInclude {
+ count op_count sub { pos } repeat % Clean up stacks
+ countdictstack dict_count sub { end } repeat
+ b4_Inc_state restore
+} bind def
+
+/BeginEPSF {
+ BeginInclude
+ /showpage { } def
+} bind def
+
+/EndEPSF {
+ EndInclude
+} bind def
+
+% Page prefeed
+/page_prefeed { % bool -> -
+ statusdict /prefeed known {
+ statusdict exch /prefeed exch put
+ } {
+ pop
+ } ifelse
+} bind def
+
+/deffont {
+ findfont exch scalefont def
+} bind def
+
+/reencode_font {
+ findfont reencode 2 copy definefont pop def
+} bind def
+
+% Function c-show (str => -)
+% centers text only according to x axis.
+/c-show {
+ dup stringwidth pop
+ 2 div neg 0 rmoveto
+ show
+} bind def
+
+% Function l-show (str => -)
+% prints texts so that it ends at currentpoint
+/l-show {
+ dup stringwidth pop neg
+ 0
+ rmoveto show
+} bind def
+
+% center-fit show (str w => -)
+% show centered, and scale currentfont so that the width is less than w
+/cfshow {
+ exch dup stringwidth pop
+ % If the title is too big, try to make it smaller
+ 3 2 roll 2 copy
+ gt
+ { % if, i.e. too big
+ exch div
+ currentfont exch scalefont setfont
+ } { % ifelse
+ pop pop
+ }
+ ifelse
+ c-show % center title
+} bind def
+
+% Return the y size of the current font
+% - => fontsize
+/currentfontsize {
+ currentfont /FontMatrix get 3 get 1000 mul
+} bind def
+
+% reencode the font
+% <encoding-vector> <fontdict> -> <newfontdict>
+/reencode { %def
+ dup length 5 add dict begin
+ { %forall
+ % <vector> <key> <val>
+ 1 index /FID ne
+ { def }{ pop pop } ifelse
+ } forall
+ /Encoding exch def % -
+
+ % Use the font's bounding box to determine the ascent, descent,
+ % and overall height; don't forget that these values have to be
+ % transformed using the font's matrix.
+ % We use `load' because sometimes BBox is executable, sometimes not.
+ % Since we need 4 numbers an not an array avoid BBox from being executed
+ /FontBBox load aload pop
+ FontMatrix transform /Ascent exch def pop
+ FontMatrix transform /Descent exch def pop
+ /FontHeight Ascent Descent sub def
+
+ % Get the underline position and thickness if they're defined.
+ % Use 1 if they are not defined.
+ currentdict /FontInfo 2 copy known
+ { get
+ /UnderlinePosition 2 copy % <FontInfo> /UP <FontInfo> /UP
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+
+ /UnderlineThickness 2 copy % <FontInfo> /UT <FontInfo> /UT
+ 2 copy known
+ { get }{ pop pop 1 } ifelse
+ 0 exch FontMatrix transform exch pop
+ def % <FontInfo>
+ pop % -
+ }{ pop pop
+ } ifelse
+
+ currentdict
+ end
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+
+% -------- Some routines to enlight plain b/w printings ---------
+
+% Underline
+% width --
+/dounderline {
+ currentpoint
+ gsave
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ 0 rlineto
+ stroke
+ grestore
+} bind def
+
+% Underline a string
+% string --
+/dounderlinestring {
+ stringwidth pop
+ dounderline
+} bind def
+
+/UL {
+ /ul exch store
+} bind def
+
+% Draw a box of WIDTH wrt current font
+% width --
+/dobox {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ stroke
+ grestore
+} bind def
+
+/BX {
+ /bx exch store
+} bind def
+
+% Box a string
+% string --
+/doboxstring {
+ stringwidth pop
+ dobox
+} bind def
+
+%
+% ------------- Color routines ---------------
+%
+/FG /setrgbcolor load def
+
+% Draw the background
+% width --
+/dobackground {
+ currentpoint
+ gsave
+ newpath
+ moveto
+ 0 currentfont /Descent get currentfontsize mul rmoveto
+ dup 0 rlineto
+ 0 currentfont /FontHeight get currentfontsize mul rlineto
+ neg 0 rlineto
+ closepath
+ bgcolor aload pop setrgbcolor
+ fill
+ grestore
+} bind def
+
+% Draw bg for a string
+% string --
+/dobackgroundstring {
+ stringwidth pop
+ dobackground
+} bind def
+
+
+/BG {
+ dup /bg exch store
+ { mark 4 1 roll ] /bgcolor exch store } if
+} bind def
+
+
+/Show {
+ bg { dup dobackgroundstring } if
+ ul { dup dounderlinestring } if
+ bx { dup doboxstring } if
+ show
+} bind def
+
+% Function T(ab), jumps to the n-th tabulation in the current line
+/T {
+ cw mul x0 add
+ bg { dup currentpoint pop sub dobackground } if
+ ul { dup currentpoint pop sub dounderline } if
+ bx { dup currentpoint pop sub dobox } if
+ y0 moveto
+} bind def
+
+% Function n: move to the next line
+/n {
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+% Function N: show and move to the next line
+/N {
+ Show
+ /y0 y0 bfs sub store
+ x0 y0 moveto
+} bind def
+
+/S {
+ Show
+} bind def
+
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Function title: prints page header.
+% <ct> <rt> <lt> are passed as argument
+/title {
+ % 1. Draw the background
+ x v get y v get moveto
+ 0 setgray
+ gsave
+ 0 th 2 div neg rmoveto
+ th setlinewidth
+ 0.5 0.5 1 setrgbcolor
+ pw 0 rlineto stroke
+ grestore
+ % 2. Border it
+ gsave
+ 0.7 setlinewidth
+ pw 0 rlineto
+ 0 th neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+ % stk: ct rt lt
+ x v get y v get th sub 1 add moveto
+%%IncludeResource: font Helvetica
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ % 3. The left title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ fnfs 0.8 mul hm rmoveto
+ show % left title
+ grestore
+ exch
+ % stk: ct ltw rt
+ % 4. the right title
+ gsave
+ dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+ dup
+ pw exch stringwidth pop fnfs 0.8 mul add sub
+ hm
+ rmoveto
+ show % right title
+ grestore
+ % stk: ct ltw rtw
+ % 5. the center title
+ gsave
+ pw 3 1 roll
+ % stk: ct pw ltw rtw
+ 3 copy
+ % Move to the center of the left room
+ sub add 2 div hm rmoveto
+ % What is the available space in here?
+ add sub fnfs 0.8 mul sub fnfs 0.8 mul sub
+ % stk: ct space_left
+%%IncludeResource: font Helvetica-Bold
+ fHelvetica-Bold fnfs scalefont setfont
+ 1 setgray
+ cfshow
+ grestore
+} bind def
+
+% Function border: prints virtual page border
+/border { %def
+ gsave % print four sides
+ 0 setgray
+ x v get y v get moveto
+ 0.7 setlinewidth % of the square
+ pw 0 rlineto
+ 0 ph neg rlineto
+ pw neg 0 rlineto
+ closepath stroke
+ grestore
+} bind def
+
+% Function water: prints a water mark in background
+/water { %def
+ gsave
+ scx scy moveto rotate
+%%IncludeResource: font Times-Bold
+ fTimes-Bold 100 scalefont setfont
+ .97 setgray
+ dup stringwidth pop 2 div neg -50 rmoveto
+ show
+ grestore
+} bind def
+
+% Function rhead: prints the right header
+/rhead { %def
+ lx ly moveto
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ l-show
+} bind def
+
+% Function footer (cf rf lf -> -)
+/footer {
+ fHelvetica fnfs 0.8 mul scalefont setfont
+ dx dy moveto
+ show
+
+ snx sny moveto
+ l-show
+
+ fnx fny moveto
+ c-show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul neg 2 div 0 rmoveto
+ f# setfont
+ c-show
+ grestore
+} bind def
+%%BeginResource: procset a2ps-color-prolog 2.0 1
+
+%% Definition of the color faces.
+/p {
+ 0 0 0 FG
+ false BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/sy {
+ 0 0 0 FG
+ false BG
+ fSymbol bfs scalefont setfont
+ Show
+} bind def
+
+/k {
+ false BG
+ false UL
+ false BX
+ 0 0 0.9 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/K {
+ false BG
+ false UL
+ false BX
+ 0 0 0.8 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/c {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/C {
+ false BG
+ false UL
+ false BX
+ 0.8 0 0 FG
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/l {
+ 0 0 0 FG
+ 0.8 0.8 0 true BG
+ false UL
+ false BX
+ fCourier bfs scalefont setfont
+ Show
+} bind def
+
+/L {
+ 0 0 0 FG
+ 1 1 0 true BG
+ false UL
+ false BX
+ fCourier-Bold bfs scalefont setfont
+ Show
+} bind def
+
+/str {
+ false BG
+ false UL
+ false BX
+ 0 0.5 0 FG
+ fTimes-Roman bfs scalefont setfont
+ Show
+} bind def
+
+/e{
+ 1 0 0 true BG
+ false UL
+ true BX
+ 1 1 1 FG
+ fHelvetica-Bold bfs scalefont setfont
+ Show
+} bind def
+
+% Function print line number (<string> # -)
+/# {
+ gsave
+ sx cw mul 2 div neg 0 rmoveto
+ f# setfont
+ 0.8 0.1 0.1 FG
+ c-show
+ grestore
+} bind def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%IncludeResource: font Courier
+%%IncludeResource: font Courier-Bold
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Symbol
+%%BeginResource: encoding ISO-8859-1Encoding
+/ISO-8859-1Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.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 /minus /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 /asciicircum /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 /asciitilde /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section
+/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
+/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet
+/cedilla /onesuperior /ordmasculine /guillemotright /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
+%%EndResource
+% Initialize page description variables.
+/sh 842 def
+/sw 595 def
+/llx 24 def
+/urx 571 def
+/ury 818 def
+/lly 24 def
+/#copies 1 def
+/th 15.000000 def
+/fnfs 11 def
+/bfs 5.477068 def
+/cw 3.286241 def
+
+% Dictionary for ISO-8859-1 support
+/iso1dict 6 dict begin
+ /fCourier ISO-8859-1Encoding /Courier reencode_font
+ /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font
+ /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font
+ /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font
+ /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font
+ /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_font
+currentdict end def
+/bgcolor [ 0 0 0 ] def
+/bg false def
+/ul false def
+/bx false def
+% The font for line numbering
+/f# /Helvetica findfont bfs .6 mul scalefont def
+/fSymbol /Symbol findfont def
+/hm fnfs 0.25 mul def
+/pw
+ cw 81.400000 mul
+def
+/ph
+ 359.843364 th add
+def
+/pmw urx llx sub pw 2 mul sub 1 div def
+/pmh ury lly sub ph 2 mul sub 24 sub 1 div def
+/v 0 def
+/x [
+ 0
+ dup pmw add pw add
+ 0
+ dup pmw add pw add
+] def
+/y [
+ pmh ph add 1 mul ph add
+ dup
+ pmh ph add 0 mul ph add
+ dup
+] def
+/scx sw 2 div def
+/scy sh 2 div def
+/snx urx def
+/sny lly 2 add def
+/dx llx def
+/dy sny def
+/fnx scx def
+/fny dy def
+/lx snx def
+/ly ury fnfs 0.8 mul sub def
+/sx 0 def
+/tab 8 def
+/x0 0 def
+/y0 0 def
+%%EndSetup
diff --git a/tests/ps-ref/prosamp.ps b/tests/ps-ref/prosamp.ps
new file mode 100644
index 0000000..c367cff
--- /dev/null
+++ b/tests/ps-ref/prosamp.ps
@@ -0,0 +1,33 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(This is an example of keyword) k n
+(This is an example of keyword strong) K n
+(This is an example of comment) c n
+(This is an example of Comment strong) C n
+(This is an example of label) l n
+(This is an example of Label strong) L n
+(This is an example of string) str n
+(This is an example of symbol) sy n
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/psmandup.ps b/tests/ps-ref/psmandup.ps
new file mode 100644
index 0000000..d7d7f2f
--- /dev/null
+++ b/tests/ps-ref/psmandup.ps
@@ -0,0 +1,659 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#! /bin/sh -e) c n
+(# -*- ksh -*-) N
+() p n
+(# psmandup --- produce a version of a PS file to print in manual Duplex.) c n
+() p n
+(# Copyright \(c\) 1998, 1999 Akim Demaille, Miguel Santana) c n
+() p n
+(# This program is free software; you can redistribute it and/or modify) c n
+(# it under the terms of the GNU General Public License as published by) N
+(# the Free Software Foundation; either version 3, or \(at your option\)) N
+(# any later version.) N
+(#) N
+(# This program is distributed in the hope that it will be useful,) N
+(# but WITHOUT ANY WARRANTY; without even the implied warranty of) N
+(# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) N
+(# GNU General Public License for more details.) N
+(#) N
+(# You should have received a copy of the GNU General Public License) N
+(# along with this program; if not, you can either send email to this) N
+(# program's maintainer or write to: The Free Software Foundation,) N
+(# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.) N
+() p n
+(# Author: Akim Demaille <Akim.Demaille@freefriends.org>) c n
+() p n
+(# Get the name of the program) c n
+(program=`echo $0 | sed ') p
+(s#.*/##g) str
+('`) p n
+() N
+(# Local vars) c n
+(address=0) p 16 T () S
+(# Where to put the manual feed feature) c n
+(back=:) p 8 T () S 16 T () S
+(# Print the back side pages.) c n
+(debug=) p n
+(file=) N
+(front=:) S 8 T () S 16 T () S
+(# Print the front side pages.) c n
+(output=-) p 16 T () S
+(# Default is stdout) c n
+(fixps=${FIXPS:-fixps}) p n
+(message=) N
+(psselect=${PSSELECT:-psselect}) N
+(psset=${PSSET:-psset}) N
+(tmpdir=`mktemp -d -t psmandup.XXXXXX` || { echo ") S
+($program: Cannot create temporary dir!) str
+(" >&) p n
+(2 ; ) S
+(exit) K
+( 1; }) p n
+() N
+(# These two must be kept in synch. They are opposed.) c n
+(verbose=echo) p n
+(quiet=:) N
+() N
+(# The version/usage strings) c n
+(version=") p
+(psmandup 2.1 \(GNU a2ps 4.13c\)) str n
+(Written by Akim Demaille.) N
+() N
+(Copyright \(c\) 1998-1999 Akim Demaille, Miguel Santana) N
+(This is free software; see the source for copying conditions. There is NO) N
+(warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.) S
+(") p n
+() N
+(usage=") S
+(\\) str n
+(Usage: $program FILE) N
+(Tries to produce a version of the PostScript FILE to print in manual) N
+(Duplex.) N
+() N
+(Options:) N
+( -h, --help display this help and exit) N
+( -v, --version display version information and exit) N
+( -q, --quiet don't print informational messages) N
+( -o, --output=FILE save result in FILE. If FILE is \\`-', send to stdout) N
+( -n, --no-fix don't call fixps to fix PS problems in FILE) N
+( -f, --front output only the front pages \(recto\) on the regular) N
+( tray) N
+(psmandup) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( -b, --back output only the back pages \(verso\) on the manual) str n
+( feed tray) N
+() N
+(Produced output is meant for PS level 2 printers which don't support) N
+(Duplex printing, but support Manual Feed. Once the first set of pages) N
+(is printed \(odd pages\), manual feed is asked: introduce the odd pages) N
+(to print the even pages on the other side.) N
+() N
+(Because there is usually a short time out for manually fed jobs, you) N
+(should really be next to the printer. If ever the time out expired,) N
+(use the option -b to send only the missing part.) N
+() N
+(Environment variables FIXPS, PSSELECT and PSSET, if defined, are used) N
+(to find the tools.) N
+() N
+(News, updates and documentation: http://www.inf.enst.fr/~demaille/a2ps/) N
+(Report bugs to <bug-a2ps@gnu.org>) S
+(") p n
+() N
+(help=") S
+(Try \\`$program --help' for more information.) str
+(") p n
+() N
+(# Parse command line arguments.) c n
+(option_without_arguments=') p
+(vhsqnDbf) str
+(') p n
+() N
+(# Push a token among the arguments that will be used to notice when) c n
+(# we ended options/arguments parsing.) N
+(arg_sep=") p
+($$--$$) str
+(") p n
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($arg_sep) str
+(") p n
+(shift) K n
+(while) S
+( ) p
+(test) K
+( ") p
+(x$1) str
+(" != ") p
+(x$arg_sep) str
+("; ) p
+(do) K n
+() p n
+( ) S
+(# Handle --option=value by splitting apart and putting back on argv.) c n
+( ) p
+(case) K
+( ") p
+($1) str
+(" ) p
+(in) K n
+( --*=*\)) p n
+( opt=`echo ") S
+($1) str
+(" | sed -e ') p
+(s/=.*//) str
+('`) p n
+( val=`echo ") S
+($1) str
+(" | sed -e ') p
+(s/[^=]*=//) str
+('`) p n
+( ) S
+(shift) K n
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($val) str
+(" ${1+") p
+($@) str
+("}) p n
+( ) S
+(shift) K n
+( ;;) p n
+() N
+( -[$option_without_arguments]?*\)) N
+( ) S
+(# Prefix $1 with x to avoid running `echo -na' for instance.) c n
+( opt=`echo ") p
+(x$1) str
+(" | sed -e ') p
+(s/x-\\\(.\\\).*/-\\1/) str
+('`) p n
+( rest=`echo ") S
+(x$1) str
+(" | sed -e ') p
+(s/x-.\\\(.*\\\)/-\\1/) str
+('`) p n
+( ) S
+(shift) K n
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($rest) str
+(" ${1+") p
+($@) str
+("}) p n
+( ) S
+(shift) K n
+( ;;) p n
+() N
+( ) S
+(# This case needs to be protected so that the case `-??*' does) c n
+( ) p
+(# not split long options without arguments) c n
+( --*\)) p n
+( ;;) N
+() N
+( ) S
+(# This is an option with argument. Split apart and put back on argv.) c n
+( -??*\)) p n
+( opt=`echo ") S
+(x$1) str
+(" | sed -e ') p
+(s/x-\\\(.\\\).*/-\\1/) str
+('`) p n
+( arg=`echo ") S
+(x$1) str
+(" | sed -e ') p
+(s/x-.\\\(.*\\\)/\\1/) str
+('`) p n
+( ) S
+(shift) K n
+( ) p
+(set) K
+( dummy ") p
+($opt) str
+(" ") p
+($arg) str
+(" ${1+") p
+($@) str
+("}) p n
+( ) S
+(shift) K n
+( ;;) p n
+( ) S
+(esac) K n
+() p n
+( ) S
+(# Now, handle the options. $1 is the option *only*. If it has an) c n
+( ) p
+(# argument, it is now necessarily in $2 etc. Remember to shift) c n
+(psmandup) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(# when fetching an argument.) c n
+( ) p
+(case) K
+( ") p
+($1) str
+(" ) p
+(in) K n
+( -v | --v*\) echo ") p
+($version) str
+("; ) p
+(exit) K
+( 0;;) p n
+( -h | --h*\) echo ") S
+($usage) str
+("; ) p
+(exit) K
+( 0;;) p n
+( -q | -s | --s* | --q*\) verbose=:; quiet=echo;;) N
+( ) S
+(# Delay debugging so that options parsing does not appear) c n
+( -D | --deb*\) debug=-D ;;) p n
+( -o | --out*\) ) S
+(shift) K
+( ; output=$1 ;;) p n
+( -b | --bac*\) front= ; back=: ;;) N
+( -f | --fro*\) front=: ; back= ;;) N
+( -\) ) S
+(# We are working with stdin ;;) c n
+( ) p
+(set) K
+( dummy ") p
+($@) str
+(" ") p
+($1) str
+(") p n
+( ) S
+(shift) K n
+( ;;) p n
+( -n | --no*\) fixps= ;;) N
+() N
+( --\) ) S
+(# What remains are not options.) c n
+( ) p
+(shift) K n
+( ) p
+(while) K
+( ) p
+(test) K
+( ") p
+(x$1) str
+(" != ") p
+(x$arg_sep) str
+("; ) p
+(do) K n
+( ) p
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($1) str
+(") p n
+( ) S
+(shift) K n
+() p 8 T () S
+(shift) K n
+( ) p
+(done) K n
+( ) p
+(break) K
+(;;) p n
+() N
+( -*\)) N
+( echo ") S
+($program: Unknown or ambiguous option \\`$1'.) str
+(" >&2) p n
+( echo ") S
+($program: Try \\`--help' for more information.) str
+(" >&2) p n
+( ) S
+(exit) K
+( 1;;) p n
+( *\) ) S
+(set) K
+( dummy ${1+") p
+($@) str
+("} ") p
+($1) str
+(") p n
+( ) S
+(shift) K n
+( ;;) p n
+( ) S
+(esac) K n
+( ) p
+(shift) K n
+(done) N
+(# Pop the token) c n
+(shift) K n
+() p n
+() N
+(# Check the number of arguments.) c n
+(case) K
+( $# ) p
+(in) K n
+( 0\) file=-;;) p n
+( 1\) file=$1;;) N
+( *\) echo ") S
+($program: too many arguments) str
+(" 1>&2) p n
+( echo ") S
+($help) str
+(" 1>&2) p n
+( ) S
+(exit) K
+( 1;;) p n
+(esac) K n
+() p n
+(if) K
+( ) p
+(test) K
+( -n ") p
+($debug) str
+("; ) p
+(then) K n
+( ) p
+(# Set -x now if debugging) c n
+( ) p
+(set) K
+( -x) p n
+(else) K n
+( ) p
+(# Temp dir. Get ready not to leave junk \(if not debugging\)) c n
+( ) p
+(trap) K
+( ") p
+(/bin/rm -rf $tmpdir) str
+(" 0 1 2 3 13 15) p n
+(fi) K n
+() p n
+(# If printing from stdin, save into a tmp file) c n
+(if) K
+( ) p
+(test) K
+( $file = ') p
+(-) str
+('; ) p
+(then) K n
+( file=$tmpdir/stdin.ps) p n
+( cat > $file) N
+(fi) K n
+() p n
+(# Fix the file beforehand, so that we can really expect to find the) c n
+(# page numbers.) N
+(if) K
+( ) p
+(test) K
+( -n ") p
+($fixps) str
+("; ) p
+(then) K n
+( $fixps $file -o $tmpdir/fixed.ps `$quiet -q`) p n
+(psmandup) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( file=$tmpdir/fixed.ps) p n
+(fi) K n
+() p n
+(# Get the number of pages of the document) c n
+(pagenum=`sed -ne ') p
+(/^%%Pages:/{) str n
+(s/%%Pages: \\\\\([0-9]*\\\\\).*$/\\\\1/p) N
+(q) N
+(}) S
+(' $file`) p n
+() N
+(# Make the string to get the front pages \(even, increasing\) if needed) c n
+(if) K
+( ) p
+(test) K
+( -n ") p
+($front) str
+("; ) p
+(then) K n
+( evens=") p
+(1) str
+(") p n
+( i=3) N
+( ) S
+(# Build the string to give to psselect) c n
+( ) p
+(while) K
+( ) p
+(test) K
+( $i -le $pagenum;) p n
+( ) S
+(do) K n
+( evens=") p
+($evens,$i) str
+(") p n
+( i=`expr $i + 2`) N
+( ) S
+(done) K n
+(fi) N
+() p n
+(# Make the string to get the back pages \(odd, decreasing\) if needed) c n
+(if) K
+( ) p
+(test) K
+( -n ") p
+($back) str
+("; ) p
+(then) K n
+( ) p
+(# If the number of pages is odd, we need to insert a blank sheet) c n
+( ) p
+(case) K
+( ") p
+($pagenum) str
+(" ) p
+(in) K n
+( *[13579]\)) p n
+( odds=") S
+(_) str
+(") p n
+( i=`expr $pagenum - 1 || ) S
+(exit) K
+( 0`) p n
+( ;;) N
+( *\) ) S
+(# Odd, and not 0, so at least >= 2) c n
+( odds=$pagenum) p n
+( i=`expr $pagenum - 2 || ) S
+(exit) K
+( 0`) p n
+( ;;) N
+( ) S
+(esac) K n
+() p n
+( ) S
+(# Make the string to get the second half \(odd, decreasing\)) c n
+( ) p
+(while) K
+( ) p
+(test) K
+( $i != 0;) p n
+( ) S
+(do) K n
+( odds=") p
+($odds,$i) str
+(") p n
+( i=`expr $i - 2 || ) S
+(exit) K
+( 0`) p n
+( ) S
+(done) K n
+(fi) N
+() p n
+(# If there are both odds and evens to print, the separator is `,') c n
+(test) K
+( -n ") p
+($odds) str
+(" && ) p
+(test) K
+( -n ") p
+($evens) str
+(" && separator=,) p n
+() N
+(# Reorder the pages) c n
+($psselect -q $evens$separator$odds $file > $tmpdir/ordered.ps) p n
+() N
+(# If needed, insert the manual feed request) c n
+(if) K
+( ) p
+(test) K
+( -n ") p
+($back) str
+("; ) p
+(then) K n
+( ) p
+(# The option of psset to ask the manual feed. If not set,) c n
+( ) p
+(# psset just does nothing.) c n
+( pssetmanfeed=-m) p n
+( ) S
+(# Compute the address, depending on front pages are printed or not.) c n
+( ) p
+(if) K
+( ) p
+(test) K
+( -n ") p
+($front) str
+("; ) p
+(then) K n
+( address=`expr ') p
+(\() str
+(' $pagenum + 1 ') p
+(\)) str
+(' / 2 + 1`) p n
+( message=") S
+(\\) str n
+(Once the first half of the file printed, insert the sheets stack into) N
+(the manual feed tray to print the second half. Be aware the time out) N
+(if usually short. If it expired, use option -b to proceed.) S
+(") p n
+( ) S
+(else) K n
+( address=0) p n
+( message=") S
+(Insert the front pages stack into the manual feed tray.) str
+(") p n
+( ) S
+(fi) K n
+(fi) N
+(psmandup) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+(# Insert the manual feed request if needed) c n
+($psset -n $pssetmanfeed -a $address -o$output $tmpdir/ordered.ps $debug) p n
+() N
+(test) K
+( -n ") p
+($message) str
+(" && $verbose ") p
+($message) str
+(" 1>&2) p n
+(exit) K
+( 0) p n
+(psmandup) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/report.ps b/tests/ps-ref/report.ps
new file mode 100644
index 0000000..e9679ff
--- /dev/null
+++ b/tests/ps-ref/report.ps
@@ -0,0 +1,616 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+() N
+(This is the automatic report about styles of a2ps, version 4.8.2) K n
+() p n
+() N
+() N
+() N
+(Style definitions) L n
+(The reader should first note that a2ps is _not_ a powerful syntactical pretty-printer: it just handles lexical structures, i.e) str n
+(., if in your language) S
+( IF IF == THEN THEN ELSE := IF ELSE ELSE := THEN ) p
+(is legal, then a2ps is not t) str n
+(he tool you need. It is for the same reason that you can't expect a2ps to highlight the function definitions in C.) N
+(In the following is described how the style sheets are defined. You can skip this section if you don't care how a2ps doe) N
+(s this, and if you don't expect to implement new styles.) N
+() p n
+(Consistancy) L n
+(There are no found problems in the styles.) str n
+() p n
+() N
+(Known languages) L n
+() p n
+( 1) S
+(\267) sy
+( ada) p n
+( 2) S
+(\267) sy
+( c) p n
+( 3) S
+(\267) sy
+( c++) p n
+( 4) S
+(\267) sy
+( caml) p n
+( 5) S
+(\267) sy
+( claire) p n
+( 6) S
+(\267) sy
+( coq-vernacular) p n
+(37) S
+(\267) sy
+( Unity) p n
+(38) S
+(\267) sy
+( VERILOG) p n
+(39) S
+(\267) sy
+( VHDL) p n
+(40) S
+(\267) sy
+( zsh) p n
+() N
+() N
+() N
+() N
+(Description of the language styles) L n
+(1) K
+( ) p
+(ada style) l n
+() p n
+(\267) sy
+( ) p
+(the abbreviation are:) str
+( adb, ads.) p n
+(\267) sy
+( ) p
+(first alphabet is:) str n
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '_'\(9) p n
+(5\), '\)'\(41\).) N
+(\267) sy
+( ) p
+(second alphabet is:) str n
+('0123456789'\(48-57\), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstu) p n
+(vwxyz'\(97-122\), '_'\(95\), '''\(39\).) N
+(\267) sy
+( ) p
+(keywords, symbols and sequences recognition is case insensitive.) str n
+(\267) sy
+( ) p
+(the keywords are:) str n
+(abort) K
+(, ) p
+(abs) K
+(, ) p
+(abstract) K
+(, ) p
+(accept) K
+(, ) p
+(access) K
+(, ) p
+(access function) K
+(, ) p
+(access procedure) K
+(, ) p
+(aliased) K
+() p n
+(, ) S
+(all) K
+(, ) p
+(and) K
+(, ) p
+(array) K
+(, ) p
+(at) K
+(, ) p
+(begin) K
+(, ) p
+(body) K
+(, ) p
+(case) K
+(, ) p
+(constant) K
+(, ) p
+(declare) K
+(, ) p
+(delay) K
+(, ) p
+(delta) K
+(, ) p
+(digit) K n
+(s) S
+(, ) p
+(do) K
+(, ) p
+(else) K
+(, ) p
+(elsif) K
+(, ) p
+(end) K
+(, ) p
+(entry) K
+(, ) p
+(exception) K
+(, ) p
+(exit) K
+(, ) p
+(for) K
+(, ) p
+(function) K
+(, ) p
+(generic) K
+(, ) p
+(goto) K
+(, ) p
+(i) K n
+(f) S
+(, ) p
+(in) K
+(, ) p
+(is) K
+(, ) p
+(limited) K
+(, ) p
+(loop) K
+(, ) p
+(mod) K
+(, ) p
+(new) K
+(, ) p
+(not) K
+(, ) p
+(null) K
+(, ) p
+(of) K
+(, ) p
+(or) K
+(, ) p
+(others) K
+(, ) p
+(out) K
+(, ) p
+(package) K
+(, ) p
+(pra) K n
+(gma) S
+(, ) p
+(private) K
+(, ) p
+(procedure) K
+(, ) p
+(protected) K
+(, ) p
+(raise) K
+(, ) p
+(range) K
+(, ) p
+(record) K
+(, ) p
+(rem) K
+(, ) p
+(renames) K
+(, ) p
+(requeue) K
+(,) p n
+( ) S
+(return) K
+(, ) p
+(reverse) K
+(, ) p
+(select) K
+(, ) p
+(separate) K
+(, ) p
+(subtype) K
+(, ) p
+(tagged) K
+(, ) p
+(task) K
+(, ) p
+(terminate) K
+(, ) p
+(then) K
+(, ) p
+(type) K
+() p n
+(, ) S
+(until) K
+(, ) p
+(use) K
+(, ) p
+(when) K
+(, ) p
+(while) K
+(, ) p
+(with) K
+(, ) p
+(xor) K
+(.) p n
+(\267) sy
+( ) p
+(the regular symbols are:) str n
+(\267) sy
+( ) p
+(the special symbols are:) str n
+(!= ) p
+(\256) sy
+( ) p
+(\271) sy
+(, == ) p
+(\256) sy
+( ) p
+(\272) sy
+(, <= ) p
+(\256) sy
+( ) p
+(\243) sy
+(, >= ) p
+(\256) sy
+( ) p
+(\263) sy
+(, => ) p
+(\256) sy
+( ) p
+(\336) sy
+(.) p n
+(\267) sy
+( ) p
+(the sequences are:) str n
+(--inside$ ) p
+(\256) sy
+( ) p
+(--inside) c
+($, "inside" ) p
+(\256) sy
+( ") p
+(inside) str
+(", 'inside' ) p
+(\256) sy
+( ') p
+(inside) str
+(', package body insi) p n
+(de is ) S
+(\256) sy
+( ) p
+(package body ) K
+(inside) L
+( is) K
+(, package inside is ) p
+(\256) sy
+( ) p
+(package ) K
+(inside) L
+( is) K
+(, package) p n
+( inside renames ) S
+(\256) sy
+( ) p
+(package ) K
+(inside) L
+( renames) K
+(, procedure inside renames ) p
+(\256) sy
+( ) p
+(procedure) K n
+( ) S
+(inside) l
+( renames) K
+(, procedure inside is ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+( is) K
+(, procedure inside \( ) p
+() sy n
+(\256) S
+( ) p
+(procedure ) K
+(inside) l
+( \(, procedure inside\( ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+(\(, procedure inside$) p n
+( ) S
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+($, procedure inside; ) p
+(\256) sy
+( ) p
+(procedure ) K
+(inside) l
+(;, function inside r) p n
+(enames ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( renames) K
+(, function inside is ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( is) K
+(, fun) p n
+(ction inside \( ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+( \(, function inside\( ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+(\(, funct) p n
+(ion inside$ ) S
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+($, function inside; ) p
+(\256) sy
+( ) p
+(function ) K
+(inside) l
+(;.) p n
+(ada style) (Style sheets of a2ps version 4.8.2) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(\267) sy
+( ) p
+(the verbatims are:) str n
+("'''".) p n
+(\267) sy
+( ) p
+(the escapes are:) str n
+("""", "\\\\", "\\'".) p n
+() N
+() N
+() N
+(25) K
+( ) p
+(PreScript style) l n
+() p n
+(\267) sy
+( This is prescript, a language of description of textual pages. It provides by ) p n
+(the use of LaTeX like commands, a way to describe the pages that this program sh) N
+(ould produce. It can be a very good choice of destination language for people wh) N
+(o want to produce text to print \(e.g. pretty-printing, automating documentation ) N
+(etc.\) but who definitely do not want to learn postscript, nor to require the use) N
+( of LaTeX.) N
+(It is also known as BifTeX \(Basic Instruction From LaTeX\), of ptf \(Poor Text For) N
+(mat\).) N
+(Symbol translation is always enabled in this mode.) N
+(\267) sy
+( ) p
+(the abbreviation are:) str
+( prescript, biftex, bif, pre, ptf.) p n
+(\267) sy
+( ) p
+(first alphabet is:) str n
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '\\'\(9) p n
+(2\), '_'\(95\).) N
+(\267) sy
+( ) p
+(second alphabet is:) str n
+('ABCDEFGHIJKLMNOPQRSTUVWXYZ'\(65-90\), 'abcdefghijklmnopqrstuvwxyz'\(97-122\), '_'\(9) p n
+(5\).) N
+(\267) sy
+( ) p
+(keywords, symbols and sequences recognition is case sensitive.) str n
+(\267) sy
+( ) p
+(there are no keywords.) str n
+(\267) sy
+( ) p
+(there are no regular symbols.) str n
+(\267) sy
+( ) p
+(the special symbols are:) str n
+(\\$ ) p
+(\256) sy
+( $, $ ) p
+(\256) sy
+( , \\_ ) p
+(\256) sy
+( _, \\% ) p
+(\256) sy
+( %, \\& ) p
+(\256) sy
+( &, \\# ) p
+(\256) sy
+( #, \\\( ) p
+(\256) sy
+( \(, \\\) ) p
+(\256) sy
+( \), \\[ ) p
+(\256) sy
+( [, \\] ) p
+() sy n
+(\256) S
+( ], \\{ ) p
+(\256) sy
+( {, \\| ) p
+(\256) sy
+( |, \\} ) p
+(\256) sy
+( }.) p n
+(\267) sy
+( ) p
+(the sequences are:) str n
+(\\\\encoding{inside} ) p
+(\256) sy
+( inside, %%prescript:skipinside%%prescript:piks$ ) p
+(\256) sy
+( , %insi) p n
+(de$ ) S
+(\256) sy
+( , \\\\item[inside] ) p
+(\256) sy
+( ) p
+(inside) l
+(, \\\\section{inside} ) p
+(\256) sy
+( ) p
+(inside) L
+(, \\\\subsection{insi) p n
+(de} ) S
+(\256) sy
+( ) p
+(inside) l
+(, \\\\subsubsection{inside} ) p
+(\256) sy
+( ) p
+(inside) l
+(, \\\\header{inside}$ ) p
+(\256) sy
+( inside, \\\\) p n
+(footer{inside}$ ) S
+(\256) sy
+( inside, \\\\textbf{inside} ) p
+(\256) sy
+( ) p
+(inside) K
+(, \\\\textit{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+() p n
+(, \\\\textbi{inside} ) S
+(\256) sy
+( ) p
+(inside) K
+(, \\\\textrm{inside} ) p
+(\256) sy
+( ) p
+(inside) str
+(, \\\\textsy{inside} ) p
+(\256) sy
+( ) p
+(inside) sy
+() p n
+(, \\\\texttt{inside} ) S
+(\256) sy
+( inside, \\\\keyword{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+(, \\\\Keyword{inside} ) p
+(\256) sy
+( ) p
+(i) K n
+(nside) S
+(, \\\\comment{inside} ) p
+(\256) sy
+( ) p
+(inside) c
+(, \\\\Comment{inside} ) p
+(\256) sy
+( ) p
+(inside) C
+(, \\\\label{inside}) p n
+( ) S
+(\256) sy
+( ) p
+(inside) l
+(, \\\\Label{inside} ) p
+(\256) sy
+( ) p
+(inside) L
+(, \\\\string{inside} ) p
+(\256) sy
+( ) p
+(inside) str
+(, \\\\magicbf{inside) p n
+(} ) S
+(\256) sy
+( ) p
+(inside) K
+(, \\\\magicit{inside} ) p
+(\256) sy
+( ) p
+(inside) k
+(, \\\\magicbi{inside} ) p
+(\256) sy
+( ) p
+(inside) K
+(, \\\\magicrm{) p n
+(inside} ) S
+(\256) sy
+( ) p
+(inside) str
+(, \\\\magicsy{inside} ) p
+(\256) sy
+( ) p
+(inside) sy
+(, \\\\magictt{inside} ) p
+(\256) sy
+( inside, \\\\verb+) p n
+(inside+ ) S
+(\256) sy
+( inside, \\\\verb!inside! ) p
+(\256) sy
+( inside, \\\\verb|inside| ) p
+(\256) sy
+( inside, \\\\verb#ins) p n
+(ide# ) S
+(\256) sy
+( inside, \\\\verb=inside= ) p
+(\256) sy
+( inside.) p n
+(\267) sy
+( ) p
+(there are no verbatims.) str n
+(\267) sy
+( ) p
+(there are no escapes.) str n
+() p n
+() N
+(PreScript style) (Style sheets of a2ps version 4.8.2) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/run-help.ps b/tests/ps-ref/run-help.ps
new file mode 100644
index 0000000..3ec4edc
--- /dev/null
+++ b/tests/ps-ref/run-help.ps
@@ -0,0 +1,55 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#! /bin/zsh) c n
+(# zsh script to peruse the help directory) N
+(#) N
+(if) K
+( [[ $1 = ") p
+(-l) str
+(" ]]; ) p
+(then) K n
+( ) p
+(if) K
+( [[ ${HELPDIR:-} != "" ]]; ) p
+(then) K n
+( echo ') p
+(Here is a list of topics for which help is available:) str
+(') p n
+( echo "") N
+( ls $HELPDIR) N
+( ) S
+(else) K n
+( echo ') p
+(There is no help available at this time) str
+(') p n
+( ) S
+(fi) K n
+(elif) S
+( [[ ${HELPDIR:-} != "" && -r $HELPDIR/$1 ]]) p n
+(then) K n
+( ${=PAGER:-more} $HELPDIR/$1) p n
+(else) K n
+( man $1) p n
+(fi) K n
+(run-help) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/s-garnam.ps b/tests/ps-ref/s-garnam.ps
new file mode 100644
index 0000000..27f45a7
--- /dev/null
+++ b/tests/ps-ref/s-garnam.ps
@@ -0,0 +1,1170 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(------------------------------------------------------------------------------) c n
+(-- --) N
+(-- GLADE COMPONENTS --) N
+(-- --) N
+(-- S Y S T E M . G A R L I C . N A M I N G --) N
+(-- --) N
+(-- B o d y --) N
+(-- --) N
+(-- --) N
+(-- Copyright \(C\) 1996,1997 Free Software Foundation, Inc. --) N
+(-- --) N
+(-- GARLIC is free software; you can redistribute it and/or modify it under --) N
+(-- terms of the GNU General Public License as published by the Free Soft- --) N
+(-- ware Foundation; either version 3, or \(at your option\) any later ver- --) N
+(-- sion. GARLIC is distributed in the hope that it will be useful, but --) N
+(-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI- --) N
+(-- LITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --) N
+(-- License for more details. You should have received a copy of the GNU --) N
+(-- General Public License distributed with GARLIC; see file COPYING. If --) N
+(-- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --) N
+(-- Boston, MA 02111-1307, USA. --) N
+(-- --) N
+(-- As a special exception, if other files instantiate generics from this --) N
+(-- unit, or you link this unit with other files to produce an executable, --) N
+(-- this unit does not by itself cause the resulting executable to be --) N
+(-- covered by the GNU General Public License. This exception does not --) N
+(-- however invalidate any other reasons why the executable file might be --) N
+(-- covered by the GNU Public License. --) N
+(-- --) N
+(-- GLADE is maintained by ACT Europe. --) N
+(-- \(email: glade-report@act-europe.fr\) --) N
+(-- --) N
+(------------------------------------------------------------------------------) N
+() p n
+(with) K
+( Ada.Exceptions;) p n
+(with) K
+( Interfaces.C; ) p
+(use) K
+( Interfaces.C;) p n
+(with) K
+( Interfaces.C.Strings; ) p
+(use) K
+( Interfaces.C.Strings;) p n
+(with) K
+( System.Garlic.Constants; ) p
+(use) K
+( System.Garlic.Constants;) p n
+(with) K
+( System.Garlic.OS_Lib; ) p
+(use) K
+( System.Garlic.OS_Lib;) p n
+(with) K
+( Unchecked_Conversion;) p n
+(with) K
+( Unchecked_Deallocation;) p n
+() N
+(package body ) K
+(System.Garlic.Naming) L
+( is) K n
+() p n
+( ) S
+(use) K
+( Thin;) p n
+() N
+( Default_Buffer_Size : ) S
+(constant) K
+( := 16384;) p n
+() N
+( ) S
+(procedure ) K
+(Free) l
+( is) K n
+( ) p
+(new) K
+( Unchecked_Deallocation \(char_array, char_array_access\);) p n
+() N
+( ) S
+(function ) K
+(Allocate) l
+( \(Size : Positive := Default_Buffer_Size\)) p n
+( ) S
+(return) K
+( char_array_access;) p n
+( ) S
+(-- Allocate a buffer.) c n
+() p n
+( ) S
+(function ) K
+(Parse_Entry) l
+( \(Host : Hostent\)) p n
+( ) S
+(return) K
+( Host_Entry;) p n
+( ) S
+(-- Parse an entry.) c n
+() p n
+( ) S
+(procedure ) K
+(Raise_Naming_Error) l n
+( \(Errno : ) p
+(in) K
+( C.Int;) p n
+( Message : ) S
+(in) K
+( String\);) p n
+( ) S
+(-- Raise the exception Naming_Error with an appropriate error message.) c n
+() p n
+( ) S
+(protected) K
+( Gethost_In_Progress ) p
+(is) K n
+( ) p
+(entry) K
+( Lock;) p n
+(s-garnam.adb) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(procedure ) K
+(Unlock) l
+(;) p n
+( ) S
+(private) K n
+( Locked : Boolean := False;) p n
+( ) S
+(end) K
+( Gethost_In_Progress;) p n
+( ) S
+(-- We have to protect this.) c n
+() p n
+( ) S
+(----------------) c n
+( ) p
+(-- Address_Of --) c n
+( ) p
+(----------------) c n
+() p n
+( ) S
+(function ) K
+(Address_Of) l
+( \(Something : String\)) p n
+( ) S
+(return) K
+( Address) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(if) K
+( Is_IP_Address \(Something\) ) p
+(then) K n
+( ) p
+(return) K
+( Value \(Something\);) p n
+( ) S
+(else) K n
+( ) p
+(return) K
+( Info_Of \(Something\) .Addresses \(1\);) p n
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(end) K
+( Address_Of;) p n
+() N
+( ) S
+(------------) c n
+( ) p
+(-- Adjust --) c n
+( ) p
+(------------) c n
+() p n
+( ) S
+(procedure ) K
+(Adjust) l
+( \(Object : ) p
+(in) K
+( ) p
+(out) K
+( Host_Entry\)) p n
+( ) S
+(is) K n
+( Aliases : String_Array ) p
+(renames) K
+( Object.Aliases;) p n
+( ) S
+(begin) K n
+( Object.Name := ) p
+(new) K
+( String'\(Object.Name.) p
+(all) K
+(\);) p n
+( ) S
+(for) K
+( I ) p
+(in) K
+( Aliases'Range ) p
+(loop) K n
+( Aliases \(I\) := ) p
+(new) K
+( String'\(Aliases \(I\) .) p
+(all) K
+(\);) p n
+( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+( ) S
+(end) K
+( Adjust;) p n
+() N
+( ) S
+(--------------) c n
+( ) p
+(-- Allocate --) c n
+( ) p
+(--------------) c n
+() p n
+( ) S
+(function ) K
+(Allocate) l n
+( \(Size : Positive := Default_Buffer_Size\)) p n
+( ) S
+(return) K
+( char_array_access) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(return) K
+( ) p
+(new) K
+( char_array \(1 .. size_t \(Size\)\);) p n
+( ) S
+(end) K
+( Allocate;) p n
+() N
+( ) S
+(-----------------) c n
+( ) p
+(-- Any_Address --) c n
+( ) p
+(-----------------) c n
+() p n
+( ) S
+(function ) K
+(Any_Address) l
+( return) K
+( Address) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(return) K
+( To_Address \(Inaddr_Any\);) p n
+( ) S
+(end) K
+( Any_Address;) p n
+() N
+( ) S
+(--------------) c n
+( ) p
+(-- Finalize --) c n
+( ) p
+(--------------) c n
+() p n
+( ) S
+(procedure ) K
+(Finalize) l
+( \(Object : ) p
+(in) K
+( ) p
+(out) K
+( Host_Entry\)) p n
+( ) S
+(is) K n
+( Aliases : String_Array ) p
+(renames) K
+( Object.Aliases;) p n
+( ) S
+(procedure ) K
+(Free) l
+( is) K n
+( ) p
+(new) K
+( Unchecked_Deallocation \(String, String_Access\);) p n
+(s-garnam.adb) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(begin) K n
+( Free \(Object.Name\);) p n
+( ) S
+(for) K
+( I ) p
+(in) K
+( Aliases'Range ) p
+(loop) K n
+( Free \(Aliases \(I\)\);) p n
+( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+( ) S
+(end) K
+( Finalize;) p n
+() N
+( ) S
+(-------------------------) c n
+( ) p
+(-- Gethost_In_Progress --) c n
+( ) p
+(-------------------------) c n
+() p n
+( ) S
+(protected) K
+( ) p
+(body) K
+( Gethost_In_Progress ) p
+(is) K n
+() p n
+( ) S
+(----------) c n
+( ) p
+(-- Lock --) c n
+( ) p
+(----------) c n
+() p n
+( ) S
+(entry) K
+( Lock ) p
+(when) K
+( ) p
+(not) K
+( Locked ) p
+(is) K n
+( ) p
+(begin) K n
+( Locked := True;) p n
+( ) S
+(end) K
+( Lock;) p n
+() N
+( ) S
+(------------) c n
+( ) p
+(-- Unlock --) c n
+( ) p
+(------------) c n
+() p n
+( ) S
+(procedure ) K
+(Unlock) l
+( is) K n
+( ) p
+(begin) K n
+( Locked := False;) p n
+( ) S
+(end) K
+( Unlock;) p n
+() N
+( ) S
+(end) K
+( Gethost_In_Progress;) p n
+() N
+( ) S
+(---------------) c n
+( ) p
+(-- Host_Name --) c n
+( ) p
+(---------------) c n
+() p n
+( ) S
+(function ) K
+(Host_Name) l
+( return) K
+( String) p n
+( ) S
+(is) K n
+( Buff : char_array_access := Allocate;) p n
+( Buffer : ) S
+(constant) K
+( chars_ptr := To_Chars_Ptr \(Buff\);) p n
+( Res : ) S
+(constant) K
+( int := C_Gethostname \(Buffer, Buff'Length\);) p n
+( ) S
+(begin) K n
+( ) p
+(if) K
+( Res = Failure ) p
+(then) K n
+( Free \(Buff\);) p n
+( Raise_Naming_Error \(C_Errno, ""\);) N
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(declare) K n
+( Result : ) p
+(constant) K
+( String := Value \(Buffer\);) p n
+( ) S
+(begin) K n
+( Free \(Buff\);) p n
+( ) S
+(return) K
+( Result;) p n
+( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+( Host_Name;) p n
+() N
+( ) S
+(-----------) c n
+( ) p
+(-- Image --) c n
+( ) p
+(-----------) c n
+() p n
+( ) S
+(function ) K
+(Image) l
+( \(Add : Address\) ) p
+(return) K
+( String) p n
+( ) S
+(is) K n
+() p n
+( ) S
+(function ) K
+(Image) l
+( \(A : Address_Component\) ) p
+(return) K
+( String;) p n
+( ) S
+(-- Return the string corresponding to its argument without) c n
+( ) p
+(-- the leading space.) c n
+() p n
+(s-garnam.adb) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(-----------) c n
+( ) p
+(-- Image --) c n
+( ) p
+(-----------) c n
+() p n
+( ) S
+(function ) K
+(Image) l
+( \(A : Address_Component\)) p n
+( ) S
+(return) K
+( String) p n
+( ) S
+(is) K n
+( Im : ) p
+(constant) K
+( String := Address_Component'Image \(A\);) p n
+( ) S
+(begin) K n
+( ) p
+(return) K
+( Im \(2 .. Im'Last\);) p n
+( ) S
+(end) K
+( Image;) p n
+() N
+( ) S
+(begin) K n
+( ) p
+(return) K
+( Image \(Add.H1\) & ") p
+(.) str
+(" & Image \(Add.H2\) & ") p
+(.) str
+(" &) p n
+( Image \(Add.H3\) & ") S
+(.) str
+(" & Image \(Add.H4\);) p n
+( ) S
+(end) K
+( Image;) p n
+() N
+( ) S
+(-------------) c n
+( ) p
+(-- Info_Of --) c n
+( ) p
+(-------------) c n
+() p n
+( ) S
+(function ) K
+(Info_Of) l
+( \(Name : String\)) p n
+( ) S
+(return) K
+( Host_Entry) p n
+( ) S
+(is) K n
+( Res : Hostent_Access;) p n
+( C_Name : chars_ptr := New_String \(Name\);) N
+( ) S
+(begin) K n
+( Gethost_In_Progress.Lock;) p n
+( Res := C_Gethostbyname \(C_Name\);) N
+( Free \(C_Name\);) N
+( ) S
+(if) K
+( Res = ) p
+(null) K
+( ) p
+(then) K n
+( Gethost_In_Progress.Unlock;) p n
+( Raise_Naming_Error \(C_Errno, Name\);) N
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(declare) K n
+( Result : ) p
+(constant) K
+( Host_Entry := Parse_Entry \(Res.) p
+(all) K
+(\);) p n
+( ) S
+(begin) K n
+( Gethost_In_Progress.Unlock;) p n
+( ) S
+(return) K
+( Result;) p n
+( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+( Info_Of;) p n
+() N
+( ) S
+(-------------) c n
+( ) p
+(-- Info_Of --) c n
+( ) p
+(-------------) c n
+() p n
+( ) S
+(function ) K
+(Info_Of) l
+( \(Addr : Address\)) p n
+( ) S
+(return) K
+( Host_Entry) p n
+( ) S
+(is) K n
+( ) p
+(function ) K
+(Convert) l
+( is) K n
+( ) p
+(new) K
+( Unchecked_Conversion \(Source => In_Addr_Access,) p n
+( Target => chars_ptr\);) N
+( Temp : ) S
+(aliased) K
+( In_Addr := To_In_Addr \(Addr\);) p n
+( C_Addr : ) S
+(constant) K
+( chars_ptr := Convert \(Temp'Unchecked_Access\);) p n
+( Res : Hostent_Access;) N
+( ) S
+(begin) K n
+( Gethost_In_Progress.Lock;) p n
+( Res := C_Gethostbyaddr \(C_Addr,) N
+( C.Int \(Temp'Size / CHAR_BIT\),) N
+( Af_Inet\);) N
+( ) S
+(if) K
+( Res = ) p
+(null) K
+( ) p
+(then) K n
+( Gethost_In_Progress.Unlock;) p n
+( Raise_Naming_Error \(C_Errno, Image \(Addr\)\);) N
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(declare) K n
+( Result : ) p
+(constant) K
+( Host_Entry := Parse_Entry \(Res.) p
+(all) K
+(\);) p n
+(s-garnam.adb) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(begin) K n
+( Gethost_In_Progress.Unlock;) p n
+( ) S
+(return) K
+( Result;) p n
+( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+( Info_Of;) p n
+() N
+( ) S
+(------------------------) c n
+( ) p
+(-- Info_Of_Name_Or_IP --) c n
+( ) p
+(------------------------) c n
+() p n
+( ) S
+(function ) K
+(Info_Of_Name_Or_IP) l
+( \(Something : String\)) p n
+( ) S
+(return) K
+( Host_Entry) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(if) K
+( Is_IP_Address \(Something\) ) p
+(then) K n
+( ) p
+(return) K
+( Info_Of \(Value \(Something\)\);) p n
+( ) S
+(else) K n
+( ) p
+(return) K
+( Info_Of \(Something\);) p n
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(end) K
+( Info_Of_Name_Or_IP;) p n
+() N
+( ) S
+(-------------------) c n
+( ) p
+(-- Is_Ip_Address --) c n
+( ) p
+(-------------------) c n
+() p n
+( ) S
+(function ) K
+(Is_IP_Address) l
+( \(Something : String\)) p n
+( ) S
+(return) K
+( Boolean) p n
+( ) S
+(is) K n
+( First : ) p
+(constant) K
+( Natural := Character'Pos \(Something \(Something'First\)\);) p n
+( ) S
+(begin) K n
+( ) p
+(return) K
+( First >= Character'Pos \(') p
+(0) str
+('\) ) p
+(and) K
+( ) p
+(then) K n
+( First <= Character'Pos \(') p
+(9) str
+('\);) p n
+( ) S
+(end) K
+( Is_IP_Address;) p n
+() N
+( ) S
+(-------------) c n
+( ) p
+(-- Name_Of --) c n
+( ) p
+(-------------) c n
+() p n
+( ) S
+(function ) K
+(Name_Of) l
+( \(Something : String\)) p n
+( ) S
+(return) K
+( String) p n
+( ) S
+(is) K n
+( Hostent : ) p
+(constant) K
+( Host_Entry := Info_Of_Name_Or_IP \(Something\);) p n
+( ) S
+(begin) K n
+( ) p
+(if) K
+( Hostent.Name = ) p
+(null) K
+( ) p
+(then) K n
+( Ada.Exceptions.Raise_Exception \(Naming_Error'Identity,) p n
+( ") S
+(No name for ) str
+(" & Something\);) p n
+( ) S
+(end) K
+( ) p
+(if) K
+(;) p n
+( ) S
+(return) K
+( Hostent.Name.) p
+(all) K
+(;) p n
+( ) S
+(end) K
+( Name_Of;) p n
+() N
+( ) S
+(-----------------) c n
+( ) p
+(-- Parse_Entry --) c n
+( ) p
+(-----------------) c n
+() p n
+( ) S
+(function ) K
+(Parse_Entry) l
+( \(Host : Hostent\)) p n
+( ) S
+(return) K
+( Host_Entry) p n
+( ) S
+(is) K n
+( C_Aliases : ) p
+(constant) K
+( Thin.Chars_Ptr_Array :=) p n
+( Chars_Ptr_Pointers.Value \(Host.H_Aliases\);) N
+( C_Addr : ) S
+(constant) K
+( In_Addr_Access_Array :=) p n
+( In_Addr_Access_Pointers.Value) N
+( \(Host.H_Addr_List\);) N
+( Result : Host_Entry \(N_Aliases => C_Aliases'Length - 1,) N
+( N_Addresses => C_Addr'Length - 1\);) N
+( ) S
+(begin) K n
+( Result.Name := ) p
+(new) K
+( String'\(Value \(Host.H_Name\)\);) p n
+(s-garnam.adb) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (6) 6
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(for) K
+( I ) p
+(in) K
+( 1 .. Result.Aliases'Last ) p
+(loop) K n
+( ) p
+(declare) K n
+( Index : Natural := I - 1 + Natural \(C_Aliases'First\);) p n
+( Current : chars_ptr ) S
+(renames) K
+( C_Aliases \(size_t \(Index\)\);) p n
+( ) S
+(begin) K n
+( Result.Aliases \(I\) := ) p
+(new) K
+( String'\(Value \(Current\)\);) p n
+( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+( ) S
+(for) K
+( I ) p
+(in) K
+( Result.Addresses'Range ) p
+(loop) K n
+( ) p
+(declare) K n
+( Index : Natural := I - 1 + Natural \(C_Addr'First\);) p n
+( Current : In_Addr_Access ) S
+(renames) K
+( C_Addr \(Index\);) p n
+( ) S
+(begin) K n
+( Result.Addresses \(I\) := To_Address \(Current.) p
+(all) K
+(\);) p n
+( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+( ) p
+(loop) K
+(;) p n
+( ) S
+(return) K
+( Result;) p n
+( ) S
+(end) K
+( Parse_Entry;) p n
+() N
+( ) S
+(------------------------) c n
+( ) p
+(-- Raise_Naming_Error --) c n
+( ) p
+(------------------------) c n
+() p n
+( ) S
+(procedure ) K
+(Raise_Naming_Error) l n
+( \(Errno : ) p
+(in) K
+( C.Int;) p n
+( Message : ) S
+(in) K
+( String\)) p n
+( ) S
+(is) K n
+() p n
+( ) S
+(function ) K
+(Error_Message) l
+( return) K
+( String;) p n
+( ) S
+(-- Return the message according to Errno.) c n
+() p n
+( ) S
+(-------------------) c n
+( ) p
+(-- Error_Message --) c n
+( ) p
+(-------------------) c n
+() p n
+( ) S
+(function ) K
+(Error_Message) l
+( return) K
+( String ) p
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(case) K
+( Errno ) p
+(is) K n
+( ) p
+(when) K
+( Host_Not_Found => ) p
+(return) K
+( ") p
+(Host not found) str
+(";) p n
+( ) S
+(when) K
+( Try_Again => ) p
+(return) K
+( ") p
+(Try again) str
+(";) p n
+( ) S
+(when) K
+( No_Recovery => ) p
+(return) K
+( ") p
+(No recovery) str
+(";) p n
+( ) S
+(when) K
+( No_Address => ) p
+(return) K
+( ") p
+(No address) str
+(";) p n
+( ) S
+(when) K
+( ) p
+(others) K
+( => ) p
+(return) K
+( ") p
+(Unknown error) str
+(" &) p n
+( C.Int'Image \(Errno\);) N
+( ) S
+(end) K
+( ) p
+(case) K
+(;) p n
+( ) S
+(end) K
+( Error_Message;) p n
+() N
+( ) S
+(begin) K n
+( Ada.Exceptions.Raise_Exception \(Naming_Error'Identity,) p n
+( Error_Message & ") S
+(: ) str
+(" & Message\);) p n
+( ) S
+(end) K
+( Raise_Naming_Error;) p n
+() N
+( ) S
+(----------------) c n
+( ) p
+(-- To_Address --) c n
+( ) p
+(----------------) c n
+() p n
+( ) S
+(function ) K
+(To_Address) l
+( \(Addr : In_Addr\) ) p
+(return) K
+( Address) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(return) K
+( \(H1 => Address_Component \(Addr.S_B1\),) p n
+( H2 => Address_Component \(Addr.S_B2\),) N
+( H3 => Address_Component \(Addr.S_B3\),) N
+( H4 => Address_Component \(Addr.S_B4\)\);) N
+( ) S
+(end) K
+( To_Address;) p n
+() N
+( ) S
+(----------------) c n
+(s-garnam.adb) (right) (6) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (6) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (7) 7
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(-- To_In_Addr --) c n
+( ) p
+(----------------) c n
+() p n
+( ) S
+(function ) K
+(To_In_Addr) l
+( \(Addr : Address\) ) p
+(return) K
+( In_Addr) p n
+( ) S
+(is) K n
+( ) p
+(begin) K n
+( ) p
+(return) K
+( \(S_B1 => unsigned_char \(Addr.H1\),) p n
+( S_B2 => unsigned_char \(Addr.H2\),) N
+( S_B3 => unsigned_char \(Addr.H3\),) N
+( S_B4 => unsigned_char \(Addr.H4\)\);) N
+( ) S
+(end) K
+( To_In_Addr;) p n
+() N
+( ) S
+(-----------) c n
+( ) p
+(-- Value --) c n
+( ) p
+(-----------) c n
+() p n
+( ) S
+(function ) K
+(Value) l
+( \(Add : String\) ) p
+(return) K
+( Address) p n
+( ) S
+(is) K n
+( ) p
+(function ) K
+(Convert) l
+( is) K n
+( ) p
+(new) K
+( Unchecked_Conversion \(Source => unsigned_long,) p n
+( Target => In_Addr\);) N
+( C_Add : chars_ptr := New_String \(Add\);) N
+( Converted : ) S
+(constant) K
+( In_Addr := Convert \(C_Inet_Addr \(C_Add\)\);) p n
+( ) S
+(begin) K n
+( Free \(C_Add\);) p n
+( ) S
+(return) K
+( \(H1 => Address_Component \(Converted.S_B1\),) p n
+( H2 => Address_Component \(Converted.S_B2\),) N
+( H3 => Address_Component \(Converted.S_B3\),) N
+( H4 => Address_Component \(Converted.S_B4\)\);) N
+( ) S
+(end) K
+( Value;) p n
+() N
+(end) K
+( System.Garlic.Naming;) p n
+(s-garnam.adb) (right) (7) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (7) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/snacc.ps b/tests/ps-ref/snacc.ps
new file mode 100644
index 0000000..0268374
--- /dev/null
+++ b/tests/ps-ref/snacc.ps
@@ -0,0 +1,244 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(-- This file is extracted from the Snacc distribution.) c n
+(-- Parts have be cut to win bytes, and the result is probably meaningless.) N
+(--) N
+() p n
+(RFC1213-MIB DEFINITIONS ::= ) S
+(BEGIN) L n
+() p n
+( ) S
+(IMPORTS) L n
+( mgmt, NetworkAddress, ) p
+(IpAddress) k
+(, Counter, ) p
+(Gauge) k
+(,) p n
+( ) S
+(TimeTicks) k n
+( FROM RFC1155-SMI) p n
+() N
+(-- OBJECT-TYPE) c n
+(-- FROM RFC-1212) N
+() p n
+( ;) N
+() N
+( ) S
+(-- MIB-II \(same prefix as MIB-I\)) c n
+() p n
+( mib-2 ) S
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mgmt 1 }) p n
+() N
+( ) S
+(-- textual conventions) c n
+() p n
+( ) S
+(DisplayString) k
+( ::=) p n
+( ) S
+(OCTET) k
+( ) p
+(STRING) k n
+( ) p
+(-- This data type is used to model textual information taken) c n
+( ) p
+(-- from the NVT ASCII character set. By convention, objects) c n
+( ) p
+(-- with this syntax are declared as having) c n
+( ) p
+(-- SIZE \(0..255\)) c n
+() p n
+( ) S
+(-- groups in MIB-II) c n
+() p n
+( system ) S
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mib-2 1 }) p n
+() N
+( ) S
+(-- historical \(some say hysterical\)) c n
+( ) p
+(-- cmot OBJECT IDENTIFIER ::= { mib-2 9 }) c n
+() p n
+( transmission ) S
+(OBJECT) k
+( ) p
+(IDENTIFIER) k
+( ::= { mib-2 10 }) p n
+() N
+() N
+( ) S
+(-- the Interfaces table) c n
+() p n
+( ) S
+(-- The Interfaces table contains information on the entity's) c n
+( ) p
+(-- interfaces. Each interface is thought of as being) c n
+( ) p
+(-- attached to a `subnetwork'. Note that this term should) c n
+( ) p
+(-- not be confused with `subnet' which refers to an) c n
+( ) p
+(-- addressing partitioning scheme used in the Internet suite) c n
+( ) p
+(-- of protocols.) c n
+() p n
+( ifTable ) S
+(OBJECT-TYPE) K n
+( ) p
+(SYNTAX) K
+( ) p
+(SEQUENCE) K
+( ) p
+(OF) K
+( IfEntry) p n
+( ) S
+(ACCESS) K
+( not-accessible) p n
+( ) S
+(STATUS) K
+( mandatory) p n
+( ) S
+(DESCRIPTION) K n
+( ") p
+(A list of interface entries. The number of) str n
+( entries is given by the value of ifNumber.) S
+(") p n
+( ::= { interfaces 2 }) N
+() N
+( IfEntry ::=) N
+( ) S
+(SEQUENCE) K
+( {) p n
+( ifIndex) N
+( ) S
+(INTEGER) k
+(,) p n
+( ifDescr) N
+( ) S
+(DisplayString) k
+(,) p n
+( ifType) N
+( ) S
+(INTEGER) k
+(,) p n
+( ifMtu) N
+(snacc.mib) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(INTEGER) k
+(,) p n
+( ifSpeed) N
+( ) S
+(Gauge) k
+(,) p n
+( ifPhysAddress) N
+( ) S
+(PhysAddress) k
+(,) p n
+( ifSpecific) N
+( ) S
+(OBJECT) k
+( ) p
+(IDENTIFIER) k n
+( }) p n
+() N
+() N
+( ifType ) S
+(OBJECT-TYPE) K n
+( ) p
+(SYNTAX) K
+( ) p
+(INTEGER) k
+( {) p n
+( other\(1\), ) S
+(-- none of the following) c n
+( regular1822\(2\),) p n
+( hdh1822\(3\),) N
+( ddn-x25\(4\),) N
+( rfc877-x25\(5\),) N
+( e1\(19\), ) S
+(-- european equiv. of T-1) c n
+( basicISDN\(20\),) p n
+( primaryISDN\(21\), ) S
+(-- proprietary serial) c n
+( propPointToPointSerial\(22\),) p n
+( ppp\(23\),) N
+( softwareLoopback\(24\),) N
+( eon\(25\), ) S
+(-- CLNP over IP [11]) c n
+( ethernet-3Mbit\(26\),) p n
+( nsip\(27\), ) S
+(-- XNS over IP) c n
+( slip\(28\), ) p
+(-- generic SLIP) c n
+( ultra\(29\), ) p
+(-- ULTRA technologies) c n
+( ds3\(30\), ) p
+(-- T-3) c n
+( sip\(31\), ) p
+(-- SMDS) c n
+( frame-relay\(32\)) p n
+( }) N
+( ) S
+(ACCESS) K
+( read-only) p n
+( ) S
+(STATUS) K
+( mandatory) p n
+( ) S
+(DESCRIPTION) K n
+( ") p
+(The type of interface, distinguished according to) str n
+( the physical/link protocol\(s\) immediately `below') N
+( the network layer in the protocol stack.) S
+(") p n
+( ::= { ifEntry 3 }) N
+() N
+() N
+(END) L n
+(snacc.mib) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/space.ps b/tests/ps-ref/space.ps
new file mode 100644
index 0000000..751a9ed
--- /dev/null
+++ b/tests/ps-ref/space.ps
@@ -0,0 +1,184 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(REM Script to check space left in database.) c n
+(REM ) N
+(DECLARE) K n
+( ) p
+(CURSOR) K
+( tot_space ) p
+(IS) K n
+( ) p
+(SELECT) K
+( a.tablespace_name, ) p
+(sum) K
+(\(a.bytes\) ) p
+(FROM) K
+( dba_data_files a) p n
+( ) S
+(GROUP) K
+( ) p
+(BY) K
+( tablespace_name;) p n
+( tbl_tot ) S
+(VARCHAR2) K
+(\(50\);) p n
+( byt_tot ) S
+(NUMBER) K
+(\(13\);) p n
+( ) S
+(CURSOR) K
+( free_space ) p
+(IS) K n
+( ) p
+(SELECT) K
+( ) p
+(sum) K
+(\(b.bytes\) ) p
+(FROM) K
+( dba_free_space b) p n
+( ) S
+(WHERE) K
+( b.tablespace_name = tbl_tot) p n
+( ) S
+(GROUP) K
+( ) p
+(BY) K
+( b.tablespace_name;) p n
+( byt_free ) S
+(NUMBER) K
+(\(13\);) p n
+( pct_used ) S
+(NUMBER) K
+(\(3\);) p n
+(/* ) c n
+( * Here are some useless comments, inserted for testing a2ps) N
+( */) N
+(BEGIN) K n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') p
+(TABLESPACE) str
+(',30,') p
+( ) str
+('\) || LPAD\(') p
+(Total Bytes) str
+(',17,') p
+( ) str
+('\) ||) p n
+( LPAD\(') S
+(Free Bytes) str
+(',17,') p
+( ) str
+('\)) p n
+( || LPAD\(') S
+(% Used) str
+(',10,') p
+( ) str
+('\)\);) p n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') S
+(-) str
+(',79,') p
+(-) str
+('\)\);) p n
+( ) S
+(LOOP) K n
+( ) p
+(IF) K
+( ) p
+(NOT) K
+( tot_space%ISOPEN) p n
+( ) S
+(THEN) K n
+( ) p
+(OPEN) K
+( tot_space;) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(FETCH) K
+( tot_space ) p
+(INTO) K n
+( tbl_tot,) p n
+( byt_tot;) N
+( ) S
+(IF) K
+( tot_space%FOUND) p n
+( ) S
+(THEN) K n
+( ) p
+(OPEN) K
+( free_space;) p n
+( ) S
+(FETCH) K
+( free_space ) p
+(INTO) K
+( byt_free;) p n
+( ) S
+(IF) K
+( free_space%FOUND) p n
+( ) S
+(THEN) K n
+( pct_used := TRUNC\(\(\(1 - \(byt_free/byt_tot\)\) * 100\),0\);) p n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(tbl_tot,30,') S
+( ) str
+('\) || LPAD\(byt_tot,17,') p
+( ) str
+('\) || LP) p n
+(AD\(byt_free,17,') S
+( ) str
+('\)) p n
+( || LPAD\(pct_used,10,') S
+( ) str
+('\)\);) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(CLOSE) K
+( free_space;) p n
+( ) S
+(ELSE) K n
+( ) p
+(EXIT) K
+(;) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(END) K
+( ) p
+(LOOP) K
+(;) p n
+( ) S
+(CLOSE) K
+( tot_space;) p n
+(END) K
+(;) p n
+(/) N
+(space.pls) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/sqlcrtbl.ps b/tests/ps-ref/sqlcrtbl.ps
new file mode 100644
index 0000000..643bfeb
--- /dev/null
+++ b/tests/ps-ref/sqlcrtbl.ps
@@ -0,0 +1,608 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#) p 8 T (Skeleton script ) S
+(for) K
+( creating a ) p
+(table) K n
+(#) p n
+(#) S 8 T (Notes:) N
+(#) S 8 T (- Script should be formatted exactly ) S
+(as) K
+( indicated) p n
+(#) S 8 T (- The primary key columns should always be the first columns indicated) N
+(#) S 8 T (- ) S
+(All) K
+( SQL statements should be terminated ) p
+(with) K
+( a /) p n
+(#) S 8 T (- Primary key, foreign key, ) S
+(and) K
+( ) p
+(unique) K
+( constraints are out-) p
+(of) K
+(-line.) p n
+(#) S 8 T (- Multi-) S
+(column) K
+( constraints are out-) p
+(of) K
+(-line.) p n
+(#) S 8 T (- ) S
+(All) K
+( other constraints are ) p
+(in) K
+(-line.) p n
+(#) S 8 T (- ) S
+(Remove all comments above the next line) c n
+(#=============================================================================) p n
+(# Name :) N
+(# Created ) S
+(On) K
+(:) p n
+(# Created ) S
+(By) K
+(:) p n
+(# SCN No :) N
+(# Purpose :) N
+(#==============================================================================) N
+(drop) K
+( ) p
+(table) K
+( owner.table_name) p n
+(/) N
+(create) K
+( ) p
+(table) K
+( owner.table_name \() p n
+() S 8 T (column_name) S 24 T () S
+(varchar2) K
+(\(4\)) p 40 T (constraint table_name_nn1 ) S
+(not) K
+( ) p
+(null) K
+(,) p n
+() S 8 T (column_name) S 24 T () S
+(varchar2) K
+(\(10\),) p n
+() S 8 T (column_name) S 24 T () S
+(number) K
+(\(8,2\) ) p 40 T (constraint ) N
+() S 8 T () S 16 T () S 24 T () S 32 T () S 40 T (table_name_ck1 \( column_name > 0\),) N
+() S 8 T (column_name) S 24 T () S
+(number) K
+(\(4,2\)) p 40 T () S
+(default) K
+( 0,) p n
+() S 8 T (column_name) S 24 T () S
+(date) K
+(,) p n
+() S 8 T (.) N
+() S 8 T (.) N
+() S 8 T (.) N
+() S 8 T (constraint table_name_pk1) N
+() S 8 T () S 16 T (primary key \(column_name, column_name, ...\)) N
+(#) N
+(# ) S
+(All) K
+( constraints that ) p
+(create) K
+( an ) p
+(index) K
+( must have a USING ) p
+(INDEX) K
+( clause) p n
+(# ) S
+(To) K
+( calculate the ) p
+(initial) K
+( extent ) p
+(of) K
+( an ) p
+(index) K
+(, use the following \(assuming) p n
+(# a 4K block ) S
+(size) K
+(\):) p n
+(# bytes = \(\(x*\(11+x+len\)\)/\(\(4096 - 90\)*\(1 - ) S
+(pctfree) K
+(/100\)\)\)*\(4096 * 1.1\)) p n
+(# ) S
+(where) K n
+(#) p 8 T (x ) S 16 T () S 24 T (= expected ) S
+(number) K
+( ) p
+(of) K
+( ) p
+(rows) K
+( after 6 months) p n
+(#) S 8 T (z) S 16 T () S 24 T (= ) S
+(number) K
+( ) p
+(of) K
+( columns indexed) p n
+(#) S 8 T (len) S 16 T () S 24 T (= the average length ) S
+(of) K
+( the indexed ) p
+(column) K n
+(#) p n
+(# Alternatively, you may use one ) S
+(of) K
+( the following storage clauses:) p n
+(#) N
+(#) S 8 T (Small \(small indexes 20K ) S
+(to) K
+( 2560K\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+(#) S 8 T (Medium \(medium indexes 2560K ) S
+(to) K
+( 40960K\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 2560K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+(#) S 8 T (Large \(large indexes 40960K ) S
+(and) K
+( up\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 40960K next 320K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+() S 8 T () S 16 T (using ) S
+(index) K n
+() p 8 T () S 16 T () S 24 T (tablespace get_from_dba) N
+() S 8 T () S 16 T () S 24 T () S
+(pctfree) K
+( 10) p n
+() S 8 T () S 16 T () S 24 T (storage \() S
+(initial) K
+( 20K) p n
+() S 8 T () S 16 T () S 24 T () S 32 T ( next 20K) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( minextents 1 ) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( ) S
+(maxextents) K
+( 99) p n
+() S 8 T () S 16 T () S 24 T () S 32 T ( pctincrease 100) N
+(sqlcrtbl.sql) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T () S 16 T () S 24 T () S 32 T ( freelists 1\)) N
+() S 8 T (constraint table_name_fk1) N
+() S 8 T () S 16 T (foreign key \(column_name\) references) N
+() S 8 T () S 16 T (table_name \(column_name\),) N
+() S 8 T (constraint table_name_u1) N
+() S 8 T () S 16 T () S
+(unique) K
+( \(column_name, column_name\)) p n
+() S 8 T () S 16 T (using ) S
+(index) K n
+() p 8 T () S 16 T () S 24 T (tablespace get_from_dba) N
+() S 8 T () S 16 T () S 24 T () S
+(pctfree) K
+( 10) p n
+() S 8 T () S 16 T () S 24 T (storage \() S
+(initial) K
+( 20K) p n
+() S 8 T () S 16 T () S 24 T () S 32 T ( next 20K) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( minextents 1 ) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( ) S
+(maxextents) K
+( 99) p n
+() S 8 T () S 16 T () S 24 T () S 32 T ( pctincrease 100) N
+() S 8 T () S 16 T () S 24 T () S 32 T ( freelists 1\)) N
+(# ) S
+(pctfree) K
+( should be ) p
+(set) K
+( ) p
+(to) K
+( 0 ) p
+(for) K
+( tables whose ) p
+(rows) K
+( are ) p
+(not) K
+( updated ) p n
+(# \(e.g. validation tables, control tables, history tables, etc.\)) N
+(# ) S
+(and) K
+( whose columsn will ) p
+(all) K
+( be complete \() p
+(not) K
+( ) p
+(null) K
+(\) upon first ) p
+(insert) K
+(.) p n
+(#) N
+(# ) S
+(pctfree) K
+( should be ) p
+(set) K
+( higher than 10 ) p
+(for) K
+( those ) p
+(rows) K
+( ) p
+(where) K
+( many columns) p n
+(# will initially be left ) S
+(null) K
+( upon the first ) p
+(insert) K
+(, but will be updated) p n
+(# later) N
+(pctfree) K
+( 10 pctused 40) p n
+(tablespace get_from_dba) N
+(#) N
+(# STORAGE CLAUSE) N
+(#) N
+(# ) S
+(Initial) K
+( Extent) p n
+(# ) S
+(Initial) K
+( extent storage should be ) p
+(set) K
+( ) p
+(to) K
+( the appropriate ) p
+(number) K
+( ) p
+(of) K
+( bytes) p n
+(# \(rounded ) S
+(to) K
+( a multiple ) p
+(of) K
+( 20K bytes\) this ) p
+(table) K
+( ) p
+(is) K
+( expected ) p
+(to) K
+( grow ) p
+(to) K
+( ) p
+(in) K
+( ) p n
+(# the first 6 months.) N
+(# ) S
+(To) K
+( calculate the ) p
+(initial) K
+( extent, use the following \(assuming) p n
+(# a 4K block ) S
+(size) K
+(\):) p n
+(# bytes = \(\(x*\(5+y*\(1+len\)\)\)/\(\(4096 - 90\)*\(1 - ) S
+(pctfree) K
+(/100\)\)\)*4096) p n
+(# ) S
+(where) K n
+(#) p 8 T (x ) S 16 T () S 24 T (= expected ) S
+(number) K
+( ) p
+(of) K
+( ) p
+(rows) K
+( after 6 months) p n
+(#) S 8 T (y) S 16 T () S 24 T (= ) S
+(number) K
+( ) p
+(of) K
+( columns ) p
+(in) K
+( the ) p
+(table) K n
+(#) p 8 T (len) S 16 T () S 24 T (= the average ) S
+(column) K
+( length) p n
+(#) S 8 T () S
+(pctfree) K
+() p 16 T () S 24 T (= obtained ) S
+(from) K
+( guidelines above) p n
+(#) N
+(# Round the ) S
+(initial) K
+( extent up ) p
+(to) K
+( one ) p
+(of) K
+( the ) p
+(values) K
+( ) p
+(in) K
+( the ) p
+(table) K
+( below.) p n
+(# Determine the next extent ) S
+(from) K
+( the ) p
+(table) K
+( below \(again assuming 4K ) p n
+(# block sizes\):) N
+(#) N
+(#) S 8 T () S
+(Initial) K
+( Extent) p 24 T () S 32 T (Next Extent) N
+(#) S 8 T (=============) S 24 T () S 32 T (===========) N
+(#) S 8 T ( 20K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 40K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 80K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 160K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 320K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 640K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 1280K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 2560K) S 24 T () S 32 T ( 20K) N
+(#) S 8 T ( 5120K) S 24 T () S 32 T ( 40K) N
+(#) S 8 T ( 10240K) S 24 T () S 32 T ( 80K) N
+(#) S 8 T ( 20480K) S 24 T () S 32 T ( 160K) N
+(#) S 8 T ( 40960K) S 24 T () S 32 T ( 320K) N
+(#) S 8 T ( 81920K) S 24 T () S 32 T ( 640K) N
+(#) S 8 T ( 163840K) S 24 T () S 32 T ( 1280K) N
+(#) S 8 T ( 327680K) S 24 T () S 32 T ( 2560K) N
+(#) S 8 T ( 655360K) S 24 T () S 32 T ( 5120K) N
+(#) S 8 T (1310720K) S 24 T () S 32 T (10240K) N
+(#) S 8 T (etc, ) S
+(with) K
+( each succeeding value twice the previous value.) p n
+(#) N
+(# Alternatively, you may use one ) S
+(of) K
+( the following storage clauses:) p n
+(sqlcrtbl.sql) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#) p n
+(#) S 8 T (Small \(small tables 20K ) S
+(to) K
+( 2560K\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+(#) S 8 T (Medium \(medium tables 2560K ) S
+(to) K
+( 40960K\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 2560K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+(#) S 8 T (Large \(large tables 40960K ) S
+(and) K
+( up\)) p n
+(#) N
+(# storage \() S
+(initial) K
+( 40960K next 320K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+(#) S 8 T () S 16 T (freelists 1\)) N
+(#) N
+(storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99 pctincrease 100) p n
+() S 8 T () S 16 T (freelists 1\)) N
+(/) N
+(#) N
+(# Comments are required ) S
+(on) K
+( the ) p
+(table) K
+( ) p
+(and) K
+( ) p
+(all) K
+( columns.) p n
+(# Comments should be ) S
+(in) K
+( upper ) p
+(and) K
+( lower case, should be terminated ) p
+(by) K
+( a) p n
+(# period, ) S
+(and) K
+( cannot be longer than 255 bytes.) p n
+(#) N
+(comment) K
+( ) p
+(on) K
+( ) p
+(table) K
+( table_name ) p
+(is) K n
+(') p
+(Table Alias: XXXX. Add more comment on the table, it can be up to 255 bytes long.) str
+(') p n
+(/) N
+(comment) K
+( ) p
+(on) K
+( ) p
+(column) K
+( table_name.column_name ) p
+(is) K n
+(') p
+(This is the comment on this column. A column comment is required.) str
+(') p n
+(/) N
+(comment) K
+( ) p
+(on) K
+( ) p
+(column) K
+( table_name.column_name ) p
+(is) K n
+(') p
+(This is another comment on this column. A column comment is required.) str
+(') p n
+(/) N
+(#) N
+(# You may need ) S
+(to) K
+( ) p
+(create) K
+( other indexes ) p
+(for) K
+( performance reasons.) p n
+(#) N
+(create) K
+( ) p
+(index) K
+( table_name_n1 ) p
+(on) K
+( table_name \(column_name\)) p n
+(tablespace get_from_dba) N
+(pctfree) K
+( 10) p n
+(storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99) p n
+() S 8 T (pctincrease 100 freelists 1\)) N
+(/) N
+(create) K
+( ) p
+(index) K
+( table_name_n2 ) p
+(on) K
+( table_name \(column_name\)) p n
+(tablespace get_from_dba) N
+(pctfree) K
+( 10) p n
+(storage \() S
+(initial) K
+( 20K next 20K minextents 1 ) p
+(maxextents) K
+( 99) p n
+() S 8 T (pctincrease 100 freelists 1\)) N
+(/) N
+(# ) N
+(# if this ) S
+(table) K
+( requires a key assigned ) p
+(by) K
+( sequence, ) p
+(create) K
+( the sequence) p n
+(#) N
+(create) K
+( sequence table_name_pk_sq ) p
+(increment) K
+( ) p
+(by) K
+( 1 ) p
+(start) K
+( ) p
+(with) K
+( 1) p n
+(/) N
+(# ) S
+(public) K
+( synonyms may be required) p n
+(#) N
+(create) K
+( ) p
+(public) K
+( ) p
+(synonym) K
+( table_name ) p
+(for) K
+( table_name) p n
+(/) N
+(create) K
+( ) p
+(public) K
+( ) p
+(synonym) K
+( table_name_pk_sq ) p
+(for) K
+( table_name_pk_sq) p n
+(/) N
+(#) N
+(sqlcrtbl.sql) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/sqlinit.ps b/tests/ps-ref/sqlinit.ps
new file mode 100644
index 0000000..f5ddf3d
--- /dev/null
+++ b/tests/ps-ref/sqlinit.ps
@@ -0,0 +1,350 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(#) p n
+(##############################################################################) N
+(# Example INIT.ORA ) S
+(file) K n
+(#) p n
+(# This ) S
+(file) K
+( ) p
+(is) K
+( provided ) p
+(by) K
+( Oracle Corporation ) p
+(to) K
+( help you customize) p n
+(# your RDBMS installation ) S
+(for) K
+( your site. Important ) p
+(system) K
+( parameters) p n
+(# are discussed, ) S
+(and) K
+( example settings given.) p n
+(#) N
+(# ) S
+(Some) K
+( parameter settings are ) p
+(generic) K
+( ) p
+(to) K
+( ) p
+(any) K
+( ) p
+(size) K
+( installation.) p n
+(# ) S
+(For) K
+( parameters that require different ) p
+(values) K
+( ) p
+(in) K
+( different ) p
+(size) K n
+(# installations, three scenarios have been provided: SMALL, MEDIUM) p n
+(# ) S
+(and) K
+( LARGE. ) p
+(Any) K
+( parameter that needs ) p
+(to) K
+( be tuned according ) p
+(to) K n
+(# installation ) p
+(size) K
+( will have three settings, ) p
+(each) K
+( one commented) p n
+(# according ) S
+(to) K
+( installation ) p
+(size) K
+(.) p n
+(#) N
+(# ) S
+(Use) K
+( the following ) p
+(table) K
+( ) p
+(to) K
+( approximate the SGA ) p
+(size) K
+( needed ) p
+(for) K
+( the) p n
+(# three scenarious provided ) S
+(in) K
+( this ) p
+(file) K
+(:) p n
+(#) N
+(# ) S
+(-------Installation/Database Size------) c n
+(# SMALL MEDIUM LARGE) p n
+(# ) S
+(Block) K
+( 2K 4500K 6800K 17000K) p n
+(# ) S
+(Size) K
+( 4K 5500K 8800K 21000K) p n
+(#) N
+(# ) S
+(To) K
+( ) p
+(set) K
+( up a ) p
+(database) K
+( that multiple instances will be ) p
+(using) K
+(, place) p n
+(# ) S
+(all) K
+( ) p
+(instance) K
+(-specific parameters ) p
+(in) K
+( one ) p
+(file) K
+(, ) p
+(and) K
+( ) p
+(then) K
+( have ) p
+(all) K n
+(# ) p
+(of) K
+( these files point ) p
+(to) K
+( a master ) p
+(file) K
+( ) p
+(using) K
+( the IFILE command.) p n
+(# This way, ) S
+(when) K
+( you ) p
+(change) K
+( a ) p
+(public) K n
+(# parameter, it will automatically ) p
+(change) K
+( ) p
+(on) K
+( ) p
+(all) K
+( instances. This ) p
+(is) K n
+(# necessary, since ) p
+(all) K
+( instances must ) p
+(run) K
+( ) p
+(with) K
+( the same value ) p
+(for) K
+( many) p n
+(# parameters. ) S
+(For) K
+( example, ) p
+(if) K
+( you choose ) p
+(to) K
+( ) p
+(use) K
+( ) p
+(private) K
+( ) p
+(rollback) K
+( segments,) p n
+(# these must be specified ) S
+(in) K
+( different files, but since ) p
+(all) K
+( gc_*) p n
+(# parameters must be the same ) S
+(on) K
+( ) p
+(all) K
+( instances, they should be ) p
+(in) K
+( one ) p
+(file) K
+(.) p n
+(#) N
+(# INSTRUCTIONS: Edit this ) S
+(file) K
+( ) p
+(and) K
+( the other INIT files it calls ) p
+(for) K n
+(# your site, either ) p
+(by) K
+( ) p
+(using) K
+( the ) p
+(values) K
+( provided here ) p
+(or) K
+( ) p
+(by) K
+( providing) p n
+(# your ) S
+(own) K
+(. ) p
+(Then) K
+( place an IFILE= line ) p
+(into) K
+( ) p
+(each) K
+( ) p
+(instance) K
+(-specific) p n
+(# INIT ) S
+(file) K
+( that points ) p
+(at) K
+( this ) p
+(file) K
+(.) p n
+(###############################################################################) N
+() N
+(db_name = oracle) N
+(db_files = 20) N
+(control_files = \(%RDBMS_FILES%\\ctl1orcl.ora\)) N
+() N
+(compatible = 7.3.0.0.0) N
+() N
+(db_file_multiblock_read_count = 8) S 40 T () S 48 T () S 56 T () S 64 T ( # ) S
+(INITIAL) K n
+(# db_file_multiblock_read_count = 8 # SMALL) p n
+(# db_file_multiblock_read_count = 16 # MEDIUM) N
+(# db_file_multiblock_read_count = 32 # LARGE) N
+() N
+(db_block_buffers = 50) S 24 T () S 32 T () S 40 T ( # ) S
+(INITIAL) K n
+(# db_block_buffers = 200 # SMALL) p n
+(# db_block_buffers = 550 # MEDIUM) N
+(# db_block_buffers = 3200 # LARGE) N
+() N
+(shared_pool_size = 500000 # ) S
+(INITIAL) K n
+(# shared_pool_size = 3500000 # SMALL) p n
+(# shared_pool_size = 6000000 # MEDIUM) N
+(# shared_pool_size = 9000000 # LARGE) N
+() N
+(log_checkpoint_interval = 10000) N
+() N
+(processes = 50 # ) S
+(INITIAL) K n
+(# processes = 50 # SMALL) p n
+(# processes = 100 # MEDIUM) N
+(# processes = 200 # LARGE) N
+(sqlinit.ora) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p n
+(dml_locks = 100 # ) S
+(INITIAL) K n
+(# dml_locks = 100 # SMALL) p n
+(# dml_locks = 200 # MEDIUM) N
+(# dml_locks = 500 # LARGE) N
+() N
+(log_buffer = 1000 # ) S
+(INITIAL) K n
+(# log_buffer = 8192 # SMALL) p n
+(# log_buffer = 32768 # MEDIUM) N
+(# log_buffer = 163840 # LARGE) N
+() N
+(sequence_cache_entries = 10 # ) S
+(INITIAL) K n
+(# sequence_cache_entries = 10 # SMALL) p n
+(# sequence_cache_entries = 30 # MEDIUM) N
+(# sequence_cache_entries = 100 # LARGE) N
+() N
+(sequence_cache_hash_buckets = 10 # ) S
+(INITIAL) K n
+(# sequence_cache_hash_buckets = 10 # SMALL) p n
+(# sequence_cache_hash_buckets = 23 # MEDIUM) N
+(# sequence_cache_hash_buckets = 89 # LARGE) N
+() N
+(# audit_trail = ) S
+(true) K
+( # ) p
+(if) K
+( you want auditing) p n
+(# timed_statistics = ) S
+(true) K
+( # ) p
+(if) K
+( you want timed ) p
+(statistics) K n
+(max_dump_file_size = 10240 # limit trace ) p
+(file) K
+( ) p
+(size) K
+( ) p
+(to) K
+( 5 Meg ) p
+(each) K n
+() p n
+(# log_archive_start = ) S
+(true) K
+( # ) p
+(if) K
+( you want automatic archiving) p n
+() N
+(# ) S
+(define) K
+( directories ) p
+(to) K
+( store trace ) p
+(and) K
+( alert files) p n
+(background_dump_dest=%RDBMS73%\\TRACE) N
+(user_dump_dest=%RDBMS73%\\TRACE) N
+() N
+(db_block_size = 2048) N
+() N
+(snapshot_refresh_processes = 0) N
+() N
+(remote_login_passwordfile = shared) c n
+(sqlinit.ora) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/sqlpq92.ps b/tests/ps-ref/sqlpq92.ps
new file mode 100644
index 0000000..334f159
--- /dev/null
+++ b/tests/ps-ref/sqlpq92.ps
@@ -0,0 +1,31 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(SELECT H.emp_no, ) p n
+( H.hist_type,) N
+( ) S
+(count) K
+(\(*\) ) p n
+(FROM emp_history H) N
+(GROUP BY H.emp_no, H.hist_type;) N
+(sqlpq92.sql) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/sqlspace.ps b/tests/ps-ref/sqlspace.ps
new file mode 100644
index 0000000..a5697be
--- /dev/null
+++ b/tests/ps-ref/sqlspace.ps
@@ -0,0 +1,184 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(REM Script to check space left in database.) c n
+(REM ) N
+(DECLARE) K n
+( ) p
+(CURSOR) K
+( tot_space ) p
+(IS) K n
+( ) p
+(SELECT) K
+( a.tablespace_name, ) p
+(sum) K
+(\(a.bytes\) ) p
+(FROM) K
+( dba_data_files a) p n
+( ) S
+(GROUP) K
+( ) p
+(BY) K
+( tablespace_name;) p n
+( tbl_tot ) S
+(VARCHAR2) K
+(\(50\);) p n
+( byt_tot ) S
+(NUMBER) K
+(\(13\);) p n
+( ) S
+(CURSOR) K
+( free_space ) p
+(IS) K n
+( ) p
+(SELECT) K
+( ) p
+(sum) K
+(\(b.bytes\) ) p
+(FROM) K
+( dba_free_space b) p n
+( ) S
+(WHERE) K
+( b.tablespace_name = tbl_tot) p n
+( ) S
+(GROUP) K
+( ) p
+(BY) K
+( b.tablespace_name;) p n
+( byt_free ) S
+(NUMBER) K
+(\(13\);) p n
+( pct_used ) S
+(NUMBER) K
+(\(3\);) p n
+(/* ) c n
+( * Here are some useless comments, inserted for testing a2ps) N
+( */) N
+(BEGIN) K n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') p
+(TABLESPACE) str
+(',30,') p
+( ) str
+('\) || LPAD\(') p
+(Total Bytes) str
+(',17,') p
+( ) str
+('\) ||) p n
+( LPAD\(') S
+(Free Bytes) str
+(',17,') p
+( ) str
+('\)) p n
+( || LPAD\(') S
+(% Used) str
+(',10,') p
+( ) str
+('\)\);) p n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(') S
+(-) str
+(',79,') p
+(-) str
+('\)\);) p n
+( ) S
+(LOOP) K n
+( ) p
+(IF) K
+( ) p
+(NOT) K
+( tot_space%ISOPEN) p n
+( ) S
+(THEN) K n
+( ) p
+(OPEN) K
+( tot_space;) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(FETCH) K
+( tot_space ) p
+(INTO) K n
+( tbl_tot,) p n
+( byt_tot;) N
+( ) S
+(IF) K
+( tot_space%FOUND) p n
+( ) S
+(THEN) K n
+( ) p
+(OPEN) K
+( free_space;) p n
+( ) S
+(FETCH) K
+( free_space ) p
+(INTO) K
+( byt_free;) p n
+( ) S
+(IF) K
+( free_space%FOUND) p n
+( ) S
+(THEN) K n
+( pct_used := TRUNC\(\(\(1 - \(byt_free/byt_tot\)\) * 100\),0\);) p n
+( DBMS_OUTPUT.PUT_LINE \(RPAD\(tbl_tot,30,') S
+( ) str
+('\) || LPAD\(byt_tot,17,') p
+( ) str
+('\) || LP) p n
+(AD\(byt_free,17,') S
+( ) str
+('\)) p n
+( || LPAD\(pct_used,10,') S
+( ) str
+('\)\);) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(CLOSE) K
+( free_space;) p n
+( ) S
+(ELSE) K n
+( ) p
+(EXIT) K
+(;) p n
+( ) S
+(END) K
+( ) p
+(IF) K
+(;) p n
+( ) S
+(END) K
+( ) p
+(LOOP) K
+(;) p n
+( ) S
+(CLOSE) K
+( tot_space;) p n
+(END) K
+(;) p n
+(/) N
+(sqlspace.pkb) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/strange.ps b/tests/ps-ref/strange.ps
new file mode 100644
index 0000000..da1b885
--- /dev/null
+++ b/tests/ps-ref/strange.ps
@@ -0,0 +1,249 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(Topics:) p n
+( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+( Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) N
+() N
+() N
+(----------------------------------------------------------------------) N
+() N
+(Date: Sat, 09 Aug 1997 17:57:56 +0200) C n
+(From: ) K
+(Christian Gottschling <chg@pegasus.dvz.fh-aachen.de>) L n
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+(Message-ID: <33EC9384.B15C03F4@pegasus.dvz.fh-aachen.de>) c n
+(References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>) N
+() p n
+(W.I.N. \(Holding\)LLC wrote:) N
+() N
+(>) S
+( \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+(>) p
+( \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+(>) p
+( \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+(>) p
+( \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+(>) p
+( \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+(>) p
+( \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+(>) p n
+(>) S
+( sergch@anet.donetsk.ua) k n
+(>) p n
+(>) S
+( \363\320\305\333\311\324\305!!!) k n
+() p n
+(Yes! Indeed!) N
+() N
+(SCNR.) N
+() N
+( --) N
+(Christian Gottschling Datenverwurstungszentrale Juelich) N
+(... I'm sitting here all day, randomly pressing keys ...) N
+() N
+() N
+() N
+(------------------------------) N
+() N
+(Date: 9 Aug 1997 12:25:33 -0400) C n
+(From: ) K
+(brobin@freenet.columbus.oh.us \(Brian Robinson\)) L n
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+(Message-ID: <5si5lt$4cv@login.freenet.columbus.oh.us>) c n
+(References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33EC9384.B15C03) N
+(F4@pegasus.dvz.fh-aachen.de>) N
+() p n
+(Christian Gottschling \(chg@pegasus.dvz.fh-aachen.de\) wrote:) N
+(: W.I.N. \(Holding\)LLC wrote:) N
+() N
+(: > \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) N
+(: > \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) N
+(: > \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) N
+(: > \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) N
+(: > \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) N
+(: > \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) N
+(: >) N
+(: > sergch@anet.donetsk.ua) N
+(: >) N
+(: > \363\320\305\333\311\324\305!!!) N
+() N
+(: Yes! Indeed!) N
+() N
+(: SCNR.) N
+() N
+(: --) N
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Brian Robinson) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(: Christian Gottschling Datenverwurstungszentrale Juelich) p n
+(: ... I'm sitting here all day, randomly pressing keys ...) N
+() N
+(..... uhh.... \256\316\256\350\256y1\330\322}? ;\)) N
+(-- ) N
+(Brian Robinson | Sometimes its curious how much people are afraid of crazy) N
+(Cols., Ohio | people. Who is to determine who is sane and crazy? I myself) N
+(Student of WHS | am rather insane, some would say. Then again, im not the) N
+(Maxim\\Starmind | psycho beating himself with a rubber chicken in the corner.) N
+() N
+(------------------------------) N
+() N
+(Date: Sat, 09 Aug 1997 15:19:42 -0700) C n
+(From: ) K
+(Andy Schwartz <andys@mail.stlnet.com>) L n
+(To: "W.I.N. \(Holding\)LLC" <sergch@anet.donetsk.ua>) C n
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+(Message-ID: <33ECECFE.5566@mail.stlnet.com>) c n
+(References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>) N
+() p n
+(IMHO, I think you should use \323\320\305\303\311\301\314\311\323\324 instead of \320\322\317\307\322\301\315\315\311\322\317.) N
+() N
+(.. Andy) N
+() N
+(W.I.N. \(Holding\)LLC wrote:) N
+(>) S
+( ) k n
+(>) p
+( \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+(>) p
+( \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+(>) p
+( \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+(>) p
+( \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+(>) p
+( \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+(>) p
+( \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+(>) p
+( ) k n
+(>) p
+( sergch@anet.donetsk.ua) k n
+(>) p
+( ) k n
+(>) p
+( \363\320\305\333\311\324\305!!!) k n
+() p n
+(------------------------------) N
+() N
+(Date: Sun, 10 Aug 1997 22:53:31 GMT) C n
+(From: ) K
+(ribo@mindspring.com \(Kevin Allegood\)) L n
+(Subject: ) K
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) L n
+(Message-ID: <5slgmt$g6@camel3.mindspring.com>) c n
+(References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33ECECFE.5566@m) N
+(ail.stlnet.com>) N
+() p n
+(Andy Schwartz <andys@mail.stlnet.com> let escape his/her/whatever's) N
+(keyboard:) N
+() N
+(>) S
+(IMHO, I think you should use \323\320\305\303\311\301\314\311\323\324 instead of \320\322\317\307\322\301\315\315\311\322\317.) k n
+() p n
+(It depends on your version of Notes. For 4.5X, I'd use \323\320\305\303\311\301\314\311\323\324, but) N
+(for earlier versions \320\322\317\307\322\301\315\315\311\322\317 works fine. Incedentally, although) N
+(you can do it, I'd be careful about \304\317\325\323\324\322\317\312\323\324ing the SAP \323) N
+(\320\317\323\314\305\304\325\300\335\311\315 unless your really know what you're doing.) N
+() N
+(Kevin Allegood.) N
+() N
+(>) S
+(.. Andy) k n
+() p n
+(>) S
+(W.I.N. \(Holding\)LLC wrote:) k n
+(>) p
+(> ) k n
+(>) p
+(> \345\323\314\311 \367\331 - \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\312 \323\320\305\303\311\301\314\311\323\324 SAP - \304\314\321 \367\301\323 \322\305\301\314\330\316\301\321 \327\317\332\315\317\326\316\317\323\324\330) k n
+(>) p
+(> \324\322\325\304\317\325\323\324\322\317\312\323\324\327\301 \320\317 \313\317\316\324\322\301\313\324\325 \327 \341\327\323\324\322\301\314\311\312\323\313\311\310 \313\317\315\320\301\316\311\321\310. \344\314\321) k n
+(>) p
+(> \313\327\301\314\311\306\311\303\311\322\317\327\301\316\316\331\310 \323\320\305\303\311\301\314\311\323\324\317\327 \327 \304\322\325\307\311\310 \317\302\314\301\323\324\321\310 \320\322\317\307\322\301\315\315\311\322\317\327\301\316\311\321 -) k n
+(>) p
+(> \327\317\332\315\317\326\316\317 \342\345\363\360\354\341\364\356\357\345 \317\302\325\336\305\316\311\305 SAP \323 \320\317\323\314\305\304\325\300\335\311\315 \324\322\325\304\317\325\323\324\322\317\312\323\324\327\317\315.) k n
+(>) p
+(> \372\316\301\316\311\305 \341\316\307\314\311\312\323\313\317\307\317 \321\332\331\313\301 - \357\342\361\372\341\364\345\354\370\356\357!) k n
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Kevin Allegood) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(>) p
+(> \356\301\320\322\301\327\314\321\312\324\305 \320\317\314\316\317\305 \322\305\332\300\315\305 \(attachment file\) \316\301 \301\316\307\314\311\312\323\313\317\315 \321\332\331\313\305 \320\317 \301\304\322\305\323\325:) k n
+(>) p
+(> ) k n
+(>) p
+(> sergch@anet.donetsk.ua) k n
+(>) p
+(> ) k n
+(>) p
+(> \363\320\305\333\311\324\305!!!) k n
+() p n
+() N
+() N
+(------------------------------) N
+() N
+(End of forwarda004hb Digest) N
+(***************************) N
+(Re: \360\362\357\347\362\341\355\355\351\363\364\371!!! \362\301\302\317\324\301 \327 \341\367\363\364\362\341\354\351\351 \320\317 \313\317\316\324\322\301\313\324\325!) (Kevin Allegood) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/strip-0.ps b/tests/ps-ref/strip-0.ps
new file mode 100644
index 0000000..c367cff
--- /dev/null
+++ b/tests/ps-ref/strip-0.ps
@@ -0,0 +1,33 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(This is an example of keyword) k n
+(This is an example of keyword strong) K n
+(This is an example of comment) c n
+(This is an example of Comment strong) C n
+(This is an example of label) l n
+(This is an example of Label strong) L n
+(This is an example of string) str n
+(This is an example of symbol) sy n
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/strip-1.ps b/tests/ps-ref/strip-1.ps
new file mode 100644
index 0000000..b141f92
--- /dev/null
+++ b/tests/ps-ref/strip-1.ps
@@ -0,0 +1,33 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(This is an example of keyword) k n
+(This is an example of keyword strong) K n
+() p n
+(This is an example of Comment strong) C n
+(This is an example of label) l n
+(This is an example of Label strong) L n
+(This is an example of string) str n
+(This is an example of symbol) sy n
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/strip-2.ps b/tests/ps-ref/strip-2.ps
new file mode 100644
index 0000000..2cf48ab
--- /dev/null
+++ b/tests/ps-ref/strip-2.ps
@@ -0,0 +1,33 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(This is an example of keyword) k n
+(This is an example of keyword strong) K n
+(This is an example of comment) c n
+() p n
+(This is an example of label) l n
+(This is an example of Label strong) L n
+(This is an example of string) str n
+(This is an example of symbol) sy n
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/strip-3.ps b/tests/ps-ref/strip-3.ps
new file mode 100644
index 0000000..3e7f5fa
--- /dev/null
+++ b/tests/ps-ref/strip-3.ps
@@ -0,0 +1,33 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(This is an example of keyword) k n
+(This is an example of keyword strong) K n
+() p n
+() N
+(This is an example of label) l n
+(This is an example of Label strong) L n
+(This is an example of string) str n
+(This is an example of symbol) sy n
+(This is an example of error) e n
+(This is an example of header) (This is an example of footer) () title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/symbol.ps b/tests/ps-ref/symbol.ps
new file mode 100644
index 0000000..e7c09a1
--- /dev/null
+++ b/tests/ps-ref/symbol.ps
@@ -0,0 +1,578 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( 0, 0, 0 :) p
+(^@) sy
+() p 16 T ( 1, 1, 1 :) S
+(^A) sy
+() p 32 T ( 2, 2, 2 :) S
+(^B) sy
+() p 48 T ( 3, 3, 3 :) S
+(^C) sy n
+( 4, 4, 4 :) p
+(^D) sy
+() p 16 T ( 5, 5, 5 :) S
+(^E) sy
+() p 32 T ( 6, 6, 6 :) S
+(^F) sy
+() p 48 T ( 7, 7, 7 :) S
+(^G) sy n
+( 10, 8, 8 :) p
+(^H) sy
+() p 16 T ( 11, 9, 9 :) S
+() sy 32 T () S
+() p 40 T ( 12, 10, a :) N
+() S 8 T ( 13, 11, b :) S
+(^K) sy n
+( 14, 12, c :) p n
+(symbol.pre) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T ( 15, 13, d :) N
+() S 8 T ( 16, 14, e :) S
+(^N) sy
+() p 24 T ( 17, 15, f :) S
+(^O) sy n
+( 20, 16,10 :) p
+(^P) sy
+() p 16 T ( 21, 17,11 :) S
+(^Q) sy
+() p 32 T ( 22, 18,12 :) S
+(^R) sy
+() p 48 T ( 23, 19,13 :) S
+(^S) sy n
+( 24, 20,14 :) p
+(^T) sy
+() p 16 T ( 25, 21,15 :) S
+(^U) sy
+() p 32 T ( 26, 22,16 :) S
+(^V) sy
+() p 48 T ( 27, 23,17 :) S
+(^W) sy n
+( 30, 24,18 :) p
+(^X) sy
+() p 16 T ( 31, 25,19 :) S
+(^Y) sy
+() p 32 T ( 32, 26,1a :) S
+(^Z) sy
+() p 48 T ( 33, 27,1b :) S
+(^[) sy n
+( 34, 28,1c :) p
+(^\\) sy
+() p 16 T ( 35, 29,1d :) S
+(^]) sy
+() p 32 T ( 36, 30,1e :) S
+(^^) sy
+() p 48 T ( 37, 31,1f :) S
+(^_) sy n
+( 40, 32,20 :) p
+( ) sy
+() p 16 T ( 41, 33,21 :) S
+(!) sy
+() p 32 T ( 42, 34,22 :) S
+(") sy
+() p 48 T ( 43, 35,23 :) S
+(#) sy n
+( 44, 36,24 :) p
+($) sy
+() p 16 T ( 45, 37,25 :) S
+(%) sy
+() p 32 T ( 46, 38,26 :) S
+(&) sy
+() p 48 T ( 47, 39,27 :) S
+(') sy n
+( 50, 40,28 :) p
+(\() sy
+() p 16 T ( 51, 41,29 :) S
+(\)) sy
+() p 32 T ( 52, 42,2a :) S
+(*) sy
+() p 48 T ( 53, 43,2b :) S
+(+) sy n
+( 54, 44,2c :) p
+(,) sy
+() p 16 T ( 55, 45,2d :) S
+(-) sy
+() p 32 T ( 56, 46,2e :) S
+(.) sy
+() p 48 T ( 57, 47,2f :) S
+(/) sy n
+( 60, 48,30 :) p
+(0) sy
+() p 16 T ( 61, 49,31 :) S
+(1) sy
+() p 32 T ( 62, 50,32 :) S
+(2) sy
+() p 48 T ( 63, 51,33 :) S
+(3) sy n
+( 64, 52,34 :) p
+(4) sy
+() p 16 T ( 65, 53,35 :) S
+(5) sy
+() p 32 T ( 66, 54,36 :) S
+(6) sy
+() p 48 T ( 67, 55,37 :) S
+(7) sy n
+( 70, 56,38 :) p
+(8) sy
+() p 16 T ( 71, 57,39 :) S
+(9) sy
+() p 32 T ( 72, 58,3a :) S
+(:) sy
+() p 48 T ( 73, 59,3b :) S
+(;) sy n
+( 74, 60,3c :) p
+(<) sy
+() p 16 T ( 75, 61,3d :) S
+(=) sy
+() p 32 T ( 76, 62,3e :) S
+(>) sy
+() p 48 T ( 77, 63,3f :) S
+(?) sy n
+(100, 64,40 :) p
+(@) sy
+() p 16 T (101, 65,41 :) S
+(A) sy
+() p 32 T (102, 66,42 :) S
+(B) sy
+() p 48 T (103, 67,43 :) S
+(C) sy n
+(104, 68,44 :) p
+(D) sy
+() p 16 T (105, 69,45 :) S
+(E) sy
+() p 32 T (106, 70,46 :) S
+(F) sy
+() p 48 T (107, 71,47 :) S
+(G) sy n
+(110, 72,48 :) p
+(H) sy
+() p 16 T (111, 73,49 :) S
+(I) sy
+() p 32 T (112, 74,4a :) S
+(J) sy
+() p 48 T (113, 75,4b :) S
+(K) sy n
+(114, 76,4c :) p
+(L) sy
+() p 16 T (115, 77,4d :) S
+(M) sy
+() p 32 T (116, 78,4e :) S
+(N) sy
+() p 48 T (117, 79,4f :) S
+(O) sy n
+(120, 80,50 :) p
+(P) sy
+() p 16 T (121, 81,51 :) S
+(Q) sy
+() p 32 T (122, 82,52 :) S
+(R) sy
+() p 48 T (123, 83,53 :) S
+(S) sy n
+(124, 84,54 :) p
+(T) sy
+() p 16 T (125, 85,55 :) S
+(U) sy
+() p 32 T (126, 86,56 :) S
+(V) sy
+() p 48 T (127, 87,57 :) S
+(W) sy n
+(130, 88,58 :) p
+(X) sy
+() p 16 T (131, 89,59 :) S
+(Y) sy
+() p 32 T (132, 90,5a :) S
+(Z) sy
+() p 48 T (133, 91,5b :) S
+([) sy n
+(134, 92,5c :) p
+(\\) sy
+() p 16 T (135, 93,5d :) S
+(]) sy
+() p 32 T (136, 94,5e :) S
+(^) sy
+() p 48 T (137, 95,5f :) S
+(_) sy n
+(140, 96,60 :) p
+(`) sy
+() p 16 T (141, 97,61 :) S
+(a) sy
+() p 32 T (142, 98,62 :) S
+(b) sy
+() p 48 T (143, 99,63 :) S
+(c) sy n
+(144,100,64 :) p
+(d) sy
+() p 16 T (145,101,65 :) S
+(e) sy
+() p 32 T (146,102,66 :) S
+(f) sy
+() p 48 T (147,103,67 :) S
+(g) sy n
+(150,104,68 :) p
+(h) sy
+() p 16 T (151,105,69 :) S
+(i) sy
+() p 32 T (152,106,6a :) S
+(j) sy
+() p 48 T (153,107,6b :) S
+(k) sy n
+(154,108,6c :) p
+(l) sy
+() p 16 T (155,109,6d :) S
+(m) sy
+() p 32 T (156,110,6e :) S
+(n) sy
+() p 48 T (157,111,6f :) S
+(o) sy n
+(160,112,70 :) p
+(p) sy
+() p 16 T (161,113,71 :) S
+(q) sy
+() p 32 T (162,114,72 :) S
+(r) sy
+() p 48 T (163,115,73 :) S
+(s) sy n
+(164,116,74 :) p
+(t) sy
+() p 16 T (165,117,75 :) S
+(u) sy
+() p 32 T (166,118,76 :) S
+(v) sy
+() p 48 T (167,119,77 :) S
+(w) sy n
+(170,120,78 :) p
+(x) sy
+() p 16 T (171,121,79 :) S
+(y) sy
+() p 32 T (172,122,7a :) S
+(z) sy
+() p 48 T (173,123,7b :) S
+({) sy n
+(174,124,7c :) p
+(|) sy
+() p 16 T (175,125,7d :}) S 32 T (176,126,7e :) S
+(~) sy
+() p 48 T (177,127,7f :) S
+(^?) sy n
+(200,128,80 :) p
+(M-^@) sy
+() p 24 T (201,129,81 :) S
+(M-^A) sy
+() p 48 T (202,130,82 :) S
+(M-^B) sy
+() p 72 T (203,131,) N
+(83 :) S
+(M-^C) sy n
+(204,132,84 :) p
+(M-^D) sy
+() p 24 T (205,133,85 :) S
+(M-^E) sy
+() p 48 T (206,134,86 :) S
+(M-^F) sy
+() p 72 T (207,135,) N
+(87 :) S
+(M-^G) sy n
+(210,136,88 :) p
+(M-^H) sy
+() p 24 T (211,137,89 :) S
+(M-^I) sy
+() p 48 T (212,138,8a :) S
+(M-^J) sy
+() p 72 T (213,139,) N
+(8b :) S
+(M-^K) sy n
+(214,140,8c :) p
+(M-^L) sy
+() p 24 T (215,141,8d :) S
+(M-^M) sy
+() p 48 T (216,142,8e :) S
+(M-^N) sy
+() p 72 T (217,143,) N
+(8f :) S
+(M-^O) sy n
+(220,144,90 :) p
+(M-^P) sy
+() p 24 T (221,145,91 :) S
+(M-^Q) sy
+() p 48 T (222,146,92 :) S
+(M-^R) sy
+() p 72 T (223,147,) N
+(93 :) S
+(M-^S) sy n
+(224,148,94 :) p
+(M-^T) sy
+() p 24 T (225,149,95 :) S
+(M-^U) sy
+() p 48 T (226,150,96 :) S
+(M-^V) sy
+() p 72 T (227,151,) N
+(97 :) S
+(M-^W) sy n
+(230,152,98 :) p
+(M-^X) sy
+() p 24 T (231,153,99 :) S
+(M-^Y) sy
+() p 48 T (232,154,9a :) S
+(M-^Z) sy
+() p 72 T (233,155,) N
+(9b :) S
+(M-^[) sy n
+(234,156,9c :) p
+(M-^\\) sy
+() p 24 T (235,157,9d :) S
+(M-^]) sy
+() p 48 T (236,158,9e :) S
+(M-^^) sy
+() p 72 T (237,159,) N
+(9f :) S
+(M-^_) sy n
+(240,160,a0 :) p
+(\240) sy
+() p 16 T (241,161,a1 :) S
+(\241) sy
+() p 32 T (242,162,a2 :) S
+(\242) sy
+() p 48 T (243,163,a3 :) S
+(\243) sy n
+(244,164,a4 :) p
+(\244) sy
+() p 16 T (245,165,a5 :) S
+(\245) sy
+() p 32 T (246,166,a6 :) S
+(\246) sy
+() p 48 T (247,167,a7 :) S
+(\247) sy n
+(250,168,a8 :) p
+(\250) sy
+() p 16 T (251,169,a9 :) S
+(\251) sy
+() p 32 T (252,170,aa :) S
+(\252) sy
+() p 48 T (253,171,ab :) S
+(\253) sy n
+(254,172,ac :) p
+(\254) sy
+() p 16 T (255,173,ad :) S
+(\255) sy
+() p 32 T (256,174,ae :) S
+(\256) sy
+() p 48 T (257,175,af :) S
+(\257) sy n
+(260,176,b0 :) p
+(\260) sy
+() p 16 T (261,177,b1 :) S
+(\261) sy
+() p 32 T (262,178,b2 :) S
+(\262) sy
+() p 48 T (263,179,b3 :) S
+(\263) sy n
+(264,180,b4 :) p
+(\264) sy
+() p 16 T (265,181,b5 :) S
+(\265) sy
+() p 32 T (266,182,b6 :) S
+(\266) sy
+() p 48 T (267,183,b7 :) S
+(\267) sy n
+(270,184,b8 :) p
+(\270) sy
+() p 16 T (271,185,b9 :) S
+(\271) sy
+() p 32 T (272,186,ba :) S
+(\272) sy
+() p 48 T (273,187,bb :) S
+(\273) sy n
+(274,188,bc :) p
+(\274) sy
+() p 16 T (275,189,bd :) S
+(\275) sy
+() p 32 T (276,190,be :) S
+(\276) sy
+() p 48 T (277,191,bf :) S
+(\277) sy n
+(300,192,c0 :) p
+(\300) sy
+() p 16 T (301,193,c1 :) S
+(\301) sy
+() p 32 T (302,194,c2 :) S
+(\302) sy
+() p 48 T (303,195,c3 :) S
+(\303) sy n
+(304,196,c4 :) p
+(\304) sy
+() p 16 T (305,197,c5 :) S
+(\305) sy
+() p 32 T (306,198,c6 :) S
+(\306) sy
+() p 48 T (307,199,c7 :) S
+(\307) sy n
+(310,200,c8 :) p
+(\310) sy
+() p 16 T (311,201,c9 :) S
+(\311) sy
+() p 32 T (312,202,ca :) S
+(\312) sy
+() p 48 T (313,203,cb :) S
+(\313) sy n
+(314,204,cc :) p
+(\314) sy
+() p 16 T (315,205,cd :) S
+(\315) sy
+() p 32 T (316,206,ce :) S
+(\316) sy
+() p 48 T (317,207,cf :) S
+(\317) sy n
+(320,208,d0 :) p
+(\320) sy
+() p 16 T (321,209,d1 :) S
+(\321) sy
+() p 32 T (322,210,d2 :) S
+(\322) sy
+() p 48 T (323,211,d3 :) S
+(\323) sy n
+(324,212,d4 :) p
+(\324) sy
+() p 16 T (325,213,d5 :) S
+(\325) sy
+() p 32 T (326,214,d6 :) S
+(\326) sy
+() p 48 T (327,215,d7 :) S
+(\327) sy n
+(330,216,d8 :) p
+(\330) sy
+() p 16 T (331,217,d9 :) S
+(\331) sy
+() p 32 T (332,218,da :) S
+(\332) sy
+() p 48 T (333,219,db :) S
+(\333) sy n
+(334,220,dc :) p
+(\334) sy
+() p 16 T (335,221,dd :) S
+(\335) sy
+() p 32 T (336,222,de :) S
+(\336) sy
+() p 48 T (337,223,df :) S
+(\337) sy n
+(340,224,e0 :) p
+(\340) sy
+() p 16 T (341,225,e1 :) S
+(\341) sy
+() p 32 T (342,226,e2 :) S
+(\342) sy
+() p 48 T (343,227,e3 :) S
+(\343) sy n
+(344,228,e4 :) p
+(\344) sy
+() p 16 T (345,229,e5 :) S
+(\345) sy
+() p 32 T (346,230,e6 :) S
+(\346) sy
+() p 48 T (347,231,e7 :) S
+(\347) sy n
+(350,232,e8 :) p
+(\350) sy
+() p 16 T (351,233,e9 :) S
+(\351) sy
+() p 32 T (352,234,ea :) S
+(\352) sy
+() p 48 T (353,235,eb :) S
+(\353) sy n
+(354,236,ec :) p
+(\354) sy
+() p 16 T (355,237,ed :) S
+(\355) sy
+() p 32 T (356,238,ee :) S
+(\356) sy
+() p 48 T (357,239,ef :) S
+(\357) sy n
+(symbol.pre) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(360,240,f0 :) p
+(M-p) sy
+() p 16 T (361,241,f1 :) S
+(\361) sy
+() p 32 T (362,242,f2 :) S
+(\362) sy
+() p 48 T (363,243,f3 :) S
+(\363) sy n
+(364,244,f4 :) p
+(\364) sy
+() p 16 T (365,245,f5 :) S
+(\365) sy
+() p 32 T (366,246,f6 :) S
+(\366) sy
+() p 48 T (367,247,f7 :) S
+(\367) sy n
+(370,248,f8 :) p
+(\370) sy
+() p 16 T (371,249,f9 :) S
+(\371) sy
+() p 32 T (372,250,fa :) S
+(\372) sy
+() p 48 T (373,251,fb :) S
+(\373) sy n
+(374,252,fc :) p
+(\374) sy
+() p 16 T (375,253,fd :) S
+(\375) sy
+() p 32 T (376,254,fe :) S
+(\376) sy
+() p 48 T () N
+(symbol.pre) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/synopsys.ps b/tests/ps-ref/synopsys.ps
new file mode 100644
index 0000000..352a5bc
--- /dev/null
+++ b/tests/ps-ref/synopsys.ps
@@ -0,0 +1,106 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(/* presentation */) c n
+(company = ") p
+(Sorep) str
+(" ;) p n
+(designer = ") S
+(Philippe LE VAN) str
+(";) p n
+() N
+(/* alias communs */) c n
+(alias) K
+( h history) p n
+() N
+(/* presentation generale */) c n
+(view_background = ") p
+(black) str
+(";) p n
+(set_layer) K
+( pin_name_layer visible true) p n
+(set_layer) K
+( pin_name_layer red 65535) p n
+(set_layer) K
+( pin_name_layer green 0) p n
+(set_layer) K
+( pin_name_layer blue 0) p n
+() N
+(/* nom des bus pour un "change_names" */) c n
+(bus_naming_style = ") p
+(%s\(%d\)) str
+(") p n
+() N
+(/* definition des libraries */) c n
+(search_path={") p
+(/dtmref/ws/wskit/exploitation/erc32/V1.4.1/Global/SYNOPSYS/SYNOPSYS_1998.08) str
+("}) p n
+(library_fast = {") S
+(SC2RTP_BASIC_fast_5p5v_m55c.db) str
+("}) p n
+(library_nom = {") S
+(SC2RTP_BASIC_nom_5p0v_25c.db) str
+("}) p n
+(library_slow = {") S
+(SC2RTP_BASIC_slow_2p7v_145c.db) str
+("}) p n
+(link_library = {") S
+(*) str
+("} + library_slow) p n
+(target_library = library_slow) N
+(symbol_library = {") S
+(SC2RTP_BASIC.sdb) str
+("}) p n
+() N
+(/* ecriture d'une netliste vhdl */) c n
+(vhdlout_use_packages = {IEEE.std_logic_1164,sc2rtp_basic.basic_vcomponents.all}) p n
+(vhdlout_write_components = ") S
+(FALSE) str
+(") p n
+() N
+(/* lecture de l'edif */) c n
+(edifin_ground_net_property_name = ") p
+(INIT) str
+(") p n
+(edifin_ground_net_property_value = ") S
+(0SF) str
+(") p n
+( ) N
+(edifin_power_net_property_name = ") S
+(INIT) str
+(") p n
+(edifin_power_net_property_value = ") S
+(1SF) str
+(") p n
+() N
+(/* ecriture de l'edif \(pour qu'il ne retienne pas les info de schematic\) */) c n
+(edifout_netlist_only = ") p
+(TRUE) str
+(") p n
+() N
+(/* commande d'impression */) c n
+(plot_command = ") p
+(lpr -Planteeq1) str
+(") p n
+() N
+(synopsys.setup) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/tabulation.ps b/tests/ps-ref/tabulation.ps
new file mode 100644
index 0000000..0dfd036
--- /dev/null
+++ b/tests/ps-ref/tabulation.ps
@@ -0,0 +1,60 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() str n
+(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii) N
+(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii) N
+() p n
+(\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253) sy n
+(\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253\253) N
+(\\texttt{) p n
+(................................................................................) N
+(................................................................................) N
+(................................................................................) N
+(.........) N
+(}) N
+() e n
+( ^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+(^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+(^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+(^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q^Q) N
+() p n
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+() L n
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+() p n
+(\\invisible{) N
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) S 80 T () N
+(1) S 8 T (2) S 16 T (3) S 24 T (4) S 32 T (5) S 40 T (6) S 48 T (7) S 56 T (8) S 64 T (9) S 72 T (0) N
+(}) N
+() c n
+(m) S 8 T (mm) S 16 T (mmm) S 24 T (mmmm) S 32 T (mmmmm) S 40 T (mmmmmm) S 48 T (mmmmmmm) S 56 T (mmmmmmmm) S 72 T (mmmmmmmm) N
+(m) S 8 T (mmmmmmmmmmm) S 24 T (mmmmmmmmmmm) S 40 T (mmmmmmmmmmmm) N
+() p n
+() K n
+(\351) S 8 T (\351\351) S 16 T (\351\351\351) S 24 T (\351\351\351\351) S 32 T (\351\351\351\351\351) S 40 T (\351\351\351\351\351\351) S 48 T (\351\351\351\351\351\351\351) S 56 T (\351\351\351\351\351\351\351\351) S 72 T (\351\351\351\351\351\351\351\351) N
+(\351) S 8 T (\351\351\351\351\351\351\351\351\351\351\351) S 24 T (\351\351\351\351\351\351\351\351\351\351\351) S 40 T (\351\351\351\351\351\351\351\351\351\351\351\351) N
+() p n
+(tabulation.pre) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/template.ps b/tests/ps-ref/template.ps
new file mode 100644
index 0000000..0d51dd4
--- /dev/null
+++ b/tests/ps-ref/template.ps
@@ -0,0 +1,359 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(class) K
+( TEMPLATE2 ) p
+(inherit) K n
+() p n
+( ARGUMENTS) N
+( ) S
+(undefine) K n
+() p 8 T ( copy, consistent, is_equal, setup) N
+( ) S
+(end) K n
+() p n
+( TEMPLATE2_LEX) N
+( ) S
+(redefine) K n
+() p 8 T ( store_analyzer,) N
+() S 8 T ( retrieve_analyzer) N
+( ) S
+(end) K n
+() p n
+(creation) K n
+() p n
+( make) N
+() N
+(feature) K n
+() p n
+( root_line: TEMPLATE_CLAUSE;) N
+() N
+( analyzer_file_name: ) S
+(STRING) k
+( ) p
+(is) K
+( ") p
+(/inf/nana/infthes/demaille/eiffel/template2/lexical/template2_analyz) str n
+(er) S
+(";) p n
+() N
+( make ) S
+(is) K n
+( ) p
+(local) K n
+() p 8 T ( text_name: ) S
+(STRING) k
+(;) p n
+() S 8 T ( analyzer_file: RAW_FILE;) N
+() S 8 T ( analyzer_needs_storing: ) S
+(BOOLEAN) k
+(;) p n
+() S 8 T ( text_file: PLAIN_TEXT_FILE;) N
+() S 8 T ( argument_position: ) S
+(INTEGER) k n
+( ) p
+(do) K n
+() p 8 T ( ) S
+(if) K
+( argument_count = 0 ) p
+(then) K n
+() p 8 T ( io.putstring \(") S
+(Usage: template2 file_name%N) str
+("\);) p n
+() S 8 T ( ) S
+(else) K n
+() p 8 T ( !! root_line.make;) N
+() S 8 T ( io.putstring \(Separator_line_message\);) N
+() S 8 T ( io.putstring \(") S
+(TEMPLATE2) str
+("\);) p n
+() S 8 T ( io.putstring \(") S
+( \(Version 1.0\).) str 48 T ( \(C\)) S
+("\);) p n
+() S 8 T ( !! analyzer_file.make \(analyzer_file_name\);) N
+() S 8 T ( ) S
+(if) K
+( analyzer_file.exists ) p
+(then) K n
+() p 8 T ( io.putstring \(") S
+(%NRetrieving analyzer . . .) str
+("\);) p n
+() S 8 T ( retrieve_analyzer \(analyzer_file_name\);) N
+() S 8 T ( root_line.document.set_lexical \(analyzer\);) N
+() S 8 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+() S 8 T ( ) S
+(else) K n
+() p 8 T ( io.putstring \(") S
+(%NBuilding analyzer ... ) str
+("\);) p n
+() S 8 T ( build \(root_line.document\);) N
+() S 8 T ( analyzer_needs_storing := ) S
+(true) K n
+() p 8 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( ) N
+() S 8 T ( ) S
+(-- Test for left-recursion ?) c n
+() p 8 T ( ) S
+(-- test_left_recursion;) c n
+() p 8 T ( ) N
+() S 8 T ( text_name := argument \(1\);) N
+() S 8 T ( !! text_file.make \(text_name\);) N
+() S 8 T ( ) S
+(if) K
+( \() p
+(not) K
+( text_file.exists\) ) p
+(then) K n
+() p 8 T ( io.putstring \(text_name\);) N
+() S 8 T ( io.putstring \(") S
+(: No such file or directory%N) str
+("\);) p n
+() S 8 T ( ) S
+(else) K n
+() p 8 T ( root_line.document.set_input_file \(text_name\);) N
+() S 8 T ( root_line.document.get_token;) N
+() S 8 T ( io.putstring \(") S
+(%NParsing document in file: ) str
+("\)) p n
+() S 8 T ( io.putstring \(text_name\);) N
+() S 8 T ( io.putstring \(") S
+( ... ) str
+("\);) p n
+(template.e) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T ( root_line.parse;) N
+() S 8 T ( ) S
+(if) K
+( root_line.parsed ) p
+(then) K n
+() p 8 T () S 16 T ( io.putstring \(") S
+(DONE) str
+("\);) p n
+() S 8 T () S 16 T ( io.putstring \(") S
+(%NParse tree ... %N) str
+("\);) p n
+() S 8 T () S 16 T ( root_line.display \(io.output\);) N
+() S 8 T () S 16 T ( io.putstring \(") S
+(%NApplying semantics ... ) str
+("\);) p n
+() S 8 T () S 16 T ( root_line.semantics;) N
+() S 8 T () S 16 T ( io.putstring \(") S
+(DONE%N) str
+("\);) p n
+() S 8 T ( ) S
+(else) K n
+() p 8 T () S 16 T ( io.putstring \(") S
+(%NSyntax error with document) str
+("\);) p n
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( ) S
+(end) K n
+() p 8 T ( ) S
+(if) K
+( analyzer_needs_storing ) p
+(then) K n
+() p 8 T ( io.putstring \(") S
+(%NStoring analyzer ... ) str
+("\);) p n
+() S 8 T ( ) S
+(-- store_analyzer \(analyzer_file_name\);) c n
+() p 8 T ( io.putstring \(") S
+(DONE%N) str
+("\);) p n
+() S 8 T ( io.putstring \(Separator_line_message\);) N
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( io.new_line;) N
+() S 8 T ( ) S
+(end) K
+(;) p n
+( ) S
+(end) K
+(; ) p
+(-- make) c n
+( Separator_line_message: ) p
+(STRING) k
+( ) p
+(is) K
+( ") p
+(--------------------------------------------) str n
+(-------------------------------%N) S
+(";) p n
+() N
+( test_left_recursion ) S
+(is) K n
+() p 8 T ( ) S
+(-- Test root_line for left recursion.) c n
+( ) p
+(local) K n
+() p 8 T ( t_b: ) S
+(BOOLEAN) k
+(;) p n
+( ) S
+(do) K n
+() p 8 T ( root_line.print_mode.put \() S
+(true) K
+(\);) p n
+() S 8 T ( root_line.expand_all;) N
+() S 8 T ( t_b := ) S
+(not) K
+( root_line.left_recursion;) p n
+() S 8 T ( root_line.check_recursion;) N
+() S 8 T ( ) S
+(if) K
+( ) p
+(not) K
+( root_line.left_recursion.item ) p
+(then) K n
+() p 8 T ( io.putstring \(") S
+(No left recursion detected%N) str
+("\);) p n
+() S 8 T ( ) S
+(else) K n
+() p 8 T ( io.putstring \(") S
+(Left recursive.%N) str
+("\);) p n
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( ) N
+( ) S
+(end) K
+(; ) p
+(-- test_left_recursion) c n
+() p n
+( store_analyzer \(file_name: ) S
+(STRING) k
+(\) ) p
+(is) K n
+() p 8 T ( ) S
+(-- Store `analyzer' in file named `file_name'.) c n
+( ) p
+(require) K
+( ) p
+(else) K n
+() p 8 T ( initialized: initialized) N
+( ) S
+(local) K n
+() p 8 T ( store_file: RAW_FILE) N
+( ) S
+(do) K n
+() p 8 T ( ) S
+(if) K
+( analyzer = ) p
+(Void) K
+( ) p
+(then) K n
+() p 8 T ( !! analyzer.make) N
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( !! store_file.make_open_write \(file_name\);) N
+() S 8 T ( analyzer.basic_store \(store_file\);) N
+() S 8 T ( store_file.close;) N
+( ) S
+(end) K
+(; ) p
+(-- store_analyzer) c n
+() p n
+( retrieve_analyzer \(file_name: ) S
+(STRING) k
+(\) ) p
+(is) K n
+() p 8 T ( ) S
+(-- Retrieve `analyzer' from file named `file_name'.) c n
+( ) p
+(local) K n
+() p 8 T ( retrieved_file: RAW_FILE) N
+( ) S
+(do) K n
+() p 8 T ( ) S
+(if) K
+( analyzer = ) p
+(Void) K
+( ) p
+(then) K n
+() p 8 T ( !! analyzer.make) N
+() S 8 T ( ) S
+(end) K
+(;) p n
+() S 8 T ( !! retrieved_file.make_open_read \(file_name\);) N
+() S 8 T ( analyzer ?= analyzer.retrieved \(retrieved_file\);) N
+(template.e) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T ( retrieved_file.close;) N
+( ) S
+(end) K
+(; ) p
+(-- store_analyzer_feature) c n
+() p n
+(end) K
+( ) p
+(-- class TEMPLATE2) c n
+(template.e) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/toc.ps b/tests/ps-ref/toc.ps
new file mode 100644
index 0000000..7bf9b48
--- /dev/null
+++ b/tests/ps-ref/toc.ps
@@ -0,0 +1,233 @@
+%%Page: (2) 1
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T () p n
+0 T (#import "AppDelegate.h") N
+0 T () N
+0 T (#import <foundation/NSArray.h>) N
+(5) # (#import <dbkit/DBValue.h>) N
+0 T () N
+0 T (@implementation AppDelegate) N
+0 T () N
+0 T (// --------------------- Constants) N
+(10) # () N
+0 T (#define N_FIELDS) S 24 T () S 32 T (\(8\)) N
+0 T () N
+0 T (// --------------------- Global variables) N
+0 T () N
+(15) # (NSString) N
+0 T ( *AppDelegateNewSetNotificationName = @"AppDelegateNewSetNotification",) N
+0 T ( ) S 8 T (// This is the name of the notification sent out when a new) N
+0 T () S 8 T (// field set has been selected for manipulation.) N
+0 T ( *AppDelegateNewFieldNotificationName = @"AppDelegateNewSetNotification";) N
+(20) # ( ) S 8 T (// This is the name of the notification sent out when a new) N
+0 T () S 8 T (// field has been selected for manipulation.) N
+0 T ( ) N
+0 T (// --------------------- Class variables) N
+0 T () N
+(25) # (static NSMutableArray) N
+0 T () S 8 T (*classDefaultSet = nil;) N
+0 T () S 8 T () N
+0 T (// --------------------- Methods) N
+0 T () N
+(30) # (+ initize) N
+0 T ({) N
+0 T ( // This method will be called automatically prior to any) N
+0 T ( // other to this class.) N
+0 T ( ) N
+(35) # ( int ) N
+0 T ( ) S 8 T (i;) N
+0 T () S 8 T () N
+0 T ( // Create an array to hold the actual field objects.) N
+0 T ( classDefaultSet = [[NSMutableArray array] retain];) N
+(40) # ( ) S 8 T () S 16 T ( ) N
+0 T ( ) N
+0 T ( return self;) N
+0 T ( ) S 8 T () S 16 T ( ) N
+0 T (} // initize) N
+(45) # ( ) N
+0 T (- \(id <FieldSet>\)fieldSet) N
+0 T ({) N
+0 T ( // This method returns an object \(conforming to the FieldSet) N
+0 T ( // protocol\) which is being manipulated by this application. ) N
+(50) # ( ) N
+0 T ( // If we don't have one yet...) N
+0 T ( if \(!myFieldSet\)) N
+0 T ( {) N
+0 T ( ) S 8 T (// Just adopt the default one for this class.) N
+(55) # () S 8 T ([self setFieldSet:\(id\)classDefaultSet];) N
+0 T ( }) N
+0 T ( ) N
+0 T ( return myFieldSet;) N
+0 T ( ) N
+(60) # (} // fieldSet) N
+0 T () N
+0 T (- \(void\)setFieldSet:\(id <FieldSet>\)newValue) N
+0 T ({) N
+0 T ( // This method sets the field set being manipulated to the one given.) N
+(65) # ( // If the new set differs from the old, the AppDelegateNewSet) N
+0 T ( // notification will be posted informing watchers of the change.) N
+(AppDelegate.m) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (1) 2
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.167824 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+0 T (Table of Content) K n
+0 T () S
+( 1 ) p
+(AppDelegate.m.......) k
+( sheets 1 to 1 \( 1\) pages 1- 2 123 lines) p n
+0 T ( 2 ) S
+(InsertBlock.java....) k
+( sheets 1 to 1 \( 1\) pages 3- 3 42 lines) p n
+0 T ( 3 ) S
+(a2ps.man............) k
+( sheets 1 to 1 \( 1\) pages 4- 5 78 lines) p n
+(5) # ( 4 ) S
+(bookie.idl..........) k
+( sheets 1 to 1 \( 1\) pages 6- 7 98 lines) p n
+0 T ( 5 ) S
+(configure.in........) k
+( sheets 1 to 1 \( 1\) pages 8- 8 4 lines) p n
+0 T ( 6 ) S
+(confirm.m3..........) k
+( sheets 1 to 1 \( 1\) pages 9- 9 46 lines) p n
+0 T ( 7 ) S
+(ehandler............) k
+( sheets 1 to 1 \( 1\) pages 10- 10 66 lines) p n
+0 T ( 8 ) S
+(eplv_chkr.v.........) k
+( sheets 1 to 1 \( 1\) pages 11- 11 39 lines) p n
+(10) # ( 9 ) S
+(essai2.o2c..........) k
+( sheets 1 to 1 \( 1\) pages 12- 14 134 lines) p n
+0 T (10 ) S
+(ex1.asn1............) k
+( sheets 1 to 1 \( 1\) pages 15- 15 39 lines) p n
+0 T (11 ) S
+(ex_PSGETRS.f90......) k
+( sheets 1 to 1 \( 1\) pages 16- 18 193 lines) p n
+0 T (12 ) S
+(ShellNewDummyHook.pas) k
+( sheets 1 to 1 \( 1\) pages 19- 20 95 lines) p n
+0 T (13 ) S
+(formfeed.txt........) k
+( sheets 1 to 1 \( 1\) pages 21- 27 8 lines) p n
+(15) # (14 ) S
+(ftp2.pml............) k
+( sheets 1 to 1 \( 1\) pages 28- 34 456 lines) p n
+0 T (15 ) S
+(includeres..........) k
+( sheets 1 to 1 \( 1\) pages 35- 35 61 lines) p n
+0 T (16 ) S
+(mofibida.hs.........) k
+( sheets 1 to 1 \( 1\) pages 36- 36 51 lines) p n
+0 T (17 ) S
+(mtvplot.octave......) k
+( sheets 1 to 1 \( 1\) pages 37- 37 28 lines) p n
+0 T (18 ) S
+(mutex.py............) k
+( sheets 1 to 1 \( 1\) pages 38- 38 61 lines) p n
+(20) # (19 ) S
+(pi.b................) k
+( sheets 1 to 1 \( 1\) pages 39- 39 54 lines) p n
+0 T (20 ) S
+(polkaIDL.hh.........) k
+( sheets 1 to 1 \( 1\) pages 40- 41 122 lines) p n
+0 T (21 ) S
+(prosamp.pre.........) k
+( sheets 1 to 1 \( 1\) pages 42- 42 14 lines) p n
+0 T (22 ) S
+(psmandup............) k
+( sheets 1 to 1 \( 1\) pages 43- 47 270 lines) p n
+0 T (23 ) S
+(report.pre..........) k
+( sheets 1 to 1 \( 1\) pages 48- 51 220 lines) p n
+(25) # (24 ) S
+(run-help............) k
+( sheets 1 to 1 \( 1\) pages 52- 52 18 lines) p n
+0 T (25 ) S
+(s-garnam.adb........) k
+( sheets 1 to 1 \( 1\) pages 53- 59 429 lines) p n
+0 T (26 ) S
+(snacc.mib...........) k
+( sheets 1 to 1 \( 1\) pages 60- 61 109 lines) p n
+0 T (27 ) S
+(space.pls...........) k
+( sheets 1 to 1 \( 1\) pages 62- 62 48 lines) p n
+0 T (28 ) S
+(sqlcrtbl.sql........) k
+( sheets 1 to 1 \( 1\) pages 63- 65 193 lines) p n
+(30) # (29 ) S
+(sqlinit.ora.........) k
+( sheets 1 to 1 \( 1\) pages 66- 67 103 lines) p n
+0 T (30 ) S
+(sqlpq92.sql.........) k
+( sheets 1 to 1 \( 1\) pages 68- 68 6 lines) p n
+0 T (31 ) S
+(sqlspace.pkb........) k
+( sheets 1 to 1 \( 1\) pages 69- 69 48 lines) p n
+0 T (32 ) S
+(strange.mail........) k
+( sheets 1 to 1 \( 1\) pages 70- 72 143 lines) p n
+0 T (33 ) S
+(symbol.pre..........) k
+( sheets 1 to 1 \( 1\) pages 73- 75 67 lines) p n
+(35) # (34 ) S
+(synopsys.setup......) k
+( sheets 1 to 1 \( 1\) pages 76- 76 44 lines) p n
+0 T (35 ) S
+(tabulation.pre......) k
+( sheets 1 to 1 \( 1\) pages 77- 77 24 lines) p n
+0 T (36 ) S
+(template.e..........) k
+( sheets 1 to 1 \( 1\) pages 78- 80 135 lines) p n
+0 T (37 ) S
+(typing.cl...........) k
+( sheets 1 to 1 \( 1\) pages 81- 85 301 lines) p n
+0 T (38 ) S
+(vrcaml.ml...........) k
+( sheets 1 to 1 \( 1\) pages 86- 88 139 lines) p n
+(40) # (39 ) S
+(wide.txt............) k
+( sheets 1 to 1 \( 1\) pages 89- 91 72 lines) p n
+0 T () S
+(End of toc) K n
+(Table of Content) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/typing.ps b/tests/ps-ref/typing.ps
new file mode 100644
index 0000000..e1cd019
--- /dev/null
+++ b/tests/ps-ref/typing.ps
@@ -0,0 +1,570 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(//------------------------------------------------------------------+) c n
+(// MARIE Yves Caseau |) N
+(// typing.cl |) N
+(// |) N
+(// Moteur Algebrique pour la Resolution d'Inferences Elementaires |) N
+(// Copyright \(C\) 1986-97 by Y. CASEAU. All Rights Reserved |) N
+(//------------------------------------------------------------------+) N
+() p n
+(//-------------------------------------------------------------------) c n
+(//This file contains:) N
+(//a lot of useful stuff for manipulating algebraic terms) N
+(//-------------------------------------------------------------------) N
+() p n
+(//*******************************************************************) C n
+(//* Part 1: get_range/get_domain *) N
+(//* Part 2: Utility methods for compilation *) N
+(//* Part 3: Inversion of Properties *) N
+(//*******************************************************************) N
+() p n
+(//*******************************************************************) C n
+(//* Part 1: get_range/get_domain *) N
+(//*******************************************************************) N
+() p n
+(// a small range inference algorithm, to improve the system) c n
+(//) N
+(get_range\(self:abstract_relation,x:type\) : type) p n
+( ) S
+(->) K
+( \() p
+(case) K
+( self) p n
+( \(phi x, ) N
+( composition get_range\(self.r1,) N
+( get_range\(self.r2, x\)\),) N
+( ands get_range\(self.r1, x\) ^) N
+( get_range\(self.r2, x\),) N
+( ors get_range\(self.r1, x\) U) N
+( get_range\(self.r2, x\),) N
+( psi \() S
+(if) K
+( \(self.op % class\) self.op) p n
+( ) S
+(else) K
+( extract_range\(self.op,) p n
+( list\(get_range\(self.r1, x\),) N
+( get_range\(self.r2, x\)\)\)\),) N
+( array \() S
+(if) K
+( self.multivalued? member\(self.range\) ) p
+(else) K
+( self.range\),) p n
+( property \() S
+(if) K
+( \(self = Id\) x ) p
+(else) K
+( extract_range\(self, list\(x\)\)\), ) p n
+( product self.ens, ) N
+( annotation get_range\(self.v.definition, x\),) N
+( connotation get_range\(self.r, x\),) N
+( denotation \() S
+(if) K
+( unknown?\(definition, self.v\)) p n
+( self.v.range) N
+( ) S
+(else) K
+( get_range\(self.v.definition,) p n
+( x\)\),) N
+( property_inverse ) N
+( get_domain\(self.r, x\),) N
+( any error\(") S
+(error: range is not defined for ~S\(~S\)) str
+(", self,) p n
+( owner\(self\)\)\)\) ) N
+() N
+(// a similar domain inference algorithm) c n
+(//) N
+(get_domain\(self:abstract_relation,x:type\) : type) p n
+( ) S
+(->) K
+( \() p
+(case) K
+( self) p n
+( \(phi x, ) N
+( composition get_domain\(self.r2,) N
+( get_domain\(self.r1,) N
+( x\)\),) N
+( ands get_domain\(self.r1, x\) ^ ) N
+( get_domain\(self.r2, x\),) N
+( ors get_domain\(self.r1, x\) U) N
+( get_domain\(self.r2, x\),) N
+( property \() S
+(if) K
+( \(self = Id\) x) p n
+( ) S
+(else) K
+( ) p
+(let) K
+( y := {} ) p
+(in) K
+( ) p n
+(typing.cl) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( \() p
+(for) K
+( r ) p
+(in) K
+( self.restrictions ) p n
+( \() S
+(if) K
+( \(self.multivalued? | x ^ r.range\)) p n
+( y :U domain!\(r\)\),) N
+( y\)\),) N
+( property_inverse ) N
+( get_range\(self.r, x\),) N
+( product \() S
+(if) K
+( known?\(BASE\) BASE ) p
+(else) K
+( any\),) p n
+( psi \() S
+(if) K
+( inv?\(self\)) p n
+( get_range\(inverse!\(self\), x\)) N
+( ) S
+(else) K
+( domain!\(self.r1\) ^ domain!\(self.r2\)\),) p n
+( psi get_domain\(self.r1, x\) ^) N
+( get_domain\(self.r2, x\),) N
+( denotation get_domain\(self.v.definition, x\),) N
+( any domain!\(self\)\)\)) N
+() N
+(// we extend range_type to take the type of arguments into account.) c n
+(//) N
+(extract_range\(self:property,l:list\) : type) p n
+( ) S
+(->) K
+( \() p
+(let) K
+( %first := l[1],) p n
+( %rest := \(copy\(l\) << 1\),) N
+( prop := Optimize/restriction!\(self, l\),) N
+( %res := \() S
+(case) K
+( prop \(restriction prop.range, any self.range\)\) ) p
+(in) K
+( ) p n
+( \() S
+(if) K
+( self.multivalued? member\(%res\) ) p
+(else) K
+( %res\)\) ) p n
+(extract_range\(self:property_operator,l:list\) : type) N
+( ) S
+(->) K
+( extract_range\(self.op, l\) ) p n
+() N
+(// A small range inference algorithm, to improve the system.) c n
+(// \(x X y\) is the signature of the input pair) N
+(//) N
+(get_range\(self:derivative,x:type,y:type\) : type) p n
+( ) S
+(->) K
+( \() p
+(case) K
+( self) p n
+( \(Tone y, ) N
+( Tinv x,) N
+( Tphi get_domain\(self.e1, x, y\),) N
+( compr get_range\(self.r1,) N
+( get_range\(self.e2, x, y\)\),) N
+( compl get_range\(self.e1, x, y\),) N
+( Tand get_range\(self.e1, x, y\) ^) N
+( get_range\(self.r2, any\),) N
+( Tunion get_range\(self.e1, x, y\) U) N
+( get_range\(self.e2, x, y\),) N
+( Tpsi extract_range\(self.op,) N
+( list\(get_range\(self.e1, x, y\),) N
+( get_range\(self.r2,) N
+( get_domain\(self.e1, x, y\)\)\)) N
+(\),) N
+( Tannotation2) N
+( get_range\(self.e1, x, y\),) N
+( Tannotation1) N
+( get_range\(self.v.definition, any\),) N
+( Tconnotation2) N
+( get_range\(self.r,) N
+( get_domain\(self.e1, x, y\)\),) N
+( Tconnotation1) N
+( get_range\(self.e1, x, y\),) N
+( Tif get_range\(self.r1,) N
+( get_domain\(self.e1, x, y\)\) U) N
+( get_range\(self.r2,) N
+( get_domain\(self.e1, x, y\)\),) N
+( Tdenotation get_range\(self.e1, x, y\),) N
+( any error\(") S
+(error: get_range is not defined for ~S \(~S\)) str
+(", self,) p n
+( owner\(self\)\)\)\) ) N
+() N
+(// A small domain inference algorithm, to improve the system.) c n
+(// \(x X y\) is the signature of the input pair) N
+(//) N
+(typing.cl) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(get_domain\(self:derivative,x:type,y:type\) : type) p n
+( ) S
+(->) K
+( \() p
+(case) K
+( self) p n
+( \(Tone x, ) N
+( Tinv y,) N
+( Tphi get_domain\(self.e1, x, y\),) N
+( compr get_domain\(self.e2, x, y\),) N
+( compl get_domain\(self.r2,) N
+( get_domain\(self.e1, x, y\)\),) N
+( Tand get_domain\(self.e1, x, y\) ^) N
+( get_domain\(self.r2, any\),) N
+( Tunion get_domain\(self.e1, x, y\) U) N
+( get_domain\(self.e2, x, y\),) N
+( Tpsi get_domain\(self.e1, x, y\) ^) N
+( get_domain\(self.r2, any\),) N
+( Tannotation2) N
+( get_domain\(self.e1, x, y\),) N
+( Tannotation1) N
+( get_domain\(self.e1, x, y\) ^) N
+( get_domain\(self.v.definition, any\),) N
+( Tconnotation2) N
+( get_domain\(self.v.definition, any\),) N
+( Tconnotation1) N
+( get_domain\(self.e1, x, y\),) N
+( Tdenotation get_domain\(self.e1, x, y\),) N
+( Tif get_domain\(self.e1, x, y\),) N
+( any error\(") S
+(error: get_domain is not defined for ~S \(~S\)) str
+(", self,) p n
+( owner\(self\)\)\)\) ) N
+() N
+(//*******************************************************************) C n
+(//* Part 2: Utility methods for compilation *) N
+(//*******************************************************************) N
+(// a protected substitution) c n
+(//) N
+(Logic/cpsubst\(self:any,x:any,y:any\) : any) p n
+( ) S
+(->) K
+( substitution\(instruction_copy\(self\), x, y\)) p n
+() N
+(// instruction copy with fresh local variables) c n
+(//) N
+(Logic/cpfresh\(self:any\) : any) p n
+( ) S
+(->) K
+( \() p
+(let) K
+( l := bound_variables\(self\),) p n
+( x := instruction_copy\(self\) ) S
+(in) K
+( ) p n
+( \() S
+(for) K
+( y ) p
+(in) K
+( l x := substitution\(x, y, Variable\(pname = y.pname\)\), x\)\) ) p n
+() N
+(// make a copy with fresh variable + a substitution) c n
+(//) N
+(cpfresh\(self:any,x1:Variable,x2:Variable\) : any) p n
+( ) S
+(->) K
+( substitution\(cpfresh\(self\), x1, x2\)) p n
+() N
+(// make a new two variable conclusion) c n
+(//) N
+(cpfresh\(self:any,x1:Variable,x2:Variable,y1:Variable,y2:Variable\) : any) p n
+( ) S
+(->) K
+( substitution\(substitution\(cpfresh\(self\), x1, x2\), y1, y2\)) p n
+() N
+(// we create so many binary messages ...) c n
+(//) N
+(Logic/message!\(x:any,p:property,y:any\) : Call ) p
+(->) K
+( Call\(p, list\(x, y\)\)) p n
+() N
+(Logic/make_a_and\(self:list\) : any) N
+( ) S
+(->) K
+( \() p
+(if) K
+( \(size\(self\) = 1\) self[1] ) p
+(else) K
+( And\(args = self\)\)) p n
+() N
+(//*******************************************************************) C n
+(//* Part 3: Inversion of Properties *) N
+(//*******************************************************************) N
+(// now we van define the inversion of a psi ------------------------) c n
+(//) N
+(// a psi term is usually non inversible.) N
+(typing.cl) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (4) 4
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(// two exceptions are interesting:) c n
+(// - the second subterm is a constant \(a constant is always placed) N
+(// in the second place\) and we have an addition or a multiplication) N
+(// - the two subterm are inversible and the operation is a mapping) N
+(//) N
+(inv?\(self:psi\) : boolean) p n
+( ) S
+(->) K
+( \() p
+(let) K
+( %d := description[self.op] ) p
+(in) K n
+( \(\(%d = group_operation &) p n
+( \(inv?\(self.r1\) & self.r2 % product\)\) | ) N
+( \(\(%d = monoid |) N
+( \(%d = binary_operation & ) N
+( known?\(ternary_inverse_of[self.op]\)\)\) & ) N
+( \(\(inv?\(self.r1\) & const?\(self.r2\)\) |) N
+( \(inv?\(self.r2\) & const?\(self.r1\)\)\)\)\)\)) N
+() N
+(// this is only called if the psi is inversible) c n
+(//) N
+(inverse!\(self:psi\) : any) p n
+( ) S
+(->) K
+( \() p
+(let) K
+( %o := self.op,) p n
+( t1 := self.r1,) N
+( t2 := self.r2 ) S
+(in) K n
+( \() p
+(if) K
+( \(description[%o] = group_operation\)) p n
+( compose\(inverse!\(t1\), ) N
+( psify\(%o, Id,) N
+( compose\(function_inverse[%o],) N
+( t2\)\)\)) N
+( ) S
+(else) K
+( ) p
+(if) K
+( \(description[%o] = monoid\) ) p n
+( \() S
+(if) K
+( const?\(t2\) ) p n
+( compose\(inverse!\(t1\),) N
+( compose\(psify\(ternary_inverse[%o],) N
+( Id, t2\),) N
+( phi\(op = ) N
+( comparison_inverse[%o],) N
+( r1 = Id,) N
+( r2 = t2\)\)\)) N
+( ) S
+(else) K
+( compose\(inverse!\(t2\),) p n
+( compose\(psify\(ternary_inverse[%o],) N
+( Id, t1\),) N
+( phi\(op = ) N
+( comparison_inverse[%o],) N
+( r1 = Id,) N
+( r2 = t1\)\)\)\)) N
+( ) S
+(else) K
+( ) p
+(if) K
+( known?\(ternary_inverse_of[%o]\)) p n
+( \() S
+(if) K
+( const?\(t2\)) p n
+( compose\(inverse!\(t1\),) N
+( psify\(ternary_inverse_of[%o],) N
+( Id, t2\)\)) N
+( ) S
+(else) K
+( compose\(inverse!\(t2\), psify\(%o, t1, Id\)\)\) ) p n
+( ) S
+(else) K
+( ) p
+(if) K
+( \(description[%o] = mapping\)) p n
+( ands\(r1 = ) N
+( compose\(inverse!\(t1\),) N
+( projection1[%o]\),) N
+( r2 =) N
+( compose\(inverse!\(t2\),) N
+( projection2[%o]\)\)\)\)) N
+() N
+(// check if a relation can be inversed without trouble) c n
+(//) N
+(inv?\(self:relation\) : boolean) p n
+( ) S
+(->) K
+( \(known?\(inverse, self\) |) p n
+( \() S
+(case) K
+( self ) p n
+( \(relation finite?\(self.domain\), ) N
+( property not\({ r ) S
+(in) K
+( self.restrictions | ) p n
+( not\(finite?\(domain!\(r\)\)\)}\)\)\)\)) N
+(inverse!\(self:relation\) : relation) N
+( ) S
+(->) K
+( \() p
+(let) K
+( r1 := get\(inverse, self\) ) p
+(in) K n
+(typing.cl) (right) (4) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (4) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (5) 5
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+( ) p
+(case) K
+( r1) p n
+( \(relation r1,) N
+( any property_inverse\(r = self\)\)\)) N
+() N
+(// a constant expression is either a constant or an expression involving) c n
+(// constants) N
+(//) N
+(const?\(self:abstract_relation\) : boolean) p n
+( ) S
+(->) K
+( \() p
+(case) K
+( self) p n
+( \(constant true, ) N
+( composition const?\(self.r2\),) N
+( psi \(const?\(self.r1\) &) N
+( const?\(self.r2\)\)\)\)) N
+() N
+(//*******************************************************************) C n
+(//* Part 4: Algebra Canonical Injection *) N
+(//*******************************************************************) N
+() p n
+(domain!\(r:relation\) : type ) S
+(->) K
+( r.domain) p n
+() N
+(// a property is an abstract relation ----------------------------------) c n
+(// "inversion" is straightforward, we create a message) N
+(//) N
+(inversion\(self:property,x:any,y:Variable\) : any) p n
+( ) S
+(->) K
+( \() p
+(if) K
+( self.multivalued?) p n
+( Call\(selector = %, args = list\(y, inversion!\(self, x\)\)\) ) N
+( ) S
+(else) K
+( Call\(selector = =, args = list\(y, inversion!\(self, x\)\)\)\)) p n
+(inversion!\(self:property,x:any\) : any) N
+( ) S
+(->) K
+( \() p
+(if) K
+( \(self = Id\) x ) p
+(else) K
+( Call\(selector = self, args = list\(x\)\)\)) p n
+() N
+(// an extensional relation) c n
+(//) N
+(inversion\(self:array,x:any,y:Variable\) : any) p n
+( ) S
+(->) K
+( Call\(selector = =, args = list\(y, inversion!\(self, x\)\)\)) p n
+(inversion!\(self:array,x:any\) : any) N
+( ) S
+(->) K
+( Call\(selector = nth, args = list\(self, x\)\)) p n
+() N
+(typing.cl) (right) (5) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (5) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/vrcaml.ps b/tests/ps-ref/vrcaml.ps
new file mode 100644
index 0000000..689c172
--- /dev/null
+++ b/tests/ps-ref/vrcaml.ps
@@ -0,0 +1,446 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(\(**************************************************************************\)) c n
+(\(* Creation and manipulation of VRML objects *\)) N
+(\(**************************************************************************\)) N
+() p n
+(#) S
+(open) K
+( ") p
+(VRcaML) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(default) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(exceptions) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(basic_types) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(font) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(fonts) str
+(";;) p n
+(#) S
+(open) K
+( ") p
+(colors) str
+(";;) p n
+() N
+() N
+() N
+() N
+(\(**************************************************************************\)) c n
+(\(* Creation of VRML objects *\)) N
+(\(**************************************************************************\)) N
+() p n
+(\(* New empty referential **************************************************\)) c n
+() p n
+(\(* new_referential: vrml_object *\)) c n
+(let) K
+( new_referential = default_vrml_object ;;) p n
+() N
+() N
+(\(* New VRML object ********************************************************\)) c n
+() p n
+(\(* new_vrml_object :) c n
+( vrml_positionable list -> vrml_object list -> vect3D -> rotation) N
+(-> vect3D -> frame -> bool -> anchor -> billboard -> collision) N
+(-> vrml_object *\)) N
+(let) K
+( new_vrml_object objects children position rotation scale) p n
+( frame unique anchor billboard collision =) N
+( { objects = objects ;) N
+( children = children ;) N
+( position = position ;) N
+( rotation = rotation ;) N
+( scale = scale ;) N
+( frame = frame ;) N
+( unique = unique ;) N
+( anchor = anchor ;) N
+( billboard = billboard ;) N
+( collision = collision }) N
+(;;) N
+() N
+() N
+(\(**************************************************************************\)) c n
+(\(* Setting fields *\)) N
+(\(**************************************************************************\)) N
+() p n
+(\(* set_objects : vrml_object -> vrml_positionable list -> vrml_object *\)) c n
+(let) K
+( setf_objects ) p
+(object) K
+( objects =) p n
+( new_vrml_object objects ) S
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(let) K
+( set_objects = setf_objects ;;) p n
+() N
+(\(* set_children : vrml_object -> vrml_object list -> vrml_object *\)) c n
+(let) K
+( setf_children ) p
+(object) K
+( children =) p n
+( new_vrml_object ) S
+(object) K
+(.objects children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(vrcaml.ml) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(;;) p n
+() N
+(let) K
+( set_children = setf_children ;;) p n
+() N
+(\(* setf_position : vrml_object -> float -> float -> float -> vrml_object *\)) c n
+(let) K
+( setf_position ) p
+(object) K
+( position =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(\(* setf_rotation :) c n
+( vrml_object -> float -> float -> float -> float -> vrml_object *\)) N
+(let) K
+( setf_rotation ) p
+(object) K
+( rotation =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( rotation ) S
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(\(* setf_scale : vrml_object -> float -> float -> float -> vrml_object *\)) c n
+(let) K
+( setf_scale ) p
+(object) K
+( scale =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(\(* setf_frame : vrml_object -> frame -> vrml_object *\)) c n
+(let) K
+( setf_frame ) p
+(object) K
+( frame =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(let) K
+( set_frame = setf_frame ;;) p n
+() N
+(\(* setf_unique : vrml_object -> bool -> vrml_object *\)) c n
+(let) K
+( setf_unique ) p
+(object) K
+( unique =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( unique ) S
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(let) K
+( set_unique = setf_unique ;;) p n
+() N
+(\(* setf_anchor : vrml_object -> anchor -> vrml_object *\)) c n
+(let) K
+( setf_anchor ) p
+(object) K
+( anchor =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique anchor ) p
+(object) K
+(.billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(\(* setf_billboard : vrml_object -> billboard -> vrml_object *\)) c n
+(let) K
+( setf_billboard ) p
+(object) K
+( billboard =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor billboard) p n
+( ) S
+(object) K
+(.collision) p n
+(;;) N
+() N
+(\(* setf_collision : vrml_object -> collision -> vrml_object *\)) c n
+(vrcaml.ml) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(let) K
+( setf_collision ) p
+(object) K
+( collision =) p n
+( new_vrml_object ) S
+(object) K
+(.objects ) p
+(object) K
+(.children ) p
+(object) K
+(.position) p n
+( ) S
+(object) K
+(.rotation ) p
+(object) K
+(.scale ) p
+(object) K
+(.frame) p n
+( ) S
+(object) K
+(.unique ) p
+(object) K
+(.anchor ) p
+(object) K
+(.billboard) p n
+( collision) N
+(;;) N
+(vrcaml.ml) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/ps-ref/wide.ps b/tests/ps-ref/wide.ps
new file mode 100644
index 0000000..8638ebb
--- /dev/null
+++ b/tests/ps-ref/wide.ps
@@ -0,0 +1,144 @@
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T (This is a test for the coverage of the whole ascii) N
+() S 8 T (char set \(from 0 to 255\)) N
+(--------------------------------------------------------------) N
+( 0, 0, 0 :^@) S 16 T ( 1, 1, 1 :^A) S 32 T ( 2, 2, 2 :^B) S 48 T ( 3, 3, 3 :^C) N
+( 4, 4, 4 :^D) S 16 T ( 5, 5, 5 :^E) S 32 T ( 6, 6, 6 :^F) S 48 T ( 7, 7, 7 :^G) N
+( 10, 8, 8 :^H) S 16 T ( 11, 9, 9 :) S 32 T () S 40 T ( 12, 10, a :) N
+() S 8 T ( 13, 11, b :^K) N
+( 14, 12, c :) N
+(wide.txt) (right) (1) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (1) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (2) 2
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+() p 8 T ( 15, 13, d :) N
+() S 8 T ( 16, 14, e :^N) S 24 T ( 17, 15, f :^O) N
+( 20, 16,10 :^P) S 16 T ( 21, 17,11 :^Q) S 32 T ( 22, 18,12 :^R) S 48 T ( 23, 19,13 :^S) N
+( 24, 20,14 :^T) S 16 T ( 25, 21,15 :^U) S 32 T ( 26, 22,16 :^V) S 48 T ( 27, 23,17 :^W) N
+( 30, 24,18 :^X) S 16 T ( 31, 25,19 :^Y) S 32 T ( 32, 26,1a :^Z) S 48 T ( 33, 27,1b :^[) N
+( 34, 28,1c :^\\) S 16 T ( 35, 29,1d :^]) S 32 T ( 36, 30,1e :^^) S 48 T ( 37, 31,1f :^_) N
+( 40, 32,20 : ) S 16 T ( 41, 33,21 :!) S 32 T ( 42, 34,22 :") S 48 T ( 43, 35,23 :#) N
+( 44, 36,24 :$) S 16 T ( 45, 37,25 :%) S 32 T ( 46, 38,26 :&) S 48 T ( 47, 39,27 :') N
+( 50, 40,28 :\() S 16 T ( 51, 41,29 :\)) S 32 T ( 52, 42,2a :*) S 48 T ( 53, 43,2b :+) N
+( 54, 44,2c :,) S 16 T ( 55, 45,2d :-) S 32 T ( 56, 46,2e :.) S 48 T ( 57, 47,2f :/) N
+( 60, 48,30 :0) S 16 T ( 61, 49,31 :1) S 32 T ( 62, 50,32 :2) S 48 T ( 63, 51,33 :3) N
+( 64, 52,34 :4) S 16 T ( 65, 53,35 :5) S 32 T ( 66, 54,36 :6) S 48 T ( 67, 55,37 :7) N
+( 70, 56,38 :8) S 16 T ( 71, 57,39 :9) S 32 T ( 72, 58,3a ::) S 48 T ( 73, 59,3b :;) N
+( 74, 60,3c :<) S 16 T ( 75, 61,3d :=) S 32 T ( 76, 62,3e :>) S 48 T ( 77, 63,3f :?) N
+(100, 64,40 :@) S 16 T (101, 65,41 :A) S 32 T (102, 66,42 :B) S 48 T (103, 67,43 :C) N
+(104, 68,44 :D) S 16 T (105, 69,45 :E) S 32 T (106, 70,46 :F) S 48 T (107, 71,47 :G) N
+(110, 72,48 :H) S 16 T (111, 73,49 :I) S 32 T (112, 74,4a :J) S 48 T (113, 75,4b :K) N
+(114, 76,4c :L) S 16 T (115, 77,4d :M) S 32 T (116, 78,4e :N) S 48 T (117, 79,4f :O) N
+(120, 80,50 :P) S 16 T (121, 81,51 :Q) S 32 T (122, 82,52 :R) S 48 T (123, 83,53 :S) N
+(124, 84,54 :T) S 16 T (125, 85,55 :U) S 32 T (126, 86,56 :V) S 48 T (127, 87,57 :W) N
+(130, 88,58 :X) S 16 T (131, 89,59 :Y) S 32 T (132, 90,5a :Z) S 48 T (133, 91,5b :[) N
+(134, 92,5c :\\) S 16 T (135, 93,5d :]) S 32 T (136, 94,5e :^) S 48 T (137, 95,5f :_) N
+(140, 96,60 :`) S 16 T (141, 97,61 :a) S 32 T (142, 98,62 :b) S 48 T (143, 99,63 :c) N
+(144,100,64 :d) S 16 T (145,101,65 :e) S 32 T (146,102,66 :f) S 48 T (147,103,67 :g) N
+(150,104,68 :h) S 16 T (151,105,69 :i) S 32 T (152,106,6a :j) S 48 T (153,107,6b :k) N
+(154,108,6c :l) S 16 T (155,109,6d :m) S 32 T (156,110,6e :n) S 48 T (157,111,6f :o) N
+(160,112,70 :p) S 16 T (161,113,71 :q) S 32 T (162,114,72 :r) S 48 T (163,115,73 :s) N
+(164,116,74 :t) S 16 T (165,117,75 :u) S 32 T (166,118,76 :v) S 48 T (167,119,77 :w) N
+(170,120,78 :x) S 16 T (171,121,79 :y) S 32 T (172,122,7a :z) S 48 T (173,123,7b :{) N
+(174,124,7c :|) S 16 T (175,125,7d :}) S 32 T (176,126,7e :~) S 48 T (177,127,7f :^?) N
+(200,128,80 :M-^@) S 24 T (201,129,81 :M-^A) S 48 T (202,130,82 :M-^B) S 72 T (203,131,) N
+(83 :M-^C) N
+(204,132,84 :M-^D) S 24 T (205,133,85 :M-^E) S 48 T (206,134,86 :M-^F) S 72 T (207,135,) N
+(87 :M-^G) N
+(210,136,88 :M-^H) S 24 T (211,137,89 :M-^I) S 48 T (212,138,8a :M-^J) S 72 T (213,139,) N
+(8b :M-^K) N
+(214,140,8c :M-^L) S 24 T (215,141,8d :M-^M) S 48 T (216,142,8e :M-^N) S 72 T (217,143,) N
+(8f :M-^O) N
+(220,144,90 :M-^P) S 24 T (221,145,91 :M-^Q) S 48 T (222,146,92 :M-^R) S 72 T (223,147,) N
+(93 :M-^S) N
+(224,148,94 :M-^T) S 24 T (225,149,95 :M-^U) S 48 T (226,150,96 :M-^V) S 72 T (227,151,) N
+(97 :M-^W) N
+(230,152,98 :M-^X) S 24 T (231,153,99 :M-^Y) S 48 T (232,154,9a :M-^Z) S 72 T (233,155,) N
+(9b :M-^[) N
+(234,156,9c :M-^\\) S 24 T (235,157,9d :M-^]) S 48 T (236,158,9e :M-^^) S 72 T (237,159,) N
+(9f :M-^_) N
+(240,160,a0 :\240) S 16 T (241,161,a1 :\241) S 32 T (242,162,a2 :\242) S 48 T (243,163,a3 :\243) N
+(244,164,a4 :\244) S 16 T (245,165,a5 :\245) S 32 T (246,166,a6 :\246) S 48 T (247,167,a7 :\247) N
+(250,168,a8 :\250) S 16 T (251,169,a9 :\251) S 32 T (252,170,aa :\252) S 48 T (253,171,ab :\253) N
+(254,172,ac :\254) S 16 T (255,173,ad :\255) S 32 T (256,174,ae :\256) S 48 T (257,175,af :\257) N
+(260,176,b0 :\260) S 16 T (261,177,b1 :\261) S 32 T (262,178,b2 :\262) S 48 T (263,179,b3 :\263) N
+(264,180,b4 :\264) S 16 T (265,181,b5 :\265) S 32 T (266,182,b6 :\266) S 48 T (267,183,b7 :\267) N
+(270,184,b8 :\270) S 16 T (271,185,b9 :\271) S 32 T (272,186,ba :\272) S 48 T (273,187,bb :\273) N
+(274,188,bc :\274) S 16 T (275,189,bd :\275) S 32 T (276,190,be :\276) S 48 T (277,191,bf :\277) N
+(300,192,c0 :\300) S 16 T (301,193,c1 :\301) S 32 T (302,194,c2 :\302) S 48 T (303,195,c3 :\303) N
+(304,196,c4 :\304) S 16 T (305,197,c5 :\305) S 32 T (306,198,c6 :\306) S 48 T (307,199,c7 :\307) N
+(310,200,c8 :\310) S 16 T (311,201,c9 :\311) S 32 T (312,202,ca :\312) S 48 T (313,203,cb :\313) N
+(314,204,cc :\314) S 16 T (315,205,cd :\315) S 32 T (316,206,ce :\316) S 48 T (317,207,cf :\317) N
+(320,208,d0 :\320) S 16 T (321,209,d1 :\321) S 32 T (322,210,d2 :\322) S 48 T (323,211,d3 :\323) N
+(324,212,d4 :\324) S 16 T (325,213,d5 :\325) S 32 T (326,214,d6 :\326) S 48 T (327,215,d7 :\327) N
+(330,216,d8 :\330) S 16 T (331,217,d9 :\331) S 32 T (332,218,da :\332) S 48 T (333,219,db :\333) N
+(334,220,dc :\334) S 16 T (335,221,dd :\335) S 32 T (336,222,de :\336) S 48 T (337,223,df :\337) N
+(340,224,e0 :\340) S 16 T (341,225,e1 :\341) S 32 T (342,226,e2 :\342) S 48 T (343,227,e3 :\343) N
+(344,228,e4 :\344) S 16 T (345,229,e5 :\345) S 32 T (346,230,e6 :\346) S 48 T (347,231,e7 :\347) N
+(350,232,e8 :\350) S 16 T (351,233,e9 :\351) S 32 T (352,234,ea :\352) S 48 T (353,235,eb :\353) N
+(354,236,ec :\354) S 16 T (355,237,ed :\355) S 32 T (356,238,ee :\356) S 48 T (357,239,ef :\357) N
+(wide.txt) (right) (2) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (2) footer
+end % of iso1dict
+pagesave restore
+showpage
+%%Page: (3) 3
+%%BeginPageSetup
+/pagesave save def
+%%EndPageSetup
+iso1dict begin
+(Test Files) 35.25 water
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 4.703931 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(360,240,f0 :\360) p 16 T (361,241,f1 :\361) S 32 T (362,242,f2 :\362) S 48 T (363,243,f3 :\363) N
+(364,244,f4 :\364) S 16 T (365,245,f5 :\365) S 32 T (366,246,f6 :\366) S 48 T (367,247,f7 :\367) N
+(370,248,f8 :\370) S 16 T (371,249,f9 :\371) S 32 T (372,250,fa :\372) S 48 T (373,251,fb :\373) N
+(374,252,fc :\374) S 16 T (375,253,fd :\375) S 32 T (376,254,fe :\376) S 48 T (377,255,ff :\377) N
+() N
+(=============================================================) N
+(wide.txt) (right) (3) title
+border
+grestore
+(The room for the header) rhead
+(Printed by Somebody from a machine) (Right) (3) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/tests/strip.tst b/tests/strip.tst
new file mode 100755
index 0000000..4f41cd4
--- /dev/null
+++ b/tests/strip.tst
@@ -0,0 +1,39 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# This program checks that a2ps handles correctly --strip
+
+# This is were you installed the tested version of the program
+# (and the directories test, test-ps and diff)
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+# Where is the test file
+TEST_FILE=$TST_DIR/prosamp.pre
+
+# Initialize the success
+failure=0
+
+for strip_level in 0 1 2 3
+do
+ # Checked and reference outputs
+ REF_FILE=$REF_DIR/strip-${strip_level}.ps
+ CHK_FILE=$CHK_DIR/strip-${strip_level}.ps
+
+ # The options to run a2ps with
+ OPT="-Epre --strip-level=${strip_level} -P awkout"
+
+ # Generation of the reports
+ # It must not crash
+ $CHK $OPT $TEST_FILE > $CHK_FILE
+ test $? = 0 || exit 1
+
+ # build the ref if not here
+ test -f $REF_FILE || $REF $OPT $TEST_FILE > $REF_FILE
+
+ # it must not print the ps header: just receive `OK'
+ cmp -s $REF_FILE $CHK_FILE 2> /dev/null || failure=1
+done
+
+exit $failure
diff --git a/tests/styles.tst b/tests/styles.tst
new file mode 100755
index 0000000..48b6ba5
--- /dev/null
+++ b/tests/styles.tst
@@ -0,0 +1,123 @@
+#! /bin/sh
+# -*- ksh -*-
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+# This program compares what produces two distinct versions of the program
+
+# Same but with -g
+GREF_DIR=$srcdir/gps-ref
+GCHK_DIR=$builddir/gps-chk
+
+# Here are stored the diff of outputs by both programs
+DIFF=$builddir/ps-diff
+GDIFF=$builddir/gps-diff
+
+# Just used for the banner
+whites=" "
+
+# Remove trash
+/bin/rm -f $TST_DIR/*~ $PS_DIFF $GPS_DIFF 2> /dev/null
+
+# Make sure the directories exist
+for dir in $GREF_DIR $GCHK_DIR $DIFF $GDIFF
+do
+ test -d "$dir" || mkdir $dir
+ chmod u+wrx $dir
+done
+
+echo "-------------------------------------"
+echo " Comparing generated PostScript"
+echo "-------------------------------------"
+
+# We explicitely give the style sheet to use, because:
+# - it avoids the problems with broken file(1)
+# - it is not the purpose of this test to test automatic style selection
+# - some languages share the same suffix
+
+for pair in $TEST_FILES
+do
+ filename=`echo $pair | sed "s/:.*//"g`
+ lang=`echo $pair | sed "s/[^:]*://"g`
+ bannerfile=`echo "$filename$whites" | sed -e 's/^\(.\{18\}\).*/\1/'`
+ bannerlang=`echo "($lang)...$whites" | sed -e 's/^\(.\{16\}\).*/\1/'`
+ echo $echo_n "$bannerfile$bannerlang$echo_c"
+ if [ ! -f "$TST_DIR/$filename" ]; then
+ echo $ac_t "is not a test file"
+ continue
+ fi
+
+ # If the file has a `.', then sed the suffix to ps
+ # Otherwise, add `.ps'
+ if echo "$filename" | grep \\. >/dev/null; then
+ psfilename=`echo $filename | sed -e 's/\..*/.ps/g'`
+ else
+ psfilename=$filename.ps
+ fi
+
+ # The name of the input file.
+ file=$TST_DIR/$filename
+
+ # What produces this tested program?
+ $CHK -E$lang -P awkout $file > $CHK_DIR/$psfilename 2>&5
+ $CHK -Cgs2 -E$lang -P awkout $file > $GCHK_DIR/$psfilename 2>&5
+
+ # Build the references if missing, and protect them.
+ if [ ! -r "$REF_DIR/$psfilename" ]; then
+ $REF -E$lang -P awkout $file > $REF_DIR/$psfilename 2>&5 || :
+ fi
+ if [ ! -r "$GREF_DIR/$psfilename" ]; then
+ $REF -Cgs2 -E$lang -P awkout $file > $GREF_DIR/$psfilename 2>&5 || :
+ fi
+
+ # Compute the diffs. In a subshell and with `:' to avoid set -e
+ # catches the exit status of diff.
+ if (cmp $REF_DIR/$psfilename $CHK_DIR/$psfilename) >/dev/null 2>&1; then
+ # Identical.
+ rm -f $DIFF/$filename
+ nbdiff=0
+ else
+ # Different.
+ (diff $REF_DIR/$psfilename $CHK_DIR/$psfilename > $DIFF/$filename || :)
+ nbdiff=`wc -l <$DIFF/$filename`
+ fi
+ if (cmp $GREF_DIR/$psfilename $GCHK_DIR/$psfilename) >/dev/null 2>&1; then
+ # Identical.
+ rm -f $GDIFF/$filename
+ nbdiffsym=0
+ else
+ # Different.
+ (diff $GREF_DIR/$psfilename $GCHK_DIR/$psfilename > $GDIFF/$filename || :)
+ nbdiffsym=`wc -l <$GDIFF/$filename`
+ fi
+
+ case "$nbdiff$nbdiffsym" in
+ 00) echo "Ok";;
+ *) echo "Bad: -ng -> $nbdiff, -g -> $nbdiffsym";;
+ esac
+done
+
+# Sumary of the diff's. Protect with `||:' the commands that may
+# exit != 0 (because of set -e).
+cd $DIFF
+# I don't use `echo *`, since I don't know how the various shells behave
+# when there are no files.
+if test -n "`ls`"; then
+ (wc -l `ls` | sort -u | grep -v "^[ \t]*0"||:) > \
+ $builddir/sum-ps-diff
+ echo " There are differences with reference PostScript files:"
+ cat $builddir/sum-ps-diff
+ failure=1
+fi
+
+cd $GDIFF
+if test -n "`ls`"; then
+ (wc -l `ls` | sort -u | grep -v "^[ \t]*0"||:) > \
+ $builddir/sum-gps-diff
+ echo " There are differences with reference PostScript files (with -g):"
+ cat $builddir/sum-gps-diff
+ failure=1
+fi
+
+exit $failure
diff --git a/tests/toc.tst b/tests/toc.tst
new file mode 100755
index 0000000..df77e33
--- /dev/null
+++ b/tests/toc.tst
@@ -0,0 +1,36 @@
+#! /bin/sh
+# -*- ksh -*-
+
+: ${SRCDIR=.}
+. $SRCDIR/defs || exit 1
+
+## In this test, a2ps is called on the regular test files.
+## This is because it happened that it crashed _only_ when
+## printing several files. Don't take all the content of
+## test_files, because encoding.pre generates a super big
+## prologue which is of no use here but wasting space.
+
+# But it was dumb to lose so much time. Now it makes sure that --toc
+# in conjunction with --pages=toc is OK. Actually, we use
+# --pages=1,toc just to make sure :)
+
+# The options to run with
+OPT="-Eplain -Cmq2 --compact=no -a1,toc --toc=#{toc_test} -P awkout"
+
+# Where are the test files
+FILES=`echo $TEST_FILES | sed "s#\\([^ :]*\\):[^ ]*#$TST_DIR/\\1#g"`
+
+# Checked and reference outputs
+REF_FILE=$REF_DIR/toc.ps
+CHK_FILE=$CHK_DIR/toc.ps
+
+# Run the test
+$CHK $OPT $FILES > $CHK_FILE 2>&5
+if test -f $REF_FILE; then :; else
+ $REF $OPT $FILES > $REF_FILE 2>&5
+fi
+
+# Return the verdict
+cmp $REF_FILE $CHK_FILE 2>/dev/null
+
+exit 0
diff --git a/tests/tstfiles/3-pages.txt b/tests/tstfiles/3-pages.txt
new file mode 100644
index 0000000..7496607
--- /dev/null
+++ b/tests/tstfiles/3-pages.txt
@@ -0,0 +1 @@
+Page 1 Page 2 Page 3
diff --git a/tests/tstfiles/AppDelegate.m b/tests/tstfiles/AppDelegate.m
new file mode 100644
index 0000000..697944e
--- /dev/null
+++ b/tests/tstfiles/AppDelegate.m
@@ -0,0 +1,122 @@
+
+#import "AppDelegate.h"
+
+#import <foundation/NSArray.h>
+#import <dbkit/DBValue.h>
+
+@implementation AppDelegate
+
+// --------------------- Constants
+
+#define N_FIELDS (8)
+
+// --------------------- Global variables
+
+NSString
+ *AppDelegateNewSetNotificationName = @"AppDelegateNewSetNotification",
+ // This is the name of the notification sent out when a new
+ // field set has been selected for manipulation.
+ *AppDelegateNewFieldNotificationName = @"AppDelegateNewSetNotification";
+ // This is the name of the notification sent out when a new
+ // field has been selected for manipulation.
+
+// --------------------- Class variables
+
+static NSMutableArray
+ *classDefaultSet = nil;
+
+// --------------------- Methods
+
++ initize
+{
+ // This method will be called automatically prior to any
+ // other to this class.
+
+ int
+ i;
+
+ // Create an array to hold the actual field objects.
+ classDefaultSet = [[NSMutableArray array] retain];
+
+
+ return self;
+
+} // initize
+
+- (id <FieldSet>)fieldSet
+{
+ // This method returns an object (conforming to the FieldSet
+ // protocol) which is being manipulated by this application.
+
+ // If we don't have one yet...
+ if (!myFieldSet)
+ {
+ // Just adopt the default one for this class.
+ [self setFieldSet:(id)classDefaultSet];
+ }
+
+ return myFieldSet;
+
+} // fieldSet
+
+- (void)setFieldSet:(id <FieldSet>)newValue
+{
+ // This method sets the field set being manipulated to the one given.
+ // If the new set differs from the old, the AppDelegateNewSet
+ // notification will be posted informing watchers of the change.
+
+ // If the new field is the same as the old..
+ if (newValue EQ myFieldSet)
+ {
+ return; // do nothing
+ }
+
+ // Release the old value and adopt the new.
+ [newValue retain];
+
+ // Post a notification of the change.
+ [[NotificationCenter defaultCenter]
+ postNotificationName:AppDelegateNewSetNotificationName
+ object:myFieldSet];
+
+} // setFieldSet:
+
+- (Field *)selectedField
+{
+ // This method returns the field from our field set
+ // which is currently considered selected.
+
+ // If we don't currently have a selected field...
+ if (!mySelectedField)
+ {
+ // Adopt the first field in our set.
+ [self setSelectedField:[[self fieldSet] fieldAtIndex:0]];
+ }
+
+ return mySelectedField;
+
+} // selectedField
+
+- (void)setSelectedField:(Field *)newValue
+{
+ // This method causes the given field to be taken as the active one.
+ // If the new field differs from the old, the AppDelegateNewField
+ // notification will be posted informing watchers of the change.
+
+ // If the new field is the same as the old..
+ if (newValue EQ mySelectedField)
+ {
+ return; // do nothing
+ }
+
+ // Release the old value and adopt the new.
+ [newValue retain];
+
+ // Post a notification of the change.
+ [[NotificationCenter defaultCenter]
+ postNotificationName:AppDelegateNewFieldNotificationName
+ object:mySelectedField];
+
+} // setSelectedField:
+
+@end
diff --git a/tests/tstfiles/InsertBlock.java b/tests/tstfiles/InsertBlock.java
new file mode 100644
index 0000000..1135821
--- /dev/null
+++ b/tests/tstfiles/InsertBlock.java
@@ -0,0 +1,41 @@
+/* This code is part of Freenet. It is distributed under the GNU General
+ * Public License, version 2 (or at your option any later version). See
+ * http://www.gnu.org/ for further details of the GPL. */
+package freenet.client;
+
+import freenet.keys.FreenetURI;
+import freenet.support.api.Bucket;
+
+/**
+ * Class to contain everything needed for an insert.
+ */
+public class InsertBlock {
+
+ private final Bucket data;
+ private boolean isFreed;
+ public final FreenetURI desiredURI;
+ public final ClientMetadata clientMetadata;
+
+ public InsertBlock(Bucket data, ClientMetadata metadata, FreenetURI desiredURI) {
+ if(data == null) throw new NullPointerException();
+ this.data = data;
+ this.isFreed = false;
+ if(metadata == null)
+ clientMetadata = new ClientMetadata();
+ else
+ clientMetadata = metadata;
+ this.desiredURI = desiredURI;
+ }
+
+ public Bucket getData() {
+ return (isFreed ? null : data);
+ }
+
+ public void free(){
+ synchronized (this) {
+ if(isFreed) return;
+ isFreed = true;
+ }
+ data.free();
+ }
+}
diff --git a/tests/tstfiles/ShellNewDummyHook.pas b/tests/tstfiles/ShellNewDummyHook.pas
new file mode 100644
index 0000000..2090e3b
--- /dev/null
+++ b/tests/tstfiles/ShellNewDummyHook.pas
@@ -0,0 +1,94 @@
+{-----------------------------------------------------------------------------
+The contents of this file are subject to the GNU General Public License
+Version 1.1 or later (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+http://www.gnu.org/copyleft/gpl.html
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
+the specific language governing rights and limitations under the License.
+
+The Initial Developer of the Original Code is Michael Elsdrfer.
+All Rights Reserved.
+
+You may retrieve the latest version of this file at the NTFS Link Homepage
+located at http://www.elsdoerfer.net/ntfslink/
+
+Please note:
+This is /not/ a real shell extension. We use this fake COM object factory to
+register the "ShellNew" menu items. It's just the easiest way to do this,
+because the Delphi RTL will automatically call the UpdateRegistry() method if
+a client calls DllRegisterServer.
+-----------------------------------------------------------------------------}
+
+unit ShellNewDummyHook;
+
+interface
+
+uses
+ Windows, ComObj, ActiveX;
+
+type
+ TShellNewDummyHook = class(TComObject(* no interfaces needed, it's a fake! *))
+ end;
+
+ TShellNewDummyFactory = class(TComObjectFactory)
+ public
+ procedure UpdateRegistry(Register: Boolean); override;
+ end;
+
+implementation
+
+uses
+ ComServ, SysUtils, JclRegistry;
+
+{ TShellNewDummyFactory }
+
+procedure TShellNewDummyFactory.UpdateRegistry(Register: Boolean);
+
+ procedure CreateShellNewStructure(FileExtKey, FileClassKey,
+ DllFunctionName, ItemCaption: string; IconIndex: Integer);
+ begin
+ // Create the file extension key + the "ShellNew" key
+ CreateRegKey(FileExtKey, '', FileClassKey, HKEY_CLASSES_ROOT);
+ CreateRegKey(FileExtKey + '\ShellNew', 'Command',
+ 'rundll32.exe "' + ComServer.ServerFileName + '",' +
+ DLLFunctionName + ' %1',
+ HKEY_CLASSES_ROOT);
+ // Create the file class key, + the the icon and a command sub-key
+ CreateRegKey(FileClassKey, '', ItemCaption, HKEY_CLASSES_ROOT);
+ CreateRegKey(FileClassKey + '\DefaultIcon', '',
+ ComServer.ServerFileName + ',' + IntToStr(IconIndex),
+ HKEY_CLASSES_ROOT);
+ CreateRegKey(FileClassKey + '\Shell\Open\Command', '', '.',
+ HKEY_CLASSES_ROOT);
+ end;
+
+const
+ HARDLINK_FILEEXT_KEY = '.ntfs-hardlink';
+ HARDLINK_FILECLASS_KEY = 'NTFSLink.Hardlink';
+ JUNCTION_FILEEXT_KEY = '.ntfs-junction';
+ JUNCTION_FILECLASS_KEY = 'NTFSLink.Junction';
+begin
+ if Register then
+ begin
+ CreateShellNewStructure(HARDLINK_FILEEXT_KEY, HARDLINK_FILECLASS_KEY,
+ 'NewHardlinkDlg', 'NTFS Hardlink', 0);
+ CreateShellNewStructure(JUNCTION_FILEEXT_KEY, JUNCTION_FILECLASS_KEY,
+ 'NewJunctionDlg', 'NTFS Junction Point', 1);
+ end else
+ begin
+ try RegDeleteKeyTree(HKEY_CLASSES_ROOT, HARDLINK_FILEEXT_KEY); except end;
+ try RegDeleteKeyTree(HKEY_CLASSES_ROOT, HARDLINK_FILECLASS_KEY); except end;
+ try RegDeleteKeyTree(HKEY_CLASSES_ROOT, JUNCTION_FILEEXT_KEY); except end;
+ try RegDeleteKeyTree(HKEY_CLASSES_ROOT, JUNCTION_FILECLASS_KEY); except end;
+ end;
+
+ // *NO* inherited call here, it would just make unnecessary registry entries
+end;
+
+initialization
+ TShellNewDummyFactory.Create(ComServer, TShellNewDummyHook, GUID_NULL, '', '',
+ ciMultiInstance, tmApartment);
+
+end.
diff --git a/tests/tstfiles/a2ps.man b/tests/tstfiles/a2ps.man
new file mode 100644
index 0000000..d18c97e
--- /dev/null
+++ b/tests/tstfiles/a2ps.man
@@ -0,0 +1,77 @@
+
+
+
+A2PS(1L) Misc. Reference Manual Pages A2PS(1L)
+
+
+
+NNNNAAAAMMMMEEEE
+ a2ps - formats an ascii file for printing on a postscript
+ printer
+
+SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
+ aaaa2222ppppssss [ gggglllloooobbbbaaaallll ooooppppttttiiiioooonnnnssss ] [ ppppoooossssiiiittttiiiioooonnnnaaaallll ooooppppttttiiiioooonnnnssss ] [ _f_i_l_e_1 [
+ ppppoooossssiiiittttiiiioooonnnnaaaallll ooooppppttttiiiioooonnnnssss ] ] _f_i_l_e_2 ... ] ]
+
+DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
+ _a_2_p_s formats each named file for printing in a postscript
+ printer; if no file is given, _a_2_p_s reads from the standard
+ input. The output is sent to the printer or to stdout or to
+ a file. The format used is nice and compact: normally two
+ pages on each physical page, borders surrounding pages,
+ headers with useful information (page number, printing date,
+ file name or supplied header), line numbering, keyword
+ highlighting, symbol substitution etc. This is very useful
+ for making archive listings of programs.
+
+ GGGGlllloooobbbbaaaallll ooooppppttttiiiioooonnnnssss
+ Global options offered by _a_2_p_s are the following:
+
+ ----???? ----hhhh Print usage information.
+
+ ----aaaa Use alternative paper size. In general defined to be
+ US letter. (see -V).
+
+ ----bbbb Force printing binary files. By default, binary files
+ printing is stopped before second page (see -nb
+ option).
+
+ ----cccc Compact mode for a sequence of files. This option
+ allows the printing of two files in the same physical
+ page: last page of the first file in the left (or up)
+ side and first page of the second file in the right
+ (or down) side. This option is valid only for twinpage
+ mode (two pages per physical page).
+
+ ----ffff Fold lines too large to be printed inside the borders
+ (default option). Max line size depends on format and
+ font size used and whether line numbering has been
+ suppressed.
+
+ ----hhhh Print usage information.
+
+ ----IIII_f_i_l_e
+ Use the specified file as the postscript prologue for
+ a2ps.
+
+ ----iiii Interpret TAB, BS and FF characters (default option).
+ TAB is replaced by enough spaces to reach next tab
+ stop while BS and FF have their meanings.
+
+
+
+SunOS 5.5 Last change: 9 August 1996 1
+
+Some weird characters that exists out there are:
+
+- O plus: o+ and +o
+
+- Copyright: cO
+
+- Plus or minus: +_
+
+- Greater than or equal to: ~>_
+
+- Less than or equal to: ~<_
+
+- Another form of u_n_d_e_r_l_i_n_i_n_g_._ \ No newline at end of file
diff --git a/tests/tstfiles/bookie.idl b/tests/tstfiles/bookie.idl
new file mode 100644
index 0000000..705b6bb
--- /dev/null
+++ b/tests/tstfiles/bookie.idl
@@ -0,0 +1,97 @@
+/* ########################################################################
+
+ Bookie.idl
+
+ 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.
+
+ (c) Copyright 1999 Bob Phillips
+
+ ######################################################################## */
+
+#include <IncludedIdl.idl>
+
+#define FIVE_BUCKS 5.00
+
+module Bookie {
+
+// For now, we will cheat on the date, time,
+// and location. Eventually, we want to make
+// these real objects.
+typedef string Date;
+typedef string Time;
+typedef string Location;
+
+exception NoBet {};
+exception EmptyBetList{};
+
+ # pragma MindlessJunk
+
+// PointSpread is a bit of a hack. We need to be able to express the
+// 1/2 point push-eliminator What we will do is create an object that
+// can be initialized with a float/double. Any non-zero part of the
+// fraction will be rounded (up or down) to 1/2 -- the implementation
+// will probably represent it as a short int (16-bit, so, allowing 1
+// bit to serve as the 1/2 fraction and 1 to serve as a sign, we have
+// 14 bit spreads. Even in basketball, that isn't going to happen
+// anytime soon :^)
+
+ interface PointSpread {
+ // Attributes would be the logical way to
+ // do this, but the example is short on
+ // methods... So we need to have some methods.
+ void SetSpread(in float spread);
+ float GetSpread(void);
+ };
+
+// Same sort of thing with currency. We want a Fixed representation
+// So we allow any float in. We output a Float for other purposes.
+// We can later add all sorts of operations.
+
+ interface Currency {
+ attribute float amount;
+ };
+
+
+const float NICKEL_BET FIVE_BUCKS;
+const float DIME_BET 10.00;
+
+ interface Team {
+ readonly attribute string name; // No need to change this
+ attribute unsigned long wins;
+ attribute unsigned long losses;
+ };
+
+ interface Game {
+ attribute Date date;
+ attribute Time time;
+ attribute Location location;
+ }
+
+ interface Bet {
+ // If an attribute ever changes, we need to create a new Bet.
+ // This allows for record keeping if we integrate persistent
+ // storage -- we have a record of every bet ever made.
+ readonly attribute Game game;
+ readonly attribute Team team;
+ readonly attribute Currency amount;
+ };
+
+typedef sequence<Bet> BetList;
+
+ interface Customer {
+ readonly attribute string name;
+ attribute boolean PaidUp;
+ void AddToBetList (in Bet bet);
+ void DelFromBetList (in Bet bet)
+ raises (NoBet);
+ void SetBetlist (in BetList list);
+ oneway void ClearBetList (void);
+ void FindBet(inout Bet bet) // Need to show an inout...
+ raises(NoBet);
+ void GetBetList(out BetList list) // Need to show an out param...
+ raises (EmptyBetList);
+ };
+};
diff --git a/tests/tstfiles/configure.in b/tests/tstfiles/configure.in
new file mode 100644
index 0000000..0e0a0a7
--- /dev/null
+++ b/tests/tstfiles/configure.in
@@ -0,0 +1,3 @@
+AC_INIT
+AC_FATAL([You are not supposed to run this file])dnl Kill the empty line.
+AC_OUTPUT \ No newline at end of file
diff --git a/tests/tstfiles/confirm.m3 b/tests/tstfiles/confirm.m3
new file mode 100644
index 0000000..dcac7e7
--- /dev/null
+++ b/tests/tstfiles/confirm.m3
@@ -0,0 +1,45 @@
+
+
+MODULE Confirm EXPORTS Main;
+
+IMPORT Trestle, VBT, TextVBT, RigidVBT, ButtonVBT, BorderedVBT, HVSplit;
+IMPORT PaintOp, Pixmap, Axis;
+IMPORT ConfirmVBT;
+
+PROCEDURE Yes (self: ButtonVBT.T; READONLY cd: VBT.MouseRec) =
+ BEGIN
+ Trestle.Delete(main);
+ END Yes;
+
+PROCEDURE QuitAction (self: ButtonVBT.T; READONLY cd: VBT.MouseRec) =
+ VAR
+ msg := "Do you really wish to quit?";
+ confirm := ConfirmVBT.New(msg, Yes);
+ BEGIN
+ Trestle.Install(confirm)
+ END QuitAction;
+
+CONST
+ (* sizes for the RigidVBT *)
+ horz = 30.0;
+ vert = 10.0; (* size in millimeters *)
+ (* border size for text and button *)
+ bsize = 1.5; (* size in millimeters *)
+
+VAR
+ blue := PaintOp.FromRGB(0.0, 0.0, 1.0);
+ green := PaintOp.FromRGB(0.0, 1.0, 0.0);
+ text := RigidVBT.FromHV(TextVBT.New("Confirm demo"), horz, vert);
+ top := BorderedVBT.New(
+ text, size := bsize, op := blue, txt := Pixmap.Solid);
+ button := ButtonVBT.New(TextVBT.New("Quit"), QuitAction);
+ bottom := BorderedVBT.New(
+ button, size := bsize, op := green, txt := Pixmap.Gray);
+ main := HVSplit.Cons(Axis.T.Ver, top, bottom);
+
+BEGIN
+ Trestle.Install(main);
+ Trestle.AwaitDelete(main)
+END Confirm.
+
+
diff --git a/tests/tstfiles/ehandler b/tests/tstfiles/ehandler
new file mode 100644
index 0000000..518fe36
--- /dev/null
+++ b/tests/tstfiles/ehandler
@@ -0,0 +1,65 @@
+%!ps
+% lib/ehandler.ps -- Downloaded Error Break-page handler
+% GOVERNMENT END USERS: See Notice file in TranScript library directory
+% -- probably /usr/lib/ps/Notice
+% -- code follows this line --
+% assumes serverloop password is the default one
+/$brkpage where
+{pop(Error Handler in place - not loaded again\n)print flush stop}
+{serverdict begin statusdict begin 0000 checkpassword
+ {(Error Handler downloaded.\n)print flush 0000 exitserver}
+ {(Bad Password on loading error handler!!!\n)print flush stop}ifelse
+}ifelse
+/$brkpage 64 dict def $brkpage begin
+/prnt
+ {dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def
+ currentpoint/toy exch def/tox exch def 1 setgray newpath
+ tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto
+ closepath fill tox toy moveto 0 setgray show}bind def
+/nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def
+/=={/cp 0 def typeprint nl}def
+/typeprint{dup type exec}readonly def
+/lmargin 72 def
+/rmargin 72 def
+/tprint
+ {dup length cp add rmargin gt{nl/cp 0 def}if
+ dup length cp add/cp exch def prnt}readonly def
+/cvsprint{=string cvs tprint( )tprint}readonly def
+/integertype{cvsprint}readonly def
+/realtype{cvsprint}readonly def
+/booleantype{cvsprint}readonly def
+/operatortype{(--)tprint =string cvs tprint(-- )tprint}readonly def
+/marktype{pop(-mark- )tprint}readonly def
+/dicttype{pop(-dictionary- )tprint}readonly def
+/nulltype{pop(-null- )tprint}readonly def
+/filetype{pop(-filestream- )tprint}readonly def
+/savetype{pop(-savelevel- )tprint}readonly def
+/fonttype{pop(-fontid- )tprint}readonly def
+/nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
+/stringtype
+ {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse
+ }readonly def
+/arraytype
+ {dup rcheck{dup xcheck
+ {({)tprint{typeprint}forall(})tprint}
+ {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse
+ }readonly def
+/packedarraytype
+ {dup rcheck{dup xcheck
+ {({)tprint{typeprint}forall(})tprint}
+ {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse
+ }readonly def
+/courier/Courier findfont 10 scalefont def
+end %$brkpage
+errordict/handleerror
+ {systemdict begin $error begin $brkpage begin newerror
+ {/newerror false store
+ vmstatus pop pop 0 ne{grestoreall}if initgraphics courier setfont
+ lmargin 720 moveto(ERROR: )prnt errorname prnt
+ nl(OFFENDING COMMAND: )prnt/command load prnt
+ $error/ostack
+ known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if
+ systemdict/showpage get exec(%%[ Error: )print
+ errorname =print(; OffendingCommand: )print/command
+ load =print( ]%%)= flush}if end end end}
+dup 0 systemdict put dup 4 $brkpage put bind readonly put
diff --git a/tests/tstfiles/encoding.pre b/tests/tstfiles/encoding.pre
new file mode 100644
index 0000000..ea9d374
--- /dev/null
+++ b/tests/tstfiles/encoding.pre
@@ -0,0 +1,144 @@
+\Label{ascii}
+\encoding{ascii}%
+This is a pure ASCII file, written to test the ASCII encoding
+in a2ps. Character with the high bit set, (such as И, Ю, Т, О)
+are not printable, and are escaped.
+
+\Label{latin1}
+\encoding{latin1}%
+Ceci est un texte en franГais accentuИ, comme dans aoШt, ou
+dИcembre, et non pas aoЫt et dХcembre...
+
+\Label{latin2}
+\encoding{latin2}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+\Keyword{DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф}
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{latin3}
+\encoding{latin3}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+\keyword{KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka}
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{latin4}
+\encoding{latin4}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{latin5}
+\encoding{latin5}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{latin6}
+\encoding{latin6}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+% We no longer include Cyrillic fonts in the package.
+% \Label{iso5}
+% \encoding{iso5}%
+% dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+% GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+% DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+% KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+% PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+% MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+% Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+% wska╪nik WSKA╛NIK mo©na MO╞NA
+%
+% \Label{koi8}
+% \encoding{koi8}%
+% dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+% GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+% DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+% KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+% PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+% MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+% Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+% wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{CP1250}
+\encoding{CP1250}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{ibmpc}
+\encoding{ibmpc}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{pcg}
+\encoding{pcg}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{Hp}
+\encoding{Hp}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
+\Label{Mac}
+\encoding{Mac}%
+dok╠d DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie
+GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d
+DOK║D pamiЙtasz PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф
+KI╕ф mrСwka MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz
+PAMIйTASZ Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka
+MRсWKA wska╪nik WSKA╛NIK mo©na MO╞NA dok╠d DOK║D pamiЙtasz PAMIйTASZ
+Ёawka ёAWKA naФpaФ NAфPAф ga╤nie GA╕NIE ki╤Ф KI╕ф mrСwka MRсWKA
+wska╪nik WSKA╛NIK mo©na MO╞NA
+
diff --git a/tests/tstfiles/eplv_chkr.v b/tests/tstfiles/eplv_chkr.v
new file mode 100644
index 0000000..794e930
--- /dev/null
+++ b/tests/tstfiles/eplv_chkr.v
@@ -0,0 +1,38 @@
+// This module checks for BDVL deasserting when BEPVL is asserted.
+
+module epvl_chkr(clk, bpvl, bepvl, bdvl, stop);
+ input clk;
+ input bpvl;
+ input bepvl;
+ input bdvl;
+ input stop; // $stop (or $finish if BATCH) on error
+
+`ifdef JUST_COUNT_PACKETS
+ // Do nothing
+`else
+ integer status;
+`endif // ifdef JUST_COUNT_PACKETS
+
+ always @(posedge clk) begin
+ if (!bpvl && bepvl && bdvl) begin
+ $display("%%E-%M, %0t BDVL cannot be deasserted with BEPVL",
+ $time);
+ if (stop) begin
+ #1000
+`ifdef JUST_CHECK_COUNTS
+ // Do nothing
+`else
+ status = $check_counts;
+`endif // !ifdef JUST_CHECK_COUNTS
+ $display("%%I-%M, %0t Stopping simulation on error!", $time);
+`ifdef BATCH
+ $finish;
+`else
+ $stop;
+`endif // !ifdef BATCH
+ end // if (backplane.stop_on_error)
+
+ end // if (!bpvl && bepvl && bdvl)
+ end // always @ (posedge clk)
+
+endmodule // epvl_chkr
diff --git a/tests/tstfiles/essai2.o2c b/tests/tstfiles/essai2.o2c
new file mode 100644
index 0000000..0cd38bf
--- /dev/null
+++ b/tests/tstfiles/essai2.o2c
@@ -0,0 +1,133 @@
+set options "-I/inf/erebe/bdstag/sigbench/release/Schema/include";
+set schema sigrel;
+set base sigrelb;
+
+set application Index_lineaire;
+
+name Nt_rem_oid:Tt_rem_oid;
+name Ns_rem_oid:set (Tt_rem_oid);
+name No_JS_feuilleA:C_Feuille;
+name No_JS_feuilleB:C_Feuille;
+name Ns_JS_jointure_cles:set (tuple (cleA:string, cleB:string));
+function
+F_JS_big_theta (Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid):boolean;
+ function body F_JS_big_theta (Pt_a:Tt_rem_oid, Pt_b:Tt_rem_oid):boolean
+{
+/* test si "a intersecte b (sens strict)" */
+ return ((Pt_a.Ai_xmin < Pt_b.Ai_xmax)
+ && (Pt_a.Ai_ymin < Pt_b.Ai_ymax)
+ && (Pt_a.Ai_xmax > Pt_b.Ai_xmin) && (Pt_a.Ai_ymax > Pt_b.Ai_ymin));
+};
+function
+F_JS_existe_cle (Pc_cleA:string, Pc_cleB:string):boolean;
+ function body F_JS_existe_cle (Pc_cleA:string, Pc_cleB:string):boolean
+{
+#include "varextbis.h"
+
+ Handle poign_root, poign_objet_final, *poign_cle;
+ Scan *scan_index;
+ Predicate *predicat;
+ void *index_id;
+ o2 string cle = "index-racine";
+
+/************** Fermeture du scan index et retour ******/
+ o2_col_scan_close (scan_index);
+/*printf("sortie F_Lecture_index\n");*/
+ printf (" ===> feuille %s ok ...\n", Pc_cleA + Pc_cleB);
+ return true;
+};
+
+function
+F_JS_get_quadrant (Pc_cle:string, Pt_rem:Tt_rem_oid):Tt_rem_oid;
+ function body F_JS_get_quadrant (Pc_cle:string,
+ Pt_rem:Tt_rem_oid):Tt_rem_oid
+{
+ o2 integer dx = (Pt_rem.Ai_xmax - Pt_rem.Ai_xmin) / 2;
+ o2 integer dy = (Pt_rem.Ai_ymax - Pt_rem.Ai_ymin) / 2;
+ o2 integer i;
+ for (i = 0; i < count (Pc_cle); i++)
+ {
+ switch (Pc_cle[i])
+ {
+ default:
+ printf ("Nom de feuille (%s) erronee !!!\n", Pc_cle);
+ }
+ dx = dx / 2;
+ dy = dy / 2;
+ }
+ return (Pt_rem);
+};
+
+
+function F_JS_join_f (Pc_cleA:string,
+ Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid);
+function body
+F_JS_join_f (Pc_cleA:string,
+ Pt_remA:Tt_rem_oid, Pc_cleB:string, Pt_remB:Tt_rem_oid)
+{
+#include "varextbis.h" /* contexte general */
+
+ printf ("tente (%s,%s) ...", Pc_cleA, Pc_cleB);
+ if (F_JS_small_theta (Pt_remA, Pt_remB))
+ {
+ printf ("===> ok");
+ Ns_JS_jointure_cles += set (tuple (cleA: Pc_cleA, cleB:Pc_cleB));
+ }
+ printf ("\n");
+ return;
+};
+;
+
+program private
+P_JS_Lance_jointure (Pc_quad_linA:string, Pc_quad_linB:string)
+ in application Index_lineaire;
+ transaction body P_JS_Lance_jointure (Pc_quad_linA:string,
+ Pc_quad_linB:string)
+ in application Index_lineaire
+ {
+#include "varextbis.h"
+
+ o2 Tt_def_index t_def_idxA;
+ o2 Tt_def_index t_def_idxB;
+ o2 Tt_def_index def_idx;
+
+ o2 Tt_rem_oid t_remA;
+ o2 Tt_rem_oid t_remB;
+
+ };
+
+program public
+P_JS_select (Pc_noeud:string)
+ in application Index_lineaire;
+ transaction body P_JS_select (Pc_noeud:string)
+ in application Index_lineaire
+ {
+ o2 set (C_Feuille) Tree = set ();
+ o2 C_Feuille f = nil;
+ o2 integer reso2q = 0;
+ o2 Tt_rem_oid rem, quadrant;
+ o2 set (Tt_rem_oid) Resultat = set ();
+ o2 Tt_rem_oid Po_objet = Nt_rem_oid;
+ o2 Tt_def_index Po_index, idx;
+ for (idx in Nt_indexes.Al_def_index)
+ if (idx.Ao_index == No_quad_lin01)
+ Po_index = idx;
+
+/* Recuperation des feuilles de l'arbre */
+ reso2q = o2query (Tree, "select f from f in $1", Po_index.Ao_index);
+ if (reso2q)
+ {
+ printf ("Index vide ou inexistant ...!!!");
+/* return set();*/
+ abort;
+ }
+
+ for (f in Tree)
+ if (F_JS_small_theta (Po_objet, rem)
+ Resultat += set (rem);
+ Ns_rem_oid = Resultat;
+/*return Resultat;*/
+ };
+
+commit;
+quit;
diff --git a/tests/tstfiles/ex1.asn1 b/tests/tstfiles/ex1.asn1
new file mode 100644
index 0000000..1c9c280
--- /dev/null
+++ b/tests/tstfiles/ex1.asn1
@@ -0,0 +1,38 @@
+-- file: .../asn1specs/ex1.asn1
+--
+-- This is an example ASN.1 module used in the documentation
+--
+-- MS 92
+--
+-- Initial checkin.
+--
+-- Revision 1.2 1997/02/16 20:25:22 rj
+-- check-in of a few cosmetic changes
+--
+-- Revision 1.1 1994/10/08 05:41:32 rj
+-- initial check-in.
+--
+
+EX1 DEFINITIONS ::=
+BEGIN
+
+anOidVal OBJECT IDENTIFIER ::= { joint-iso-ccitt 40 foobar(29) }
+theSameOidVal OBJECT IDENTIFIER ::= { 2 40 29 }
+anIntVal INTEGER ::= 1
+aBoolVal BOOLEAN ::= TRUE
+
+
+MACRO ::= identifier END
+
+T1 ::= SEQUENCE
+{
+ INTEGER OPTIONAL,
+ OCTET STRING OPTIONAL,
+ ENUMERATED { a(0), b(1), c(2) },
+ SEQUENCE OF INTEGER,
+ SEQUENCE { id OBJECT IDENTIFIER, value OCTET STRING },
+ CHOICE { INTEGER, OBJECT IDENTIFIER }
+ DESCRIPTION "This is a string with a quote "" in it."
+}
+
+END
diff --git a/tests/tstfiles/ex_PSGETRS.f90 b/tests/tstfiles/ex_PSGETRS.f90
new file mode 100644
index 0000000..dc6d6e0
--- /dev/null
+++ b/tests/tstfiles/ex_PSGETRS.f90
@@ -0,0 +1,192 @@
+! Gilles GRASSEAU (CNRS/IDRIS - France) <Gilles.Grasseau@idris.fr> - Nov. 1996
+
+program test_psgetrs
+!-------------------------------------------------------------------
+! Description :
+! Exemple de factorisation LU puis de resolution du systeme :
+! A * x = b , ou A est une matrice (5,5).
+!
+! Principe :
+! Les matrice/vecteurs A, x et b sont globaux et les matrices/
+! vecteurs dist_a, dist_x et dist_b sont respectivement les
+! matrices/vecteurs distribuees sur la grille de proc. 2x2.
+! La repartition de la matrice se fait par blocs cycliques 2x2
+! (2 elements par ligne et 2 elements par colonne -
+! voir Exemple de repartition d'une matrice).
+! La repartition des vecteurs se fait par blocs cycliques 2x1
+! (le processeur logique (0,0) possede les blocs {x(1:2) ,x(5)}
+! et le processeur logique (1,0) possede le bloc x(3:4) ).
+!
+! Algorithme :
+! 1 - Initialisation du BLACS et autres.
+! 2 - Distribution de la matrice A et du vecteur x vers les blocs
+! locaux dist_a et dist_x de chaque processeur logique.
+! (voir Distribution de matrice)
+! On a simule la situation ou seul le processeur (0,0) possede
+! la matrice et les vecteurs globaux A, x et b.
+! 3 - Factorisation LU et resolution.
+! 4 - Recuperation et impression des resultats par le processeur
+! logique (0,0).
+!
+! Remarque :
+! 1 - Le tableau de travail 'work' a ete dimensionne a la valeur
+! donnee par INITBUFF pour psgetrs ( > au buffer de psgetrf).
+! 2 - La liste des pivots locaux 'dist_piv' est dimensionnee a
+! 'n_max' + 'rb_size'.
+!
+!-------------------------------------------------------------------
+ implicit none
+
+ integer :: pe, npes ! Identificateur du processeur et
+ ! nombre de processeurs physiques.
+
+ integer, parameter:: nprow=2, npcol=2 ! Grille de proc. logiques.
+ integer :: prow, pcol ! Coord. de mon proc. logique
+
+ integer :: icntxt ! Contexte (grille de procs)
+ integer, dimension(8) :: desc_a ! Descripteur de la matrice.
+ integer, dimension(8) :: desc_x ! Descripteur des vecteurs.
+
+ integer, parameter :: n=5 ! Ordre matrices/vecteurs.
+ real, dimension(n,n) :: a ! Matrice globale a.
+ real, dimension(n) :: x ! Vecteur resultat x(global)
+ real, dimension(n) :: b ! Vecteur b (global)
+
+ integer, parameter :: n_max=3 ! Dim. des matrices/vecteurs
+ ! locaux.
+ real, dimension(n_max,n_max):: dist_a ! Matrice locale.
+ real, dimension(n_max) :: dist_x ! Vecteur local.
+ real, dimension(n_max) :: dist_b ! Vecteur local.
+
+ integer, parameter :: rb_size=2, & ! Taille des blocs lignes
+ cb_size=2 ! et colonnes.
+
+ integer, dimension(n_max+rb_size):: dist_piv ! Vecteur local des
+ ! pivots.
+
+ integer :: info, i, j
+
+ data a/ 0.5, 0.0, 2.3, 0.0,-2.6, & ! Coefficients de la matrice
+ 0.0, 0.5,-1.4, 0.0,-0.7, & ! globale A.
+ 2.3,-1.4, 0.5, 0.0, 0.0, &
+ 0.0, 0.0, 0.0, 1.0, 0.0, &
+ -2.6,-0.7, 0.0, 0.0, 0.5/
+
+ data b/-2.1, 0.3, 1.5, 0.0,-1.5/ ! Coefficients du vecteur global
+
+
+ integer,parameter:: minb=rb_size, maxb=minb ! Calcul de l'espace
+ integer,parameter:: minp=nprow, maxd=n ! de travail
+ integer,parameter:: wsize=2*maxb*(((maxd/minb)/minp)*maxb+maxb)*8
+ real, dimension(wsize/8) :: work
+
+! Initialisation BLACS et autres.
+!--------------------------------------
+ call initbuff(work,wsize) ! Init. des buffers internes au PBLAS
+ call blacs_pinfo(pe, npes) ! Init. mon PE, nbre de procs physiques
+ call blacs_gridinit(icntxt, & ! Init. Grille de proc. logiques.
+ 'C', nprow, npcol)
+
+ call blacs_gridinfo(icntxt, & ! Mes coord. dans la grille
+ nprow, npcol, prow, pcol) ! de processeurs logiques.
+
+ call descinit(desc_a, n, n, & ! Init. descripteur de la
+ rb_size, cb_size, 0, 0, & ! matrice a
+ icntxt, n_max, info)
+ if (info.lt.0) stop 'descinit'
+
+ call descinit(desc_x, n, 1, & ! Init. descripteur du vecteur x
+ rb_size, 1, 0, 0, &
+ icntxt, n_max, info) &
+ if (info.lt.0) stop 'descinit'
+
+! Distribution de la matrice 'a' vers la matrice distribuee 'dist_a'.
+!--------------------------------------------------------------------
+ call distribue(icntxt, a, n, dist_a, n_max, prow, pcol)
+
+! Distribution du vecteur 'b' sur le vecteur distribue 'dist_b'.
+!------------------------------------------------------------------
+ if ((prow==0).and.(pcol==0)) then
+ dist_b(1:2) = b(1:2) ! copie de b(1:2) dans proc(0,0)
+ call sgesd2d(icntxt,2,1, & ! b(3:5) envoie au proc (1,0)
+ b(3),n,1,0)
+ dist_b(3) = b(5) ! copie de b(5) dans proc (0,0)
+ end if
+ if ((prow==1).and.(pcol==0)) then
+ call sgerv2d(icntxt, 2,1, dist_b(1), & ! reception b(3:5) dans
+ n_max, 0, 0) ! dist_b(1:2).
+ end if
+
+! Calculs
+!----------------------------------
+ call PSGETRF(n, n, dist_a, 1, 1, desc_a, &
+ dist_piv, info)
+ if (info /= 0) print *,'Erreur dans la factorisation : ',info
+
+ call PSGETRS( 'N', n, 1, dist_a, 1, 1, desc_a, &
+ dist_piv, dist_b, 1, 1, desc_x, info)
+ if (info /= 0) print *,'Erreur dans la resolution : ',info
+
+! Recuperation des resultats 'dist_b' -> 'x'
+!----------------------------------------------
+ if ((prow==1).and.(pcol==0)) then
+ call sgesd2d(icntxt,2,1,dist_b(1), & ! envoie de dist_b(1:2)
+ n_max, 0, 0) ! au proc (0,0)
+ end if
+ if ((prow==0).and.(pcol==0)) then
+ x(1:2) = dist_b(1:2) ! copie de dist_b(1:2) dans proc(0,0)
+ call sgerv2d(icntxt,2,1, & ! reception dist_b(1:2) dans x(3:4)
+ x(3), n, 1, 0)
+ x(5) = dist_b(3) ! copie de dist_b(3) dans proc (0,0)
+ end if
+
+! Impression des resultats
+!-----------------------------
+ if ((prow==0).and.(pcol==0)) then
+ write(6,*) ' resultats :'
+ write(6,'(1x,5F5.1)') (x(j),j=1,n)
+ end if
+
+end program
+
+!--------------------------------------------------------------------
+! Distribution de la matrice 'x' vers la matrice distribuee 'dist_x'.
+!--------------------------------------------------------------------
+subroutine distribue( icntxt, x, n, dist_x, n_max, prow, pcol)
+ implicit none
+ integer :: icntxt ! Contexte (grille de procs)
+ integer :: n ! Ordre de la matrice X
+ integer :: n_max ! Ordre de la matrice locale.
+ real,dimension(n,n):: x ! Matrice globale X.
+ real,dimension(n_max,n_max):: dist_x ! Matrice locale.
+ integer :: prow, pcol ! Coord. de mon proc. logique
+
+ if ((prow == 0) .and. (pcol == 0)) then ! Emission par le
+ ! processeur (0,0)
+ call sgesd2d( icntxt, 2,2, x(1,3), n, 0, 1)
+ call sgesd2d( icntxt, 2,2, x(3,1), n, 1, 0)
+ call sgesd2d( icntxt, 2,2, x(3,3), n, 1, 1)
+ call sgesd2d( icntxt, 2,1, x(3,5), n, 1, 0)
+ call sgesd2d( icntxt, 1,2, x(5,3), n, 0, 1)
+ end if
+
+ if ((prow == 0) .and. (pcol == 0)) then ! Copie des blocs
+ dist_x(1:2,1:2) = x(1:2,1:2) ! appartenant au proc(0,0)
+ dist_x(1:2,3) = x(1:2,5)
+ dist_x(3,1:2) = x(5,1:2)
+ dist_x(3,3) = x(5,5)
+ end if
+ ! Reception par les
+ if ((prow == 0) .and. (pcol == 1)) then ! autres processeurs.
+ call SGERV2D( icntxt, 2,2, dist_x(1,1), n_max, 0, 0)
+ call SGERV2D( icntxt, 1,2, dist_x(3,1), n_max, 0, 0)
+ end if
+ if ((prow == 1) .and. (pcol == 0)) then
+ call SGERV2D( icntxt, 2,2, dist_x(1,1), n_max, 0, 0)
+ call SGERV2D( icntxt, 2,1, dist_x(1,3), n_max, 0, 0)
+ end if
+ if ((prow == 1) .and. (pcol == 1)) then
+ call SGERV2D( icntxt, 2,2, dist_x(1,1), n_max, 0, 0)
+ end if
+
+end subroutine distribue
diff --git a/tests/tstfiles/formfeed.txt b/tests/tstfiles/formfeed.txt
new file mode 100644
index 0000000..be63455
--- /dev/null
+++ b/tests/tstfiles/formfeed.txt
@@ -0,0 +1,7 @@
+1
+ 2
+
+
+5
+ 6
+7
diff --git a/tests/tstfiles/ftp2.pml b/tests/tstfiles/ftp2.pml
new file mode 100644
index 0000000..f8bf8ad
--- /dev/null
+++ b/tests/tstfiles/ftp2.pml
@@ -0,0 +1,455 @@
+/*
+ * File Transfer Protocol
+ *
+ * Promela (Protocol Meta Language)
+ *
+ * J-Ph Cottin 12/96 (inspired by Gerard J. Holzmann)
+ */
+
+
+/*
+ * Global Definitions
+ */
+
+#define LOSS 0 /* message loss */
+#define DUPS 0 /* duplicate msgs */
+#define QSZ 2 /* queue size */
+
+mtype = {
+ red, white, blue,
+ abort, accept, ack, sync_ack, close, connect,
+ create, data, eof, open, reject, sync, transfer,
+ FATAL, NON_FATAL, COMPLETE
+ }
+
+
+/*chan use_to_pres[2] = [QSZ] of {byte};
+chan pres_to_use[2] = [QSZ] of {byte};
+chan pres_to_ses[2] = [QSZ] of {byte};
+
+chan ses_to_pres[2] = [QSZ] of {byte,byte};
+chan ses_to_flow[2] = [QSZ] of {byte,byte};
+chan flow_to_ses[2] = [QSZ] of {byte,byte};
+chan dll_to_flow[2] = [QSZ] of {byte,byte};
+chan flow_to_dll[2] = [QSZ] of {byte,byte};
+
+chan ses_to_fsrv[2] = [QSZ] of {byte};
+chan fsrv_to_ses[2] = [QSZ] of {byte}; */
+
+chan use_to_pres[2] = [QSZ] of {mtype};
+chan pres_to_use[2] = [QSZ] of {mtype};
+chan pres_to_ses[2] = [QSZ] of {mtype};
+
+chan ses_to_pres[2] = [QSZ] of {mtype,byte};
+chan ses_to_flow[2] = [QSZ] of {mtype,byte};
+chan flow_to_ses[2] = [QSZ] of {mtype,byte};
+chan dll_to_flow[2] = [QSZ] of {mtype,byte};
+chan flow_to_dll[2] = [QSZ] of {mtype,byte};
+
+chan ses_to_fsrv[2] = [QSZ] of {mtype};
+chan fsrv_to_ses[2] = [QSZ] of {mtype};
+
+/*
+ * User Layer Validation Model
+ */
+
+proctype userprc ( bit n)
+{
+ use_to_pres[n]!transfer;
+ if
+ :: pres_to_use[n]?accept -> goto Done
+ :: pres_to_use[n]?reject -> goto Done
+ :: use_to_pres[n]!abort -> goto Aborted
+ fi;
+Aborted:
+ if
+ :: pres_to_use[n]?accept -> goto Done
+ :: pres_to_use[n]?reject -> goto Done
+ fi;
+Done:
+ skip
+ }
+
+
+/*
+ * Presentation Layer Validation Model
+ */
+
+proctype present(bit n)
+{
+ byte status, uabort;
+
+endIDLE:
+ do
+ :: use_to_pres[n]?transfer ->
+ uabort = 0;
+ break
+ :: use_to_pres[n]?abort ->
+ skip
+ od;
+
+TRANSFER:
+ pres_to_ses[n]!transfer;
+ do
+ :: use_to_pres[n]?abort ->
+ if
+ :: (!uabort) ->
+ uabort = 1;
+ pres_to_ses[n]!abort
+ :: (uabort) ->
+ assert(1+1!=2)
+ fi
+ :: ses_to_pres[n]?accept,0 ->
+ goto DONE
+ :: ses_to_pres[n]?reject(status) ->
+ if
+ :: (status == FATAL || uabort) ->
+ goto FAIL
+ :: (status == NON_FATAL && !uabort) ->
+ goto TRANSFER
+ fi
+ od ;
+
+DONE:
+ pres_to_use[n]!accept;
+ goto endIDLE;
+FAIL:
+ pres_to_use[n]!reject;
+ goto endIDLE
+ }
+
+/*
+ * Session Layer Validation Model
+ */
+
+
+proctype session (bit n)
+{
+ bit toggle;
+ byte type, status;
+
+endIDLE:
+ do
+ :: pres_to_ses[n]?type ->
+ if
+ :: (type == transfer) ->
+ goto DATA_OUT
+ :: (type != transfer) /* ignore */
+ fi
+ :: flow_to_ses[n]?type, 0 ->
+ if
+ :: (type == connect) ->
+ goto DATA_IN
+ :: (type != connect) /* ignore */
+ fi
+ od;
+
+DATA_IN: /* 1. prepare local file fsrver */
+ ses_to_fsrv[n]!create;
+ do
+ :: fsrv_to_ses[n]?reject ->
+ ses_to_flow[n]!reject,0;
+ goto endIDLE
+ :: fsrv_to_ses[n]?accept ->
+ ses_to_flow[n]!accept,0;
+ break
+ od;
+ /* 2. Receive the data, upto eof */
+ do
+ :: flow_to_ses[n]?data,0 ->
+ ses_to_fsrv[n]!data
+ :: flow_to_ses[n]?eof,0 ->
+ ses_to_fsrv[n]!eof;
+ break
+ :: pres_to_ses[n]?transfer ->
+ ses_to_pres[n]!reject(NON_FATAL)
+ :: flow_to_ses[n]?close,0 -> /* remote user aborted */
+ ses_to_fsrv[n]!close;
+ break
+ :: timeout -> /* got disconnect */
+ ses_to_fsrv[n]!close;
+ goto endIDLE
+ od;
+ /* 3. Close the connection */
+ ses_to_flow[n]!close,0;
+ goto endIDLE;
+
+DATA_OUT: /* 1. prepare local file fsver */
+ ses_to_fsrv[n]!open;
+ if
+ :: fsrv_to_ses[n]?reject ->
+ ses_to_pres[n]!reject(FATAL);
+ goto endIDLE
+ :: fsrv_to_ses[n]?accept ->
+ skip
+ fi;
+ /* 2. Initialize flow control */
+ ses_to_flow[n]!sync,toggle;
+ do
+ :: atomic {
+ flow_to_ses[n]?sync_ack,type ->
+ if
+ :: (type!= toggle)
+ :: (type == toggle) -> break
+ fi
+ }
+ :: timeout ->
+ ses_to_fsrv[n]!close;
+ ses_to_pres[n]!reject(FATAL);
+ goto endIDLE
+od;
+ toggle = 1 - toggle;
+ /* 3. Prepare remote file fsrver */
+ ses_to_flow[n]!connect,0;
+ if
+ :: flow_to_ses[n]?reject,0 ->
+ ses_to_fsrv[n]!close;
+ ses_to_pres[n]!reject(FATAL);
+ goto endIDLE
+ :: flow_to_ses[n]?connect,0 ->
+ ses_to_fsrv[n]!close;
+ ses_to_pres[n]!reject(NON_FATAL);
+ goto endIDLE
+ :: flow_to_ses[n]?accept,0 ->
+ skip
+ :: timeout ->
+ ses_to_fsrv[n]!close;
+ ses_to_pres[n]!reject(FATAL);
+ goto endIDLE
+fi;
+ /* 4. Transmit the data, upto eof*/
+do
+ :: fsrv_to_ses[n]?data ->
+ ses_to_flow[n]!data,0
+ :: fsrv_to_ses[n]?eof ->
+ ses_to_flow[n]!eof,0;
+ status = COMPLETE;
+ break
+ :: pres_to_ses[n]?abort -> /* local user aborted */
+ ses_to_fsrv[n]!close;
+ ses_to_flow[n]!close,0;
+ status = FATAL;
+ break
+od;
+ /* 5. Close the connexion */
+do
+ :: pres_to_ses[n]?abort /* ignore */
+ :: flow_to_ses[n]?close,0 ->
+ if
+ :: (status == COMPLETE) ->
+ ses_to_pres[n]!accept,0
+ :: (status != COMPLETE) ->
+ ses_to_pres[n]!reject(status)
+ fi;
+ break
+ :: timeout ->
+ ses_to_pres[n]!reject(FATAL);
+ break
+ od;
+ goto endIDLE
+
+}
+
+/*
+ * File Server Validation Model
+ */
+
+proctype fserver (bit n)
+{
+ end:
+ do
+ :: ses_to_fsrv[n]?create -> /* incoming */
+ if
+ :: fsrv_to_ses[n]!reject
+ :: fsrv_to_ses[n]!accept ->
+ do
+ :: ses_to_fsrv[n]?data
+ :: ses_to_fsrv[n]?eof -> break
+ :: ses_to_fsrv[n]?close -> break
+ od
+ fi
+ :: ses_to_fsrv[n]?open -> /* outgoing */
+ if
+ :: fsrv_to_ses[n]!reject
+ :: fsrv_to_ses[n]!accept ->
+ do
+ :: fsrv_to_ses[n]!data
+ :: fsrv_to_ses[n]!eof -> break
+ :: ses_to_fsrv[n]?close -> break
+ od
+ fi
+ od
+}
+
+/*
+ * Flow Control Laer Validation Model
+ */
+
+#define true 1
+#define false 0
+
+#define M 4 /* range sequence numbers */
+#define W 2 /* window size : M/2 */
+
+proctype fc(bit n)
+{
+ bool busy[M]; /* outstanding messages */
+ byte q; /* seq# oldest unacked msg */
+ byte m; /* seq# last msg received */
+ byte s; /* seq# next msg to send */
+ byte window; /* nr of outstanding msgs */
+ byte type; /* msg type */
+ bit received[M]; /* receiver housekeeping */
+ bit x; /* scratch variable */
+ byte p; /* seq# of last msg acked */
+ byte I_buf[M], O_buf[M]; /* message buffers */
+
+ /* sender part */
+ end:
+ do
+ :: atomic {
+ (window < W && len (ses_to_flow [n]) > 0
+ && len (flow_to_dll[n]) < QSZ ) ->
+ ses_to_flow[n]?type,x;
+ window = window +1;
+ busy[s]= true;
+ O_buf[s] = type;
+ flow_to_dll[n]!type, s;
+ if
+ :: (type != sync) ->
+ s = (s+1) %M
+ :: (type == sync) ->
+ window = 0;
+ s = M;
+ do
+ :: (s > 0) ->
+ s= s - 1;
+ busy[s] = false
+ :: (s == 0) -> break
+ od
+ fi
+ }
+ :: atomic {
+ (window > 0 && busy[q] == false) ->
+ window = window -1;
+ q = (q+1) %M
+ }
+#if DUPS
+ :: atomic {
+ (len(flow_to_dll[n]) < QSZ
+ && window >0 && busy[q] == true) ->
+ flow_to_dll[n]! O_buf[q], q
+ }
+#endif
+ :: atomic {
+ (timeout && len(flow_to_dll[n]) < QSZ
+ && window >0 && busy[q] == true) ->
+ flow_to_dll[n]! O_buf[q], q
+ }
+/* receiver part */
+#if LOSS
+ :: dll_to_flow[n]?type,m /* lose any message */
+#endif
+ :: dll_to_flow[n]?type,m ->
+ if
+ :: atomic{
+ (type == ack) ->
+ busy[m] = false
+ }
+ :: atomic{
+ (type == sync) ->
+ m = 0;
+ do
+ :: (m < M) ->
+ received[m] = 0;
+ m = m + 1
+ :: (m == M) ->
+ break
+ od
+ };
+ flow_to_dll[n]!sync_ack,0
+ :: (type == sync_ack) ->
+ flow_to_ses[n]!sync_ack,0
+ :: (type != ack && type != sync && type != sync_ack) ->
+ if
+ :: atomic {
+ (received[m] == true) ->
+ x = ((0 < p-m && p-m<= W)
+ || (0 < p-m-M && p-m-M <=W))};
+ if
+ :: (x) -> flow_to_dll[n]!ack,m
+ :: (!x) /* else skip */
+ fi
+ :: atomic {
+ (received[m] == false) ->
+ I_buf[m] = type;
+ received[m] = true;
+ received[(m-W+M)%M] = false
+ }
+ fi
+ fi
+
+ :: (received[p] == true && len(flow_to_ses[n])<QSZ
+ && len(flow_to_dll[n])<QSZ ) ->
+ flow_to_ses[n]!I_buf[p],0;
+ flow_to_dll[n]!ack,p;
+ p = (p+1) % M
+ od
+ }
+
+/*
+ * Datalink Layer Validation Model
+ */
+
+proctype data_link ()
+{
+byte type, seq;
+
+end:
+ do
+ :: flow_to_dll[0]?type,seq ->
+ if
+ :: dll_to_flow[1]!type,seq
+ :: skip /* lose message */
+ fi
+ :: flow_to_dll[1]?type,seq ->
+ if
+ :: dll_to_flow[0]!type,seq
+ :: skip /* lose message */
+ fi
+ od
+}
+
+/*
+ * Main Program
+ */
+
+/*init
+ {
+ atomic {
+ run userprc(0); run userprc(1);
+ run present(0); run present(1);
+ run session(0); run session(1);
+ run fserver(0); run fserver(1);
+ run fc(0); run fc(1);
+ run data_link()
+ }
+ }
+ */
+
+init
+ {
+ atomic {
+ run userprc(0);
+ run present(0);
+ run session(0);
+ run fserver(0);
+ run fc(0);
+ run data_link();
+ run fc(1);
+ run fserver(1);
+ run session(1);
+ run present(1);
+ run userprc(1);
+ }
+ }
diff --git a/tests/tstfiles/includeres b/tests/tstfiles/includeres
new file mode 100644
index 0000000..f9023bd
--- /dev/null
+++ b/tests/tstfiles/includeres
@@ -0,0 +1,60 @@
+#!/usr/local/bin/perl
+eval 'exec perl -S $0 "$@"'
+ if $running_under_some_shell;
+
+# includeres: include resources in PostScript file
+#
+# Copyright (C) Angus J. C. Duggan 1991-1995
+# See file LICENSE for details.
+
+$prog = ($0 =~ s=.*/==);
+
+%extn = ("font", ".pfa", "file", ".ps", "procset", ".ps", # resource extns
+ "pattern", ".pat", "form", ".frm", "encoding", ".enc");
+%type = ("%%BeginFile:", "file", "%%BeginProcSet:", "procset",
+ "%%BeginFont:", "font"); # resource types
+
+=head1 NAME
+
+ foo - script which blah
+
+=cut
+
+
+sub filename { # make filename for resource in @_
+ local($name);
+ foreach (@_) { # sanitise name
+ s/[!()\$\#*&\\\|\`\'\"\~\{\}\[\]\<\>\?]//g;
+ $name .= $_;
+ }
+ $name =~ s@.*/@@; # drop directories
+ die "Filename not found for resource ", join(" ", @_), "\n"
+ if $name =~ /^$/;
+ $name;
+}
+
+while (<>) {
+ if (/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/) {
+ local($comment, @res) = split(/\s+/);
+ local($type) = defined($type{$comment}) ? $type{$comment} : shift(@res);
+ local($name) = &filename(@res);
+ local($inc) = "/inf/soft/infthes/demaille/include/psutils"; # system include directory
+ if (open(RES, $name) || open(RES, "$name$extn{$type}") ||
+ open(RES, "$inc/$name") || open(RES, "$inc/$name$extn{$type}")) {
+ while (<RES>) {
+ print $_;
+ }
+ close(RES);
+ } else {
+ print "%%IncludeResource: ", join(" ", $type, @res), "\n";
+ print STDERR "Resource $name not found\n";
+ }
+ } else {
+ print $_;
+ }
+}
+
+=head1 SEE ALSO
+
+blah blah. This is pod documentation.
+blah blah
diff --git a/tests/tstfiles/mofibida.hs b/tests/tstfiles/mofibida.hs
new file mode 100644
index 0000000..7c560b1
--- /dev/null
+++ b/tests/tstfiles/mofibida.hs
@@ -0,0 +1,50 @@
+#!/usr/pd/bin/runhugs
+{- A sample Haskell file -}
+module Test
+where
+import qualified Monad
+import Prelude hiding (zip3)
+
+{-#specialise qsort :: [String]->[String] #-} -- a pragma
+
+-- Quicksort
+qsort :: Ord a => [a] -> [a] -- type annotation
+qsort [] = []
+qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_greq_x
+ where
+ elts_lt_x = [y | y <- xs, y < x]
+ elts_greq_x = [y | y <- xs, y >= x]
+
+-- Fibbonacci sequence
+fib = 1 : 1 : [ a+b | (a,b) <- zip fib (tail fib) ]
+
+-- Binary tree
+data Tree a = Branch (Tree a) (Tree a) | Leaf a
+
+-- State monad from "http://haskell.org/tutorial/monads.html"
+-- note that ">>=" should not be prited as ">\geq"
+data S = Tree String
+data SM a = SM (S -> (a,S)) -- The monadic type
+instance Monad SM where
+ -- defines state propagation
+ SM c1 >>= fc2 = SM (\s0 -> let (r,s1) = c1 s0
+ SM c2 = fc2 r in
+ c2 s1)
+ return k = SM (\s -> (k,s))
+
+leap = \n -> ( (n `mod` 4 == 0)&&(n `mod` 100 > 0) || (n `mod` 400 == 0))
+
+a<->b = a ++ "<->" ++ b -- <-> is a new binary operator
+
+infixr 7 <-> -- infix declaration can be anywhere in the module
+
+-- dark corners of Haskell syntax are not pretty-printed correctly:
+ifЕ' = True -- characters outside ASCII are allowed,
+(<=╚) :: String->String->String -- <=╚ is a valid operator name,
+a <=╚ b = a++"<=<<"++b
+a |-- b = a++"|--"++b -- operator names can even inlude double dash,
+ -- but many compilers will confuse it with a comment
+data Pair = String ::: String -- ::: is a valid constructor
+(x,hiding,qualified) = (0,0,0) -- not actually reserved words
+string_with_gaps = "Hel\ \lo,\HTwo\
+ \rld"++['\33'] -- the value is "Hello,\tworld!"
diff --git a/tests/tstfiles/mtvplot.octave b/tests/tstfiles/mtvplot.octave
new file mode 100644
index 0000000..ca6843b
--- /dev/null
+++ b/tests/tstfiles/mtvplot.octave
@@ -0,0 +1,27 @@
+## usage mtvplot(input,titles,filename)
+##
+## Outpluts graphs in MTV 1.4.1 curve2d format.
+##
+## input: is a matrix with the ordinate in the first column,
+## each successive column is a separate curve to plot
+## on the SEPARATE axes.
+## titles: a list of string titles for each plot
+## filename: the file to store the mtv file in
+
+function mtvplot(input,titles,filename)
+ file=fopen(filename,"w");
+
+
+ for g=(1:columns(input)-1)
+ fprintf(file,"%s\n","$DATA=Curve2d");
+ fprintf(file,"%s %s %s\n","%toplabel=\"",titles(g,:),"\"");
+ fprintf(file,"%s\n","% linetype=1");
+ for x=1:rows(input)
+ fprintf(file,"%f %f\n",input(x,1),input(x,g+1));
+ endfor
+ endfor
+ fclose(file)
+endfunction
+
+
+ \ No newline at end of file
diff --git a/tests/tstfiles/mutex.py b/tests/tstfiles/mutex.py
new file mode 100644
index 0000000..9135607
--- /dev/null
+++ b/tests/tstfiles/mutex.py
@@ -0,0 +1,60 @@
+# Mutual exclusion -- for use with module sched
+
+# A mutex has two pieces of state -- a 'locked' bit and a queue.
+# When the mutex is not locked, the queue is empty.
+# Otherwise, the queue contains 0 or more (function, argument) pairs
+# representing functions (or methods) waiting to acquire the lock.
+# When the mutex is unlocked while the queue is not empty,
+# the first queue entry is removed and its function(argument) pair called,
+# implying it now has the lock.
+#
+# Of course, no multi-threading is implied -- hence the funny interface
+# for lock, where a function is called once the lock is aquired.
+#
+class mutex:
+ #
+ # Create a new mutex -- initially unlocked
+ #
+ def __init__(self):
+ self.locked = 0
+ self.queue = []
+ #
+ # Test the locked bit of the mutex
+ #
+ def test(self):
+ return self.locked
+ #
+ # Atomic test-and-set -- grab the lock if it is not set,
+ # return true if it succeeded
+ #
+ def testandset(self):
+ if not self.locked:
+ self.locked = 1
+ return 1
+ else:
+ return 0
+ #
+ # Lock a mutex, call the function with supplied argument
+ # when it is acquired.
+ # If the mutex is already locked, place function and argument
+ # in the queue.
+ #
+ def lock(self, function, argument):
+ """Take it."""
+ if self.testandset():
+ function(argument)
+ else:
+ self.queue.append((function, argument))
+ #
+ # Unlock a mutex. If the queue is not empty, call the next
+ # function with its argument.
+ #
+ def unlock(self):
+ """Release."""
+ if self.queue:
+ function, argument = self.queue[0]
+ del self.queue[0]
+ function(argument)
+ else:
+ self.locked = 0
+ #
diff --git a/tests/tstfiles/pi.b b/tests/tstfiles/pi.b
new file mode 100644
index 0000000..0d840cf
--- /dev/null
+++ b/tests/tstfiles/pi.b
@@ -0,0 +1,53 @@
+/*
+ This is a program to determine the distribution of digits in the
+ fraction part of PI. It will look at the first scale digits.
+
+ The results are left in the global variable digits.
+ digits[0] is the number of 0's in PI.
+
+ This program requires the math library.
+*/
+
+define pi () {
+ auto ix, pi, save_scale, work;
+
+ save_scale = scale;
+ scale += 5;
+ print "\n\nCalculating PI to ",scale," digits. Please wait . . .";
+ pi = 4*a(1);
+ scale -= 5;
+ work = pi;
+
+ print "\nCounting digits. . .";
+ for (ix = 0; ix < 10; ix++) digits[ix] = 0;
+
+ /* Extract the One's digit from pi. */
+ scale = 0;
+ one_digit = work / 1;
+
+ for (ix = save_scale; ix > 0; ix--) {
+
+ /* Remove the One's digit and multiply by 10. */
+ scale = ix;
+ work = (work - one_digit) / 1 * 10;
+
+ /* Extract the One's digit. */
+ scale = 0;
+ one_digit = work / 1;
+
+ digits[one_digit] += 1;
+ }
+
+ /* Restore the scale. */
+ scale = save_scale;
+
+ /* Report. */
+ print "\n\n"
+ print "PI to ", scale, " digits is:\n", pi/1, "\n\n"
+ print "The frequency of the digits are:\n"
+ for (ix = 0; ix < 10; ix++) {
+ print " ", ix, " - ", digits[ix], " times\n"
+ }
+
+ print "\n\n"
+}
diff --git a/tests/tstfiles/polkaIDL.hh b/tests/tstfiles/polkaIDL.hh
new file mode 100644
index 0000000..325f426
--- /dev/null
+++ b/tests/tstfiles/polkaIDL.hh
@@ -0,0 +1,121 @@
+#ifndef __polkaIDL_hh__
+#define __polkaIDL_hh__
+
+#include <omniORB2/CORBA.h>
+
+#include <polkaTypes.hh>
+_CORBA_MODULE polka {
+_CORBA_MODULE_PUBLIC
+
+#ifndef __polka_loader__
+#define __polka_loader__
+ class loader;
+ typedef loader* loader_ptr;
+ typedef loader_ptr loaderRef;
+
+ class loader_Helper {
+ public:
+ static loader_ptr _nil();
+ static CORBA::Boolean is_nil(loader_ptr p);
+ static void release(loader_ptr p);
+ static loader_ptr unmarshalObjRef(MemBufferedStream &s);
+ };
+ typedef _CORBA_ObjRef_Var<loader,loader_Helper> loader_var;
+
+#endif
+#define polka_loader_IntfRepoID "IDL:polka/loader:1.0"
+
+ class _sk_loader : public virtual loader {
+ public:
+
+ _sk_loader() {}
+ _sk_loader(const omniORB::objectKey& k);
+ virtual ~_sk_loader() {}
+ loader_ptr _this() { return loader::_duplicate(this); }
+ void _obj_is_ready(CORBA::BOA_ptr boa) { boa->obj_is_ready(this); }
+
+ protected:
+ virtual void *_widenFromTheMostDerivedIntf(const char *repoId) {
+ return loader::_widenFromTheMostDerivedIntf(repoId);
+ }
+ private:
+ _sk_loader (const _sk_loader&);
+ _sk_loader &operator=(const _sk_loader&);
+ };
+
+ class _proxy_loader : public virtual loader {
+ private:
+
+ _proxy_loader (const _proxy_loader&);
+ _proxy_loader &operator=(const _proxy_loader&);
+ };
+
+ class _nil_loader : public virtual loader {
+ public:
+ _nil_loader() { this->PR_setobj(0); }
+ virtual ~_nil_loader() {}
+ void dump ( ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ return;
+ }
+
+ polkaStatus enregistreServeur ( const char * name ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ polkaStatus _result = 0;
+ return _result;
+ }
+
+ polkaStatus enregistreClient ( const char * name, CORBA::Long & numSerie ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ polkaStatus _result = 0;
+ return _result;
+ }
+
+ polkaStatus supprimeServeur ( const char * name ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ polkaStatus _result = 0;
+ return _result;
+ }
+
+ polkaStatus supprimeClient ( const char * name, CORBA::Long numSerie ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ polkaStatus _result = 0;
+ return _result;
+ }
+
+ void terminaisonClient ( ){
+ throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
+ // never reach here! Dummy return to keep some compilers happy.
+ return;
+ }
+
+ protected:
+ virtual void *_widenFromTheMostDerivedIntf(const char *repoId) {
+ return loader::_widenFromTheMostDerivedIntf(repoId);
+ }
+ };
+
+ class loader_proxyObjectFactory : public proxyObjectFactory {
+ public:
+ loader_proxyObjectFactory () {}
+ virtual ~loader_proxyObjectFactory () {}
+ virtual const char *irRepoId() const;
+ virtual CORBA::Object_ptr newProxyObject(Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release);
+ virtual CORBA::Boolean is_a(const char *base_repoId) const;
+ static polka::loader_ptr _nil() {
+ if (!__nil_loader) {
+ __nil_loader = new polka::_nil_loader;
+ }
+ return __nil_loader;
+ }
+ private:
+ static polka::loader_ptr __nil_loader;
+ };
+};
+
+#endif // __polkaIDL_hh__
diff --git a/tests/tstfiles/prosamp.pre b/tests/tstfiles/prosamp.pre
new file mode 100644
index 0000000..4eec3ce
--- /dev/null
+++ b/tests/tstfiles/prosamp.pre
@@ -0,0 +1,13 @@
+% This is an a2ps prologue sampler.
+%
+\header{This is an example of header}
+\footer{This is an example of footer}
+\keyword{This is an example of keyword}
+\Keyword{This is an example of keyword strong}
+\comment{This is an example of comment}
+\Comment{This is an example of Comment strong}
+\label{This is an example of label}
+\Label{This is an example of Label strong}
+\string{This is an example of string}
+\symbol{This is an example of symbol}
+\error{This is an example of error}
diff --git a/tests/tstfiles/psmandup b/tests/tstfiles/psmandup
new file mode 100644
index 0000000..174167b
--- /dev/null
+++ b/tests/tstfiles/psmandup
@@ -0,0 +1,269 @@
+#! /bin/sh -e
+# -*- ksh -*-
+
+# psmandup --- produce a version of a PS file to print in manual Duplex.
+
+# Copyright (c) 1998, 1999 Akim Demaille, Miguel Santana
+
+# 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, 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, you can either send email to this
+# program's maintainer or write to: The Free Software Foundation,
+# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+
+# Author: Akim Demaille <Akim.Demaille@freefriends.org>
+
+# Get the name of the program
+program=`echo $0 | sed 's#.*/##g'`
+
+# Local vars
+address=0 # Where to put the manual feed feature
+back=: # Print the back side pages.
+debug=
+file=
+front=: # Print the front side pages.
+output=- # Default is stdout
+fixps=${FIXPS:-fixps}
+message=
+psselect=${PSSELECT:-psselect}
+psset=${PSSET:-psset}
+tmpdir=`mktemp -d -t psmandup.XXXXXX` || { echo "$program: Cannot create temporary dir!" >&2 ; exit 1; }
+
+# These two must be kept in synch. They are opposed.
+verbose=echo
+quiet=:
+
+# The version/usage strings
+version="psmandup 2.1 (GNU a2ps 4.13c)
+Written by Akim Demaille.
+
+Copyright (c) 1998-1999 Akim Demaille, Miguel Santana
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+usage="\
+Usage: $program FILE
+Tries to produce a version of the PostScript FILE to print in manual
+Duplex.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version display version information and exit
+ -q, --quiet don't print informational messages
+ -o, --output=FILE save result in FILE. If FILE is \`-', send to stdout
+ -n, --no-fix don't call fixps to fix PS problems in FILE
+ -f, --front output only the front pages (recto) on the regular
+ tray
+ -b, --back output only the back pages (verso) on the manual
+ feed tray
+
+Produced output is meant for PS level 2 printers which don't support
+Duplex printing, but support Manual Feed. Once the first set of pages
+is printed (odd pages), manual feed is asked: introduce the odd pages
+to print the even pages on the other side.
+
+Because there is usually a short time out for manually fed jobs, you
+should really be next to the printer. If ever the time out expired,
+use the option -b to send only the missing part.
+
+Environment variables FIXPS, PSSELECT and PSSET, if defined, are used
+to find the tools.
+
+News, updates and documentation: http://www.inf.enst.fr/~demaille/a2ps/
+Report bugs to <bug-a2ps@gnu.org>"
+
+help="Try \`$program --help' for more information."
+
+# Parse command line arguments.
+option_without_arguments='vhsqnDbf'
+
+# Push a token among the arguments that will be used to notice when
+# we ended options/arguments parsing.
+arg_sep="$$--$$"
+set dummy ${1+"$@"} "$arg_sep"
+shift
+while test "x$1" != "x$arg_sep"; do
+
+ # Handle --option=value by splitting apart and putting back on argv.
+ case "$1" in
+ --*=*)
+ opt=`echo "$1" | sed -e 's/=.*//'`
+ val=`echo "$1" | sed -e 's/[^=]*=//'`
+ shift
+ set dummy "$opt" "$val" ${1+"$@"}
+ shift
+ ;;
+
+ -[$option_without_arguments]?*)
+ # Prefix $1 with x to avoid running `echo -na' for instance.
+ opt=`echo "x$1" | sed -e 's/x-\(.\).*/-\1/'`
+ rest=`echo "x$1" | sed -e 's/x-.\(.*\)/-\1/'`
+ shift
+ set dummy "$opt" "$rest" ${1+"$@"}
+ shift
+ ;;
+
+ # This case needs to be protected so that the case `-??*' does
+ # not split long options without arguments
+ --*)
+ ;;
+
+ # This is an option with argument. Split apart and put back on argv.
+ -??*)
+ opt=`echo "x$1" | sed -e 's/x-\(.\).*/-\1/'`
+ arg=`echo "x$1" | sed -e 's/x-.\(.*\)/\1/'`
+ shift
+ set dummy "$opt" "$arg" ${1+"$@"}
+ shift
+ ;;
+ esac
+
+ # Now, handle the options. $1 is the option *only*. If it has an
+ # argument, it is now necessarily in $2 etc. Remember to shift
+ # when fetching an argument.
+ case "$1" in
+ -v | --v*) echo "$version"; exit 0;;
+ -h | --h*) echo "$usage"; exit 0;;
+ -q | -s | --s* | --q*) verbose=:; quiet=echo;;
+ # Delay debugging so that options parsing does not appear
+ -D | --deb*) debug=-D ;;
+ -o | --out*) shift ; output=$1 ;;
+ -b | --bac*) front= ; back=: ;;
+ -f | --fro*) front=: ; back= ;;
+ -) # We are working with stdin ;;
+ set dummy "$@" "$1"
+ shift
+ ;;
+ -n | --no*) fixps= ;;
+
+ --) # What remains are not options.
+ shift
+ while test "x$1" != "x$arg_sep"; do
+ set dummy ${1+"$@"} "$1"
+ shift
+ shift
+ done
+ break;;
+
+ -*)
+ echo "$program: Unknown or ambiguous option \`$1'." >&2
+ echo "$program: Try \`--help' for more information." >&2
+ exit 1;;
+ *) set dummy ${1+"$@"} "$1"
+ shift
+ ;;
+ esac
+ shift
+done
+# Pop the token
+shift
+
+
+# Check the number of arguments.
+case $# in
+ 0) file=-;;
+ 1) file=$1;;
+ *) echo "$program: too many arguments" 1>&2
+ echo "$help" 1>&2
+ exit 1;;
+esac
+
+if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+fi
+
+# If printing from stdin, save into a tmp file
+if test $file = '-'; then
+ file=$tmpdir/stdin.ps
+ cat > $file
+fi
+
+# Fix the file beforehand, so that we can really expect to find the
+# page numbers.
+if test -n "$fixps"; then
+ $fixps $file -o $tmpdir/fixed.ps `$quiet -q`
+ file=$tmpdir/fixed.ps
+fi
+
+# Get the number of pages of the document
+pagenum=`sed -ne '/^%%Pages:/{
+s/%%Pages: \\([0-9]*\\).*$/\\1/p
+q
+}' $file`
+
+# Make the string to get the front pages (even, increasing) if needed
+if test -n "$front"; then
+ evens="1"
+ i=3
+ # Build the string to give to psselect
+ while test $i -le $pagenum;
+ do
+ evens="$evens,$i"
+ i=`expr $i + 2`
+ done
+fi
+
+# Make the string to get the back pages (odd, decreasing) if needed
+if test -n "$back"; then
+ # If the number of pages is odd, we need to insert a blank sheet
+ case "$pagenum" in
+ *[13579])
+ odds="_"
+ i=`expr $pagenum - 1 || exit 0`
+ ;;
+ *) # Odd, and not 0, so at least >= 2
+ odds=$pagenum
+ i=`expr $pagenum - 2 || exit 0`
+ ;;
+ esac
+
+ # Make the string to get the second half (odd, decreasing)
+ while test $i != 0;
+ do
+ odds="$odds,$i"
+ i=`expr $i - 2 || exit 0`
+ done
+fi
+
+# If there are both odds and evens to print, the separator is `,'
+test -n "$odds" && test -n "$evens" && separator=,
+
+# Reorder the pages
+$psselect -q $evens$separator$odds $file > $tmpdir/ordered.ps
+
+# If needed, insert the manual feed request
+if test -n "$back"; then
+ # The option of psset to ask the manual feed. If not set,
+ # psset just does nothing.
+ pssetmanfeed=-m
+ # Compute the address, depending on front pages are printed or not.
+ if test -n "$front"; then
+ address=`expr '(' $pagenum + 1 ')' / 2 + 1`
+ message="\
+Once the first half of the file printed, insert the sheets stack into
+the manual feed tray to print the second half. Be aware the time out
+if usually short. If it expired, use option -b to proceed."
+ else
+ address=0
+ message="Insert the front pages stack into the manual feed tray."
+ fi
+fi
+
+# Insert the manual feed request if needed
+$psset -n $pssetmanfeed -a $address -o$output $tmpdir/ordered.ps $debug
+
+test -n "$message" && $verbose "$message" 1>&2
+exit 0
diff --git a/tests/tstfiles/report.pre b/tests/tstfiles/report.pre
new file mode 100644
index 0000000..8bdab5c
--- /dev/null
+++ b/tests/tstfiles/report.pre
@@ -0,0 +1,219 @@
+% This has been generated by a2ps version 4.8.2
+% It should be processed by either LaTeX or
+% a2ps with options -Epre to be printable.
+%
+
+%%prescript:skip
+% a2ps skips everything between this line, and the one with `piks'
+
+\documentclass{article}
+
+
+%% These are LaTeX commands for prescript primitives.
+\newcommand{\textbi}[1]{\textbf{\textit{#1}}}
+\newcommand{\textsy}[1]{#1}
+\newcommand{\keyword}[1]{\textbf{#1}}
+\newcommand{\Keyword}[1]{\textbf{#1}}
+\newcommand{\comment}[1]{\textit{#1}}
+\newcommand{\Comment}[1]{\textit{#1}}
+\newcommand{\label}[1]{\textit{#1}}
+\newcommand{\Label}[1]{\textit{#1}}
+\newcommand{\string}[1]{``\textit{#1}''}
+
+%% These are made to be forgotten by LaTeX but seen by a2ps
+%% To get a better LaTeX file, remove any occurrence.
+\newcommand{\magicbf}[1]{}
+\newcommand{\magicit}[1]{}
+\newcommand{\magicbi}[1]{}
+\newcommand{\magicrm}[1]{}
+\newcommand{\magicsy}[1]{}
+\newcommand{\magictt}[1]{}
+
+
+%% There might be a better way to handle these
+\newcommand{\footer}[1]{}
+\newcommand{\header}[1]{}
+
+
+%% These symbols are available in ps but not in LaTeX.
+\newcommand{\carriagereturn}{$\backslash$n}
+\newcommand{\suchthat}{``suchthat''}
+\newcommand{\therefore}{``therefore''}
+\newcommand{\radicalex}{``radicalex''}
+\newcommand{\florin}{``florin''}
+\newcommand{\lozenge}{\diamondsuit}
+\newcommand{\register}{``register''}
+\newcommand{\trademark}{(TM)}}
+\newcommand{\varcopyright}{\copyright}
+\newcommand{\vartrademark}{\trademark}
+\newcommand{\varregister}{\register}
+\newcommand{\apple}{``apple''}
+\newcommand{\Alpha}{A}
+\newcommand{\Beta}{B}
+\newcommand{\Chi}{X}
+\newcommand{\Epsilon}{E}
+\newcommand{\Eta}{H}
+\newcommand{\Iota}{I}
+\newcommand{\Kappa}{K}
+\newcommand{\Mu}{M}
+\newcommand{\Nu}{N}
+\newcommand{\Omicron}{O}
+\newcommand{\Rho}{P}
+\newcommand{\Tau}{T}
+\newcommand{\Zeta}{Z}
+\newcommand{\varUpsilon}{\Upsilon}
+\newcommand{\omicron}{o}
+%%prescript:piks
+\begin{document}
+\textbi{This is the automatic report about styles of a2ps, version 4.8.2}
+
+\footer{Style sheets of a2ps version 4.8.2}
+\header{a2ps report}
+
+
+
+\section{Style definitions}
+\textrm{The reader should first note that a2ps is _not_ a powerful syntactical pretty-printer: it just handles lexical structures, i.e., if in your language} IF IF == THEN THEN ELSE := IF ELSE ELSE := THEN \textrm{is legal, then a2ps is not the tool you need. It is for the same reason that you can't expect a2ps to highlight the function definitions in C.
+In the following is described how the style sheets are defined. You can skip this section if you don't care how a2ps does this, and if you don't expect to implement new styles.}
+
+\section{Consistancy}
+\textrm{There are no found problems in the styles.}
+
+
+\section{Known languages}
+\begin{enumerate}
+\magictt{ 1}\item ada
+\magictt{ 2}\item c
+\magictt{ 3}\item c++
+\magictt{ 4}\item caml
+\magictt{ 5}\item claire
+\magictt{ 6}\item coq-vernacular
+\magictt{37}\item Unity
+\magictt{38}\item VERILOG
+\magictt{39}\item VHDL
+\magictt{40}\item zsh
+\end{enumerate}
+
+
+
+\section{Description of the language styles}
+\magicbf{1} \subsection{ada style}
+\begin{itemize}
+\header{ada style}
+\item \textrm{the abbreviation are:} adb, ads.
+\item \textrm{first alphabet is:}
+'\verb|A|\verb|B|\verb|C|\verb|D|\verb|E|\verb|F|\verb|G|\verb|H|\verb|I|\verb|J|\verb|K|\verb|L|\verb|M|\verb|N|\verb|O|\verb|P|\verb|Q|\verb|R|\verb|S|\verb|T|\verb|U|\verb|V|\verb|W|\verb|X|\verb|Y|\verb|Z|'(65-90), '\verb|a|\verb|b|\verb|c|\verb|d|\verb|e|\verb|f|\verb|g|\verb|h|\verb|i|\verb|j|\verb|k|\verb|l|\verb|m|\verb|n|\verb|o|\verb|p|\verb|q|\verb|r|\verb|s|\verb|t|\verb|u|\verb|v|\verb|w|\verb|x|\verb|y|\verb|z|'(97-122), '\verb|_|'(95), '\verb|)|'(41).
+\item \textrm{second alphabet is:}
+'\verb|0|\verb|1|\verb|2|\verb|3|\verb|4|\verb|5|\verb|6|\verb|7|\verb|8|\verb|9|'(48-57), '\verb|A|\verb|B|\verb|C|\verb|D|\verb|E|\verb|F|\verb|G|\verb|H|\verb|I|\verb|J|\verb|K|\verb|L|\verb|M|\verb|N|\verb|O|\verb|P|\verb|Q|\verb|R|\verb|S|\verb|T|\verb|U|\verb|V|\verb|W|\verb|X|\verb|Y|\verb|Z|'(65-90), '\verb|a|\verb|b|\verb|c|\verb|d|\verb|e|\verb|f|\verb|g|\verb|h|\verb|i|\verb|j|\verb|k|\verb|l|\verb|m|\verb|n|\verb|o|\verb|p|\verb|q|\verb|r|\verb|s|\verb|t|\verb|u|\verb|v|\verb|w|\verb|x|\verb|y|\verb|z|'(97-122), '\verb|_|'(95), '\verb|'|'(39).
+\item \textrm{keywords, symbols and sequences recognition is case insensitive.}
+\item \textrm{the keywords are:}
+\Keyword{abort}, %
+\Keyword{abs}, \Keyword{abstract}, \Keyword{accept}, \Keyword{access}, %
+\Keyword{access function}, \Keyword{access procedure}, \Keyword{aliased}, \Keyword{all}, %
+\Keyword{and}, \Keyword{array}, \Keyword{at}, \Keyword{begin}, %
+\Keyword{body}, \Keyword{case}, \Keyword{constant}, \Keyword{declare}, %
+\Keyword{delay}, \Keyword{delta}, \Keyword{digits}, \Keyword{do}, %
+\Keyword{else}, \Keyword{elsif}, \Keyword{end}, \Keyword{entry}, %
+\Keyword{exception}, \Keyword{exit}, \Keyword{for}, \Keyword{function}, %
+\Keyword{generic}, \Keyword{goto}, \Keyword{if}, \Keyword{in}, %
+\Keyword{is}, \Keyword{limited}, \Keyword{loop}, \Keyword{mod}, %
+\Keyword{new}, \Keyword{not}, \Keyword{null}, \Keyword{of}, %
+\Keyword{or}, \Keyword{others}, \Keyword{out}, \Keyword{package}, %
+\Keyword{pragma}, \Keyword{private}, \Keyword{procedure}, \Keyword{protected}, %
+\Keyword{raise}, \Keyword{range}, \Keyword{record}, \Keyword{rem}, %
+\Keyword{renames}, \Keyword{requeue}, \Keyword{return}, \Keyword{reverse}, %
+\Keyword{select}, \Keyword{separate}, \Keyword{subtype}, \Keyword{tagged}, %
+\Keyword{task}, \Keyword{terminate}, \Keyword{then}, \Keyword{type}, %
+\Keyword{until}, \Keyword{use}, \Keyword{when}, \Keyword{while}, %
+\Keyword{with}, \Keyword{xor}.
+\item \textrm{the regular symbols are:}
+\item \textrm{the special symbols are:}
+\verb#!=# $\to$ $\neq$, %
+\verb!==! $\to$ $\equiv$, \verb!<=! $\to$ $\leq$, %
+\verb!>=! $\to$ $\geq$, \verb!=>! $\to$ $\Rightarrow$.
+\item \textrm{the sequences are:}
+\verb!--inside$! $\to$ \comment{--}\comment{inside}\$, %
+\verb!"inside"! $\to$ \texttt{"}\string{inside}\texttt{"}, %
+\verb!'inside'! $\to$ \texttt{'}\string{inside}\texttt{'}, %
+\verb!package body inside is! $\to$ \Keyword{package body }\Label{inside}\Keyword{ is}, %
+\verb!package inside is! $\to$ \Keyword{package }\Label{inside}\Keyword{ is}, %
+\verb!package inside renames! $\to$ \Keyword{package }\Label{inside}\Keyword{ renames}, %
+\verb!procedure inside renames! $\to$ \Keyword{procedure }\label{inside}\Keyword{ renames}, %
+\verb!procedure inside is! $\to$ \Keyword{procedure }\label{inside}\Keyword{ is}, %
+\verb!procedure inside (! $\to$ \Keyword{procedure }\label{inside}\texttt{ (}, %
+\verb!procedure inside(! $\to$ \Keyword{procedure }\label{inside}\texttt{(}, %
+\verb!procedure inside$! $\to$ \Keyword{procedure }\label{inside}\$, %
+\verb!procedure inside;! $\to$ \Keyword{procedure }\label{inside}\texttt{;}, %
+\verb!function inside renames! $\to$ \Keyword{function }\label{inside}\Keyword{ renames}, %
+\verb!function inside is! $\to$ \Keyword{function }\label{inside}\Keyword{ is}, %
+\verb!function inside (! $\to$ \Keyword{function }\label{inside}\texttt{ (}, %
+\verb!function inside(! $\to$ \Keyword{function }\label{inside}\texttt{(}, %
+\verb!function inside$! $\to$ \Keyword{function }\label{inside}\$, %
+\verb!function inside;! $\to$ \Keyword{function }\label{inside}\texttt{;}.
+\item \textrm{the verbatims are:}
+"\verb!'''!".
+\item \textrm{the escapes are:}
+"\verb!""!", "\verb!\\!", "\verb!\'!".
+\end{itemize}
+
+
+\magicbf{25} \subsection{PreScript style}
+\begin{itemize}
+\header{PreScript style}
+\item This is prescript, a language of description of textual pages. It provides by the use of LaTeX like commands, a way to describe the pages that this program should produce. It can be a very good choice of destination language for people who want to produce text to print (e.g. pretty-printing, automating documentation etc.) but who definitely do not want to learn postscript, nor to require the use of LaTeX.
+It is also known as BifTeX (Basic Instruction From LaTeX), of ptf (Poor Text Format).
+Symbol translation is always enabled in this mode.
+\item \textrm{the abbreviation are:} prescript, biftex, bif, pre, ptf.
+\item \textrm{first alphabet is:}
+'\verb|A|\verb|B|\verb|C|\verb|D|\verb|E|\verb|F|\verb|G|\verb|H|\verb|I|\verb|J|\verb|K|\verb|L|\verb|M|\verb|N|\verb|O|\verb|P|\verb|Q|\verb|R|\verb|S|\verb|T|\verb|U|\verb|V|\verb|W|\verb|X|\verb|Y|\verb|Z|'(65-90), '\verb|a|\verb|b|\verb|c|\verb|d|\verb|e|\verb|f|\verb|g|\verb|h|\verb|i|\verb|j|\verb|k|\verb|l|\verb|m|\verb|n|\verb|o|\verb|p|\verb|q|\verb|r|\verb|s|\verb|t|\verb|u|\verb|v|\verb|w|\verb|x|\verb|y|\verb|z|'(97-122), '\verb|\|'(92), '\verb|_|'(95).
+\item \textrm{second alphabet is:}
+'\verb|A|\verb|B|\verb|C|\verb|D|\verb|E|\verb|F|\verb|G|\verb|H|\verb|I|\verb|J|\verb|K|\verb|L|\verb|M|\verb|N|\verb|O|\verb|P|\verb|Q|\verb|R|\verb|S|\verb|T|\verb|U|\verb|V|\verb|W|\verb|X|\verb|Y|\verb|Z|'(65-90), '\verb|a|\verb|b|\verb|c|\verb|d|\verb|e|\verb|f|\verb|g|\verb|h|\verb|i|\verb|j|\verb|k|\verb|l|\verb|m|\verb|n|\verb|o|\verb|p|\verb|q|\verb|r|\verb|s|\verb|t|\verb|u|\verb|v|\verb|w|\verb|x|\verb|y|\verb|z|'(97-122), '\verb|_|'(95).
+\item \textrm{keywords, symbols and sequences recognition is case sensitive.}
+\item \textrm{there are no keywords.}
+\item \textrm{there are no regular symbols.}
+\item \textrm{the special symbols are:}
+\verb!\$! $\to$ \$, %
+\verb!$! $\to$ , \verb!\_! $\to$ \_, %
+\verb!\%! $\to$ \%, \verb!\&! $\to$ \&, %
+\verb!\#! $\to$ \#, \verb!\(! $\to$ (, %
+\verb!\)! $\to$ ), \verb!\[! $\to$ [, %
+\verb!\]! $\to$ ], \verb!\{! $\to$ \{, %
+\verb!\|! $\to$ $\|$, \verb!\}! $\to$ \}.
+\item \textrm{the sequences are:}
+\verb!\\encoding{inside}! $\to$ \texttt{inside}, %
+\verb!%%prescript:skipinside%%prescript:piks$! $\to$ , %
+\verb!%inside$! $\to$ , %
+\verb!\\item[inside]! $\to$ \label{inside}, %
+\verb!\\section{inside}! $\to$ \Label{inside}, %
+\verb!\\subsection{inside}! $\to$ \label{inside}, %
+\verb!\\subsubsection{inside}! $\to$ \label{inside}, %
+\verb!\\header{inside}$! $\to$ \texttt{inside}, %
+\verb!\\footer{inside}$! $\to$ \texttt{inside}, %
+\verb!\\textbf{inside}! $\to$ \Keyword{inside}, %
+\verb!\\textit{inside}! $\to$ \keyword{inside}, %
+\verb!\\textbi{inside}! $\to$ \Keyword{inside}, %
+\verb!\\textrm{inside}! $\to$ \string{inside}, %
+\verb!\\textsy{inside}! $\to$ $\iota$$\nu$$\sigma$$\iota$$\delta$$\epsilon$, %
+\verb!\\texttt{inside}! $\to$ \texttt{inside}, %
+\verb!\\keyword{inside}! $\to$ \keyword{inside}, %
+\verb!\\Keyword{inside}! $\to$ \Keyword{inside}, %
+\verb!\\comment{inside}! $\to$ \comment{inside}, %
+\verb!\\Comment{inside}! $\to$ \Comment{inside}, %
+\verb!\\label{inside}! $\to$ \label{inside}, %
+\verb!\\Label{inside}! $\to$ \Label{inside}, %
+\verb!\\string{inside}! $\to$ \string{inside}, %
+\verb!\\magicbf{inside}! $\to$ \Keyword{inside}, %
+\verb!\\magicit{inside}! $\to$ \keyword{inside}, %
+\verb!\\magicbi{inside}! $\to$ \Keyword{inside}, %
+\verb!\\magicrm{inside}! $\to$ \string{inside}, %
+\verb!\\magicsy{inside}! $\to$ $\iota$$\nu$$\sigma$$\iota$$\delta$$\epsilon$, %
+\verb!\\magictt{inside}! $\to$ \texttt{inside}, %
+\verb!\\verb+inside+! $\to$ \texttt{inside}, %
+\verb#\\verb!inside!# $\to$ \texttt{inside}, %
+\verb!\\verb|inside|! $\to$ \texttt{inside}, %
+\verb!\\verb#inside#! $\to$ \texttt{inside}, %
+\verb!\\verb=inside=! $\to$ \texttt{inside}.
+\item \textrm{there are no verbatims.}
+\item \textrm{there are no escapes.}
+\end{itemize}
+\end{document}
diff --git a/tests/tstfiles/run-help b/tests/tstfiles/run-help
new file mode 100644
index 0000000..58a14dd
--- /dev/null
+++ b/tests/tstfiles/run-help
@@ -0,0 +1,17 @@
+#! /bin/zsh
+# zsh script to peruse the help directory
+#
+if [[ $1 = "-l" ]]; then
+ if [[ ${HELPDIR:-} != "" ]]; then
+ echo 'Here is a list of topics for which help is available:'
+ echo ""
+ ls $HELPDIR
+ else
+ echo 'There is no help available at this time'
+ fi
+elif [[ ${HELPDIR:-} != "" && -r $HELPDIR/$1 ]]
+then
+ ${=PAGER:-more} $HELPDIR/$1
+else
+ man $1
+fi
diff --git a/tests/tstfiles/s-garnam.adb b/tests/tstfiles/s-garnam.adb
new file mode 100644
index 0000000..c9ac236
--- /dev/null
+++ b/tests/tstfiles/s-garnam.adb
@@ -0,0 +1,428 @@
+------------------------------------------------------------------------------
+-- --
+-- GLADE COMPONENTS --
+-- --
+-- S Y S T E M . G A R L I C . N A M I N G --
+-- --
+-- B o d y --
+-- --
+-- --
+-- Copyright (C) 1996,1997 Free Software Foundation, Inc. --
+-- --
+-- GARLIC is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GARLIC is distributed in the hope that it will be useful, but --
+-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI- --
+-- LITY 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 distributed with GARLIC; see file COPYING. If --
+-- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
+-- Boston, MA 02111-1307, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GLADE is maintained by ACT Europe. --
+-- (email: glade-report@act-europe.fr) --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Exceptions;
+with Interfaces.C; use Interfaces.C;
+with Interfaces.C.Strings; use Interfaces.C.Strings;
+with System.Garlic.Constants; use System.Garlic.Constants;
+with System.Garlic.OS_Lib; use System.Garlic.OS_Lib;
+with Unchecked_Conversion;
+with Unchecked_Deallocation;
+
+package body System.Garlic.Naming is
+
+ use Thin;
+
+ Default_Buffer_Size : constant := 16384;
+
+ procedure Free is
+ new Unchecked_Deallocation (char_array, char_array_access);
+
+ function Allocate (Size : Positive := Default_Buffer_Size)
+ return char_array_access;
+ -- Allocate a buffer.
+
+ function Parse_Entry (Host : Hostent)
+ return Host_Entry;
+ -- Parse an entry.
+
+ procedure Raise_Naming_Error
+ (Errno : in C.Int;
+ Message : in String);
+ -- Raise the exception Naming_Error with an appropriate error message.
+
+ protected Gethost_In_Progress is
+ entry Lock;
+ procedure Unlock;
+ private
+ Locked : Boolean := False;
+ end Gethost_In_Progress;
+ -- We have to protect this.
+
+ ----------------
+ -- Address_Of --
+ ----------------
+
+ function Address_Of (Something : String)
+ return Address
+ is
+ begin
+ if Is_IP_Address (Something) then
+ return Value (Something);
+ else
+ return Info_Of (Something) .Addresses (1);
+ end if;
+ end Address_Of;
+
+ ------------
+ -- Adjust --
+ ------------
+
+ procedure Adjust (Object : in out Host_Entry)
+ is
+ Aliases : String_Array renames Object.Aliases;
+ begin
+ Object.Name := new String'(Object.Name.all);
+ for I in Aliases'Range loop
+ Aliases (I) := new String'(Aliases (I) .all);
+ end loop;
+ end Adjust;
+
+ --------------
+ -- Allocate --
+ --------------
+
+ function Allocate
+ (Size : Positive := Default_Buffer_Size)
+ return char_array_access
+ is
+ begin
+ return new char_array (1 .. size_t (Size));
+ end Allocate;
+
+ -----------------
+ -- Any_Address --
+ -----------------
+
+ function Any_Address return Address
+ is
+ begin
+ return To_Address (Inaddr_Any);
+ end Any_Address;
+
+ --------------
+ -- Finalize --
+ --------------
+
+ procedure Finalize (Object : in out Host_Entry)
+ is
+ Aliases : String_Array renames Object.Aliases;
+ procedure Free is
+ new Unchecked_Deallocation (String, String_Access);
+ begin
+ Free (Object.Name);
+ for I in Aliases'Range loop
+ Free (Aliases (I));
+ end loop;
+ end Finalize;
+
+ -------------------------
+ -- Gethost_In_Progress --
+ -------------------------
+
+ protected body Gethost_In_Progress is
+
+ ----------
+ -- Lock --
+ ----------
+
+ entry Lock when not Locked is
+ begin
+ Locked := True;
+ end Lock;
+
+ ------------
+ -- Unlock --
+ ------------
+
+ procedure Unlock is
+ begin
+ Locked := False;
+ end Unlock;
+
+ end Gethost_In_Progress;
+
+ ---------------
+ -- Host_Name --
+ ---------------
+
+ function Host_Name return String
+ is
+ Buff : char_array_access := Allocate;
+ Buffer : constant chars_ptr := To_Chars_Ptr (Buff);
+ Res : constant int := C_Gethostname (Buffer, Buff'Length);
+ begin
+ if Res = Failure then
+ Free (Buff);
+ Raise_Naming_Error (C_Errno, "");
+ end if;
+ declare
+ Result : constant String := Value (Buffer);
+ begin
+ Free (Buff);
+ return Result;
+ end;
+ end Host_Name;
+
+ -----------
+ -- Image --
+ -----------
+
+ function Image (Add : Address) return String
+ is
+
+ function Image (A : Address_Component) return String;
+ -- Return the string corresponding to its argument without
+ -- the leading space.
+
+ -----------
+ -- Image --
+ -----------
+
+ function Image (A : Address_Component)
+ return String
+ is
+ Im : constant String := Address_Component'Image (A);
+ begin
+ return Im (2 .. Im'Last);
+ end Image;
+
+ begin
+ return Image (Add.H1) & "." & Image (Add.H2) & "." &
+ Image (Add.H3) & "." & Image (Add.H4);
+ end Image;
+
+ -------------
+ -- Info_Of --
+ -------------
+
+ function Info_Of (Name : String)
+ return Host_Entry
+ is
+ Res : Hostent_Access;
+ C_Name : chars_ptr := New_String (Name);
+ begin
+ Gethost_In_Progress.Lock;
+ Res := C_Gethostbyname (C_Name);
+ Free (C_Name);
+ if Res = null then
+ Gethost_In_Progress.Unlock;
+ Raise_Naming_Error (C_Errno, Name);
+ end if;
+ declare
+ Result : constant Host_Entry := Parse_Entry (Res.all);
+ begin
+ Gethost_In_Progress.Unlock;
+ return Result;
+ end;
+ end Info_Of;
+
+ -------------
+ -- Info_Of --
+ -------------
+
+ function Info_Of (Addr : Address)
+ return Host_Entry
+ is
+ function Convert is
+ new Unchecked_Conversion (Source => In_Addr_Access,
+ Target => chars_ptr);
+ Temp : aliased In_Addr := To_In_Addr (Addr);
+ C_Addr : constant chars_ptr := Convert (Temp'Unchecked_Access);
+ Res : Hostent_Access;
+ begin
+ Gethost_In_Progress.Lock;
+ Res := C_Gethostbyaddr (C_Addr,
+ C.Int (Temp'Size / CHAR_BIT),
+ Af_Inet);
+ if Res = null then
+ Gethost_In_Progress.Unlock;
+ Raise_Naming_Error (C_Errno, Image (Addr));
+ end if;
+ declare
+ Result : constant Host_Entry := Parse_Entry (Res.all);
+ begin
+ Gethost_In_Progress.Unlock;
+ return Result;
+ end;
+ end Info_Of;
+
+ ------------------------
+ -- Info_Of_Name_Or_IP --
+ ------------------------
+
+ function Info_Of_Name_Or_IP (Something : String)
+ return Host_Entry
+ is
+ begin
+ if Is_IP_Address (Something) then
+ return Info_Of (Value (Something));
+ else
+ return Info_Of (Something);
+ end if;
+ end Info_Of_Name_Or_IP;
+
+ -------------------
+ -- Is_Ip_Address --
+ -------------------
+
+ function Is_IP_Address (Something : String)
+ return Boolean
+ is
+ First : constant Natural := Character'Pos (Something (Something'First));
+ begin
+ return First >= Character'Pos ('0') and then
+ First <= Character'Pos ('9');
+ end Is_IP_Address;
+
+ -------------
+ -- Name_Of --
+ -------------
+
+ function Name_Of (Something : String)
+ return String
+ is
+ Hostent : constant Host_Entry := Info_Of_Name_Or_IP (Something);
+ begin
+ if Hostent.Name = null then
+ Ada.Exceptions.Raise_Exception (Naming_Error'Identity,
+ "No name for " & Something);
+ end if;
+ return Hostent.Name.all;
+ end Name_Of;
+
+ -----------------
+ -- Parse_Entry --
+ -----------------
+
+ function Parse_Entry (Host : Hostent)
+ return Host_Entry
+ is
+ C_Aliases : constant Thin.Chars_Ptr_Array :=
+ Chars_Ptr_Pointers.Value (Host.H_Aliases);
+ C_Addr : constant In_Addr_Access_Array :=
+ In_Addr_Access_Pointers.Value
+ (Host.H_Addr_List);
+ Result : Host_Entry (N_Aliases => C_Aliases'Length - 1,
+ N_Addresses => C_Addr'Length - 1);
+ begin
+ Result.Name := new String'(Value (Host.H_Name));
+ for I in 1 .. Result.Aliases'Last loop
+ declare
+ Index : Natural := I - 1 + Natural (C_Aliases'First);
+ Current : chars_ptr renames C_Aliases (size_t (Index));
+ begin
+ Result.Aliases (I) := new String'(Value (Current));
+ end;
+ end loop;
+ for I in Result.Addresses'Range loop
+ declare
+ Index : Natural := I - 1 + Natural (C_Addr'First);
+ Current : In_Addr_Access renames C_Addr (Index);
+ begin
+ Result.Addresses (I) := To_Address (Current.all);
+ end;
+ end loop;
+ return Result;
+ end Parse_Entry;
+
+ ------------------------
+ -- Raise_Naming_Error --
+ ------------------------
+
+ procedure Raise_Naming_Error
+ (Errno : in C.Int;
+ Message : in String)
+ is
+
+ function Error_Message return String;
+ -- Return the message according to Errno.
+
+ -------------------
+ -- Error_Message --
+ -------------------
+
+ function Error_Message return String is
+ begin
+ case Errno is
+ when Host_Not_Found => return "Host not found";
+ when Try_Again => return "Try again";
+ when No_Recovery => return "No recovery";
+ when No_Address => return "No address";
+ when others => return "Unknown error" &
+ C.Int'Image (Errno);
+ end case;
+ end Error_Message;
+
+ begin
+ Ada.Exceptions.Raise_Exception (Naming_Error'Identity,
+ Error_Message & ": " & Message);
+ end Raise_Naming_Error;
+
+ ----------------
+ -- To_Address --
+ ----------------
+
+ function To_Address (Addr : In_Addr) return Address
+ is
+ begin
+ return (H1 => Address_Component (Addr.S_B1),
+ H2 => Address_Component (Addr.S_B2),
+ H3 => Address_Component (Addr.S_B3),
+ H4 => Address_Component (Addr.S_B4));
+ end To_Address;
+
+ ----------------
+ -- To_In_Addr --
+ ----------------
+
+ function To_In_Addr (Addr : Address) return In_Addr
+ is
+ begin
+ return (S_B1 => unsigned_char (Addr.H1),
+ S_B2 => unsigned_char (Addr.H2),
+ S_B3 => unsigned_char (Addr.H3),
+ S_B4 => unsigned_char (Addr.H4));
+ end To_In_Addr;
+
+ -----------
+ -- Value --
+ -----------
+
+ function Value (Add : String) return Address
+ is
+ function Convert is
+ new Unchecked_Conversion (Source => unsigned_long,
+ Target => In_Addr);
+ C_Add : chars_ptr := New_String (Add);
+ Converted : constant In_Addr := Convert (C_Inet_Addr (C_Add));
+ begin
+ Free (C_Add);
+ return (H1 => Address_Component (Converted.S_B1),
+ H2 => Address_Component (Converted.S_B2),
+ H3 => Address_Component (Converted.S_B3),
+ H4 => Address_Component (Converted.S_B4));
+ end Value;
+
+end System.Garlic.Naming;
diff --git a/tests/tstfiles/snacc.mib b/tests/tstfiles/snacc.mib
new file mode 100644
index 0000000..8b696cd
--- /dev/null
+++ b/tests/tstfiles/snacc.mib
@@ -0,0 +1,108 @@
+-- This file is extracted from the Snacc distribution.
+-- Parts have be cut to win bytes, and the result is probably meaningless.
+--
+
+RFC1213-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ mgmt, NetworkAddress, IpAddress, Counter, Gauge,
+ TimeTicks
+ FROM RFC1155-SMI
+
+-- OBJECT-TYPE
+-- FROM RFC-1212
+
+ ;
+
+ -- MIB-II (same prefix as MIB-I)
+
+ mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
+
+ -- textual conventions
+
+ DisplayString ::=
+ OCTET STRING
+ -- This data type is used to model textual information taken
+ -- from the NVT ASCII character set. By convention, objects
+ -- with this syntax are declared as having
+ -- SIZE (0..255)
+
+ -- groups in MIB-II
+
+ system OBJECT IDENTIFIER ::= { mib-2 1 }
+
+ -- historical (some say hysterical)
+ -- cmot OBJECT IDENTIFIER ::= { mib-2 9 }
+
+ transmission OBJECT IDENTIFIER ::= { mib-2 10 }
+
+
+ -- the Interfaces table
+
+ -- The Interfaces table contains information on the entity's
+ -- interfaces. Each interface is thought of as being
+ -- attached to a `subnetwork'. Note that this term should
+ -- not be confused with `subnet' which refers to an
+ -- addressing partitioning scheme used in the Internet suite
+ -- of protocols.
+
+ ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ DESCRIPTION
+ "A list of interface entries. The number of
+ entries is given by the value of ifNumber."
+ ::= { interfaces 2 }
+
+ IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ INTEGER,
+ ifDescr
+ DisplayString,
+ ifType
+ INTEGER,
+ ifMtu
+ INTEGER,
+ ifSpeed
+ Gauge,
+ ifPhysAddress
+ PhysAddress,
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+
+ ifType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1), -- none of the following
+ regular1822(2),
+ hdh1822(3),
+ ddn-x25(4),
+ rfc877-x25(5),
+ e1(19), -- european equiv. of T-1
+ basicISDN(20),
+ primaryISDN(21), -- proprietary serial
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ eon(25), -- CLNP over IP [11]
+ ethernet-3Mbit(26),
+ nsip(27), -- XNS over IP
+ slip(28), -- generic SLIP
+ ultra(29), -- ULTRA technologies
+ ds3(30), -- T-3
+ sip(31), -- SMDS
+ frame-relay(32)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ DESCRIPTION
+ "The type of interface, distinguished according to
+ the physical/link protocol(s) immediately `below'
+ the network layer in the protocol stack."
+ ::= { ifEntry 3 }
+
+
+END
diff --git a/tests/tstfiles/space.pls b/tests/tstfiles/space.pls
new file mode 100644
index 0000000..2f3358c
--- /dev/null
+++ b/tests/tstfiles/space.pls
@@ -0,0 +1,47 @@
+REM Script to check space left in database.
+REM
+DECLARE
+ CURSOR tot_space IS
+ SELECT a.tablespace_name, sum(a.bytes) FROM dba_data_files a
+ GROUP BY tablespace_name;
+ tbl_tot VARCHAR2(50);
+ byt_tot NUMBER(13);
+ CURSOR free_space IS
+ SELECT sum(b.bytes) FROM dba_free_space b
+ WHERE b.tablespace_name = tbl_tot
+ GROUP BY b.tablespace_name;
+ byt_free NUMBER(13);
+ pct_used NUMBER(3);
+/*
+ * Here are some useless comments, inserted for testing a2ps
+ */
+BEGIN
+ DBMS_OUTPUT.PUT_LINE (RPAD('TABLESPACE',30,' ') || LPAD('Total Bytes',17,' ') || LPAD('Free Bytes',17,' ')
+ || LPAD('% Used',10,' '));
+ DBMS_OUTPUT.PUT_LINE (RPAD('-',79,'-'));
+ LOOP
+ IF NOT tot_space%ISOPEN
+ THEN
+ OPEN tot_space;
+ END IF;
+ FETCH tot_space INTO
+ tbl_tot,
+ byt_tot;
+ IF tot_space%FOUND
+ THEN
+ OPEN free_space;
+ FETCH free_space INTO byt_free;
+ IF free_space%FOUND
+ THEN
+ pct_used := TRUNC(((1 - (byt_free/byt_tot)) * 100),0);
+ DBMS_OUTPUT.PUT_LINE (RPAD(tbl_tot,30,' ') || LPAD(byt_tot,17,' ') || LPAD(byt_free,17,' ')
+ || LPAD(pct_used,10,' '));
+ END IF;
+ CLOSE free_space;
+ ELSE
+ EXIT;
+ END IF;
+ END LOOP;
+ CLOSE tot_space;
+END;
+/
diff --git a/tests/tstfiles/sqlcrtbl.sql b/tests/tstfiles/sqlcrtbl.sql
new file mode 100644
index 0000000..675957d
--- /dev/null
+++ b/tests/tstfiles/sqlcrtbl.sql
@@ -0,0 +1,192 @@
+# Skeleton script for creating a table
+#
+# Notes:
+# - Script should be formatted exactly as indicated
+# - The primary key columns should always be the first columns indicated
+# - All SQL statements should be terminated with a /
+# - Primary key, foreign key, and unique constraints are out-of-line.
+# - Multi-column constraints are out-of-line.
+# - All other constraints are in-line.
+# - Remove all comments above the next line
+#=============================================================================
+# Name :
+# Created On:
+# Created By:
+# SCN No :
+# Purpose :
+#==============================================================================
+drop table owner.table_name
+/
+create table owner.table_name (
+ column_name varchar2(4) constraint table_name_nn1 not null,
+ column_name varchar2(10),
+ column_name number(8,2) constraint
+ table_name_ck1 ( column_name > 0),
+ column_name number(4,2) default 0,
+ column_name date,
+ .
+ .
+ .
+ constraint table_name_pk1
+ primary key (column_name, column_name, ...)
+#
+# All constraints that create an index must have a USING INDEX clause
+# To calculate the initial extent of an index, use the following (assuming
+# a 4K block size):
+# bytes = ((x*(11+x+len))/((4096 - 90)*(1 - pctfree/100)))*(4096 * 1.1)
+# where
+# x = expected number of rows after 6 months
+# z = number of columns indexed
+# len = the average length of the indexed column
+#
+# Alternatively, you may use one of the following storage clauses:
+#
+# Small (small indexes 20K to 2560K)
+#
+# storage (initial 20K next 20K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+# Medium (medium indexes 2560K to 40960K)
+#
+# storage (initial 2560K next 20K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+# Large (large indexes 40960K and up)
+#
+# storage (initial 40960K next 320K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+ using index
+ tablespace get_from_dba
+ pctfree 10
+ storage (initial 20K
+ next 20K
+ minextents 1
+ maxextents 99
+ pctincrease 100
+ freelists 1)
+ constraint table_name_fk1
+ foreign key (column_name) references
+ table_name (column_name),
+ constraint table_name_u1
+ unique (column_name, column_name)
+ using index
+ tablespace get_from_dba
+ pctfree 10
+ storage (initial 20K
+ next 20K
+ minextents 1
+ maxextents 99
+ pctincrease 100
+ freelists 1)
+# pctfree should be set to 0 for tables whose rows are not updated
+# (e.g. validation tables, control tables, history tables, etc.)
+# and whose columsn will all be complete (not null) upon first insert.
+#
+# pctfree should be set higher than 10 for those rows where many columns
+# will initially be left null upon the first insert, but will be updated
+# later
+pctfree 10 pctused 40
+tablespace get_from_dba
+#
+# STORAGE CLAUSE
+#
+# Initial Extent
+# Initial extent storage should be set to the appropriate number of bytes
+# (rounded to a multiple of 20K bytes) this table is expected to grow to in
+# the first 6 months.
+# To calculate the initial extent, use the following (assuming
+# a 4K block size):
+# bytes = ((x*(5+y*(1+len)))/((4096 - 90)*(1 - pctfree/100)))*4096
+# where
+# x = expected number of rows after 6 months
+# y = number of columns in the table
+# len = the average column length
+# pctfree = obtained from guidelines above
+#
+# Round the initial extent up to one of the values in the table below.
+# Determine the next extent from the table below (again assuming 4K
+# block sizes):
+#
+# Initial Extent Next Extent
+# ============= ===========
+# 20K 20K
+# 40K 20K
+# 80K 20K
+# 160K 20K
+# 320K 20K
+# 640K 20K
+# 1280K 20K
+# 2560K 20K
+# 5120K 40K
+# 10240K 80K
+# 20480K 160K
+# 40960K 320K
+# 81920K 640K
+# 163840K 1280K
+# 327680K 2560K
+# 655360K 5120K
+# 1310720K 10240K
+# etc, with each succeeding value twice the previous value.
+#
+# Alternatively, you may use one of the following storage clauses:
+#
+# Small (small tables 20K to 2560K)
+#
+# storage (initial 20K next 20K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+# Medium (medium tables 2560K to 40960K)
+#
+# storage (initial 2560K next 20K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+# Large (large tables 40960K and up)
+#
+# storage (initial 40960K next 320K minextents 1 maxextents 99 pctincrease 100
+# freelists 1)
+#
+storage (initial 20K next 20K minextents 1 maxextents 99 pctincrease 100
+ freelists 1)
+/
+#
+# Comments are required on the table and all columns.
+# Comments should be in upper and lower case, should be terminated by a
+# period, and cannot be longer than 255 bytes.
+#
+comment on table table_name is
+'Table Alias: XXXX. Add more comment on the table, it can be up to 255 bytes long.'
+/
+comment on column table_name.column_name is
+'This is the comment on this column. A column comment is required.'
+/
+comment on column table_name.column_name is
+'This is another comment on this column. A column comment is required.'
+/
+#
+# You may need to create other indexes for performance reasons.
+#
+create index table_name_n1 on table_name (column_name)
+tablespace get_from_dba
+pctfree 10
+storage (initial 20K next 20K minextents 1 maxextents 99
+ pctincrease 100 freelists 1)
+/
+create index table_name_n2 on table_name (column_name)
+tablespace get_from_dba
+pctfree 10
+storage (initial 20K next 20K minextents 1 maxextents 99
+ pctincrease 100 freelists 1)
+/
+#
+# if this table requires a key assigned by sequence, create the sequence
+#
+create sequence table_name_pk_sq increment by 1 start with 1
+/
+# public synonyms may be required
+#
+create public synonym table_name for table_name
+/
+create public synonym table_name_pk_sq for table_name_pk_sq
+/
+#
diff --git a/tests/tstfiles/sqlinit.ora b/tests/tstfiles/sqlinit.ora
new file mode 100644
index 0000000..671000c
--- /dev/null
+++ b/tests/tstfiles/sqlinit.ora
@@ -0,0 +1,102 @@
+#
+##############################################################################
+# Example INIT.ORA file
+#
+# This file is provided by Oracle Corporation to help you customize
+# your RDBMS installation for your site. Important system parameters
+# are discussed, and example settings given.
+#
+# Some parameter settings are generic to any size installation.
+# For parameters that require different values in different size
+# installations, three scenarios have been provided: SMALL, MEDIUM
+# and LARGE. Any parameter that needs to be tuned according to
+# installation size will have three settings, each one commented
+# according to installation size.
+#
+# Use the following table to approximate the SGA size needed for the
+# three scenarious provided in this file:
+#
+# -------Installation/Database Size------
+# SMALL MEDIUM LARGE
+# Block 2K 4500K 6800K 17000K
+# Size 4K 5500K 8800K 21000K
+#
+# To set up a database that multiple instances will be using, place
+# all instance-specific parameters in one file, and then have all
+# of these files point to a master file using the IFILE command.
+# This way, when you change a public
+# parameter, it will automatically change on all instances. This is
+# necessary, since all instances must run with the same value for many
+# parameters. For example, if you choose to use private rollback segments,
+# these must be specified in different files, but since all gc_*
+# parameters must be the same on all instances, they should be in one file.
+#
+# INSTRUCTIONS: Edit this file and the other INIT files it calls for
+# your site, either by using the values provided here or by providing
+# your own. Then place an IFILE= line into each instance-specific
+# INIT file that points at this file.
+###############################################################################
+
+db_name = oracle
+db_files = 20
+control_files = (%RDBMS_FILES%\ctl1orcl.ora)
+
+compatible = 7.3.0.0.0
+
+db_file_multiblock_read_count = 8 # INITIAL
+# db_file_multiblock_read_count = 8 # SMALL
+# db_file_multiblock_read_count = 16 # MEDIUM
+# db_file_multiblock_read_count = 32 # LARGE
+
+db_block_buffers = 50 # INITIAL
+# db_block_buffers = 200 # SMALL
+# db_block_buffers = 550 # MEDIUM
+# db_block_buffers = 3200 # LARGE
+
+shared_pool_size = 500000 # INITIAL
+# shared_pool_size = 3500000 # SMALL
+# shared_pool_size = 6000000 # MEDIUM
+# shared_pool_size = 9000000 # LARGE
+
+log_checkpoint_interval = 10000
+
+processes = 50 # INITIAL
+# processes = 50 # SMALL
+# processes = 100 # MEDIUM
+# processes = 200 # LARGE
+
+dml_locks = 100 # INITIAL
+# dml_locks = 100 # SMALL
+# dml_locks = 200 # MEDIUM
+# dml_locks = 500 # LARGE
+
+log_buffer = 1000 # INITIAL
+# log_buffer = 8192 # SMALL
+# log_buffer = 32768 # MEDIUM
+# log_buffer = 163840 # LARGE
+
+sequence_cache_entries = 10 # INITIAL
+# sequence_cache_entries = 10 # SMALL
+# sequence_cache_entries = 30 # MEDIUM
+# sequence_cache_entries = 100 # LARGE
+
+sequence_cache_hash_buckets = 10 # INITIAL
+# sequence_cache_hash_buckets = 10 # SMALL
+# sequence_cache_hash_buckets = 23 # MEDIUM
+# sequence_cache_hash_buckets = 89 # LARGE
+
+# audit_trail = true # if you want auditing
+# timed_statistics = true # if you want timed statistics
+max_dump_file_size = 10240 # limit trace file size to 5 Meg each
+
+# log_archive_start = true # if you want automatic archiving
+
+# define directories to store trace and alert files
+background_dump_dest=%RDBMS73%\TRACE
+user_dump_dest=%RDBMS73%\TRACE
+
+db_block_size = 2048
+
+snapshot_refresh_processes = 0
+
+remote_login_passwordfile = shared
diff --git a/tests/tstfiles/sqlpq92.sql b/tests/tstfiles/sqlpq92.sql
new file mode 100644
index 0000000..ee149a2
--- /dev/null
+++ b/tests/tstfiles/sqlpq92.sql
@@ -0,0 +1,5 @@
+SELECT H.emp_no,
+ H.hist_type,
+ count(*)
+FROM emp_history H
+GROUP BY H.emp_no, H.hist_type;
diff --git a/tests/tstfiles/sqlspace.pkb b/tests/tstfiles/sqlspace.pkb
new file mode 100644
index 0000000..2f3358c
--- /dev/null
+++ b/tests/tstfiles/sqlspace.pkb
@@ -0,0 +1,47 @@
+REM Script to check space left in database.
+REM
+DECLARE
+ CURSOR tot_space IS
+ SELECT a.tablespace_name, sum(a.bytes) FROM dba_data_files a
+ GROUP BY tablespace_name;
+ tbl_tot VARCHAR2(50);
+ byt_tot NUMBER(13);
+ CURSOR free_space IS
+ SELECT sum(b.bytes) FROM dba_free_space b
+ WHERE b.tablespace_name = tbl_tot
+ GROUP BY b.tablespace_name;
+ byt_free NUMBER(13);
+ pct_used NUMBER(3);
+/*
+ * Here are some useless comments, inserted for testing a2ps
+ */
+BEGIN
+ DBMS_OUTPUT.PUT_LINE (RPAD('TABLESPACE',30,' ') || LPAD('Total Bytes',17,' ') || LPAD('Free Bytes',17,' ')
+ || LPAD('% Used',10,' '));
+ DBMS_OUTPUT.PUT_LINE (RPAD('-',79,'-'));
+ LOOP
+ IF NOT tot_space%ISOPEN
+ THEN
+ OPEN tot_space;
+ END IF;
+ FETCH tot_space INTO
+ tbl_tot,
+ byt_tot;
+ IF tot_space%FOUND
+ THEN
+ OPEN free_space;
+ FETCH free_space INTO byt_free;
+ IF free_space%FOUND
+ THEN
+ pct_used := TRUNC(((1 - (byt_free/byt_tot)) * 100),0);
+ DBMS_OUTPUT.PUT_LINE (RPAD(tbl_tot,30,' ') || LPAD(byt_tot,17,' ') || LPAD(byt_free,17,' ')
+ || LPAD(pct_used,10,' '));
+ END IF;
+ CLOSE free_space;
+ ELSE
+ EXIT;
+ END IF;
+ END LOOP;
+ CLOSE tot_space;
+END;
+/
diff --git a/tests/tstfiles/strange.mail b/tests/tstfiles/strange.mail
new file mode 100644
index 0000000..3708ffd
--- /dev/null
+++ b/tests/tstfiles/strange.mail
@@ -0,0 +1,142 @@
+Topics:
+ Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+ Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+ Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+ Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+
+
+----------------------------------------------------------------------
+
+Date: Sat, 09 Aug 1997 17:57:56 +0200
+From: Christian Gottschling <chg@pegasus.dvz.fh-aachen.de>
+Subject: Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+Message-ID: <33EC9384.B15C03F4@pegasus.dvz.fh-aachen.de>
+References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>
+
+W.I.N. (Holding)LLC wrote:
+
+> Если Вы - квалифицированный специалист SAP - для Вас реальная возможность
+> трудоустройства по контракту в Австралийских компаниях. Для
+> квалифицированных специалистов в других областях программирования -
+> возможно БЕСПЛАТНОЕ обучение SAP с последующим трудоустройством.
+> Знание Английского языка - ОБЯЗАТЕЛЬНО!
+> Направляйте полное резюме (attachment file) на английском языке по адресу:
+>
+> sergch@anet.donetsk.ua
+>
+> Спешите!!!
+
+Yes! Indeed!
+
+SCNR.
+
+ --
+Christian Gottschling Datenverwurstungszentrale Juelich
+... I'm sitting here all day, randomly pressing keys ...
+
+
+
+------------------------------
+
+Date: 9 Aug 1997 12:25:33 -0400
+From: brobin@freenet.columbus.oh.us (Brian Robinson)
+Subject: Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+Message-ID: <5si5lt$4cv@login.freenet.columbus.oh.us>
+References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33EC9384.B15C03F4@pegasus.dvz.fh-aachen.de>
+
+Christian Gottschling (chg@pegasus.dvz.fh-aachen.de) wrote:
+: W.I.N. (Holding)LLC wrote:
+
+: > Если Вы - квалифицированный специалист SAP - для Вас реальная возможность
+: > трудоустройства по контракту в Австралийских компаниях. Для
+: > квалифицированных специалистов в других областях программирования -
+: > возможно БЕСПЛАТНОЕ обучение SAP с последующим трудоустройством.
+: > Знание Английского языка - ОБЯЗАТЕЛЬНО!
+: > Направляйте полное резюме (attachment file) на английском языке по адресу:
+: >
+: > sergch@anet.donetsk.ua
+: >
+: > Спешите!!!
+
+: Yes! Indeed!
+
+: SCNR.
+
+: --
+: Christian Gottschling Datenverwurstungszentrale Juelich
+: ... I'm sitting here all day, randomly pressing keys ...
+
+..... uhh.... ╝н╝Х╝y1ьр}? ;)
+--
+Brian Robinson | Sometimes its curious how much people are afraid of crazy
+Cols., Ohio | people. Who is to determine who is sane and crazy? I myself
+Student of WHS | am rather insane, some would say. Then again, im not the
+Maxim\Starmind | psycho beating himself with a rubber chicken in the corner.
+
+------------------------------
+
+Date: Sat, 09 Aug 1997 15:19:42 -0700
+From: Andy Schwartz <andys@mail.stlnet.com>
+To: "W.I.N. (Holding)LLC" <sergch@anet.donetsk.ua>
+Subject: Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+Message-ID: <33ECECFE.5566@mail.stlnet.com>
+References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua>
+
+IMHO, I think you should use специалист instead of программиро.
+
+.. Andy
+
+W.I.N. (Holding)LLC wrote:
+>
+> Если Вы - квалифицированный специалист SAP - для Вас реальная возможность
+> трудоустройства по контракту в Австралийских компаниях. Для
+> квалифицированных специалистов в других областях программирования -
+> возможно БЕСПЛАТНОЕ обучение SAP с последующим трудоустройством.
+> Знание Английского языка - ОБЯЗАТЕЛЬНО!
+> Направляйте полное резюме (attachment file) на английском языке по адресу:
+>
+> sergch@anet.donetsk.ua
+>
+> Спешите!!!
+
+------------------------------
+
+Date: Sun, 10 Aug 1997 22:53:31 GMT
+From: ribo@mindspring.com (Kevin Allegood)
+Subject: Re: ПРОГРАММИСТЫ!!! Работа в АВСТРАЛИИ по контракту!
+Message-ID: <5slgmt$g6@camel3.mindspring.com>
+References: <01bca361$472b3360$0f02000a@sergch.anet.donetsk.ua> <33ECECFE.5566@mail.stlnet.com>
+
+Andy Schwartz <andys@mail.stlnet.com> let escape his/her/whatever's
+keyboard:
+
+>IMHO, I think you should use специалист instead of программиро.
+
+It depends on your version of Notes. For 4.5X, I'd use специалист, but
+for earlier versions программиро works fine. Incedentally, although
+you can do it, I'd be careful about доустройстing the SAP с
+последующим unless your really know what you're doing.
+
+Kevin Allegood.
+
+>.. Andy
+
+>W.I.N. (Holding)LLC wrote:
+>>
+>> Если Вы - квалифицированный специалист SAP - для Вас реальная возможность
+>> трудоустройства по контракту в Австралийских компаниях. Для
+>> квалифицированных специалистов в других областях программирования -
+>> возможно БЕСПЛАТНОЕ обучение SAP с последующим трудоустройством.
+>> Знание Английского языка - ОБЯЗАТЕЛЬНО!
+>> Направляйте полное резюме (attachment file) на английском языке по адресу:
+>>
+>> sergch@anet.donetsk.ua
+>>
+>> Спешите!!!
+
+
+
+------------------------------
+
+End of forwarda004hb Digest
+***************************
diff --git a/tests/tstfiles/symbol.pre b/tests/tstfiles/symbol.pre
new file mode 100644
index 0000000..a14fa2c
--- /dev/null
+++ b/tests/tstfiles/symbol.pre
Binary files differ
diff --git a/tests/tstfiles/synopsys.setup b/tests/tstfiles/synopsys.setup
new file mode 100644
index 0000000..100e6c1
--- /dev/null
+++ b/tests/tstfiles/synopsys.setup
@@ -0,0 +1,44 @@
+/* presentation */
+company = "Sorep" ;
+designer = "Philippe LE VAN";
+
+/* alias communs */
+alias h history
+
+/* presentation generale */
+view_background = "black";
+set_layer pin_name_layer visible true
+set_layer pin_name_layer red 65535
+set_layer pin_name_layer green 0
+set_layer pin_name_layer blue 0
+
+/* nom des bus pour un "change_names" */
+bus_naming_style = "%s(%d)"
+
+/* definition des libraries */
+search_path={"/dtmref/ws/wskit/exploitation/erc32/V1.4.1/Global/SYNOPSYS/SYNOPSYS_1998.08"}
+library_fast = {"SC2RTP_BASIC_fast_5p5v_m55c.db"}
+library_nom = {"SC2RTP_BASIC_nom_5p0v_25c.db"}
+library_slow = {"SC2RTP_BASIC_slow_2p7v_145c.db"}
+link_library = {"*"} + library_slow
+target_library = library_slow
+symbol_library = {"SC2RTP_BASIC.sdb"}
+
+/* ecriture d'une netliste vhdl */
+vhdlout_use_packages = {IEEE.std_logic_1164,sc2rtp_basic.basic_vcomponents.all}
+vhdlout_write_components = "FALSE"
+
+/* lecture de l'edif */
+edifin_ground_net_property_name = "INIT"
+edifin_ground_net_property_value = "0SF"
+
+edifin_power_net_property_name = "INIT"
+edifin_power_net_property_value = "1SF"
+
+/* ecriture de l'edif (pour qu'il ne retienne pas les info de schematic) */
+edifout_netlist_only = "TRUE"
+
+/* commande d'impression */
+plot_command = "lpr -Planteeq1"
+
+ \ No newline at end of file
diff --git a/tests/tstfiles/tabulation.pre b/tests/tstfiles/tabulation.pre
new file mode 100644
index 0000000..232315b
--- /dev/null
+++ b/tests/tstfiles/tabulation.pre
@@ -0,0 +1,23 @@
+\string{
+iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+}
+\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow\leftrightarrow
+\texttt{
+.........................................................................................................................................................................................................................................................
+}
+\error{
+ 
+}
+1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+\Label{
+1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+}
+\invisible{
+1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+}
+\comment{
+m mm mmm mmmm mmmmm mmmmmm mmmmmmm mmmmmmmm mmmmmmmmm mmmmmmmmmmm mmmmmmmmmmm mmmmmmmmmmmm
+}
+\Keyword{
+И ИИ ИИИ ИИИИ ИИИИИ ИИИИИИ ИИИИИИИ ИИИИИИИИ ИИИИИИИИИ ИИИИИИИИИИИ ИИИИИИИИИИИ ИИИИИИИИИИИИ
+}
diff --git a/tests/tstfiles/template.e b/tests/tstfiles/template.e
new file mode 100644
index 0000000..b93fc90
--- /dev/null
+++ b/tests/tstfiles/template.e
@@ -0,0 +1,134 @@
+class TEMPLATE2 inherit
+
+ ARGUMENTS
+ undefine
+ copy, consistent, is_equal, setup
+ end
+
+ TEMPLATE2_LEX
+ redefine
+ store_analyzer,
+ retrieve_analyzer
+ end
+
+creation
+
+ make
+
+feature
+
+ root_line: TEMPLATE_CLAUSE;
+
+ analyzer_file_name: STRING is "/inf/nana/infthes/demaille/eiffel/template2/lexical/template2_analyzer";
+
+ make is
+ local
+ text_name: STRING;
+ analyzer_file: RAW_FILE;
+ analyzer_needs_storing: BOOLEAN;
+ text_file: PLAIN_TEXT_FILE;
+ argument_position: INTEGER
+ do
+ if argument_count = 0 then
+ io.putstring ("Usage: template2 file_name%N");
+ else
+ !! root_line.make;
+ io.putstring (Separator_line_message);
+ io.putstring ("TEMPLATE2");
+ io.putstring (" (Version 1.0). (C)");
+ !! analyzer_file.make (analyzer_file_name);
+ if analyzer_file.exists then
+ io.putstring ("%NRetrieving analyzer . . .");
+ retrieve_analyzer (analyzer_file_name);
+ root_line.document.set_lexical (analyzer);
+ io.putstring ("DONE");
+ else
+ io.putstring ("%NBuilding analyzer ... ");
+ build (root_line.document);
+ analyzer_needs_storing := true
+ io.putstring ("DONE");
+ end;
+
+ -- Test for left-recursion ?
+ -- test_left_recursion;
+
+ text_name := argument (1);
+ !! text_file.make (text_name);
+ if (not text_file.exists) then
+ io.putstring (text_name);
+ io.putstring (": No such file or directory%N");
+ else
+ root_line.document.set_input_file (text_name);
+ root_line.document.get_token;
+ io.putstring ("%NParsing document in file: ")
+ io.putstring (text_name);
+ io.putstring (" ... ");
+ root_line.parse;
+ if root_line.parsed then
+ io.putstring ("DONE");
+ io.putstring ("%NParse tree ... %N");
+ root_line.display (io.output);
+ io.putstring ("%NApplying semantics ... ");
+ root_line.semantics;
+ io.putstring ("DONE%N");
+ else
+ io.putstring ("%NSyntax error with document");
+ end;
+ end
+ if analyzer_needs_storing then
+ io.putstring ("%NStoring analyzer ... ");
+ -- store_analyzer (analyzer_file_name);
+ io.putstring ("DONE%N");
+ io.putstring (Separator_line_message);
+ end;
+ io.new_line;
+ end;
+ end; -- make
+ Separator_line_message: STRING is "---------------------------------------------------------------------------%N";
+
+ test_left_recursion is
+ -- Test root_line for left recursion.
+ local
+ t_b: BOOLEAN;
+ do
+ root_line.print_mode.put (true);
+ root_line.expand_all;
+ t_b := not root_line.left_recursion;
+ root_line.check_recursion;
+ if not root_line.left_recursion.item then
+ io.putstring ("No left recursion detected%N");
+ else
+ io.putstring ("Left recursive.%N");
+ end;
+
+ end; -- test_left_recursion
+
+ store_analyzer (file_name: STRING) is
+ -- Store `analyzer' in file named `file_name'.
+ require else
+ initialized: initialized
+ local
+ store_file: RAW_FILE
+ do
+ if analyzer = Void then
+ !! analyzer.make
+ end;
+ !! store_file.make_open_write (file_name);
+ analyzer.basic_store (store_file);
+ store_file.close;
+ end; -- store_analyzer
+
+ retrieve_analyzer (file_name: STRING) is
+ -- Retrieve `analyzer' from file named `file_name'.
+ local
+ retrieved_file: RAW_FILE
+ do
+ if analyzer = Void then
+ !! analyzer.make
+ end;
+ !! retrieved_file.make_open_read (file_name);
+ analyzer ?= analyzer.retrieved (retrieved_file);
+ retrieved_file.close;
+ end; -- store_analyzer_feature
+
+end -- class TEMPLATE2
diff --git a/tests/tstfiles/typing.cl b/tests/tstfiles/typing.cl
new file mode 100644
index 0000000..e45d6ed
--- /dev/null
+++ b/tests/tstfiles/typing.cl
@@ -0,0 +1,300 @@
+//------------------------------------------------------------------+
+// MARIE Yves Caseau |
+// typing.cl |
+// |
+// Moteur Algebrique pour la Resolution d'Inferences Elementaires |
+// Copyright (C) 1986-97 by Y. CASEAU. All Rights Reserved |
+//------------------------------------------------------------------+
+
+//-------------------------------------------------------------------
+//This file contains:
+//a lot of useful stuff for manipulating algebraic terms
+//-------------------------------------------------------------------
+
+//*******************************************************************
+//* Part 1: get_range/get_domain *
+//* Part 2: Utility methods for compilation *
+//* Part 3: Inversion of Properties *
+//*******************************************************************
+
+//*******************************************************************
+//* Part 1: get_range/get_domain *
+//*******************************************************************
+
+// a small range inference algorithm, to improve the system
+//
+get_range(self:abstract_relation,x:type) : type
+ -> (case self
+ (phi x,
+ composition get_range(self.r1,
+ get_range(self.r2, x)),
+ ands get_range(self.r1, x) ^
+ get_range(self.r2, x),
+ ors get_range(self.r1, x) U
+ get_range(self.r2, x),
+ psi (if (self.op % class) self.op
+ else extract_range(self.op,
+ list(get_range(self.r1, x),
+ get_range(self.r2, x)))),
+ array (if self.multivalued? member(self.range) else self.range),
+ property (if (self = Id) x else extract_range(self, list(x))),
+ product self.ens,
+ annotation get_range(self.v.definition, x),
+ connotation get_range(self.r, x),
+ denotation (if unknown?(definition, self.v)
+ self.v.range
+ else get_range(self.v.definition,
+ x)),
+ property_inverse
+ get_domain(self.r, x),
+ any error("error: range is not defined for ~S(~S)", self,
+ owner(self))))
+
+// a similar domain inference algorithm
+//
+get_domain(self:abstract_relation,x:type) : type
+ -> (case self
+ (phi x,
+ composition get_domain(self.r2,
+ get_domain(self.r1,
+ x)),
+ ands get_domain(self.r1, x) ^
+ get_domain(self.r2, x),
+ ors get_domain(self.r1, x) U
+ get_domain(self.r2, x),
+ property (if (self = Id) x
+ else let y := {} in
+ (for r in self.restrictions
+ (if (self.multivalued? | x ^ r.range)
+ y :U domain!(r)),
+ y)),
+ property_inverse
+ get_range(self.r, x),
+ product (if known?(BASE) BASE else any),
+ psi (if inv?(self)
+ get_range(inverse!(self), x)
+ else domain!(self.r1) ^ domain!(self.r2)),
+ psi get_domain(self.r1, x) ^
+ get_domain(self.r2, x),
+ denotation get_domain(self.v.definition, x),
+ any domain!(self)))
+
+// we extend range_type to take the type of arguments into account.
+//
+extract_range(self:property,l:list) : type
+ -> (let %first := l[1],
+ %rest := (copy(l) << 1),
+ prop := Optimize/restriction!(self, l),
+ %res := (case prop (restriction prop.range, any self.range)) in
+ (if self.multivalued? member(%res) else %res))
+extract_range(self:property_operator,l:list) : type
+ -> extract_range(self.op, l)
+
+// A small range inference algorithm, to improve the system.
+// (x X y) is the signature of the input pair
+//
+get_range(self:derivative,x:type,y:type) : type
+ -> (case self
+ (Tone y,
+ Tinv x,
+ Tphi get_domain(self.e1, x, y),
+ compr get_range(self.r1,
+ get_range(self.e2, x, y)),
+ compl get_range(self.e1, x, y),
+ Tand get_range(self.e1, x, y) ^
+ get_range(self.r2, any),
+ Tunion get_range(self.e1, x, y) U
+ get_range(self.e2, x, y),
+ Tpsi extract_range(self.op,
+ list(get_range(self.e1, x, y),
+ get_range(self.r2,
+ get_domain(self.e1, x, y)))),
+ Tannotation2
+ get_range(self.e1, x, y),
+ Tannotation1
+ get_range(self.v.definition, any),
+ Tconnotation2
+ get_range(self.r,
+ get_domain(self.e1, x, y)),
+ Tconnotation1
+ get_range(self.e1, x, y),
+ Tif get_range(self.r1,
+ get_domain(self.e1, x, y)) U
+ get_range(self.r2,
+ get_domain(self.e1, x, y)),
+ Tdenotation get_range(self.e1, x, y),
+ any error("error: get_range is not defined for ~S (~S)", self,
+ owner(self))))
+
+// A small domain inference algorithm, to improve the system.
+// (x X y) is the signature of the input pair
+//
+get_domain(self:derivative,x:type,y:type) : type
+ -> (case self
+ (Tone x,
+ Tinv y,
+ Tphi get_domain(self.e1, x, y),
+ compr get_domain(self.e2, x, y),
+ compl get_domain(self.r2,
+ get_domain(self.e1, x, y)),
+ Tand get_domain(self.e1, x, y) ^
+ get_domain(self.r2, any),
+ Tunion get_domain(self.e1, x, y) U
+ get_domain(self.e2, x, y),
+ Tpsi get_domain(self.e1, x, y) ^
+ get_domain(self.r2, any),
+ Tannotation2
+ get_domain(self.e1, x, y),
+ Tannotation1
+ get_domain(self.e1, x, y) ^
+ get_domain(self.v.definition, any),
+ Tconnotation2
+ get_domain(self.v.definition, any),
+ Tconnotation1
+ get_domain(self.e1, x, y),
+ Tdenotation get_domain(self.e1, x, y),
+ Tif get_domain(self.e1, x, y),
+ any error("error: get_domain is not defined for ~S (~S)", self,
+ owner(self))))
+
+//*******************************************************************
+//* Part 2: Utility methods for compilation *
+//*******************************************************************
+// a protected substitution
+//
+Logic/cpsubst(self:any,x:any,y:any) : any
+ -> substitution(instruction_copy(self), x, y)
+
+// instruction copy with fresh local variables
+//
+Logic/cpfresh(self:any) : any
+ -> (let l := bound_variables(self),
+ x := instruction_copy(self) in
+ (for y in l x := substitution(x, y, Variable(pname = y.pname)), x))
+
+// make a copy with fresh variable + a substitution
+//
+cpfresh(self:any,x1:Variable,x2:Variable) : any
+ -> substitution(cpfresh(self), x1, x2)
+
+// make a new two variable conclusion
+//
+cpfresh(self:any,x1:Variable,x2:Variable,y1:Variable,y2:Variable) : any
+ -> substitution(substitution(cpfresh(self), x1, x2), y1, y2)
+
+// we create so many binary messages ...
+//
+Logic/message!(x:any,p:property,y:any) : Call -> Call(p, list(x, y))
+
+Logic/make_a_and(self:list) : any
+ -> (if (size(self) = 1) self[1] else And(args = self))
+
+//*******************************************************************
+//* Part 3: Inversion of Properties *
+//*******************************************************************
+// now we van define the inversion of a psi ------------------------
+//
+// a psi term is usually non inversible.
+// two exceptions are interesting:
+// - the second subterm is a constant (a constant is always placed
+// in the second place) and we have an addition or a multiplication
+// - the two subterm are inversible and the operation is a mapping
+//
+inv?(self:psi) : boolean
+ -> (let %d := description[self.op] in
+ ((%d = group_operation &
+ (inv?(self.r1) & self.r2 % product)) |
+ ((%d = monoid |
+ (%d = binary_operation &
+ known?(ternary_inverse_of[self.op]))) &
+ ((inv?(self.r1) & const?(self.r2)) |
+ (inv?(self.r2) & const?(self.r1))))))
+
+// this is only called if the psi is inversible
+//
+inverse!(self:psi) : any
+ -> (let %o := self.op,
+ t1 := self.r1,
+ t2 := self.r2 in
+ (if (description[%o] = group_operation)
+ compose(inverse!(t1),
+ psify(%o, Id,
+ compose(function_inverse[%o],
+ t2)))
+ else if (description[%o] = monoid)
+ (if const?(t2)
+ compose(inverse!(t1),
+ compose(psify(ternary_inverse[%o],
+ Id, t2),
+ phi(op =
+ comparison_inverse[%o],
+ r1 = Id,
+ r2 = t2)))
+ else compose(inverse!(t2),
+ compose(psify(ternary_inverse[%o],
+ Id, t1),
+ phi(op =
+ comparison_inverse[%o],
+ r1 = Id,
+ r2 = t1))))
+ else if known?(ternary_inverse_of[%o])
+ (if const?(t2)
+ compose(inverse!(t1),
+ psify(ternary_inverse_of[%o],
+ Id, t2))
+ else compose(inverse!(t2), psify(%o, t1, Id)))
+ else if (description[%o] = mapping)
+ ands(r1 =
+ compose(inverse!(t1),
+ projection1[%o]),
+ r2 =
+ compose(inverse!(t2),
+ projection2[%o]))))
+
+// check if a relation can be inversed without trouble
+//
+inv?(self:relation) : boolean
+ -> (known?(inverse, self) |
+ (case self
+ (relation finite?(self.domain),
+ property not({ r in self.restrictions |
+ not(finite?(domain!(r)))}))))
+inverse!(self:relation) : relation
+ -> (let r1 := get(inverse, self) in
+ case r1
+ (relation r1,
+ any property_inverse(r = self)))
+
+// a constant expression is either a constant or an expression involving
+// constants
+//
+const?(self:abstract_relation) : boolean
+ -> (case self
+ (constant true,
+ composition const?(self.r2),
+ psi (const?(self.r1) &
+ const?(self.r2))))
+
+//*******************************************************************
+//* Part 4: Algebra Canonical Injection *
+//*******************************************************************
+
+domain!(r:relation) : type -> r.domain
+
+// a property is an abstract relation ----------------------------------
+// "inversion" is straightforward, we create a message
+//
+inversion(self:property,x:any,y:Variable) : any
+ -> (if self.multivalued?
+ Call(selector = %, args = list(y, inversion!(self, x)))
+ else Call(selector = =, args = list(y, inversion!(self, x))))
+inversion!(self:property,x:any) : any
+ -> (if (self = Id) x else Call(selector = self, args = list(x)))
+
+// an extensional relation
+//
+inversion(self:array,x:any,y:Variable) : any
+ -> Call(selector = =, args = list(y, inversion!(self, x)))
+inversion!(self:array,x:any) : any
+ -> Call(selector = nth, args = list(self, x))
+
diff --git a/tests/tstfiles/vrcaml.ml b/tests/tstfiles/vrcaml.ml
new file mode 100644
index 0000000..5ae7e71
--- /dev/null
+++ b/tests/tstfiles/vrcaml.ml
@@ -0,0 +1,138 @@
+(**************************************************************************)
+(* Creation and manipulation of VRML objects *)
+(**************************************************************************)
+
+#open "VRcaML";;
+#open "default";;
+#open "exceptions";;
+#open "basic_types";;
+#open "font";;
+#open "fonts";;
+#open "colors";;
+
+
+
+
+(**************************************************************************)
+(* Creation of VRML objects *)
+(**************************************************************************)
+
+(* New empty referential **************************************************)
+
+(* new_referential: vrml_object *)
+let new_referential = default_vrml_object ;;
+
+
+(* New VRML object ********************************************************)
+
+(* new_vrml_object :
+ vrml_positionable list -> vrml_object list -> vect3D -> rotation
+-> vect3D -> frame -> bool -> anchor -> billboard -> collision
+-> vrml_object *)
+let new_vrml_object objects children position rotation scale
+ frame unique anchor billboard collision =
+ { objects = objects ;
+ children = children ;
+ position = position ;
+ rotation = rotation ;
+ scale = scale ;
+ frame = frame ;
+ unique = unique ;
+ anchor = anchor ;
+ billboard = billboard ;
+ collision = collision }
+;;
+
+
+(**************************************************************************)
+(* Setting fields *)
+(**************************************************************************)
+
+(* set_objects : vrml_object -> vrml_positionable list -> vrml_object *)
+let setf_objects object objects =
+ new_vrml_object objects object.children object.position
+ object.rotation object.scale object.frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+let set_objects = setf_objects ;;
+
+(* set_children : vrml_object -> vrml_object list -> vrml_object *)
+let setf_children object children =
+ new_vrml_object object.objects children object.position
+ object.rotation object.scale object.frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+let set_children = setf_children ;;
+
+(* setf_position : vrml_object -> float -> float -> float -> vrml_object *)
+let setf_position object position =
+ new_vrml_object object.objects object.children position
+ object.rotation object.scale object.frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+(* setf_rotation :
+ vrml_object -> float -> float -> float -> float -> vrml_object *)
+let setf_rotation object rotation =
+ new_vrml_object object.objects object.children object.position
+ rotation object.scale object.frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+(* setf_scale : vrml_object -> float -> float -> float -> vrml_object *)
+let setf_scale object scale =
+ new_vrml_object object.objects object.children object.position
+ object.rotation scale object.frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+(* setf_frame : vrml_object -> frame -> vrml_object *)
+let setf_frame object frame =
+ new_vrml_object object.objects object.children object.position
+ object.rotation object.scale frame
+ object.unique object.anchor object.billboard
+ object.collision
+;;
+
+let set_frame = setf_frame ;;
+
+(* setf_unique : vrml_object -> bool -> vrml_object *)
+let setf_unique object unique =
+ new_vrml_object object.objects object.children object.position
+ object.rotation object.scale object.frame
+ unique object.anchor object.billboard
+ object.collision
+;;
+
+let set_unique = setf_unique ;;
+
+(* setf_anchor : vrml_object -> anchor -> vrml_object *)
+let setf_anchor object anchor =
+ new_vrml_object object.objects object.children object.position
+ object.rotation object.scale object.frame
+ object.unique anchor object.billboard
+ object.collision
+;;
+
+(* setf_billboard : vrml_object -> billboard -> vrml_object *)
+let setf_billboard object billboard =
+ new_vrml_object object.objects object.children object.position
+ object.rotation object.scale object.frame
+ object.unique object.anchor billboard
+ object.collision
+;;
+
+(* setf_collision : vrml_object -> collision -> vrml_object *)
+let setf_collision object collision =
+ new_vrml_object object.objects object.children object.position
+ object.rotation object.scale object.frame
+ object.unique object.anchor object.billboard
+ collision
+;;
diff --git a/tests/tstfiles/wide.txt b/tests/tstfiles/wide.txt
new file mode 100644
index 0000000..3c0f034
--- /dev/null
+++ b/tests/tstfiles/wide.txt
Binary files differ
diff --git a/tests/usropt-1.tst b/tests/usropt-1.tst
new file mode 100755
index 0000000..a6bde28
--- /dev/null
+++ b/tests/usropt-1.tst
@@ -0,0 +1,22 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Check that the user options work correctly.
+
+# The testing file
+IN_NAME=tabulation.pre
+
+. ./defs || exit 1
+
+# -=useroption-test is --guess, so only 1 line is expected
+
+# The file is after the user option
+lines=`$CHK -=useroption-test $TST_FILE | wc -l`
+test $lines = 1 || exit 1
+
+# The file is before the user option
+lines=`$CHK $TST_FILE -=useroption-test | wc -l`
+test $lines = 1 || exit 1
+
+# Success
+exit 0
diff --git a/tests/usropt-2.tst b/tests/usropt-2.tst
new file mode 100755
index 0000000..6974d7c
--- /dev/null
+++ b/tests/usropt-2.tst
@@ -0,0 +1,29 @@
+#! /bin/sh
+# -*- ksh -*-
+
+# Check that the user options work correctly.
+# Specifically, that option processing is not broken by user options.
+
+# We use a dummy option/value which cannot change the test:
+# for instance --stdin stdin-name
+
+# The testing file
+IN_NAME=tabulation.pre
+
+. ./defs || exit 1
+
+# -=useroption-test is --guess, so only 1 line is expected
+lines=`$CHK -=useroption-test --stdin=stdin-name $TST_FILE 2>/dev/null | wc -l`
+test $lines = 1 || exit 1
+
+lines=`$CHK $TST_FILE --stdin=stdin-name -=useroption-test 2>/dev/null | wc -l`
+test $lines = 1 || exit 1
+
+lines=`$CHK -=useroption-test $TST_FILE --stdin=stdin-name 2>/dev/null | wc -l`
+test $lines = 1 || exit 1
+
+lines=`$CHK $TST_FILE -=useroption-test --stdin=stdin-name 2>/dev/null | wc -l`
+test $lines = 1 || exit 1
+
+# Success
+exit 0
diff --git a/tests/view-diff b/tests/view-diff
new file mode 100755
index 0000000..9eb2e14
--- /dev/null
+++ b/tests/view-diff
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+gv=${GHOSTVIEW:-gv}
+
+file=`echo $1 | sed s/\\\\..*//g`
+
+# Some tests need a -4 prologue
+case $file in
+ al*) prologue=prolog-4.ps;;
+ *) prologue=prolog-1.ps;;
+esac
+
+sed "s/Title:.*/Title: ref-$file/g" ps-ref/$prologue > /tmp/1.ps
+cat ps-ref/$file.ps >> /tmp/1.ps
+
+sed "s/Title:.*/Title: chk-$file/g" ps-ref/$prologue > /tmp/2.ps
+cat ps-chk/$file.ps >> /tmp/2.ps
+
+$gv /tmp/1.ps &
+$gv /tmp/2.ps
+
+/bin/rm /tmp/1.ps /tmp/2.ps