From 3077766693013fb8fad01fb5a73adedde5f244b8 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 11 Sep 2003 08:21:49 +0000 Subject: [PATCH] * configure.ac: + Check for awk and groff. + Only build documentation if groff was found. * debian/rules: + Move .ps documentation to the elkdoc package. * doc/*: + Removed *.ps files from CVS. + Added proper build rules for *.ps files. git-svn-id: svn://svn.zoy.org/elk/trunk@143 55e467fa-43c5-0310-a8a2-de718669efc6 --- configure.ac | 18 + debian/control | 2 +- debian/elkdoc.docs | 1 - debian/rules | 4 +- doc/bitstring/Makefile.am | 32 +- doc/bitstring/bitstring.ps | 533 ----- doc/cprog/Makefile.am | 37 +- doc/cprog/cprog.ps | 4541 ------------------------------------ doc/kernel/Makefile.am | 33 +- doc/kernel/kernel.ps | 2720 --------------------- doc/man/Makefile.am | 21 +- doc/man/elk.ps | 277 --- doc/oops/Makefile.am | 32 +- doc/oops/oops.ps | 624 ----- doc/record/Makefile.am | 32 +- doc/record/record.ps | 640 ----- doc/regexp/Makefile.am | 32 +- doc/regexp/regexp.ps | 460 ---- doc/unix/Makefile.am | 32 +- doc/unix/unix.ps | 2235 ------------------ doc/usenix/Makefile.am | 23 +- doc/usenix/usenix.ps | 2354 ------------------- doc/xlib/Makefile.am | 32 +- doc/xlib/xlib.ps | 3182 ------------------------- doc/xt/Makefile.am | 32 +- doc/xt/xt.ps | 1067 --------- 26 files changed, 348 insertions(+), 18648 deletions(-) delete mode 100644 doc/bitstring/bitstring.ps delete mode 100644 doc/cprog/cprog.ps delete mode 100644 doc/kernel/kernel.ps delete mode 100644 doc/man/elk.ps delete mode 100644 doc/oops/oops.ps delete mode 100644 doc/record/record.ps delete mode 100644 doc/regexp/regexp.ps delete mode 100644 doc/unix/unix.ps delete mode 100644 doc/usenix/usenix.ps delete mode 100644 doc/xlib/xlib.ps delete mode 100644 doc/xt/xt.ps diff --git a/configure.ac b/configure.ac index bd298c7..3224fee 100644 --- a/configure.ac +++ b/configure.ac @@ -473,6 +473,23 @@ ELK_LIBS="${ELK_LIBS} -lm" AC_SUBST(INCLUDES) AC_SUBST(ELK_LIBS) +dnl +dnl Check for available programs +dnl +AC_PROG_AWK +AC_MSG_CHECKING(for groff -ms) +if echo foo | groff -ms >/dev/null 2>&1; then + ac_cv_my_have_groff=yes +else + ac_cv_my_have_groff=no +fi +AC_MSG_RESULT([${ac_cv_my_have_groff}]) +AM_CONDITIONAL(HAVE_GROFF, test "${ac_cv_my_have_groff}" = "yes") + + +dnl +dnl Finished! +dnl AC_OUTPUT([ Makefile autotools/Makefile @@ -515,5 +532,6 @@ libgdbm support: ${ac_cv_my_have_gdbm} X11 support: ${ac_cv_my_have_x11} Xaw support: ${ac_cv_my_have_xaw} Motif support: ${ac_cv_my_have_motif} +build documentation: ${ac_cv_my_have_groff} EOF diff --git a/debian/control b/debian/control index 6c6de5a..660c099 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: elk Section: devel Priority: optional Maintainer: Sam Hocevar (Debian packages) -Build-Depends: debhelper (>= 3.0), groff-base, libelfg0-dev, xlibs-dev, lesstif-dev, libgdbm-dev, libxaw7-dev +Build-Depends: debhelper (>= 3.0), groff, libelfg0-dev, xlibs-dev, lesstif-dev, libgdbm-dev, libxaw7-dev Standards-Version: 3.6.1.0 Package: elk diff --git a/debian/elkdoc.docs b/debian/elkdoc.docs index 64699f2..7ac6e03 100644 --- a/debian/elkdoc.docs +++ b/debian/elkdoc.docs @@ -5,4 +5,3 @@ MACHINES NEWS README TODO -doc diff --git a/debian/rules b/debian/rules index 9f9d01b..c36bbac 100755 --- a/debian/rules +++ b/debian/rules @@ -56,6 +56,8 @@ install: build $(CURDIR)/debian/elk/usr/lib/*.a \ $(CURDIR)/debian/libelk0-dev/usr/lib/ + mv $(CURDIR)/debian/elk/usr/share/doc/elk/*.ps \ + $(CURDIR)/debian/elkdoc/usr/share/doc/elkdoc/ mv $(CURDIR)/debian/elk/usr/share/doc/elk/examples \ $(CURDIR)/debian/elkdoc/usr/share/doc/elkdoc/ @@ -67,8 +69,6 @@ binary-indep: build install dh_testroot # dh_installdebconf dh_installdocs - rm -Rf `find $(CURDIR)/debian/elkdoc/usr/share/doc/elkdoc/ -type d -name .svn` - rm -f `find $(CURDIR)/debian/elkdoc/usr/share/doc/elkdoc/ -type f -name 'Makefile*'` # dh_installexamples # dh_installmenu # dh_installemacsen diff --git a/doc/bitstring/Makefile.am b/doc/bitstring/Makefile.am index 2af7488..a72fbce 100644 --- a/doc/bitstring/Makefile.am +++ b/doc/bitstring/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = bitstring.ms bitstring.ps +EXTRA_DIST = bitstring.ms + +if HAVE_GROFF +doc_DATA = bitstring.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= bitstring +TROFF= groff -ms -t +UNROFF= unroff -ms + +bitstring.ps: bitstring.ms index.ms + (cat bitstring.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > bitstring.ps + +bitstring.html: bitstring.ms + (cat $?; echo ".Tc") | $(UNROFF) document=bitstring + +index.ms: bitstring.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: bitstring.ms + $(TROFF) bitstring.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] bitstring.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms bitstring.ps bitstring.html diff --git a/doc/bitstring/bitstring.ps b/doc/bitstring/bitstring.ps deleted file mode 100644 index 8e10c65..0000000 --- a/doc/bitstring/bitstring.ps +++ /dev/null @@ -1,533 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 6 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E -(Elk Bit String Extension)225.486 138 Q/F1 10/Times-Italic@0 SF(Oliver Laumann) -255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R(oduction)-.198 E/F3 -11/Times-Roman@0 SF .192(The bit string e)97 252.6 R .192 -(xtension to Elk de\214nes a ne)-.165 F 2.942(wd)-.275 G .191(ata type)302.69 -252.6 R/F4 11/Times-Italic@0 SF(bitstring)2.941 E F3 .191 -(\(a sequence of zero or more)2.941 F 1.565 -(bits\) and functions to create and manipulate bit strings.)72 267.6 R 1.566 -(The bits in a bit string are numbered)7.065 F(be)72 282.6 Q .652(ginning from\ - zero up to the number of bits minus one; bit number 0 is the least signi\214c\ -ant bit)-.165 F -(\(LSB\), and the highest numbered bit is the most signi\214cant bit \(MSB\).) -72 297.6 Q .065(The print representation of bit strings is introduced by the s\ -equence `#*'; the bits are printed)97 316.2 R .922 -(starting with the most signi\214cant bit.)72 331.2 R(Lik)6.422 E -.275(ew)-.11 -G .921(ise, in the reader the sequence `#*' introduces a bit).275 F -(string constant.)72 346.2 Q(Example:)72 364.8 Q/F5 10/Courier@0 SF -(#*0100110111)100.346 387.303 Q(#*)100.346 408.303 Q F1(\(empty bit string\)) -190.346 408.303 Q F2 2.75(2. Using)72 445.303 R(the Bit String Extension)2.75 E -F3 1.76 -.88(To l)97 463.903 T(oad the bit string e).88 E(xtension, e)-.165 E --.275(va)-.275 G(luate the e).275 E(xpression)-.165 E F5 -(\(require 'bitstring\))100.346 486.406 Q F3 .319(This causes the \214les)97 -512.006 R F4(bitstring)3.07 E(.scm)-.165 E F3(and)3.07 E F4(bitstring)3.07 E -(.o)-.165 E F3 .32(to be loaded \()3.07 F F4(bitstring)A(.o)-.165 E F3 .32 -(must be statically)3.07 F(link)72 527.006 Q(ed with the interpreter on platfo\ -rms that do not support dynamic loading of object \214les\).)-.11 E -(Loading the bit string e)97 545.606 Q(xtension causes the features)-.165 E F4 -(bitstring)2.75 E F3(and)2.75 E F4(bitstring)2.75 E(.o)-.165 E F3(to be pro) -2.75 E(vided.)-.165 E F2 2.75(3. Cr)72 575.606 R(eating Bit Strings)-.198 E -(\(mak)72 605.606 Q(e-bitstring)-.11 E F4(length init)4.583 E F2 257.742(\)p)C --.198(ro)462.244 605.606 S(cedur).198 E(e)-.198 E F4(mak)72 624.206 Q -(e-bitstring)-.11 E F3 .203(returns a ne)2.953 F 2.953(wb)-.275 G .203 -(it string of the gi)206.847 624.206 R -.165(ve)-.275 G 2.953(nl).165 G 2.952 -(ength. If)302.451 624.206 R .202(init is #t, all bits are initialized to 1;) -2.952 F(if init is #f, all bits are initialized to 0.)72 639.206 Q F2 -(\(bitstring-copy)72 669.206 Q F4(bitstring)4.583 E F2 268.929(\)p)C -.198(ro) -462.244 669.206 S(cedur).198 E(e)-.198 E F3(This procedure returns a cop)72 -687.806 Q 2.75(yo)-.11 G 2.75(ft)211.491 687.806 S(he speci\214ed bit string.) -220.962 687.806 Q EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(bitstring-append)72 87 Q/F2 11 -/Times-Italic@0 SF(bitstring)4.583 E/F3 10/Times-Italic@0 SF(1)3.3 I F2 -(bitstring)2.75 -3.3 M F3(2)3.3 I F1 206.041(\)p)-3.3 K -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F2(bitstring-append)72 105.6 Q F0 .032(returns a ne) -2.782 F 2.783(wb)-.275 G .033 -(it string holding the concatenation of the speci\214ed bit string ar)215.448 -105.6 R(gu-)-.198 E(ments.)72 120.6 Q F1 2.75(4. Bit)72 150.6 R(String Pr)2.75 -E(edicates)-.198 E(\(bitstring?)72 180.6 Q F2(obj)4.583 E F1 312.324(\)p)C --.198(ro)462.244 180.6 S(cedur).198 E(e)-.198 E F0 -(This type predicate returns #t if)72 199.2 Q F2(obj)2.75 E F0 -(is a bit string, #f otherwise.)2.75 E F1(\(bitstring=?)72 229.2 Q F2 -(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I F1 232.782 -(\)p)-3.3 K -.198(ro)462.244 229.2 S(cedur).198 E(e)-.198 E F0 .57 -(This procedure returns #t if the bit string ar)72 247.8 R .57 -(guments are of the same length and contain the same)-.198 F -(bits, #f otherwise.)72 262.8 Q F1(\(bitstring-zer)72 292.8 Q(o?)-.198 E F2 -(bitstring)4.583 E F1 265.475(\)p)C -.198(ro)462.244 292.8 S(cedur).198 E(e) --.198 E F2(bitstring-zer)72 311.4 Q(o?)-.495 E F0 -(returns #t if the speci\214ed bit string contains only 0 bits, #f otherwise.) -2.75 E F1 2.75(5. Integer)72 341.4 R(Con)2.75 E -.11(ve)-.44 G(rsions).11 E -(\(unsigned-integer)72 371.4 Q/F4 11/Symbol SF(-)A F1(>bitstring)A F2(length i) -4.583 E F1 207.428(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e)-.198 E -(\(signed-integer)72 386.4 Q F4(-)A F1(>bitstring)A F2(length i)4.583 E F1 -219.66(\)p)C -.198(ro)462.244 386.4 S(cedur).198 E(e)-.198 E F0 .3 -(Both procedures con)72 405 R -.165(ve)-.44 G .3(rt the e).165 F .3(xact inte) --.165 F .301(ger ar)-.165 F(gument)-.198 E F2(i)3.051 E F0 .301 -(into a bit string of)3.051 F F2(length)3.051 E F0 .301(bits and return the) -3.051 F .051(bit string.)72 420 R F2(length)5.551 E F0 .051(must be lar)2.801 F -.05(ge enough to hold the bit string representation of)-.198 F F2(i)2.8 E F0 -5.55(.T)C .05(he inte)434.622 420 R .05(ger ar)-.165 F(gu-)-.198 E 1.176 -(ment to)72 435 R F2(unsigned-inte)3.926 E -.11(ge)-.44 G -.22(r-).11 G -(>bitstring).22 E F0 1.177(must be non-ne)3.926 F -.055(ga)-.165 G(ti).055 E --.165(ve)-.275 G(.).165 E F2(signed-inte)6.677 E -.11(ge)-.44 G -.22(r-).11 G -(>bitstring).22 E F0 1.177(uses tw)3.927 F(o')-.11 E(s)-.605 E -(complement representation for ne)72 450 Q -.055(ga)-.165 G(ti).055 E .33 -.165 -(ve i)-.275 H(nte).165 E(gers.)-.165 E F1(\(bitstring)72 480 Q F4(-)A F1 -(>unsigned-integer)A F2(bitstring)4.583 E F1 203.446(\)p)C -.198(ro)462.244 480 -S(cedur).198 E(e)-.198 E(\(bitstring)72 495 Q F4(-)A F1(>signed-integer)A F2 -(bitstring)4.583 E F1 215.678(\)p)C -.198(ro)462.244 495 S(cedur).198 E(e)-.198 -E F0 .9(Both procedures con)72 513.6 R -.165(ve)-.44 G .9(rt the gi).165 F --.165(ve)-.275 G 3.65(nb).165 G .9(it string into an inte)235.23 513.6 R(ger) --.165 E(.)-.605 E F2(bitstring->signed-inte)6.399 E -.11(ge)-.44 G(r).11 E F0 -(interprets)3.649 E(the bit string as the tw)72 528.6 Q(o')-.11 E 2.75(sc)-.605 -G(omplement representation of a signed inte)189.832 528.6 Q(ger)-.165 E(.)-.605 -E F1 2.75(6. Selecting)72 558.6 R(Components of Bit Strings)2.75 E -(\(bitstring-length)72 588.6 Q F2(bitstring)4.583 E F1 261.592(\)p)C -.198(ro) -462.244 588.6 S(cedur).198 E(e)-.198 E F0 -(This procedure returns the number of bits in the speci\214ed bit string.)72 -607.2 Q F1(\(bitstring-r)72 637.2 Q(ef)-.198 E F2(bitstring inde)4.583 E(x)-.22 -E F1 251.34(\)p)C -.198(ro)462.244 637.2 S(cedur).198 E(e)-.198 E F2 -(bitstring-r)72 655.8 Q(ef)-.407 E F0(returns #t if the)2.75 E F2(inde)2.75 E -(x)-.22 E F0(-th bit in the gi)A -.165(ve)-.275 G 2.75(nb).165 G -(it string is 1, #f otherwise.)310.48 655.8 Q F1(\(bitstring-substring)72 685.8 -Q F2(bitstring fr)4.583 E(om to)-.495 E F1 212.576(\)p)C -.198(ro)462.244 685.8 -S(cedur).198 E(e)-.198 E F0 1.018(This procedure returns a ne)72 704.4 R 3.768 -(wb)-.275 G 1.019(it string initialized with the bits of)213.358 704.4 R F2 -(bitstring)3.769 E F0 1.019(starting at the inde)3.769 F(x)-.165 E F2(fr)72 -719.4 Q(om)-.495 E F0(\(inclusi)2.75 E -.165(ve)-.275 G 2.75(\)a).165 G -(nd ending at the inde)149.275 719.4 Q(x)-.165 E F2(to)2.75 E F0(\(e)2.75 E -(xclusi)-.165 E -.165(ve)-.275 G(\).).165 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(7. Modifying)72 87 R(Bit Strings)2.75 E -(\(bitstring-\214ll!)72 117 Q/F2 11/Times-Italic@0 SF(bitstring init)4.583 E F1 -257.61(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e)-.198 E F0 .138 -(This procedure sets all bits in the speci\214ed bit string to 1 if)72 135.6 R -F2(init)2.888 E F0 .138(is #t, or to 0 if)2.888 F F2(init)2.888 E F0 .137 -(is #f.)2.887 F .137(It returns)5.637 F(the non-printing object.)72 150.6 Q F1 -(\(bitstring-set!)72 180.6 Q F2(bitstring inde)4.583 E 2.75(xi)-.22 G(nit) -210.189 180.6 Q F1 230.66(\)p)C -.198(ro)462.244 180.6 S(cedur).198 E(e)-.198 E -F2(bitstring-set!)72 199.2 Q F0 .405(sets the)3.154 F F2(inde)3.155 E(x)-.22 E -F0 .405(-th bit in the speci\214ed bit string to 1 if)B F2(init)3.155 E F0 .405 -(is #t, or to 0 if)3.155 F F2(init)3.155 E F0 .405(is #f.)3.155 F(It)5.905 E -(returns the non-printing object.)72 214.2 Q F1(\(bitstring-mo)72 244.2 Q -.11 -(ve)-.11 G(!).11 E F2(dst-bitstring sr)4.583 E(c-bitstring)-.407 E F1 189.201 -(\)p)C -.198(ro)462.244 244.2 S(cedur).198 E(e)-.198 E F2(bitstring-mo)72 262.8 -Q(ve!)-.11 E F0(destructi)3.888 E -.165(ve)-.275 G 1.138 -(ly copies the contents of the bit string).165 F F2(sr)3.887 E(c-bitstring) --.407 E F0(into)3.887 E F2(dst-bitstring)3.887 E F0(.)A -(Both bit strings must ha)72 277.8 Q .33 -.165(ve t)-.22 H(he same length.).165 -E(It returns the non-printing object.)5.5 E F1(\(bitstring-substring-mo)72 -307.8 Q -.11(ve)-.11 G(!).11 E F2(sr)4.583 E(c-bitstring fr)-.407 E(om)-.495 E -/F3 10/Times-Italic@0 SF(1)3.3 I F2(to)2.75 -3.3 M F3(1)3.3 I F2 -(dst-bitstring fr)2.75 -3.3 M(om)-.495 E F3(2)3.3 I F1 69.151(\)p)-3.3 K -.198 -(ro)462.244 307.8 S(cedur).198 E(e)-.198 E F0 .762(This procedure destructi)72 -326.4 R -.165(ve)-.275 G .763(ly copies the bits from).165 F F2(sr)3.513 E -(c-bitstring)-.407 E F0 .763(starting at inde)3.513 F(x)-.165 E F2(fr)3.513 E -(om)-.495 E F3(1)3.3 I F0(\(inclusi)3.513 -3.3 M -.165(ve)-.275 G(\)).165 E -.303(and ending at inde)72 341.4 R(x)-.165 E F2(to)3.053 E F3(1)3.3 I F0(\(e) -3.053 -3.3 M(xclusi)-.165 E -.165(ve)-.275 G 3.053(\)i).165 G(nto)233.247 341.4 -Q F2(dst-bitstring)3.053 E F0 .302(starting at inde)3.053 F(x)-.165 E F2(fr) -3.052 E(om)-.495 E F3(2)3.3 I F0(\(inclusi)3.052 -3.3 M -.165(ve)-.275 G 3.052 -(\). Ov).165 F(erlap-)-.165 E(ping is handled correctly)72 356.4 Q 5.5(.T)-.715 -G(he procedure returns the non-printing object.)195.321 356.4 Q F1 2.75 -(8. Bitwise)72 386.4 R(Logical Operations)2.75 E(\(bitstring-not)72 416.4 Q F2 -(bitstring)4.583 E F1 275.65(\)p)C -.198(ro)462.244 416.4 S(cedur).198 E(e) --.198 E F0 .668(This procedure returns a ne)72 435 R 3.419(wb)-.275 G .669 -(it string initialized to the bitwise logical ne)211.609 435 R -.055(ga)-.165 G -.669(tion of the gi).055 F -.165(ve)-.275 G 3.419(nb).165 G(it)497.884 435 Q -(string.)72 450 Q F1(\(bitstring-not!)72 480 Q F2(dst-bitstring sr)4.583 E -(c-bitstring)-.407 E F1 198.749(\)p)C -.198(ro)462.244 480 S(cedur).198 E(e) --.198 E F0 2.541(This procedure destructi)72 498.6 R -.165(ve)-.275 G 2.541 -(ly o).165 F -.165(ve)-.165 G 2.541(rwrites the contents of).165 F F2 -(dst-bitstring)5.291 E F0 2.54(with the bitwise logical)5.291 F(ne)72 513.6 Q --.055(ga)-.165 G 1.246(tion of the bits in).055 F F2(sr)3.996 E(c-bitstring) --.407 E F0 6.746(.B)C 1.246(oth bit strings must ha)247.522 513.6 R 1.576 -.165 -(ve t)-.22 H 1.246(he same length.).165 F F2(bitstring-not!)6.746 E F0 -(returns the non-printing object.)72 528.6 Q F1(\(bitstring-and)72 558.6 Q F2 -(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I F1 223.157 -(\)p)-3.3 K -.198(ro)462.244 558.6 S(cedur).198 E(e)-.198 E(\(bitstring-andnot) -72 573.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I -F1 207.878(\)p)-3.3 K -.198(ro)462.244 573.6 S(cedur).198 E(e)-.198 E -(\(bitstring-or)72 588.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 --3.3 M F3(2)3.3 I F1 230.505(\)p)-3.3 K -.198(ro)462.244 588.6 S(cedur).198 E -(e)-.198 E(\(bitstring-xor)72 603.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2 -(bitstring)2.75 -3.3 M F3(2)3.3 I F1 225.005(\)p)-3.3 K -.198(ro)462.244 603.6 -S(cedur).198 E(e)-.198 E F0 .017(These procedures return a ne)72 622.2 R 2.767 -(wb)-.275 G .017(it string initialized to the bitwise logical)215.063 622.2 R -F2(and)2.767 E F0(\(logical)2.767 E F2(and)2.767 E F0 .017(with the)2.767 F(ne) -72 637.2 Q -.055(ga)-.165 G .752(tion, logical).055 F F2(or)3.502 E F0 3.502 -(,l)C .752(ogical e)168.449 637.2 R(xclusi)-.165 E -.165(ve)-.275 G F2(or)3.667 -E F0 3.502(,r)C(especti)262.973 637.2 Q -.165(ve)-.275 G .753(ly\) of the tw) -.165 F 3.503(ob)-.11 G .753(it string ar)374.191 637.2 R 3.503(guments. The) --.198 F(tw)3.503 E(o)-.11 E(bit strings must ha)72 652.2 Q .33 -.165(ve t)-.22 -H(he same length.).165 E F1(\(bitstring-and!)72 682.2 Q F2(dst-bitstring sr) -4.583 E(c-bitstring)-.407 E F1 196.296(\)p)C -.198(ro)462.244 682.2 S(cedur) -.198 E(e)-.198 E(\(bitstring-or!)72 697.2 Q F2(dst-bitstring sr)4.583 E -(c-bitstring)-.407 E F1 203.644(\)p)C -.198(ro)462.244 697.2 S(cedur).198 E(e) --.198 E(\(bitstring-andnot!)72 712.2 Q F2(dst-bitstring sr)4.583 E(c-bitstring) --.407 E F1 181.017(\)p)C -.198(ro)462.244 712.2 S(cedur).198 E(e)-.198 E -(\(bitstring-xor!)72 727.2 Q F2(dst-bitstring sr)4.583 E(c-bitstring)-.407 E F1 -198.144(\)p)C -.198(ro)462.244 727.2 S(cedur).198 E(e)-.198 E EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL 1.685(These procedures are the destructi)72 87 R 2.015 -.165(ve ve) --.275 H 1.684(rsions of the four bitwise logical procedures described).165 F -(abo)72 102 Q -.165(ve)-.165 G 7.043(.T).165 G(he)114.452 102 Q 4.293(yp)-.165 -G 1.543(erform the corresponding logical operation on the tw)139.964 102 R -4.293(ob)-.11 G 1.543(it string ar)398.433 102 R 1.544(guments and)-.198 F --.165(ove)72 117 S .167(rwrite the contents of).165 F/F1 11/Times-Italic@0 SF -(dst-bitstring)2.917 E F0 .167(with the result.)2.917 F .167 -(Both bit strings must ha)5.667 F .497 -.165(ve t)-.22 H .167(he same length.) -.165 F(These procedures return the non-printing object.)72 132 Q EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(B)72 174 Q F0 -(bitstring-and!,)72 204 Q/F2 12/Times-Bold@0 SF(3)2.75 E F0(bitstring-and,)72 -219 Q F2(3)2.75 E F0(bitstring-andnot!,)72 234 Q F2(3)2.75 E F0 -(bitstring-andnot,)72 249 Q F2(3)2.75 E F0(bitstring-append,)72 264 Q F2(2)2.75 -E F0(bitstring-cop)72 279 Q -.715(y,)-.11 G F2(1)3.465 E F0(bitstring-\214ll!,) -72 294 Q F2(3)2.75 E F0(bitstring-length,)72 309 Q F2(2)2.75 E F0(bitstring-mo) -72 324 Q -.165(ve)-.165 G(!,).165 E F2(3)2.75 E F0(bitstring-not!,)72 339 Q F2 -(3)2.75 E F0(bitstring-not,)72 354 Q F2(3)2.75 E F0(bitstring-or!,)72 369 Q F2 -(3)2.75 E F0(bitstring-or)72 384 Q(,)-.44 E F2(3)2.75 E F0(bitstring-ref,)72 -399 Q F2(2)2.75 E F0(bitstring-set!,)72 414 Q F2(3)2.75 E F0 -(bitstring-substring,)72 429 Q F2(2)2.75 E F0(bitstring-substring-mo)72 444 Q --.165(ve)-.165 G(!,).165 E F2(3)2.75 E F0(bitstring-xor!,)72 459 Q F2(4)2.75 E -F0(bitstring-xor)72 474 Q(,)-.44 E F2(3)2.75 E F0(bitstring-zero?,)72 489 Q F2 -(2)2.75 E F0(bitstring.o, 1)72 504 Q(bitstring.scm, 1)72 519 Q(bitstring=?,)72 -534 Q F2(2)2.75 E F0(bitstring?,)72 549 Q F2(2)2.75 E F0(bitstring)72 564 Q/F3 -11/Symbol SF(-)A F0(>signed-inte)A(ger)-.165 E(,)-.44 E F2(2)2.75 E F0 -(bitstring)72 579 Q F3(-)A F0(>unsigned-inte)A(ger)-.165 E(,)-.44 E F2(2)2.75 E -F1(C)72 609 Q F0(concatenation, 2)72 639 Q F1(F)72 669 Q F0(feature, 1)302.4 -174 Q F1(L)302.4 204 Q F0(least signi\214cant bit, 1)302.4 234 Q(LSB, 1)302.4 -249 Q F1(M)302.4 279 Q F0(mak)302.4 309 Q(e-bitstring,)-.11 E F2(1)2.75 E F0 -(most signi\214cant bit, 1)302.4 324 Q(MSB, 1)302.4 339 Q F1(O)302.4 369 Q F0 --.165(ove)302.4 399 S(rlapping, 3).165 E F1(P)302.4 429 Q F0 -(print representation, 1)302.4 459 Q F1(S)302.4 489 Q F0(signed-inte)302.4 519 -Q(ger)-.165 E F3(-)A F0(>bitstring,)A F2(2)2.75 E F1(T)302.4 549 Q F0(tw)302.4 -579 Q(o')-.11 E 2.75(sc)-.605 G(omplement, 2)333.761 579 Q(type predicate, 2) -302.4 594 Q F1(U)302.4 624 Q F0(unsigned-inte)302.4 654 Q(ger)-.165 E F3(-)A F0 -(>bitstring,)A F2(2)2.75 E EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Using the Bit String Extension)72 196.2 Q -19.25(........................................................................\ -........................ 1)5.431 F(Creating Bit Strings)72 214.8 Q 19.25(.....\ -..............................................................................\ -............................... 1)2.989 F(Bit String Predicates)72 233.4 Q -19.25(........................................................................\ -........................................ 2)5.442 F(Inte)72 252 Q(ger Con)-.165 -E -.165(ve)-.44 G .118(rsions ................................................\ -..................................................................).165 F(2) -498.5 252 Q(Selecting Components of Bit Strings)72 270.6 Q 19.25(.............\ -.......................................................................... 2) -3.902 F(Modifying Bit Strings)72 289.2 Q 19.25(...............................\ -..............................................................................\ -. 3)4.815 F(Bitwise Logical Operations)72 307.8 Q 19.25(......................\ -..............................................................................\ -.. 3)3.011 F(Inde)72 326.4 Q 2.868(x.)-.165 G 19.25(..........................\ -..............................................................................\ -................................ 5)102.5 326.4 R EP -%%Trailer -end -%%EOF diff --git a/doc/cprog/Makefile.am b/doc/cprog/Makefile.am index 8e7bc62..a61aeb9 100644 --- a/doc/cprog/Makefile.am +++ b/doc/cprog/Makefile.am @@ -1 +1,36 @@ -EXTRA_DIST = cprog.ms cprog.ps +EXTRA_DIST = cprog.ms + +if HAVE_GROFF +doc_DATA = cprog.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +TROFF= groff -ms -t +UNROFF= unroff -ms +MKINDEX= awk -f ../util/mkindex.awk + +clean: local-clean +local-clean: + rm -f side side.ref side.inx cprog.ps cprog.html + +cprog.ps: cprog.ms side.ref side.inx + $(MKINDEX) cprog.ms | sed -f side.ref | $(TROFF) 2> /dev/null > $@ + +side.ref: side + sed -ne '/^[sS]/{s/\.\//\//;p}' < side > side.ref + +side.inx: side + egrep -v '^s' side | sort -f -t'#' +1 -3 +0n | \ + awk -f ../util/fixindex.awk | awk -f ../util/block.awk \ + > side.inx + +side: cprog.ms + rm -f side side.inx && printf "" > side.inx + $(MKINDEX) $? | $(TROFF) 2>side >/dev/null + +cprog.html: cprog.ms side.ref + $(MKINDEX) cprog.ms | sed -f side.ref | $(UNROFF) document=cprog + +check: + cknr -c.Tc -a.Es.Ee.Cs.Ce cprog.ms + diff --git a/doc/cprog/cprog.ps b/doc/cprog/cprog.ps deleted file mode 100644 index addfbe0..0000000 --- a/doc/cprog/cprog.ps +++ /dev/null @@ -1,4541 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier-Bold -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 65 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier-Bold -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Courier-Bold@0 -ENC0/Courier-Bold RE/Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0 -/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Building Extensible A)173.286 123 Q -(pplications with Elk \212)-.3 E(C/C++ Pr)210.504 153 Q(ogrammer')-.216 E 3(sM) --.444 G(anual)336.816 153 Q/F1 10/Times-Italic@0 SF(Oliver Laumann)255.085 177 -Q(ABSTRA)264.535 219 Q(CT)-.3 E/F2 11/Times-Roman@0 SF .953(Elk \()133 246 R/F3 -11/Times-Italic@0 SF .952(Extension Langua)B 1.172 -.11(ge K)-.11 H(it).11 E F2 -3.702(\)i)C 3.702(saS)274.089 246 S .952(cheme implementation designed as an) -296.772 246 R .723(embeddable, reusable e)108 261 R .724 -(xtension language subsystem for inte)-.165 F .724(gration into e)-.165 F -(xisting)-.165 E .767(and future applications written in C or C++.)108 276 R -.766(The programmer')6.266 F 3.516(si)-.605 G(nterf)401.821 276 Q .766 -(ace to Elk)-.11 F(pro)108 291 Q .653(vides for a close interw)-.165 F .653 -(orking of the C/C++ parts of Elk-based,)-.11 F F3(hybrid)3.403 E F2(appli-) -3.403 E .619(cations with e)108 306 R .619(xtensible Scheme code.)-.165 F .618 -(This manual describes the f)6.118 F .618(acilities of the)-.11 F .436 -(C/C++ programmer')108 321 R 3.186(si)-.605 G(nterf)209.28 321 Q .436 -(ace that can be used by authors of e)-.11 F .437(xtensible applica-)-.165 F -1.523(tions and Scheme e)108 336 R 4.273(xtensions. T)-.165 F 1.523 -(opics range from the architecture of Elk-based)-.88 F 1.538(applications and \ -the de\214nition of application-speci\214c Scheme types and primi-)108 351 R -(ti)108 366 Q -.165(ve)-.275 G 2.973(st).165 G 2.973(om)134.37 366 S .223 -(ore adv)151.401 366 R .223 -(anced subjects such as weak data structures and interacting with)-.275 F .626 -(the g)108 381 R .626(arbage collector)-.055 F 6.126(.M)-.605 G(an)219.493 381 -Q 3.376(ye)-.165 G .626(xamples throughout the te)243.307 381 R .627 -(xt illustrate the f)-.165 F(acilities)-.11 E -(and techniques discussed in this manual.)108 396 Q/F4 11/Times-Bold@0 SF 2.75 -(1. Additional)72 438 R(Documentation)2.75 E F2 1.614(The of)97 456.6 R 1.614 -(\214cial speci\214cation of the Scheme programming language is the `)-.275 F -(`R)-.814 E/F5 9/Times-Roman@0 SF(4)435.891 451.1 Q F2(RS')440.391 456.6 Q -4.363('\()-.814 G -.44(Wi)468.382 456.6 S(lliam).44 E 2.446 -(Clinger and Jonathan Rees \(editors\),)72 471.6 R F3(Re)5.197 E(vised)-.165 E -/F6 9/Times-Italic@0 SF(4)281.417 466.1 Q F3 2.447 -(Report on the Algorithmic Langua)291.114 471.6 R 2.667 -.11(ge S)-.11 H -.165 -(ch).11 G(eme).165 E F2(,)A 2.873(1991\). A)72 486.6 R .123 -(slightly modi\214ed v)2.873 F .123(ersion of an earlier re)-.165 F .123 -(vision of this report w)-.275 F .122(as adopted as an IEEE an)-.11 F .62 -(ANSI standard in 1990 \(IEEE)72 501.6 R -.917(Std 1178-1990,)1.833 F F3 .62 -(IEEE Standar)3.37 F 3.371(df)-.407 G .621(or the Sc)352.136 501.6 R .621 -(heme Pr)-.165 F -.11(og)-.495 G -.165(ra).11 G .621(mming Lan-).165 F(gua)72 -516.6 Q -.11(ge)-.11 G F2 2.75(,1).11 G(991\).)109.664 516.6 Q .244 -(The dialect of Scheme implemented by Elk \(a superset of the of)97 535.2 R -.243(\214cial language\) is described)-.275 F 1.066(in the)72 550.2 R F3(Refer) -3.816 E 1.066(ence Manual for the Elk Extension Langua)-.407 F 1.286 -.11(ge I) --.11 H(nterpr).11 E(eter)-.407 E F2 1.066(that is included in the Elk)3.816 F -(distrib)72 565.2 Q .83(ution as trof)-.22 F 3.58(fs)-.275 G .829 -(ource and preformatted PostScript \214les.)165.966 565.2 R .829 -(Reference manuals for the v)6.329 F(arious)-.275 E 1.077(prede\214ned Elk e)72 -580.2 R 1.077(xtensions \(such as the UNIX and X11 e)-.165 F 1.077 -(xtensions\) are also part of the distrib)-.165 F(u-)-.22 E -(tion; see the \214le `)72 595.2 Q(`doc/README')-.814 E 2.75('f)-.814 G -(or an o)229.542 595.2 Q -.165(ve)-.165 G(rvie).165 E 2.75(wo)-.275 G 2.75(ft) -303.165 595.2 S(he a)312.636 595.2 Q -.275(va)-.22 G(ilable documentation.).275 -E 1.743(This manual supersedes the document)97 613.8 R F3 1.743(Interfacing Sc) -4.493 F 1.742(heme to the `)-.165 F 1.742(`Real W)-1.221 F(orld')-1.012 E(') --1.221 E F2 1.742(that w)4.492 F(as)-.11 E(included in earlier v)72 628.8 Q -(ersions of Elk.)-.165 E 1.424 -(An article about Elk has appeared in USENIX Computing Systems in 1994 \(Oli)97 -647.4 R -.165(ve)-.275 G 4.175(rL).165 G(au-)489.953 647.4 Q .068 -(mann and Carsten Bormann, Elk: The Extension Language Kit,)72 662.4 R F3 .067 -(USENIX Computing Systems)2.817 F F2 2.817(,v)C(ol.)492.692 662.4 Q -(7, no. 4, pp. 419\255449\).)72 677.4 Q 3.508(Ar)97 696 S .758(ecent e)112.113 -696 R .758(xample of an application that uses Elk as its e)-.165 F .759 -(xtension language implementation)-.165 F .912(is freely a)72 711 R -.275(va) --.22 G .911(ilable in source and binary form as).275 F F3(http://www)3.661 E -(.informatik.uni-br)-.814 E(emen.de/~net/unr)-.407 E(of)-.495 E(f)-.198 E F2(.) -A F3(unr)72 726 Q(of)-.495 E(f)-.198 E F2 3.382(is a programmable, e)6.132 F -3.383(xtensible trof)-.165 F 6.133(ft)-.275 G 3.383 -(ranslator with Scheme-based back-ends for the)280.89 726 R EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S(Hyperte)72 87 Q 1.667 -(xt Markup Language.)-.165 F 1.667(The source code sho)7.167 F 1.666 -(wn in Appendix B has been directly tak)-.275 F(en)-.11 E 1.23(from the)72 102 -R/F1 11/Times-Italic@0 SF(unr)3.98 E(of)-.495 E(f)-.198 E F0 1.23(source; auth\ -ors of Elk-based applications are encourage to reuse this and other)3.98 F -(parts of the)72 117 Q F1(unr)2.75 E(of)-.495 E(f)-.198 E F0 -(source for their o)2.75 E(wn projects.)-.275 E/F2 11/Times-Bold@0 SF 2.75 -(2. Intr)72 147 R(oduction)-.198 E F0 .163(This manual can be roughly di)97 -165.6 R .163(vided into tw)-.275 F 2.913(op)-.11 G 2.913(arts. The)303.85 165.6 -R .162(\214rst part \(chapters)2.912 F 2.912(3t)2.75 G 2.75(o6)442.744 165.6 S -2.912(\)d)456.494 165.6 S(escribes)468.569 165.6 Q 1.606 -(the architectural aspects of Elk-based applications and Elk e)72 180.6 R 4.357 -(xtensions. F)-.165 F 1.607(acilities and tools for)-.165 F -.22(bu)72 195.6 S -.859(ilding e).22 F .859(xtensible applications with Elk are introduced here.) --.165 F .858(Readers who are already f)6.359 F(amiliar)-.11 E .363 -(with the concepts e)72 210.6 R .363 -(xplained in this part of the document may w)-.165 F .364 -(ant to skip it and be)-.11 F .364(gin reading at)-.165 F(chapter 7)72 225.6 Q -.223(or later)2.973 F 5.722(.T)-.605 G .222(he second part \(co)161.867 225.6 R --.165(ve)-.165 G .222(ring chapters).165 F 2.972(7t)2.75 G 2.75(o1)324.545 -225.6 S .222(2\) speci\214es the C functions and types)338.295 225.6 R -.22(av) -72 240.6 S 1.428 -(ailable to application programmers and describes techniques for b)-.055 F -1.428(uilding data structures that)-.22 F .001(can be interf)72 255.6 R .001 -(aced to Scheme in an ef)-.11 F .001(\214cient w)-.275 F(ay)-.11 E 5.5(.A)-.715 -G(ppendix C brie\215y summarizes all the functions,)295.319 255.6 Q -(macros, types, and v)72 270.6 Q(ariables e)-.275 E(xported by the Elk k)-.165 -E(ernel to the C/C++ programmer)-.11 E(.)-.605 E .594(Here is a short o)97 -289.2 R -.165(ve)-.165 G(rvie).165 E 3.344(wo)-.275 G 3.344(ft)215.14 289.2 S -.594(he remaining chapters of this manual.)225.205 289.2 R(Chapter 3)6.094 E -.594(discusses the)3.344 F 3.873(architecture of e)72 304.2 R 3.873 -(xtensible applications based on Elk and their relation to Elk e)-.165 F -(xtensions.)-.165 E(Chapter 4)72 319.2 Q(pro)2.991 E .241(vides an o)-.165 F --.165(ve)-.165 G(rvie).165 E 2.991(wo)-.275 G 2.991(ft)220.969 319.2 S .241 -(he tw)230.681 319.2 R 2.991(ob)-.11 G .241(asic methods for inte)268.937 319.2 -R .241(grating an application \(or e)-.165 F(xten-)-.165 E .515 -(sions\) with Elk: dynamic loading and static linking.)72 334.2 R(Chapter 5) -6.015 E .515(describes use of dynamic loading)3.265 F 2.8 -(in more detail; topics include automatic e)72 349.2 R 2.801 -(xtension initialization and C++ static constructors)-.165 F 1.728 -(embedded in dynamically loaded modules.)72 364.2 R(Chapter 6)7.228 E 1.728 -(describes se)4.478 F -.165(ve)-.275 G 1.727(ral forms of linking user).165 F -(-)-.22 E 1.568(supplied code with Elk statically and ho)72 379.2 R 4.318(wt) --.275 G 1.568(hese af)272.44 379.2 R 1.568 -(fect the structure of an application')-.275 F(s)-.605 E F1(main\(\))4.319 E F0 -(function.)72 394.2 Q .035(The remaining chapters are a complete speci\214cati\ -on of the functions and types of the C/C++)97 412.8 R(programmer')72 427.8 Q -4.166(si)-.605 G(nterf)140.934 427.8 Q 1.416(ace to Elk.)-.11 F(Chapter 7)6.917 -E(pro)4.167 E 1.417(vides introductory notes and advice for program-)-.165 F -1.57(mers of C/C++ code interf)72 442.8 R 1.569 -(acing to Elk \(use of include \214les, prede\214ned preprocessor symbols,)-.11 -F 2.947(etc.\). Chapter)72 457.8 R 2.947(8d)2.75 G .198 -(escribes the anatomy of Scheme objects from the C/C++ programmer')151.209 -457.8 R 2.948(sp)-.605 G .198(oint of)474.773 457.8 R(vie)72 472.8 Q 6.029 --.715(w. C)-.275 H(hapter 9).715 E -.165(ex)4.599 G 1.849(plains ho).165 F -4.599(wa)-.275 G 1.849(pplications and e)219.415 472.8 R 1.849 -(xtensions can de\214ne ne)-.165 F 4.598(wS)-.275 G 1.848(cheme primiti)423.766 -472.8 R -.165(ve)-.275 G(s.).165 E(Chapter 10)72 487.8 Q 1.935 -(presents the standard, b)4.685 F 1.936 -(uilt-in Scheme types implemented by Elk \(numbers, pairs,)-.22 F -.165(ve)72 -502.8 S .451(ctors, etc.\) and functions for creating and accessing Scheme obj\ -ects of these types from within).165 F 2.562(C/C++ code.)72 517.8 R 2.562 -(The f)8.062 F 2.563(acilities for de\214ning ne)-.11 F 3.993 -.715(w, \214) --.275 H 2.563(rst-class Scheme data types are described in).715 F(chapter 11.) -72 532.8 Q(Finally)6.448 E 3.698(,c)-.715 G(hapter 12)169.112 532.8 Q .948 -(deals with a number of more adv)3.698 F .947(anced topics, such as functions) --.275 F .184(for interacting with the g)72 547.8 R .185(arbage collector)-.055 -F 2.935(,a)-.44 G .185 -(utomatic \214nalization of inaccessible objects, de\214nition)262.923 547.8 R -(of user)72 562.8 Q(-supplied reader functions, error handling, etc.)-.22 E -3.295(An)97 581.4 S .545(ote on the naming con)113.737 581.4 R -.165(ve)-.44 G -.545(ntions follo).165 F .544 -(wed by the C identi\214ers used throughout this docu-)-.275 F .382 -(ment: the names of all functions, macros, types, and v)72 596.4 R .382 -(ariables e)-.275 F .382(xported by Elk ha)-.165 F .712 -.165(ve t)-.22 H .382 -(heir compo-).165 F 1.405 -(nents separated by underscores and capitalized \(as in)72 611.4 R F1(Re)4.155 -E(gister_Object\(\))-.44 E F0 4.155(,f)C 1.405(or e)407.396 611.4 R 4.155 -(xample\). In)-.165 F(con-)4.155 E 1.304(trast, the names de\214ned by e)72 -626.4 R 1.305(xamples sho)-.165 F 1.305(wn in this manual only use lo)-.275 F -1.305(wer case letters, so that)-.275 F(the)72 641.4 Q 2.75(yc)-.165 G -(an be distinguished easily from prede\214ned functions e)98.411 641.4 Q -(xported by Elk.)-.165 E F2 2.75(3. The)72 671.4 R(Ar)2.75 E(chitectur)-.198 E -2.75(eo)-.198 G 2.75(fE)174.553 671.4 S(xtensible A)188.303 671.4 Q -(pplications)-.275 E F0 1.352(Extensible applications b)97 690 R 1.352 -(uilt with Elk are)-.22 F F1(hybrid)4.102 E F0 1.352(in that the)4.102 F 4.101 -(yc)-.165 G 1.351(onsist of code written in a)383.285 690 R .154 -(mixture of languages\212code written in the application')72 705 R(s)-.605 E F1 -.155(implementation langua)2.905 F -.11(ge)-.11 G F0 .155(\(C or C++\) and) -3.015 F 3.582(code written in the)72 720 R F1 -.22(ex)6.332 G 3.582 -(tension langua).22 F -.11(ge)-.11 G F0 6.332(\(Scheme\). An)6.442 F 3.581 -(application of this kind is usually)6.331 F EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S 1.597(composed of tw)72 87 R -4.347(ol)-.11 G 1.597(ayers, a lo)158.257 87 R(w-le)-.275 E -.165(ve)-.275 G -4.347(lC).165 G 1.598(/C++ layer that pro)250.311 87 R 1.598 -(vides the basic, performance-critical)-.165 F .175 -(functionality of the application, and on top of that a higher)72 102 R(-le) --.22 E -.165(ve)-.275 G 2.925(ll).165 G .175(ayer which is written in Scheme) -361.676 102 R(and interpreted at runtime.)72 117 Q .287(The Scheme-language po\ -rtion of an Elk-based application may range from just a fe)97 135.6 R 3.037(wd) --.275 G(ozen)483.232 135.6 Q .214 -(lines of Scheme code \(if a simple form of customization is suf)72 150.6 R -.214(\214cient\) to \214fty percent of the appli-)-.275 F 1.13 -(cation or more \(if a high de)72 165.6 R 1.13(gree of e)-.165 F 1.13 -(xtensibility is required\).)-.165 F 1.13(As Scheme code is interpreted at)6.63 -F .285(runtime by an interpreter embedded in the application, users can custom\ -ize and modify the appli-)72 180.6 R(cation')72 195.6 Q 3.273(sS)-.605 G .524 -(cheme layer or add and test their o)115.61 195.6 R .524 -(wn Scheme procedures; recompilation, access to the)-.275 F 1.895 -(C/C++ source, or kno)72 210.6 R 1.894 -(wledge of the implementation language are not required.)-.275 F 1.894 -(Therefore, an)7.394 F .148(application can achie)72 225.6 R .478 -.165(ve h) --.275 H .148(ighest e).165 F .149(xtensibility by restricting its lo)-.165 F -(w-le)-.275 E -.165(ve)-.275 G 2.899(lp).165 G .149 -(art to just a small core of)393.733 225.6 R(time-critical C/C++ code.)72 240.6 -Q 3.014 -.88(To e)97 259.2 T 1.254(nable e).88 F 1.254(xtensions to `)-.165 F -(`w)-.814 E 1.254(ork on')-.11 F 4.004('a)-.814 G 4.004(na)267.313 259.2 S -(pplication')281.701 259.2 Q 4.004(si)-.605 G 1.254 -(nternal data structures and state, the)340.1 259.2 R .329(application core e) -72 274.2 R .33(xports a set of ne)-.165 F 1.76 -.715(w, a)-.275 H .33 -(pplication-speci\214c Scheme data types and primiti).715 F -.165(ve)-.275 G -3.08(so).165 G(per)486.51 274.2 Q(-)-.22 E .321 -(ating on them to the Scheme layer)72 289.2 R 5.821(.T)-.605 G .321 -(hese types and primiti)238.928 289.2 R -.165(ve)-.275 G 3.071(sc).165 G .32 -(an be thought of as a `)358.924 289.2 R(`wrapper')-.814 E(')-.814 E .701 -(around some of the C/C++ types and functions used by the application')72 304.2 -R 3.452(sc)-.605 G 3.452(ore. F)405.688 304.2 R .702(or e)-.165 F .702 -(xample, the)-.165 F 2.027(core of an Elk-based ne)72 319.2 R 2.027 -(wsreader program w)-.275 F 2.027(ould e)-.11 F 2.026 -(xport \214rst-class Scheme types representing)-.165 F/F1 11/Times-Italic@0 SF -(ne)72 334.2 Q(wsgr)-.165 E(oups)-.495 E F0(,)A F1(subscriptions)4.124 E F0 -4.124(,a)C(nd)201.204 334.2 Q F1(ne)4.124 E 1.375(ws articles)-.165 F F0 4.125 -(;t)C 1.375(hese types w)285.529 334.2 R 1.375 -(ould encapsulate the corresponding)-.11 F(lo)72 349.2 Q(w-le)-.275 E -.165(ve) --.275 G 3.85(lC).165 G -.814(``)-.001 G(structs').814 E 3.849('o)-.814 G 3.849 -(rC)178.962 349.2 S 1.099(++ classes.)193.811 349.2 R 1.099(In addition, it w) -6.599 F 1.099(ould e)-.11 F 1.099(xport a number of Scheme primi-)-.165 F(ti)72 -364.2 Q -.165(ve)-.275 G 3.446(st).165 G 3.446(oo)98.843 364.2 S .696 -(perate on these types\212to create members of them \(e.)113.289 364.2 R .697 -(g. by reading a ne)1.833 F .697(ws article from)-.275 F .004 -(disk\), to present them to the user through the application')72 379.2 R 2.753 -(su)-.605 G(ser)336.323 379.2 Q(-interf)-.22 E .003(ace, etc.)-.11 F .003 -(Each of these prim-)5.503 F(iti)72 394.2 Q -.165(ve)-.275 G 3.211(sw).165 G -.462(ould recur on one or more corresponding C or C++ functions implementing t\ -he function-)106.44 394.2 R(ality in an ef)72 409.2 Q(\214cient w)-.275 E(ay) --.11 E(.)-.715 E 1.089(Another job of the lo)97 427.8 R(w-le)-.275 E -.165(ve) --.275 G 3.839(lC).165 G 1.089 -(/C++ layer of an application is to hide platform-speci\214c or)237.074 427.8 R -1.572(system-speci\214c details by pro)72 442.8 R 1.572 -(viding suitable abstractions, so that the Scheme part can be k)-.165 F(ept) --.11 E .978(portable and simple.)72 457.8 R -.165(Fo)6.478 G 3.728(re).165 G -.978(xample, in case of the ne)193.513 457.8 R .978(wsreader program, e)-.275 F -.978(xtension writers should)-.165 F .267(not ha)72 472.8 R .597 -.165(ve t) --.22 H 3.017(oc).165 G .267(are about whether the ne)128.934 472.8 R .268 -(ws articles are stored in a local \214le system or retrie)-.275 F -.165(ve) --.275 G 3.018(df).165 G(rom)486.279 472.8 Q 3.189(an)72 487.8 S(etw)85.573 -487.8 Q .439(ork serv)-.11 F(er)-.165 E 3.189(,o)-.44 G 3.188(ra)156.906 487.8 -S .438(bout the idiosyncrasies of the system')168.641 487.8 R 3.188(sn)-.605 G -(etw)349.095 487.8 Q .438(orking f)-.11 F 3.188(acilities. Most)-.11 F .438 -(of these)3.188 F .666 -(system-speci\214c details can be better dealt with in a language oriented to) -72 502.8 R -.11(wa)-.275 G .666(rds systems program-).11 F -(ming, such as C, than in Scheme.)72 517.8 Q 2.028 -.88(To d)97 536.4 T .268 -(ecide whether to mak).88 F 3.017(eaf)-.11 G .267(unction part of the lo) -231.409 536.4 R(w-le)-.275 E -.165(ve)-.275 G 3.017(lp).165 G .267 -(art of an application or to write)365.536 536.4 R(it in the e)72 551.4 Q -(xtension language, you may ask yourself the follo)-.165 E(wing questions:) --.275 E<83>72 570 Q F1(Is the function performance-critical?)97 570 Q F0 .567 -(If the answer to this question is)97 588.6 R F1(yes)3.317 E F0 3.317(,p)C .568 -(ut the function into the C/C++ core.)266.822 588.6 R -.165(Fo)6.068 G 3.318 -(re).165 G .568(xample, in)456.99 588.6 R .021(case of the ne)97 603.6 R .021 -(wsreader application, a primiti)-.275 F .351 -.165(ve t)-.275 H 2.771(os).165 -G .02(earch all articles in a gi)319.764 603.6 R -.165(ve)-.275 G 2.77(nn).165 -G -.275(ew)445.911 603.6 S .02(sgroup for).275 F 2.818(ap)97 618.6 S .069 -(attern is certainly performance-critical and w)110.202 618.6 R .069 -(ould therefore be written in the implementa-)-.11 F .273(tion language, while\ - a function to ask the user to select an item from a list of ne)97 633.6 R .272 -(wsgroups is)-.275 F(not time-critical and could be written Scheme.)97 648.6 Q -<83>72 667.2 Q F1 -(Does the function have to deal with platform-speci\214c details?)97 667.2 Q F0 --.165(Fo)97 685.8 S 3.061(re).165 G .311(xample, a function that needs to allo\ -cate and open a UNIX pseudo-tty or to establish a)119.894 685.8 R(netw)97 700.8 -Q 2.552 -(ork connection needs to care about numerous system-speci\214c details and dif) --.11 F(ferent)-.275 E 1.394(kinds of operating system f)97 715.8 R 1.395 -(acilities and will therefore be written in C/C++ rather than in)-.11 F -(Scheme.)97 730.8 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S<83>72 87 Q/F1 11/Times-Italic@0 -SF(In whic)97 87 Q 2.75(hl)-.165 G(angua)140.835 87 Q .22 -.11(ge c)-.11 H -(an the function be e).11 E(xpr)-.22 E(essed mor)-.407 E 2.75(e`)-.407 G -(`natur)340.903 87 Q(ally')-.165 E('?)-1.221 E F0 3.556(Af)97 105.6 S .805 -(unction that parses and tok)112.161 105.6 R .805(enizes a string can be e)-.11 -F .805(xpressed more naturally \(that is, in a)-.165 F .742 -(signi\214cantly more concise and ef)97 120.6 R .743(\214cient w)-.275 F .743 -(ay\) in a language such as C than in Scheme.)-.11 F(On)6.243 E .295 -(the other hand, functions to construct trees of ne)97 135.6 R .294 -(ws articles, to tra)-.275 F -.165(ve)-.22 G .294(rse them, and to apply a).165 -F 2.353(function to each node are ob)97 150.6 R 2.353 -(vious candidates for writing them in a Lisp-lik)-.165 F 5.104(el)-.11 G -(anguage)467.348 150.6 Q(\(Scheme\).)97 165.6 Q<83>72 184.2 Q F1(Ar)97 184.2 Q -2.75(ec)-.407 G(ustomizability and e)120.111 184.2 Q(xtensibility important?) --.22 E F0 1.2(If it is lik)97 202.8 R 1.2(ely that the application')-.11 F 3.95 -(su)-.605 G 1.2(sers will w)262.04 202.8 R 1.199 -(ant to customize or augment a function or)-.11 F -2.365 -.275(ev e)97 217.8 T -3.126(nr).275 G .376(eplace it with their o)124.117 217.8 R .376(wn v)-.275 F -.376(ersions, write it in the e)-.165 F .376(xtension language.)-.165 F .376 -(If, for some rea-)5.876 F .175 -(son, this is impossible or not practicable, at least pro)97 232.8 R .175 -(vide suitable `)-.165 F(`hooks')-.814 E 2.925('t)-.814 G .175 -(hat enable users)433.393 232.8 R(to in\215uence the function')97 247.8 Q 2.75 -(so)-.605 G(peration from within Scheme code.)219.826 247.8 Q/F2 11 -/Times-Bold@0 SF 2.75(3.1. Scheme)72 277.8 R(Extensions)2.75 E F0 .142 -(In addition to the Scheme interpreter component, Elk consists of a number of) -97 296.4 R F1(Sc)2.893 E .143(heme e)-.165 F(xten-)-.22 E(sions)72 311.4 Q F0 -5.888(.T)C .388(hese e)109.975 311.4 R .387(xtensions are not speci\214c to an) --.165 F 3.137(yk)-.165 G .387(ind application and are therefore reusable.) -288.63 311.4 R(The)5.887 E(y)-.165 E(pro)72 326.4 Q 1.605(vide the `)-.165 F -(`glue')-.814 E 4.355('b)-.814 G 1.606(etween Scheme and a number of e)169.413 -326.4 R 1.606(xternal libraries, in particular the X11)-.165 F .605 -(libraries and the UNIX C library \(e)72 341.4 R .605 -(xceptions are the record e)-.165 F .604(xtension and the bitstring e)-.165 F -(xtension)-.165 E .198(which pro)72 356.4 R .198 -(vide a functionality of their o)-.165 F 2.948(wn\). The)-.275 F .199 -(purpose of these e)2.948 F .199(xtensions is to mak)-.165 F 2.949(et)-.11 G -.199(he func-)467.457 356.4 R 1.392(tionality of the e)72 371.4 R 1.392 -(xternal libraries \(for e)-.165 F 1.392(xample, the UNIX system calls\) a) --.165 F -.275(va)-.22 G 1.392(ilable to Scheme as).275 F -(Scheme data types and primiti)72 386.4 Q -.165(ve)-.275 G 2.75(so).165 G -(perating on them.)227.683 386.4 Q .225(While the Scheme e)97 405 R .225 -(xtensions are useful for writing freestanding Scheme programs \(e.)-.165 F -.225(g. for)1.833 F .156 -(rapid prototyping of X11-based Scheme programs\), their main job is to help b) -72 420 R .156(uilding applications)-.22 F .84(that need to interf)72 435 R .84 -(ace to e)-.11 F .84(xternal libraries on the e)-.165 F .841 -(xtension language le)-.165 F -.165(ve)-.275 G 3.591(l. The).165 F .841(X11 e) -3.591 F(xtensions,)-.165 E .64(for instance, are intended to be used by applic\ -ations with a graphical user interf)72 450 R .639(ace based on the)-.11 F 3.042 -(Xw)72 465 S(indo)90.926 465 Q 3.042(ws)-.275 G 3.042(ystem. By)125.472 465 R -.292(linking the X11 e)3.042 F .293 -(xtensions \(in addition to the Scheme interpreter\) with an)-.165 F .575 -(Elk-based application, the application')72 480 R 3.325(su)-.605 G .574 -(ser interf)256.086 480 R .574(ace can be written entirely in Scheme and will) --.11 F .642(therefore be inherently customizable and e)72 495 R 3.392 -(xtensible. As)-.165 F .642(the Scheme e)3.392 F .643 -(xtensions are reusable and)-.165 F .19(can be shared between applications, e) -72 510 R .19(xtension language code can be written in a portable manner)-.165 F -(.)-.605 E F2 2.75(3.2. A)72 540 R(pplications v)-.275 E(ersus Extensions)-.11 -E F0 1.17(As f)97 558.6 R 1.17(ar as the C/C++ programmer')-.11 F 3.92(si)-.605 -G(nterf)262.354 558.6 Q 1.17 -(ace to Elk \(that is, the subject of this manual\) is)-.11 F .673 -(concerned, there is not really a technical dif)72 573.6 R .673 -(ference between Scheme)-.275 F F1 -.22(ex)3.423 G(tensions).22 E F0 .673 -(on the one hand)3.423 F .373(\(such as the X11 e)72 588.6 R .373 -(xtensions\), and Elk-based, e)-.165 F(xtensible)-.165 E F1(applications)3.123 -E F0 .373(on the other hand.)3.123 F .373(Both are)5.873 F 1.287 -(composed of an ef)72 603.6 R 1.287(\214cient, lo)-.275 F(w-le)-.275 E -.165 -(ve)-.275 G 4.037(lC).165 G 1.287(/C++ core and, abo)243.028 603.6 R 1.617 --.165(ve t)-.165 H 1.287(hat, a higher).165 F(-le)-.22 E -.165(ve)-.275 G 4.036 -(ll).165 G 1.286(ayer written in)437.276 603.6 R 4.551(Scheme. In)72 618.6 R -1.802(both cases, the C/C++ layer e)4.551 F 1.802 -(xports a set of Scheme types and primiti)-.165 F -.165(ve)-.275 G 4.552(st) -.165 G 4.552(ot)480.506 618.6 S(he)493.616 618.6 Q 1.315 -(Scheme layer \(that is, to the Scheme)72 633.6 R F1(pr)4.065 E -.11(og)-.495 G --.165(ra).11 G(mmer).165 E F0 4.065(\)a)C 1.314 -(nd thus needs to interact with the Scheme)311.793 633.6 R(interpreter)72 648.6 -Q 7.841(.B)-.605 G 2.341(ecause of this analogy)135.138 648.6 R 5.091(,t)-.715 -G 2.341(he rest of the manual will mostly drop the distinction)249.794 648.6 R -(between applications and e)72 663.6 Q(xtensions and concentrate on the interf) --.165 E(ace between C/C++ and Elk.)-.11 E .437(The only note)97 682.2 R -.11 -(wo)-.275 G(rth).11 E 3.187(yd)-.055 G(if)198.389 682.2 Q .436 -(ference between applications and e)-.275 F .436 -(xtensions is that the former tend)-.165 F .791(to ha)72 697.2 R 1.121 -.165 -(ve t)-.22 H .791(heir o).165 F(wn)-.275 E F1(main\(\))3.541 E F0 .791 -(function that g)3.541 F .791(ains control on startup, while Scheme e)-.055 F -.791(xtensions do not)-.165 F(ha)72 712.2 Q .372 -.165(ve a)-.22 H F1(main\(\)) -2.957 E F0 .042(entry point\212the)2.792 F 2.792(ya)-.165 G .041 -(re usually loaded into the interpreter \(or application\) during run-)220.435 -712.2 R 4.631(time. This)72 727.2 R 1.881 -(distinction will become important in the ne)4.631 F 1.882(xt chapter)-.165 F -4.632(,w)-.44 G 1.882(hen the dif)386.89 727.2 R 1.882(ferent w)-.275 F 1.882 -(ays of)-.11 F EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S -(joining Elk and C/C++ code will be discussed.)72 87 Q/F1 11/Times-Bold@0 SF -2.75(4. Linking)72 117 R -.275(Ap)2.75 G(plications and Extensions with Elk) -.275 E F0 .407(There are tw)97 135.6 R 3.157(od)-.11 G(if)167.444 135.6 Q .407 -(ferent mechanisms for inte)-.275 F .407(grating compiled C/C++ code \(e)-.165 -F .407(xtensions or an)-.165 F .718(application\) with Elk:)72 150.6 R/F2 11 -/Times-Italic@0 SF .718(static linking)3.468 F F0(and)3.468 E F2 .718 -(dynamic loading)3.468 F F0 6.218(.T)C .719(he object \214les that mak)343.57 -150.6 R 3.469(eu)-.11 G 3.469(pa)462.236 150.6 S 3.469(nE)476.089 150.6 S(lk-) -491.779 150.6 Q .977(based application are usually link)72 165.6 R .976 -(ed statically with the Scheme interpreter in the normal w)-.11 F .976(ay to) --.11 F .042(produce an e)72 180.6 R -.165(xe)-.165 G .043(cutable program.).165 -F .043(Compiled e)5.543 F .043 -(xtensions, on the other hand, are usually dynamically)-.165 F .205 -(loaded into the running Scheme interpreter as the)72 195.6 R 2.955(ya)-.165 G -.205(re needed.)303.21 195.6 R .205(These con)5.705 F -.165(ve)-.44 G .204 -(ntions re\215ect the nor).165 F(-)-.22 E(mal case; Scheme e)72 210.6 Q -(xtensions may as well be link)-.165 E(ed statically with the interpreter)-.11 -E 21.15<8374>72 229.2 S 5.741(op)100.058 229.2 S 2.991(roduce a `)116.799 229.2 -R(`specialized')-.814 E 5.741('i)-.814 G 2.991 -(nstance of the interpreter \(for e)233.792 229.2 R 2.991(xample, when de)-.165 -F -.165(ve)-.275 G(loping).165 E .174(X11-based Scheme code, an e)97 244.2 R -.174(xtended v)-.165 F .173 -(ersion of the interpreter may be produced by linking)-.165 F -(it statically with the X11 e)97 259.2 Q(xtensions\);)-.165 E 21.15<8369>72 -277.8 S 4.261(fap)100.058 277.8 S 1.511(articular e)122.627 277.8 R 1.511 -(xtension is required by an application from the be)-.165 F 1.512 -(ginning \(an application)-.165 F .586(with an X-based user)97 292.8 R(-interf) --.22 E .586(ace w)-.11 F .586(ould be link)-.11 F .585(ed with the X11 e)-.11 F -.585(xtensions statically)-.165 F 3.335(,a)-.715 G 3.335(sl)473.781 292.8 S -(oad-)484.453 292.8 Q(ing on-demand w)97 307.8 Q -(ould not be useful in this case\);)-.11 E 21.15<836f>72 326.4 S 3.646(nt)102.5 -326.4 S .896(he \(fe)114.704 326.4 R .896 -(w\) platforms where dynamic loading is not supported or where dynamic loading) --.275 F(has a lar)97 341.4 Q(ge performance o)-.198 E -.165(ve)-.165 G(rhead.) -.165 E(Lik)97 360 Q -.275(ew)-.11 G 1.386(ise, dynamic loading is not only use\ -ful for on-demand loading of reusable Scheme).275 F -.165(ex)72 375 S -(tensions;).165 E F2(applications)4.517 E F0 1.767(can bene\214t from this f) -4.517 F 1.767(acility as well.)-.11 F 3.527 -.88(To r)7.267 H 1.767 -(educe the size of the \214nal).88 F -.165(exe)72 390 S .068 -(cutable, parts of an application may loaded dynamically rather than link).165 -F .067(ed statically if the)-.11 F 2.817(ya)-.165 G(re)495.453 390 Q .084 -(used infrequently or if only a fe)72 405 R 2.835(wo)-.275 G 2.835(ft)227.812 -405 S .085(hem are used at a time.)237.368 405 R .085 -(Dynamic loading enables the author)5.585 F 1.354(of an e)72 420 R 1.354 -(xtensible application to decompose it into an arbitrary number of indi)-.165 F -1.353(vidual parts as an)-.275 F(alternati)72 435 Q .778 -.165(ve t)-.275 H -3.198(oc).165 G .448(ombining them statically into a lar)137.829 435 R .448 -(ge, monolithic e)-.198 F -.165(xe)-.165 G 3.198(cutable. An).165 F -.165(ex) -3.198 G .448(tensible ne).165 F(ws-)-.275 E .933(reader program, for e)72 450 R -.932(xample, may include a separate spelling check module that is dynamically) --.165 F(loaded the \214rst time it is needed \(i.)72 465 Q(e. when a ne)1.833 E -(wly written ne)-.275 E(ws article is to be spell-check)-.275 E(ed\).)-.11 E -.14(The capability to dynamically load compiled C/C++ code into a running appl\ -ication enables)97 483.6 R 1.404(users to write)72 498.6 R F2 1.404(hybrid e) -4.154 F(xtensions)-.22 E F0 1.403(which consist of a lo)4.154 F(w-le)-.275 E --.165(ve)-.275 G 4.153(lC).165 G 1.403(/C++ part and a high-le)361.289 498.6 R --.165(ve)-.275 G 4.153(lp).165 G(art)492.395 498.6 Q .297(written in Scheme.)72 -513.6 R .297(As a result, e)5.797 F .297(xtensions can e)-.165 F -.165(xe)-.165 -G .298(cute much f).165 F .298(aster \(e)-.11 F .298 -(xtensions to the Emacs edi-)-.165 F(tor)72 528.6 Q 3.461(,f)-.44 G .711(or e) -93.655 528.6 R .71 -(xample, must be entirely written in Emacs-Lisp and can therefore become slo) --.165 F 3.46(wi)-.275 G 3.46(fs)473.931 528.6 S(uf)485.333 528.6 Q<8c2d>-.275 E -(ciently comple)72 543.6 Q(x\); and e)-.165 E -(xtensions can deal more easily with lo)-.165 E(w-le)-.275 E -.165(ve)-.275 G -(l, platform-speci\214c details.).165 E F1 2.75(5. Dynamic)72 573.6 R(Loading) -2.75 E F0 .808 -(Object \214les \(compiled C/C++ code\) are loaded by means of the standard)97 -592.2 R F2(load)3.558 E F0(primiti)3.558 E 1.138 -.165(ve o)-.275 H(f).165 E -.521(Scheme, just lik)72 607.2 R 3.271(eo)-.11 G .521(rdinary Scheme \214les.) -157.174 607.2 R .52(All you need to do is to compile your C or C++ source)6.021 -F .858(\214le, apply the)72 622.2 R F2(mak)3.608 E(edl)-.11 E F0 .858 -(script that comes with the Elk distrib)3.608 F .859 -(ution to the resulting object \214le, and)-.22 F .01 -(load it into the interpreter or application.)72 637.2 R F2(mak)5.509 E(edl) --.11 E F0 .009(prepares object \214les for dynamic loading \(which)2.759 F -1.515(is a no-op on most platforms\) and combines se)72 652.2 R -.165(ve)-.275 -G 1.516(ral object \214les into one to speed up loading;).165 F(ar)72 667.2 Q -.584(guments are the output \214le and one or more input \214les or additional\ - libraries \(input and output)-.198 F(\214le may be identical\):)72 681.2 Q EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S/F1 10/Courier-Bold@0 SF(%)100.346 -86 Q/F2 10/Courier@0 SF(cc \255c \255I/usr/elk/include file.c)6 E F1(%)100.346 -100 Q F2(/usr/elk/lib/makedl file.o file.o)6 E F1(%)100.346 114 Q F2(scheme)6 E -F1(>)100.346 128 Q F2(\(load 'file.o\))6 E F1(>)100.346 142 Q F0 1.571 -(\(This e)72 164.5 R 1.571(xamples assumes that Elk has been installed under `) --.165 F(`/usr/elk')-.814 E 4.321('o)-.814 G 4.321(ny)397.536 164.5 S 1.571 -(our site.)412.857 164.5 R(Additional)7.072 E(ar)72 179.5 Q -(guments may be required for the call to)-.198 E/F3 11/Times-Italic@0 SF(cc) -2.75 E F0(.\))A .676(Elk does not attempt to discriminate object code and Sche\ -me code based on the \214les' con-)97 198.1 R .346 -(tents; the names of object \214les are required to end in `)72 213.1 R(`.o') --.814 E .347(', the standard suf)-.814 F .347(\214x for object modules)-.275 F -.464(in UNIX.)72 228.1 R .463(Scheme \214les, on the other hand, end in `)5.964 -F(`.scm')-.814 E 3.213('b)-.814 G 3.213(yc)339.424 228.1 S(on)353.021 228.1 Q --.165(ve)-.44 G 3.213(ntion. This).165 F(con)3.213 E -.165(ve)-.44 G .463 -(ntion is not).165 F .397(enforced by Elk\212e)72 243.1 R -.165(ve)-.275 G .398 -(rything that is not an object \214le is considered to be a Scheme \214le.).165 -F 3.148(Al)5.898 G .398(ist of)481.294 243.1 R .182 -(object \214les may be passed to the)72 258.1 R F3(load)2.931 E F0(primiti) -2.931 E .511 -.165(ve w)-.275 H .181(hich may sa).165 F .511 -.165(ve t)-.22 H -.181(ime on platforms where a call to).165 F(the system link)72 273.1 Q -(er is in)-.11 E -.22(vo)-.44 G(lv).22 E(ed.)-.165 E .942 -(Loading object \214les directly as sho)97 291.7 R .942(wn abo)-.275 F 1.272 --.165(ve i)-.165 H 3.692(su).165 G 3.692(ncommon. Instead,)318.409 291.7 R .942 -(the Scheme part of a)3.692 F -.055(hy)72 306.7 S 2.765(brid e).055 F 2.765(xt\ -ension usually loads its corresponding object \214le \(and all the other \214l\ -es that are)-.165 F(required\) automatically)72 320.7 Q 2.75(,s)-.715 G 2.75 -(ot)184.013 320.7 S(hat one can write, for e)195.321 320.7 Q(xample,)-.165 E F2 -(\(require 'unix\))100.346 343.203 Q F0 1.102(to load the UNIX e)72 365.703 R -3.852(xtension. This)-.165 F -.165(ex)3.852 G 1.102(pression causes the \214le) -.165 F F3(unix.scm)3.852 E F0 1.102(to be loaded, which then)3.852 F 2.593 -(loads the object \214le)72 380.703 R F3(unix.o)5.343 E F0 2.592 -(\212the UNIX e)B(xtension')-.165 E 5.342(sl)-.605 G -.275(ow)318.519 380.703 S -(-le).275 E -.165(ve)-.275 G 5.342(lp).165 G 2.592 -(art\212automatically on startup.)367.135 380.703 R(Additional)72 395.703 Q F3 -(load-libr)3.291 E(aries)-.165 E F0 .541(\(as e)3.291 F .541 -(xplained in the ne)-.165 F .541 -(xt section\) may be set by the Scheme \214le imme-)-.165 F -(diately before loading the e)72 410.703 Q(xtension')-.165 E 2.75(so)-.605 G -(bject \214le.)245.063 410.703 Q 2.662 -(When an object \214le is loaded, unresolv)97 429.303 R 2.662 -(ed references are resolv)-.165 F 2.662(ed ag)-.165 F 2.662(ainst the symbols) --.055 F -.165(ex)72 444.303 S 1.323(ported by the running interpreter or by th\ -e combination of an application and the interpreter).165 F(\(the)72 459.303 Q -F3 .022(base pr)2.772 F -.11(og)-.495 G -.165(ra).11 G(m).165 E F0 2.772 -(\). This)B .022(is an essential feature, as dynamically loaded e)2.772 F .021 -(xtensions must be able to)-.165 F .254 -(reference the elementary Scheme primiti)72 474.303 R -.165(ve)-.275 G 3.004 -(sd).165 G .255(e\214ned by the interpreter core and all the other func-) -274.746 474.303 R 2.674(tions that are a)72 489.303 R -.275(va)-.22 G 2.674 -(ilable to the e).275 F 2.674(xtension/application programmer)-.165 F 8.174(.I) --.605 G 5.423(na)384.804 489.303 S 2.673(ddition, references are)400.611 -489.303 R(resolv)72 504.303 Q .152(ed ag)-.165 F .152(ainst the symbols e)-.055 -F .152(xported by all pre)-.165 F .152(viously loaded object \214les.)-.275 F -.152(The term)5.652 F F3(incr)2.903 E(emental)-.407 E(loading)72 519.303 Q F0 -.326(is used for this style of dynamic loading, as it allo)3.077 F .326(ws b) --.275 F .326(uilding comple)-.22 F 3.076(xa)-.165 G .326(pplications from) -431.261 519.303 R(small components incrementally)72 534.303 Q(.)-.715 E/F4 11 -/Times-Bold@0 SF 2.75(5.1. Load)72 564.303 R(Libraries)2.75 E F0 2.474 -(Dynamically loadable object \214les usually ha)97 582.903 R 2.804 -.165(ve u) --.22 H(nresolv).165 E 2.474(ed references into one or more)-.165 F .748 -(libraries, most lik)72 597.903 R .748 -(ely at least into the standard C library)-.11 F 6.248(.T)-.715 G .747 -(herefore, when loading an object \214le,)336.22 597.903 R .686 -(references are resolv)72 612.903 R .686(ed not only ag)-.165 F .687 -(ainst the base program and pre)-.055 F .687(viously loaded object \214les, b) --.275 F(ut)-.22 E 1.004(also ag)72 627.903 R 1.003(ainst a number of user)-.055 -F(-supplied)-.22 E F3 1.003(load libr)3.753 F(aries)-.165 E F0 6.503(.T)C 1.003 -(he X11 e)327.064 627.903 R 1.003(xtensions of Elk, for instance,)-.165 F 1.411 -(need to be link)72 642.903 R 1.411(ed ag)-.11 F 1.411(ainst the respecti)-.055 -F 1.741 -.165(ve l)-.275 H 1.411(ibraries of the X windo).165 F 4.161(ws)-.275 -G 1.412(ystem, such as)383.776 642.903 R F3(libX11)4.162 E F0(and)4.162 E F3 -(libXt)72 657.903 Q F0 6.012(.T)C .511 -(hese load libraries can be assigned to the Scheme v)108.878 657.903 R(ariable) --.275 E F3(load-libr)3.261 E(aries)-.165 E F0 .511(which is bound)3.261 F 1.564 -(in the top-le)72 672.903 R -.165(ve)-.275 G 4.314(le).165 G -.44(nv)150.491 -672.903 S 1.564(ironment of Elk.).44 F -.88(Ty)7.064 G(pically).88 E(,)-.715 E -F3(load-libr)4.314 E(aries)-.165 E F0 1.565(is dynamically assigned a set of) -4.314 F .014(library names by means of)72 687.903 R F3(\215uid-let)2.764 E F0 -.014(immediately before calling)2.764 F F3(load)2.764 E F0 5.514(.F)C .014 -(or e)383.605 687.903 R .014(xample, the Xlib e)-.165 F(xten-)-.165 E(sion \() -72 701.903 Q F3(xlib)A(.scm)-.44 E F0 2.75(\)c)C(ontains code such as)143.962 -701.903 Q EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-7-)278.837 51 S/F1 10/Courier@0 SF(\(fluid-let) -100.346 86 Q(\(\(load-libraries)112.346 100 Q -(\(string-append "\255L/usr/X11/lib \255lX11 " load-libraries\)\)\))130.346 114 -Q(\(load 'xlib.o\)\))112.346 128 Q F0 .591(to load the accompan)72 150.5 R .591 -(ying object \214le \()-.165 F/F2 11/Times-Italic@0 SF(xlib)A(.o)-.44 E F0 .592 -(\), linking it ag)B .592(ainst the system')-.055 F 3.342(sXl)-.605 G .592 -(ibrary in addition)426.432 150.5 R 1.881(to whate)72 165.5 R -.165(ve)-.275 G -4.63(rl).165 G 1.88(ibraries were already in use at that point.)132.752 165.5 R -1.88(The def)7.38 F 1.88(ault v)-.11 F 1.88(alue of)-.275 F F2(load-libr)4.63 E -(aries)-.165 E F0(is)4.63 E -.814(``)72 180.5 S(\255lc').814 E 3.036('\()-.814 -G -.917(i. e.)105.869 180.5 R .286(the C library\), as e)3.036 F .286 -(xtensions are lik)-.165 F .286 -(ely to use functions from this library in addition to)-.11 F .286 -(those C library functions that ha)72 195.5 R .616 -.165(ve a)-.22 H .286 -(lready been link).165 F .286(ed into the base program or ha)-.11 F .615 -.165 -(ve b)-.22 H .285(een pulled).165 F .642(in by pre)72 210.5 R .642 -(viously loaded object \214les.)-.275 F .642(By using)6.142 F F2(string-append) -3.393 E F0 .643(in the e)3.393 F .643(xample abo)-.165 F -.165(ve)-.165 G 3.393 -(,t).165 G .643(he speci\214ed)451.118 210.5 R .174 -(libraries are added to the def)72 225.5 R .174(ault v)-.11 F .174(alue of) --.275 F F2(load-libr)2.924 E(aries)-.165 E F0 .173(rather than o)2.924 F -.165 -(ve)-.165 G .173(rwriting it.).165 F .173(The e)5.673 F .173(xact syn-)-.165 F -.177(tax of the load libraries is platform speci\214c.)72 240.5 R -.165(Fo) -5.677 G 2.927(ri).165 G .177(nstance, `)291.877 240.5 R(`\255L/usr/X11/lib') --.814 E 2.927('a)-.814 G 2.928(su)417.477 240.5 S .178(sed abo)430.184 240.5 R -.508 -.165(ve i)-.165 H 2.928(sr).165 G(ec-)490.569 240.5 Q 1.064 -(ognized by the system link)72 255.5 R 1.064(er of most UNIX v)-.11 F 1.064 -(ariants as an option indicating in which directory)-.275 F .416 -(the libraries reside on the system, b)72 270.5 R .416(ut dif)-.22 F .417 -(ferent options or additional libraries are required on cer)-.275 F(-)-.22 E -(tain platforms \(as speci\214ed by the platform')72 285.5 Q 2.75(s`)-.605 G -(`con\214g/site')274.356 285.5 Q 2.75<278c>-.814 G(le in the Elk distrib) -339.234 285.5 Q(ution\).)-.22 E/F3 11/Times-Bold@0 SF 2.75(5.2. Extension)72 -315.5 R(Initializers and Finalizers)2.75 E F0 .07 -(When loading an object \214le, Elk scans the \214le')97 334.1 R 2.82(ss)-.605 -G .07(ymbol table for the names of e)313.947 334.1 R .07(xtension ini-)-.165 F -2.171(tialization functions or)72 349.1 R F2 -.22(ex)4.921 G 2.172 -(tension initializer).22 F F0 4.922(s. These)B -.165(ex)4.922 G 2.172 -(tension initializers are the initial entry).165 F 1.224(points to the ne)72 -364.1 R 1.223(wly loaded e)-.275 F 1.223(xtension; their names must ha)-.165 F -1.553 -.165(ve t)-.22 H 1.223(he pre\214x `).165 F(`elk_init_')-.814 E 3.973 -('\()-.814 G 1.223(earlier the)458.491 364.1 R .592(pre\214x `)72 379.1 R -(`init_')-.814 E 3.342('w)-.814 G .592(as used; it w)145.377 379.1 R .592 -(as changed in Elk 3.0 to a)-.11 F -.22(vo)-.22 G .593(id name con\215icts\).) -.22 F .593(Each e)6.093 F .593(xtension ini-)-.165 F .672 -(tializer found in the object \214le is in)72 394.1 R -.22(vo)-.44 G -.11(ke) -.22 G 3.422(dt).11 G 3.421(op)263.595 394.1 S .671(ass control to the e)278.016 -394.1 R 3.421(xtension. The)-.165 F .671(job of the e)3.421 F(xten-)-.165 E -.925(sion initializers is to re)72 409.1 R .925 -(gister the Scheme types and primiti)-.165 F -.165(ve)-.275 G 3.675(sd).165 G -.926(e\214ned by the e)359.297 409.1 R .926(xtension with the)-.165 F -(interpreter and to perform an)72 424.1 Q 2.75(yd)-.165 G -(ynamic initializations.)212.657 424.1 Q .731(As each e)97 442.7 R .731 -(xtension may ha)-.165 F 1.06 -.165(ve a)-.22 H 3.48(na).165 G .73 -(rbitrary number of initialization functions rather than one)246.847 442.7 R -.58(single function with a \214x)72 457.7 R .58(ed name, e)-.165 F .581 -(xtension writers can di)-.165 F .581(vide their e)-.275 F .581 -(xtensions into a number of)-.165 F .265 -(independent modules, each of which pro)72 472.7 R .265(vides its o)-.165 F -.265(wn initialization function.)-.275 F .264(The compiled mod-)5.764 F .93(ul\ -es can then be combined into one dynamically loadable object \214le without ha) -72 487.7 R .93(ving to lump all)-.22 F -(initializations into a central initialization function.)72 502.7 Q .164 -(In the same manner)97 521.3 R 2.914(,e)-.44 G .163 -(xtension can de\214ne an arbitrary number of)193.884 521.3 R F2 -.22(ex)2.913 -G .163(tension \214nalization func-).22 F(tions)72 536.3 Q F0 1.617 -(which are called on termination of the Scheme interpreter or application.) -4.366 F 1.617(The names of)7.117 F .299(\214nalization functions be)72 551.3 R -.299(gin with `)-.165 F(`elk_\214nit_')-.814 E 3.049('. Extension)-.814 F .299 -(\214nalization functions are typically used)3.049 F -(for clean-up operations such as remo)72 566.3 Q(ving temporary \214les.)-.165 -E(The e)97 584.9 Q(xtension initializers \(as well as the \214nalizers\) are c\ -alled in an unspeci\214ed order)-.165 E(.)-.605 E F3 2.75(5.3. C++)72 614.9 R -(Static Constructors and Destructors)2.75 E F0 .633(In addition to calling e)97 -633.5 R .633(xtension initialization functions, the)-.165 F F2(load)3.384 E F0 -(primiti)3.384 E -.165(ve)-.275 G 3.384(si).165 G -2.09 -.44(nv o)436.094 633.5 -T -.11(ke).44 G 3.384(sa).11 G .634(ll C++)474.755 633.5 R .836(static constru\ -ctors that are present in the dynamically loaded object \214le in case it cont\ -ains com-)72 648.5 R 1.096(piled C++ code.)72 663.5 R(Lik)6.596 E -.275(ew)-.11 -G 1.096(ise, C++ static destructors are called automatically on termination.) -.275 F(The)6.597 E 1.051 -(constructors and destructors are called in an unspeci\214ed order)72 678.5 R -3.801(,b)-.44 G 1.051(ut all constructors \(destructors\))363.677 678.5 R .642 -(are called before calling an)72 693.5 R 3.392(ye)-.165 G .642 -(xtension initializers \(\214nalizers\).)207.133 693.5 R .643 -(Elk recognizes the function name)6.142 F(pre\214x)72 708.5 Q 1.338(es of stat\ -ic constructor and destructor functions used by all major UNIX C++ compilers;) --.165 F(ne)72 723.5 Q 2.75(wp)-.275 G(re\214x)98.301 723.5 Q -(es can be added if required.)-.165 E EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-8-)278.837 51 S/F1 11/Times-Bold@0 SF 2.75 -(6. Static)72 87 R(Linking)2.75 E F0 1.864(Linking user)97 105.6 R 1.865 -(-supplied code with Elk statically can be used as an alternati)-.22 F 2.195 --.165(ve t)-.275 H 4.615(od).165 G(ynamic)471.616 105.6 Q .845 -(loading on platforms that do not support it, for applications with their o)72 -120.6 R(wn)-.275 E/F2 11/Times-Italic@0 SF(main\(\))3.594 E F0 3.594(,a)C .844 -(nd to a)453.252 120.6 R -.22(vo)-.22 G(id).22 E .437(the o)72 135.6 R -.165 -(ve)-.165 G .437(rhead of loading frequently used Elk e).165 F 3.187 -(xtensions. Dynamic)-.165 F .438(loading and static linking may)3.187 F .287(b\ -e used in combination\212 additional object \214les can be loaded in a running\ - e)72 150.6 R -.165(xe)-.165 G .287(cutable formed by).165 F -(linking the Scheme interpreter with e)72 165.6 Q -(xtensions or with an application \(or parts thereof\).)-.165 E .823 -(When making the Scheme interpreter component of Elk, these e)97 184.2 R -.165 -(xe)-.165 G .824(cutables and object \214les).165 F(get installed \(relati)72 -199.2 Q .33 -.165(ve t)-.275 H 2.75(oy).165 G(our)183.991 199.2 Q F2 -(install_dir)2.75 E F0(which usually is `)2.75 E(`/usr/elk')-.814 E 2.75('o) --.814 G 2.75(r`)378.526 199.2 S(`/usr/local/elk')387.788 199.2 Q('\):)-.814 E -F2(bin/sc)97 217.8 Q(heme)-.165 E F0 -(The freestanding, plain Scheme interpreter)122 232.8 Q(.)-.605 E F2 -(lib/standalone)97 251.4 Q(.o)-.165 E F0 1.847 -(The Scheme interpreter as a relocatable object \214le which can be link)122 -266.4 R 1.846(ed with user)-.11 F(-)-.22 E .009 -(supplied object \214les to form an e)122 281.4 R -.165(xe)-.165 G 2.76 -(cutable. This).165 F .01(object \214le contains a)2.76 F F2(main\(\))2.76 E F0 -(function;)2.76 E 2.84(thus the Scheme interpreter starts up in the normal w) -122 296.4 R 2.84(ay when the e)-.11 F -.165(xe)-.165 G 2.839(cutable is).165 F -(in)122 311.4 Q -.22(vo)-.44 G -.11(ke).22 G(d.).11 E F2(lib/module)97 330 Q -(.o)-.165 E F0(Lik)122 345 Q(e)-.11 E F2(standalone)3.341 E(.o)-.165 E F0 3.341 -(,e)C .592(xcept that the object \214le does not e)212.568 345 R .592 -(xport its o)-.165 F(wn)-.275 E F2(main\(\))3.342 E F0(function.)3.342 E -(Therefore, the object \214les link)122 360 Q(ed with it ha)-.11 E .33 -.165 -(ve t)-.22 H 2.75(os).165 G(upply a)337.809 360 Q F2(main\(\))2.75 E F0(.)A -1.234(The object \214le)97 378.6 R F2(standalone)3.984 E(.o)-.165 E F0 1.234 -(is typically link)3.984 F 1.234(ed with a number of Elk e)-.11 F 1.233 -(xtensions \(e.)-.165 F 1.233(g. the)1.833 F 1.392(X11 e)72 393.6 R 1.392 -(xtensions\), while)-.165 F F2(module)4.142 E(.o)-.165 E F0 1.392 -(is used by Elk-based applications which contrib)4.142 F 1.393(ute their o)-.22 -F(wn)-.275 E F2(main\(\))72 408.6 Q F0(and need to be `)2.75 E(`in control') --.814 E 2.75('o)-.814 G 2.75(ns)234.415 408.6 S(tartup.)246.944 408.6 Q F1 2.75 -(6.1. Linking)72 438.6 R(the Scheme Inter)2.75 E(pr)-.11 E -(eter with Extensions)-.198 E F0 3.545(As)97 457.2 S .795(hell script)112.766 -457.2 R F2(linksc)3.544 E(heme)-.165 E F0 .794(\(installed as `)3.544 F -(`lib/linkscheme')-.814 E .794('\) simpli\214es combining the Scheme)-.814 F -1.271(interpreter with a number of\212user)72 472.2 R 1.271 -(-supplied or prede\214ned\212e)-.22 F 1.271(xtensions statically)-.165 F 6.772 -(.T)-.715 G 1.272(his script is)451.34 472.2 R .91 -(called with the name of the output \214le \(the resulting e)72 487.2 R -.165 -(xe)-.165 G .91(cutable\) and an).165 F 3.66(yn)-.165 G .91 -(umber of object \214les)410.531 487.2 R .193(and libraries.)72 502.2 R .194 -(It basically links the object \214les and libraries with `)5.693 F -(`standalone.o')-.814 E 2.944('a)-.814 G .194(nd supplies an)435.335 502.2 R(y) --.165 E 1.128(additional libraries that may be required by the interpreter)72 -517.2 R 6.628(.I)-.605 G 3.878(ng)348.242 517.2 S 1.128 -(eneral, this can be done just as)363.12 517.2 R 1.026 -(well by calling the link)72 532.2 R 1.026(er or compiler directly)-.11 F 3.776 -(,b)-.715 G(ut)290.275 532.2 Q F2(linksc)3.777 E(heme)-.165 E F0 1.027 -(also tak)3.777 F 1.027(es care of additional pro-)-.11 F(cessing that needs t\ -o be performed on at least one platform \(currently AIX\).)72 547.2 Q 2.286 --.88(To c)97 565.8 T .526 -(reate an instance of Elk including the Xlib, Xt, and Xa).88 F 3.275(we)-.165 G -(xtensions,)377.044 565.8 Q F2(linksc)3.275 E(heme)-.165 E F0 -.11(wo)3.275 G -(uld).11 E(be used as follo)72 579.8 Q(ws \(ag)-.275 E(ain assuming you ha) --.055 E .33 -.165(ve i)-.22 H(nstalled the softw).165 E(are under `)-.11 E -(`/usr/elk')-.814 E('\):)-.814 E/F3 10/Courier-Bold@0 SF(%)100.346 602.303 Q/F4 -10/Courier@0 SF(cd /usr/elk)6 E F3(%)100.346 616.303 Q F4 -(lib/linkscheme x11scheme runtime/obj/xlib.o runtime/obj/xt.o \\)6 E(runtime/o\ -bj/xaw/*.o \255lXaw \255lXmu \255lXt \255lSM \255lICE \255lX11 \255lXext) -130.346 630.303 Q F0 1.459(The e)97 656.403 R 1.46 -(xact form of the libraries depends on your platform and X11 v)-.165 F 1.46 -(ersion; for e)-.165 F(xample,)-.165 E 1.813(additional options may be require\ -d if X11 is not installed in a standard location at your site.)72 671.403 R F2 -(xlib)72 686.403 Q(.o)-.44 E F0 1.332(is the Xlib e)4.082 F(xtension,)-.165 E -F2(xt.o)4.082 E F0 1.332(is the X toolkit intrinsics \(Xt\) e)4.082 F 1.333 -(xtension, and the subdirectory)-.165 F F2(xaw)72 701.403 Q F0 .165 -(holds the object \214les for all the Athena widgets.)2.915 F .165(The e)5.665 -F -.165(xe)-.165 G(cutable).165 E F2(x11sc)2.915 E(heme)-.165 E F0 .164(can no) -2.915 F 2.914(wb)-.275 G 2.914(eu)476.039 701.403 S(sed)489.337 701.403 Q .223 -(to run arbitrary X11 applications using the Athena widgets without requiring \ -an)72 716.403 R 2.974(yr)-.165 G .224(untime loading)437.468 716.403 R -(of object \214les belonging to the X11 e)72 730.403 Q(xtensions:)-.165 E EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-9-)278.837 50 S/F1 10/Courier-Bold@0 SF(%)100.346 -86 Q/F2 10/Courier@0 SF(x11scheme)6 E F1(>)100.346 100 Q F2 -(\(load '../examples/xaw/dialog.scm\))6 E([Autoloading xwidgets.scm])100.346 -114 Q([Autoloading xt.scm])100.346 128 Q([Autoloading siteinfo.scm])100.346 142 -Q(...)100.346 156 Q F0 .383(In the same w)97 182.1 R(ay)-.11 E(,)-.715 E/F3 11 -/Times-Italic@0 SF(linksc)3.133 E(heme)-.165 E F0 .383 -(can be used to link the Scheme interpreter with an)3.133 F 3.133(yn)-.165 G --.275(ew)464.513 182.1 S 3.132(,u)-.44 G(ser)487.731 182.1 Q(-)-.22 E -(supplied e)72 197.1 Q -(xtensions, with parts of an Elk-based application, or with an)-.165 E 2.75(yc) --.165 G(ombination thereof.)393.992 197.1 Q/F4 11/Times-Bold@0 SF 2.75 -(6.1.1. A)72 227.1 R(utomatic Extension Initialization)-.55 E F0 .553 -(When linking Elk with e)97 245.7 R .553(xtensions, it is)-.165 F F3(not)3.303 -E F0 .553(necessary to add calls to the e)3.303 F .553(xtension initializ-) --.165 F 1.12(ers to the Scheme interpreter')72 260.7 R(s)-.605 E F3(main\(\)) -3.87 E F0 1.12(function and recompile the interpreter; all e)3.87 F 1.12 -(xtensions are)-.165 F .146(initialized automatically on startup.)72 275.7 R -1.906 -.88(To a)5.646 H .147 -(ccomplish this kind of automatic initialization, Elk scans).88 F .546(its o)72 -290.7 R .546(wn symbol table on startup, in)-.275 F -.22(vo)-.44 G .546 -(king an).22 F 3.295(y`)-.165 G(`elk_init_')281.924 290.7 Q 3.295('f)-.814 G -.545(unctions and C++ static constructors,)338.173 290.7 R 1.144(in the same w) -72 305.7 R 1.144(ay the symbol table of object \214les is scanned when the)-.11 -F 3.895(ya)-.165 G 1.145(re dynamically loaded.)401.203 305.7 R .206 -(Extension \214nalizers and C++ static destructors are sa)72 320.7 R -.165(ve) --.22 G 2.955(df).165 G .205(or calling on e)328.845 320.7 R 2.955 -(xit. Automatic)-.165 F -.165(ex)2.955 G(tension).165 E(initialization only w) -72 335.7 Q(orks if)-.11 E 21.15<8374>97 354.3 S(he e)125.058 354.3 Q -.165(xe) --.165 G(cutable \214le has a symbol table \(i.).165 E -(e. you must not strip it\))1.833 E 21.15<8374>97 372.9 S(he e)125.058 372.9 Q --.165(xe)-.165 G(cutable \214le can be opened for reading).165 E 21.15<8374>97 -391.5 S 1.465(he interpreter can locate its e)125.058 391.5 R -.165(xe)-.165 G -1.465(cutable \214le by scanning the shell').165 F 4.215(sd)-.605 G 1.466 -(irectory search)437.48 391.5 R(path.)122 406.5 Q 1.12(The performance o)97 -425.1 R -.165(ve)-.165 G 1.12 -(rhead caused by the initial scanning of the symbol is small; the pro-).165 F -(gram')72 440.1 Q 3.378(ss)-.605 G .628 -(ymbol table can be read or mapped into memory ef)109.599 440.1 R .628 -(\214ciently \(it it has not been automati-)-.275 F(cally mapped into the addr\ -ess space by the operating system in the \214rst place\).)72 455.1 Q F4 2.75 -(6.2. Linking)72 485.1 R(the Scheme Inter)2.75 E(pr)-.11 E(eter with an A)-.198 -E(pplication)-.275 E F0 1.446(Elk-based applications that ha)97 503.7 R 1.776 --.165(ve t)-.22 H 1.446(heir o).165 F(wn)-.275 E F3(main\(\))4.196 E F0 1.445 -(are link)4.196 F 1.445(ed with the Scheme interpreter)-.11 F .821 -(installed as)72 518.7 R F3(module)3.571 E(.o)-.165 E F0 .821(which, unlik) -3.571 F(e)-.11 E F3(standalone)3.571 E(.o)-.165 E F0 3.571(,d)C .821(oes not e) -301.975 518.7 R .822(xport a)-.165 F F3(main\(\))3.572 E F0 3.572(function. No) -3.572 F(special)3.572 E F3(linksc)72 533.7 Q(heme)-.165 E F0 4.075 -(script is required to link with)6.825 F F3(module)6.824 E(.o)-.165 E F0 6.824 -(;a)C 4.074(pplication writers usually will add)337.378 533.7 R -.814(``)72 -548.7 S(/usr/elk/lib/module.o').814 E 3.547('\()-.814 G .797(or whate)184.216 -548.7 R -.165(ve)-.275 G 3.547(rt).165 G .798 -(he correct path is\) to the list of object \214les in their Mak)243.406 548.7 -R(e-)-.11 E 5.535(\214le. T)72 563.7 R 5.535(os)-.88 G 2.785 -(implify linking with Elk, a tri)118.248 563.7 R 2.785(vial script)-.275 F F3 -(ld\215a)5.535 E(gs)-.11 E F0 2.785(\(which li)5.535 F -.165(ve)-.275 G 5.535 -(si).165 G 5.535(n`)413.255 563.7 S(`lib')427.139 563.7 Q 5.535('a)-.814 G -2.785(long with)459.349 563.7 R F3(linksc)72 578.7 Q(heme)-.165 E F0 4.415(\)i) -C 4.415(ss)131.844 578.7 S 1.665(upplied that just echoes an)144.817 578.7 R -4.415(ya)-.165 G 1.665(dditional libraries required by the Scheme inter)282.821 -578.7 R(-)-.22 E(preter)72 593.7 Q 5.5(.A)-.605 G(pplication de)113.239 593.7 Q --.165(ve)-.275 G(lopers may use).165 E F3(ld\215a)2.75 E(gs)-.11 E F0 -(in their Mak)2.75 E(e\214les.)-.11 E(As)97 612.3 Q F3(module)3.665 E(.o)-.165 -E F0 .915(does not ha)3.665 F 1.245 -.165(ve a)-.22 H F3(main\(\))3.83 E F0 -.914(entry point, an application using it must initialize the)3.665 F -(interpreter from within its o)72 626.3 Q(wn)-.275 E F3(main\(\))2.75 E F0 5.5 -(.T)C(his is done by calling .)254.424 626.3 Q F3(Elk_Init\(\))5.5 E F0(:)A F2 -(void Elk_Init\(int argc, char **argv, int init_flag, char *filename\);)100.346 -648.803 Q F3(Elk_Init\(\))97 674.903 Q F0 1.178(is only de\214ned by)3.927 F F3 -(module)3.928 E(.o)-.165 E F0 1.178(and is essentially a `)3.928 F(`wrapper') --.814 E 3.928('a)-.814 G 1.178(round the Scheme)422.213 674.903 R(interpreter') -72 689.903 Q(s)-.605 E F3(main\(\))4.135 E F0(.)A F3(ar)6.885 E(gc)-.407 E F0 -(and)4.135 E F3(ar)4.134 E(gv)-.407 E F0 1.384(are the ar)4.134 F 1.384 -(guments to be passed to the Scheme interpreter')-.198 F(s)-.605 E F3(main\(\)) -72 704.903 Q F0 6.999(.T)C 1.499(hese may or may not be the calling program') -117.796 704.903 R 4.249(so)-.605 G 1.499(riginal ar)340.562 704.903 R 1.5 -(guments; ho)-.198 F(we)-.275 E -.165(ve)-.275 G -.44(r,).165 G F3(ar)4.69 E -(gv[0])-.407 E F0 .044(must be that from the calling program in an)72 719.903 R -2.794(yc)-.165 G .044(ase \(because its address is used by Elk to determine) -276.622 719.903 R .466(the program')72 734.903 R 3.216(ss)-.605 G .466 -(tack base\).)140.758 734.903 R(If)5.966 E F3(init_\215a)3.216 E(g)-.11 E F0 -.466(is nonzero, the interpreter scans its symbol table to in)3.216 F -.22(vo) --.44 G -.11(ke).22 G EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(0-)288 51 S -.165(ex)72 87 S -1.012(tension initializers as described in 6.1.1.).165 F 1.012 -(C++ static constructors, ho)6.512 F(we)-.275 E -.165(ve)-.275 G 1.891 -.44 -(r, a).165 H 1.011(re ne).44 F -.165(ve)-.275 G 3.761(ri).165 G -2.09 -.44 -(nv o)472.386 87 T -.11(ke).44 G(d).11 E(by)72 102 Q/F1 11/Times-Italic@0 SF -(module)3.11 E(.o)-.165 E F0(\(re)3.11 E -.055(ga)-.165 G .36(rless of).055 F -F1(init_\215a)3.11 E(g)-.11 E F0 .36(\), because the)B 3.111(ya)-.165 G .361 -(re already tak)298.393 102 R .361(en care of by the runtime startup)-.11 F -(in this case.)72 117 Q(If)5.5 E F1(\214lename)2.75 E F0 -(is nonzero, it is the name of Scheme \214le to be loaded by)2.75 E F1 -(Elk_Init\(\))2.75 E F0(.)A/F2 11/Times-Bold@0 SF 2.75(6.2.1. An)72 147 R -(Example `)2.75 E(`main\(\)')-.693 E 2.75('F)-.693 G(unction)217.266 147 Q F0 -.225(Figure 1 sho)97 165.6 R .224(ws a realistic \(yet some)-.275 F .224 -(what simpli\214ed\) e)-.275 F(xample)-.165 E F1(main\(\))2.974 E F0 .224 -(function of an applica-)2.974 F(tion using Elk.)72 180.6 Q(__________________\ -____________________________________________________________)75 208.1 Q/F3 10 -/Courier@0 SF(char *directory;)72 227.6 Q(int main\(int ac, char **av\) {)72 -250 Q(char **eav;)97 264 Q(int eac = 1, c;)97 278 Q(Set_App_Name\(av[0]\);)97 -300.4 Q(eav = safe_malloc\(\(ac+2+1\) * sizeof\(char *\)\);)97 314.4 Q -(/* ac + -p xxx + 0 */)391 314.4 Q(eav[0] = av[0];)97 328.4 Q -(while \(\(c = getopt\(ac, av, "gh:o"\)\) != EOF\) switch \(c\) {)97 342.4 Q -(case 'o':)122 356.4 Q/F4 10/Times-Italic@0 SF(pr)147 370.4 Q(ocess option...) --.45 E F3(case 'g':)122 384.4 Q(eav[eac++] = "-g"; break;)147 398.4 Q -(case 'h':)122 412.4 Q(eav[eac++] = "-h"; eav[eac++] = optarg; break;)147 426.4 -Q(case '?':)122 440.4 Q(usage\(\); return 1;)147 454.4 Q(})97 468.4 Q -(if \(\(directory = getenv\("APP_DIR"\)\) == 0\))97 482.4 Q -(directory = DEFAULT_DIR;)122 496.4 Q(eav[eac++] = "-p";)97 510.4 Q -(eav[eac] = safe_malloc\(strlen\(directory\) + 11\);)97 524.4 Q -(sprintf\(eav[eac++], ".:%s/elk/scm", directory\);)97 538.4 Q(eav[eac] = 0;)97 -552.4 Q(Elk_Init\(eac, eav, 0, 0\);)97 566.4 Q F4(initialize application')97 -588.8 Q 2.5(sm)-.4 G(odules...)196.61 588.8 Q F3(boot_code\(\);)97 611.2 Q F4 -(application')97 633.6 Q 2.5(sm)-.4 G(ain loop \(if written in C\))159.1 633.6 -Q F3(...)97 647.6 Q/F5 10/Times-Bold@0 SF(Figur)152.97 665.4 Q 2.5(e1)-.18 G(:) -188.62 665.4 Q/F6 10/Times-Roman@0 SF(Example)5 E F4(main\(\))2.5 E F6 -(of an Elk-based application \(simpli\214ed\))2.5 E F0(_______________________\ -_______________________________________________________)75 684 Q 2.011 -(The code sho)97 717.6 R 2.011(wn in the e)-.275 F 2.011 -(xample must construct a ne)-.165 F 4.762(wa)-.275 G -.198(rg)359.575 717.6 S -2.012(ument v).198 F 2.012(ector to be passed to)-.165 F F1(Elk_Init\(\))72 -732.6 Q F0 3.079(,b)C .328 -(ecause the application has command line options of its o)126.097 732.6 R .328 -(wn \(just)-.275 F F13.078 E F0 .328(in the e)3.078 F(xample\).)-.165 E -EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(1-)288 51 S -1.1 -.88(Tw o)72 -87 T .223(Elk-options \()3.853 F/F1 11/Times-Italic@0 SFA F0(and)2.973 E -F12.973 E F0 2.973(\)a)C .223(re handed to)211.319 87 R F1(Elk_Init\(\)) -2.973 E F0 .224(if present, so that a mixture of Elk-speci\214c)2.973 F .384 -(and application-speci\214c options can be gi)72 102 R -.165(ve)-.275 G 3.134 -(n\().165 G .384(see the manual page for the Scheme interpreter for)278.552 102 -R .873(the meaning of Elk')72 117 R 3.623(so)-.605 G 3.623(ptions\). \()175.097 -117 R F1(safe_malloc\(\))A F0 .874(is assumed to be a wrapper around)3.623 F F1 -(malloc\(\))3.624 E F0(with)3.624 E .497(proper error)72 132 R(-checking.\)) --.22 E F1(Set_App_Name\(\))5.997 E F0 .497(is pro)3.247 F .496 -(vided by Elk and is called with a name to be dis-)-.165 F -(played in front of f)72 147 Q(atal error messages by the interpreter)-.11 E(.) --.605 E .604(When all the options ha)97 165.6 R .934 -.165(ve b)-.22 H .604 -(een parsed, an additional option).165 F F13.354 E F0 .605 -(is synthesized to pro)3.354 F .605(vide a)-.165 F .262(minimal initial)72 -180.6 R F1(load-path)3.012 E F0 .262(for Elk.)3.012 F .261 -(This load-path consists of the current directory and a subdirec-)5.762 F .541 -(tory of the directory under which the application e)72 195.6 R .542 -(xpects its \214les that are needed during runtime.)-.165 F .746(An en)72 210.6 -R .746(vironment v)-.44 F .746(ariable can be used to set this directory)-.275 -F 6.246(.D)-.715 G .746(e\214ning a load-path lik)345.649 210.6 R 3.495(et)-.11 -G .745(his has the)456.068 210.6 R .273 -(bene\214t that a minimal, self-contained Elk runtime en)72 225.6 R .273 -(vironment \(e.)-.44 F .274(g. a tople)1.833 F -.165(ve)-.275 G 3.024(la).165 G -.274(nd the deb)429.136 225.6 R(ugger\))-.22 E .764 -(can be shipped with binary distrib)72 240.6 R .763 -(utions of the application so that users are not required to ha)-.22 F -.165 -(ve)-.22 G(Elk installed at their sites.)72 255.6 Q 1.742 -(When Elk has been initialized by calling)97 274.2 R F1(Elk_Init\(\))4.492 E F0 -4.492(,t)C 1.743(he application may initialize all its)343.432 274.2 R .217 -(other modules and \214nally load an initial Scheme \214le that `)72 289.2 R -(`boots')-.814 E 2.966('t)-.814 G .216(he Scheme part of the applica-)368.819 -289.2 R .114(tion \(which may in)72 304.2 R -.22(vo)-.44 G(lv).22 E 2.864(el) --.165 G .114(oading further Scheme \214les\).)185.294 304.2 R .114 -(This initial Scheme \214le may be quite sim-)5.614 F .591 -(ple and just de\214ne a fe)72 319.2 R 3.341(wf)-.275 G .59 -(unctions used later)188.912 319.2 R 3.34(,o)-.44 G 3.34(ri)283.731 319.2 S -3.34(tm)293.792 319.2 S .59(ain contain the application')308.748 319.2 R 3.34 -(se)-.605 G .59(ntire `)442.481 319.2 R(`dri)-.814 E(ving)-.275 E(logic')72 -334.2 Q 3.649('o)-.814 G 3.649(ri)109.661 334.2 S(nteracti)120.031 334.2 Q -1.229 -.165(ve u)-.275 H(ser).165 E(-interf)-.22 E 3.649(ace. This)-.11 F .899 -(is accomplished by a function)3.649 F F1(boot_code\(\))3.649 E F0 .899 -(which may)3.649 F(as simple as this:)72 348.2 Q/F2 10/Courier@0 SF -(void boot_code\(void\) {)100.346 370.703 Q -(char *fn = safe_malloc\(strlen\(directory\) + 30\);)127.846 384.703 Q -(sprintf\(fn, "%s/scm/app.scm", directory\);)127.846 407.103 Q -(Set_Error_Tag\("initial load"\);)127.846 421.103 Q(Load_File\(fn\);)127.846 -435.103 Q(free\(fn\);)127.846 449.103 Q(})100.346 463.103 Q F1(Load_F)97 -489.203 Q(ile\(\))-.495 E F0 .175(is de\214ned by Elk and loads a Scheme \214l\ -e whose name is supplied as a C string.)2.925 F F1(Set_Err)72 504.203 Q(or_T) --.495 E -.11(ag)-1.012 G(\(\)).11 E F0 .78(may be used by e)3.53 F .78 -(xtensions and applications to de\214ne the symbol that is passed)-.165 F .97 -(as the \214rst ar)72 519.203 R .97(gument to the standard error handler when \ -a Scheme error is signaled \(see section)-.198 F(12.5\).)72 534.203 Q/F3 11 -/Times-Bold@0 SF 2.75(6.3. Who)72 564.203 R(is in Contr)2.75 E(ol?)-.198 E F0 -.742(When an application')97 582.803 R 3.493(so)-.605 G .743 -(bject \214les are loaded into the interpreter dynamically or are link)205.851 -582.803 R(ed)-.11 E 1.024(with the interpreter using)72 597.803 R F1(linksc) -3.774 E(heme)-.165 E F0 3.774(,c)C 1.024 -(ontrol initially rests in the interpreter)249.864 597.803 R 6.523(.I)-.605 G -3.773(nc)429.552 597.803 S 1.023(ontrast, when)443.709 597.803 R .155 -(the application is link)72 612.803 R .155(ed using)-.11 F F1(module)2.905 E -(.o)-.165 E F0(and)2.905 E F1(Elk_Init\(\))2.905 E F0 .155(as sho)2.905 F .155 -(wn in the pre)-.275 F .156(vious section, it de\214nes)-.275 F(its o)72 -627.803 Q(wn)-.275 E F1(main\(\))2.75 E F0 -(function, and hence the application is `)2.75 E(`in control')-.814 E 2.75('o) --.814 G 2.75(ns)369.495 627.803 S(tartup.)382.024 627.803 Q .378 -(From a technical point of vie)97 646.403 R 1.808 -.715(w, i)-.275 H 3.128(td) -.715 G .377(oes not really mak)253.866 646.403 R 3.127(ead)-.11 G(if)357.369 -646.403 Q .377(ference whether control rests in)-.275 F .31 -(the interpreter or in the application initially)72 661.403 R 5.81(.I)-.715 G -3.061(nt)275.404 661.403 S .311(he \214rst case, the main `)287.023 661.403 R -(`dri)-.814 E .311(ving logic')-.275 F 3.061('\()-.814 G .311(or `)463.264 -661.403 R(`main)-.814 E(loop')72 676.403 Q .919 -('\) of the application can simply be wrapped in a Scheme primiti)-.814 F 1.249 --.165(ve w)-.275 H .919(hich is then called by).165 F .933(the Scheme tople)72 -691.403 R -.165(ve)-.275 G 3.683(lo).165 G 3.683(ns)171.819 691.403 S .934 -(tartup to pass control back to the application, if this is desired.)185.281 -691.403 R .934(In an)6.434 F(y)-.165 E .998(case, control usually changes freq\ -uently between the Scheme interpreter and the actual applica-)72 706.403 R -1.021(tion an)72 721.403 R(yw)-.165 E 1.021(ay\212the Scheme interpreter in) --.11 F -.22(vo)-.44 G -.11(ke).22 G 3.772(sc).11 G 1.022 -(allback functions or Scheme primiti)285.325 721.403 R -.165(ve)-.275 G 3.772 -(sp).165 G(ro)470.56 721.403 Q(vided)-.165 E EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(2-)288 51 S .259 -(by the application, which may in turn in)72 87 R -.22(vo)-.44 G .478 -.11 -(ke S).22 H .258(cheme procedures or load Scheme \214les, and so on.).11 F -1.251(The Tcl-lik)97 105.6 R 4.002(es)-.11 G 1.252 -(tyle of use, where control rests in the C-part of the application most of the) -161.103 105.6 R .4(time, and where this C code `)72 120.6 R .399(`calls out') --.814 F 3.149('t)-.814 G 3.149(ot)256.564 120.6 S .399 -(he interpreter occasionally by passing it an e)268.271 120.6 R(xtension)-.165 -E .286(language e)72 135.6 R .286 -(xpression or a small script, is not typical for Elk.)-.165 F .287 -(It is supported, though; Elk pro)5.787 F(vides)-.165 E 3.929(as)72 150.6 S -1.179(imple e)85.092 150.6 R 1.179(xtension to pass a Scheme e)-.165 F 1.179 -(xpression to the interpreter as a C string and recei)-.165 F 1.508 -.165(ve t) --.275 H(he).165 E 1.168(result in the same form, similar to what)72 165.6 R/F1 -11/Times-Italic@0 SF(Tcl_Eval\(\))3.918 E F0 1.169 -(does in Tcl \(see section 12.2\).)3.918 F 1.169(In a typical)6.669 F 1.491 -(Elk-based application the e)72 180.6 R 1.49(xtension language serv)-.165 F -1.49(es as the `)-.165 F(`backbone')-.814 E 4.24('o)-.814 G 4.24(ft)408.791 -180.6 S 1.49(he application: the)419.752 180.6 R(application')72 195.6 Q 3.051 -(sd)-.605 G(ri)136.772 195.6 Q .302(ving logic or main loop is written entirel\ -y in Scheme, and this Scheme code calls)-.275 F .802(out to the application')72 -210.6 R 3.552(sCl)-.605 G(ayer)192.435 210.6 Q 3.552(,u)-.44 G .802 -(sing the data types, primiti)222.728 210.6 R -.165(ve)-.275 G .802 -(s, and other callbacks e).165 F .802(xported to)-.165 F .092(the e)72 225.6 R -.093(xtension language by the application.)-.165 F -.44(Wi)5.593 G .093 -(th the help of the X11 e).44 F .093(xtensions, the entire \(graph-)-.165 F -.697(ical\) user interf)72 240.6 R .697(ace of an application can be written i\ -n Scheme easily; control can then passed to)-.11 F .171(the application')72 -255.6 R 2.921(sC)-.605 G .172(/C++ layer whene)154.842 255.6 R -.165(ve)-.275 G -2.922(ra).165 G 2.922(nX)255.601 255.6 S 2.922(tc)271.965 255.6 S .172 -(allback is triggered.)282.829 255.6 R .172(In this case, the application') -5.672 F(s)-.605 E -.814(``)72 270.6 S 1.094(main loop').814 F 3.844('c)-.814 G -1.094(onsists of a call to the Scheme primiti)139.154 270.6 R 1.424 -.165(ve c) --.275 H 1.094(orresponding to the X toolkit function).165 F F1 -(XtAppMainLoop\(\))72 285.6 Q F0(\(the main e)2.75 E -.165(ve)-.275 G -(nt dispatch loop\).).165 E/F2 11/Times-Bold@0 SF 2.75(7. Notes)72 315.6 R --.275(fo)2.75 G 2.75(rW).275 G(riting C/C++ Code Using Elk)142.29 315.6 Q F0 -.704(This chapter describes general con)97 334.2 R -.165(ve)-.44 G .704 -(ntions and usage notes for Elk-based C/C++ code and).165 F(introduces a fe)72 -349.2 Q 2.75(wu)-.275 G(seful f)152.674 349.2 Q -(acilities that are not directly related to Scheme.)-.11 E F2 2.75(7.1. Elk)72 -379.2 R(Include Files)2.75 E F0(Ev)97 397.8 Q .855 -(ery C or C++ \214le using functions, macros, or v)-.165 F .854 -(ariables de\214ned by Elk must include the)-.275 F(\214le)72 411.8 Q F1(sc) -2.75 E(heme)-.165 E(.h)-.165 E F0(:)A/F3 10/Courier@0 SF(#include ) -100.346 434.303 Q/F4 10/Times-Roman@0 SF(or:)250.346 434.303 Q F3 -(#include "scheme.h")297.456 434.303 Q F0 2.231 -(This include \214le resides in a subdirectory)97 460.403 R F1(include)4.981 E -F0 2.232(of the directory where Elk has been)4.981 F 1.372 -(installed on your system.)72 475.403 R -1.21(Yo)6.872 G 4.122(um)1.21 G 1.372 -(ust insert a suitable \255I option into your Mak)223.401 475.403 R 1.372 -(e\214les to add this)-.11 F .15(directory to the C compiler')72 490.403 R 2.9 -(ss)-.605 G .15(earch path.)206.268 490.403 R -.814(``)5.65 G(scheme.h').814 E -2.9('i)-.814 G .15(ncludes se)320.546 490.403 R -.165(ve)-.275 G .15 -(ral other Elk-speci\214c include).165 F 3.063(\214les from the same directory\ - and, in addition, the standard C include \214les)72 505.403 R F1() -5.812 E F0(and)5.812 E F1()72 520.403 Q F0(.)A F2 2.75(7.2. Standard) -72 550.403 R 2.75(Ca)2.75 G(nd Function Pr)156.953 550.403 Q(ototypes)-.198 E -F0 .866(All the e)97 569.003 R .866(xamples sho)-.165 F .866 -(wn in this manual are written in ANSI/ISO C.)-.275 F .866 -(This assumes that the)6.366 F .9(Elk include \214les ha)72 584.003 R 1.229 --.165(ve b)-.22 H .899(een installed with function prototypes enabled.).165 F -.899(Whether or not function)6.399 F .809(prototypes are enabled is controlled\ - by a de\214nition in the platform- and compiler)72 599.003 R .81 -(-speci\214c `)-.22 F(`con-)-.814 E(\214g/system')72 614.003 Q 4.381<278c>-.814 -G 1.631(le that has been selected for con\214guring Elk.)134.241 614.003 R(Ho) -7.131 E(we)-.275 E -.165(ve)-.275 G 2.511 -.44(r, i).165 H 4.381(ft).44 G 1.631 -(he include \214les ha)409.37 614.003 R -.165(ve)-.22 G .485(function prototyp\ -es disabled, prototypes are enable automatically if you are compiling your cod\ -e)72 629.003 R 1.196(with a C compiler that de\214nes the symbol `)72 644.003 R --1.834(`_ _STDC_ _')-.814 F 3.945('a)-.814 G 3.945(sn)341.752 644.003 S 1.195 -(on-zero, or with a C++ compiler)355.476 644.003 R(that de\214nes `)72 659.003 -Q -1.834(`_ _cplusplus')-.814 F(')-.814 E/F5 9/Times-Roman@0 SF(1)-3.6 I F0(.) -3.6 I .36 LW 76.5 681.2 72 681.2 DL 81 681.2 76.5 681.2 DL 85.5 681.2 81 681.2 -DL 90 681.2 85.5 681.2 DL 94.5 681.2 90 681.2 DL 99 681.2 94.5 681.2 DL 103.5 -681.2 99 681.2 DL 108 681.2 103.5 681.2 DL 112.5 681.2 108 681.2 DL 117 681.2 -112.5 681.2 DL 121.5 681.2 117 681.2 DL 126 681.2 121.5 681.2 DL 130.5 681.2 -126 681.2 DL 135 681.2 130.5 681.2 DL 139.5 681.2 135 681.2 DL 144 681.2 139.5 -681.2 DL/F6 7/Times-Roman@0 SF(1)82 691.2 Q F5 .654 -(Although the public include \214les pro)4.5 2.8 N .654 -(vided by Elk can be used by C++ code, Elk itself cannot be com-)-.135 F -(piled with a C++ compiler)72 705 Q 4.5(.T)-.495 G -(he interpreter has been written in C to maximize portability)178.902 705 Q(.) --.585 E EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(3-)288 51 S 2.125 -(Elk include \214les that ha)97 87 R 2.455 -.165(ve b)-.22 H 2.125 -(een installed with function prototypes disabled can also be).165 F -.814(``)72 -102 S(upgraded').814 E 5.017('b)-.814 G 5.017(yd)136.472 102 S 2.267 -(e\214ning the symbol `)152.489 102 R(`W)-.814 E(ANT_PR)-1.32 E -2.068 -.44 -(OT OT)-.44 H(YPES').44 E 5.017('b)-.814 G 2.267(efore including `)372.801 102 -R(`scheme.h')-.814 E('.)-.814 E(Similarly)72 117 Q 4.683(,i)-.715 G 1.932(nclu\ -de \214les installed without function prototypes can be used with a non-ANSI C) -122.729 117 R(compiler by de\214ning the symbol `)72 132 Q(`NO_PR)-.814 E --2.068 -.44(OT OT)-.44 H(YPES').44 E 2.75('b)-.814 G(efore including `)328.564 -132 Q(`scheme.h')-.814 E('.)-.814 E/F1 11/Times-Bold@0 SF 2.75(7.3. Exter)72 -162 R(nal Symbols De\214ned by Elk)-.165 E F0 .583(As e)97 180.6 R .584 -(xtensions or applications are link)-.165 F .584(ed with Elk \(re)-.11 F -.055 -(ga)-.165 G .584(rless of whether dynamic loading or).055 F 1.461 -(static linking is used\), the)72 195.6 R 4.211(yc)-.165 G 1.461 -(an in general reference all e)205.024 195.6 R 1.46(xternal symbols e)-.165 F -1.46(xported by Elk.)-.165 F(Of)6.96 E .328 -(these, only the symbols described in this manual may be used safely)72 210.6 R -5.828(.U)-.715 G .328(se of other \(pri)391.434 210.6 R -.275(va)-.275 G .328 -(te\) sym-).275 F 1.945(bols results in non-portable code, as the symbols may \ -change their meaning or may e)72 225.6 R -.165(ve)-.275 G 4.694(nb).165 G(e) -499.116 225.6 Q(remo)72 240.6 Q -.165(ve)-.165 G 5.22(df).165 G 2.47 -(rom future releases of Elk.)119.042 240.6 R 2.47 -(The same restriction applies to the macros and types)7.97 F -(de\214ned by the include \214les of Elk.)72 255.6 Q .133 -(In addition to the symbols de\214ned by the Scheme interpreter k)97 274.2 R -.133(ernel, those e)-.11 F .132(xported by other)-.165 F 1.061(Scheme e)72 -289.2 R 1.061(xtensions that are present in the same e)-.165 F -.165(xe)-.165 G -1.062(cutable \(or ha).165 F 1.392 -.165(ve b)-.22 H 1.062 -(een loaded earlier\) can be).165 F .261(referenced from within C/C++ code.)72 -304.2 R .261(These e)5.761 F .26 -(xtensions are not subject of this manual; you should)-.165 F -(refer to the rele)72 319.2 Q -.275(va)-.275 G -(nt documentation and the public include \214les that are part of the e).275 E -(xtensions.)-.165 E .809(If Elk is link)97 337.8 R .809 -(ed with an application that has its o)-.11 F(wn)-.275 E/F2 11/Times-Italic@0 -SF(main\(\))3.559 E F0 .81(function, none of the functions)3.559 F -.165(ex)72 -352.8 S(ported by Elk must be used before the initial call to).165 E F2 -(Elk_Init\(\))2.75 E F0(\(e)2.75 E(xcept)-.165 E F2(Set_App_Name\(\))2.75 E F0 -(\).)A F1 2.75(7.4. Calling)72 382.8 R(Scheme Primiti)2.75 E -.11(ve)-.11 G(s) -.11 E F0 4.266(Al)97 401.4 S(ar)112.266 401.4 Q 1.515 -(ge subset of the symbols e)-.198 F 1.515 -(xported by the Scheme interpreter is the set of functions)-.165 F .736 -(implementing the Scheme primiti)72 416.4 R -.165(ve)-.275 G 3.487(s. These) -.165 F .737(may be used safely by e)3.487 F .737(xtensions and applications.) --.165 F 1.529(There e)72 431.4 R 1.528 -(xists one C function for each Scheme primiti)-.165 F -.165(ve)-.275 G 7.028 -(.I).165 G 1.528(ts name is that of the corresponding)337.796 431.4 R(primiti) -72 446.4 Q .33 -.165(ve w)-.275 H(ith the follo).165 E(wing con)-.275 E -.165 -(ve)-.44 G(rsions applied:).165 E 21.15<8364>97 465 S .066 -(ashes are replaced by underscores, and the initial letters of the resulting w) -127.5 465 R .067(ord compo-)-.11 F(nents are capitalized;)122 480 Q 21.15<8374> -97 498.6 S(he pre\214x `)125.058 498.6 Q(`P_')-.814 E 2.75('i)-.814 G 2.75(sp) -197.053 498.6 S(repended;)209.582 498.6 Q 21.15<8360>97 517.2 S(`)124.849 517.2 -Q/F3 11/Symbol SF(-)A F0(>')A 2.75('i)-.814 G 2.75(sr)153.075 517.2 S -(eplaced by `)163.767 517.2 Q(`_T)-.814 E(o_')-.88 E 2.75('\()-.814 G(as in) -255.639 517.2 Q F2(vector)2.75 E F3(-)A F2(>list)A F0(\);)A 21.15<8361>97 535.8 -S .285(trailing e)129.919 535.8 R .285(xclamation mark is deleted, e)-.165 F -.284(xcept for)-.165 F F2(append!)3.034 E F0(and)3.034 E F2 -2.101 -.407(re v) -3.034 H(er).407 E(se!)-.11 E F0 3.034(,w)C .284(here `)449.453 535.8 R(`_Set') --.814 E(')-.814 E(is appended;)122 550.8 Q 21.15<8361>97 569.4 S .448 -(trailing question mark is replaced by the letter `p' \(e)130.082 569.4 R .448 -(xcept for)-.165 F F2 .449(eq?, eqv?, equal?)3.199 F F0(and)3.199 E -(the string and character comparison primiti)122 584.4 Q -.165(ve)-.275 G -(s, where it is deleted\);).165 E(The names of a fe)72 603 Q 2.75(wf)-.275 G -(unctions are deri)164.884 603 Q -.165(ve)-.275 G 2.75(dd).165 G(if)261.893 603 -Q(ferently as sho)-.275 E(wn by this table:)-.275 E EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(4-)288 51 S .44 LW 312.545 -76.75 97 76.75 DL(Scheme Primiti)102.5 89 Q 44.456 -.165(ve C)-.275 H(Function) -2.915 E 312.545 93.75 97 93.75 DL 52.443(P)138.442 121 S(_Generic_Greater\(\))203.205 121 Q 52.443 -(=P)138.442 136 S(_Generic_Equal\(\))203.205 136 Q 46.591 -(<= P_Generic_Eq_Less\(\))135.34 151 R 46.591(>= P_Generic_Eq_Greater\(\)) -135.34 166 R 46.943(1+ P_Inc\(\))135.692 181 R(1)116.211 196 Q/F1 11/Symbol SF -(-)A F0(and)2.75 E F1(-)2.75 E F0 27.462(1+ P_Dec\(\))B 52.443(+P)138.442 211 S -(_Generic_Plus\(\))203.205 211 Q F1(-)138.525 226 Q F0(P_Generic_Minus\(\)) -197.089 226 Q 52.795(*P)138.794 241 S(_Generic_Multiply\(\))203.205 241 Q -54.016(/P)140.015 256 S(_Generic_Di)203.205 256 Q(vide\(\))-.275 E 44.545 -(let* P_Letseq\(\))133.294 271 R 312.545 275.75 97 275.75 DL 312.545 76.75 -312.545 275.75 DL 97 76.75 97 275.75 DL 2.798 -(According to these rules, the primiti)97 295.6 R -.165(ve)-.275 G/F2 11 -/Times-Italic@0 SF -.22(ex)5.712 G(act).22 E F1(-)A F2(>ine)A(xact)-.22 E F0 -2.797(can be used from within C as)5.547 F F2(P_Exact_T)72 310.6 Q(o_Ine)-1.012 -E(xact\(\))-.22 E F0 6.336(,t)C 3.586(he predicate)182.495 310.6 R F2(inte) -6.337 E -.11(ge)-.44 G(r?).11 E F0 3.587(is a)6.337 F -.275(va)-.22 G 3.587 -(ilable as).275 F F2(P_Inte)6.337 E -.11(ge)-.44 G(rp\(\)).11 E F0 6.337(,e)C -6.337(tc. Authors)433.279 310.6 R(of)6.337 E 1.362(reusable Scheme e)72 325.6 R -1.362(xtensions are encouraged to follo)-.165 F 4.112(wt)-.275 G 1.362 -(hese \(or similar\) naming con)322.731 325.6 R -.165(ve)-.44 G 1.361 -(ntions in).165 F(their code.)72 340.6 Q 2.103 -(All the functions implementing Scheme primiti)97 359.2 R -.165(ve)-.275 G -4.853(s\().165 G 2.103(as well as special forms, which are)338.339 359.2 R -1.957(treated as primiti)72 374.2 R -.165(ve)-.275 G 4.707(si).165 G 4.707(nE) -172.449 374.2 S 1.957(lk\) recei)189.377 374.2 R 2.287 -.165(ve S)-.275 H 1.957 -(cheme objects or arrays thereof as their ar).165 F 1.957(guments and)-.198 F -.448(return Scheme objects as their v)72 389.2 R 3.199(alues. The)-.275 F .449 -(underlying C type will be described in the ne)3.199 F .449(xt chap-)-.165 F -(ter)72 404.2 Q 6.432(.F)-.605 G .932 -(or the semantics of the non-standard Scheme primiti)98.133 404.2 R -.165(ve) --.275 G 3.682(sd).165 G .932(e\214ned by Elk refer to the Refer)358.116 404.2 R -(-)-.22 E(ence Manual for the interpreter)72 419.2 Q(.)-.605 E/F3 11 -/Times-Bold@0 SF 2.75(7.5. P)72 449.2 R(ortable alloca\(\))-.22 E F0 .309 -(Elk pro)97 467.8 R .31(vides a portable v)-.165 F .31(ariant of)-.275 F F2 -(alloca\(\))3.06 E F0 .31(as a set of macros that can be used by e)3.06 F -(xtensions)-.165 E .681(and applications.)72 482.8 R F2(alloca\(\))6.18 E F0 -3.43(,w)C .68(hich is supported by most modern UNIX systems and C compilers,) -202.356 482.8 R 1.952(allocates memory in the caller')72 497.8 R 4.703(ss)-.605 -G 1.953(tack frame; the memory is automatically released when the)228.71 497.8 -R 1.575(function returns.)72 512.8 R 1.575 -(Elk simulates this functionality on the \(rare\) platforms where)7.075 F F2 -(alloca\(\))4.324 E F0 1.574(is not)4.324 F -.22(av)72 527.8 S(ailable.)-.055 E -2.804 -.88(To a)97 546.4 T 1.044(llocate memory).88 F 3.794(,t)-.715 G 1.044 -(he macro)195.689 546.4 R F2(Alloca\(\))3.794 E F0 1.044(is called with a v) -3.794 F 1.045(ariable to which the ne)-.275 F 1.045(wly allo-)-.275 F .879 -(cated memory is assigned, the type of that v)72 561.4 R .878 -(ariable, and the number of bytes that are requested.)-.275 F .102(The macro)72 -576.4 R F2(Alloca_End)2.852 E F0 .103(must be called \(without an ar)2.852 F -.103(gument list\) before returning from a function)-.198 F 1.853 -(or block that uses)72 591.4 R F2(Alloca\(\))4.602 E F0 4.602(;t)C 1.852 -(his macro is empty on those platforms that support the ordinary)206.223 591.4 -R F2(alloca\(\))72 606.4 Q F0 6.062(.F)C(inally)121.754 606.4 Q 3.312(,ac)-.715 -G .562(all to the macro)165.239 606.4 R F2(Alloca_Be)3.312 E(gin)-.44 E F0 .563 -(must be placed in the function')3.312 F 3.313(sd)-.605 G(eclarations.)453.598 -606.4 Q F2(Alloca\(\))72 621.4 Q F0 1.637(usually is more ef)4.387 F 1.637 -(\214cient than)-.275 F F2(malloc\(\))4.387 E F0(and)4.387 E F2(fr)4.387 E -(ee\(\))-.407 E F0 4.387(,a)C 1.636(nd the memory need not be freed)348.775 -621.4 R(when the function is left prematurely because of an interrupt or by ca\ -lling a continuation.)72 636.4 Q .206(As an e)72 655 R .206 -(xample, here is the sk)-.165 F .207 -(eleton of a function that is called with a \214lename pre\214x and a suf)-.11 -F(\214x,)-.275 E -(concatenates them \(separated by a period\), and opens the resulting \214le:) -72 669 Q EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(5-)288 51 S/F1 10/Courier@0 -SF(int some_function\(char *prefix, char *suffix\) {)100.346 86 Q(char *name;) -124.346 100 Q(int len, fd;)124.346 114 Q(Alloca_Begin;)124.346 128 Q -(len = strlen\(prefix\) + 1 + strlen\(suffix\) + 1;)124.346 150.4 Q -(Alloca\(name, char*, len\);)124.346 164.4 Q -(sprintf\(name, "%s.%s", prefix, suffix\);)124.346 178.4 Q -(fd = open\(name, ...\);)124.346 192.4 Q(...)124.346 206.4 Q(Alloca_End;) -124.346 220.4 Q(})100.346 234.4 Q/F2 11/Times-Bold@0 SF 2.75(7.6. Other)72 -271.9 R(Useful Macr)2.75 E(os and Functions)-.198 E F0 .159 -(The preprocessor symbols ELK_MAJOR and ELK_MINOR e)97 290.5 R .159 -(xpand to the major and minor)-.165 F -.165(ve)72 305.5 S -(rsion number of the current release of Elk.).165 E(The)5.5 E 2.75(yd)-.165 G -(id not e)304.749 305.5 Q(xist in v)-.165 E(ersions older than Elk 3.0.)-.165 E -/F3 11/Times-Italic@0 SF(inde)97 324.1 Q(x\(\))-.22 E F0(,)A F3(bcopy\(\))3.396 -E F0(,)A F3(bcmp\(\))3.396 E F0 3.396(,a)C(nd)216 324.1 Q F3(bzer)3.396 E -(o\(\))-.495 E F0 .647(are de\214ned as suitable macros on systems that do not) -3.396 F(ha)72 339.1 Q .367 -.165(ve t)-.22 H .037(hem in their C library; the) -.165 F 2.787(ym)-.165 G .037(ay be used by source \214les that include `) -229.669 339.1 R(`scheme.h')-.814 E .036(', re)-.814 F -.055(ga)-.165 G(rdless) -.055 E(of the actual platform.)72 354.1 Q(Code link)72 371.7 Q -(ed with Elk may use the tw)-.11 E 2.75(of)-.11 G(unctions)246.548 371.7 Q F1 -(char *Safe_Malloc\(unsigned size\);)100.346 394.203 Q -(char *Safe_Realloc\(char *old_pointer, unsigned size\);)100.346 408.203 Q F0 -.71(as alternati)72 430.703 R -.165(ve)-.275 G 3.46(st).165 G(o)141.411 430.703 -Q F3(malloc\(\))3.46 E F0(and)3.46 E F3 -.407(re)3.46 G(alloc\(\)).407 E F0 -6.21(.I)C 3.46(ft)261.148 430.703 S .711 -(he request for memory cannot be satis\214ed, the stan-)271.329 430.703 R -(dard Elk error handler is called with a suitable error message.)72 445.703 Q -F2 2.75(8. The)72 475.703 R(Anatomy of Scheme Objects)2.75 E F0 .416 -(All Scheme objects, re)97 494.303 R -.055(ga)-.165 G .416 -(rless of their Scheme type, are represented as instances of the type).055 F F3 -(Object)72 509.303 Q F0 .302(in C.)3.052 F F3(Object)5.802 E F0 .302 -(is implemented as a small C)3.052 F F3(struct)3.052 E F0 .302(in ne)3.052 F -.303(wer Elk releases and w)-.275 F .303(as an inte)-.11 F(gral)-.165 E 1.873 -(type earlier)72 524.303 R 7.373(.H)-.605 G -.275(ow)141.119 524.303 S -2.365 --.275(ev e).275 H 2.753 -.44(r, c).275 H 1.873 -(ode using Elk should not assume a speci\214c representation, as it may).44 F -(change ag)72 539.303 Q(ain in future re)-.055 E 2.75(visions. An)-.275 F F3 -(Object)2.75 E F0(consists of three components:)2.75 E 21.15<8374>97 557.903 S -1.272(he type of the corresponding Scheme object as a small inte)125.058 -557.903 R 1.273(ger \(the `)-.165 F 1.273(`type \214eld')-.814 F 4.023('o)-.814 -G(r)500.337 557.903 Q -.814(``)122 572.903 S(tag \214eld').814 E('\),)-.814 E -21.15<8374>97 591.503 S 1.311(he contents of the object, either directly \(for\ - small objects\) or as a pointer into the)125.058 591.503 R -(Scheme heap \(the `)122 606.503 Q(`pointer \214eld')-.814 E('\),)-.814 E 21.15 -<8361>97 625.103 S -.814(``)130.259 625.103 S .625(const bit').814 F 3.375('w) --.814 G .626 -(hich, if set, indicates that the object is read-only and cannot be modi-) -192.812 625.103 R(\214ed by destructi)122 640.103 Q .33 -.165(ve S)-.275 H -(cheme primiti).165 E -.165(ve)-.275 G(s.).165 E .928(Elk de\214nes a fe)97 -658.703 R 3.678(wm)-.275 G .928(acros to retrie)187.81 658.703 R 1.258 -.165 -(ve a)-.275 H .927(nd modify the \214elds of an).165 F F3(Object)3.677 E F0 -.927(independent of its)3.677 F(representation:)72 672.703 Q F1 54 -(TYPE\(obj\) ISCONST\(obj\))100.346 695.206 R(SET\(obj,t,ptr\))328.346 695.206 -Q 36(POINTER\(obj\) SETCONST\(obj\))100.346 709.206 R EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(6-)288 51 S/F1 11 -/Times-Italic@0 SF(TYPE\(\))97 87 Q F0 .615 -(returns the contents of the type \214eld of an)3.365 F F1(Object)3.365 E F0(;) -A F1(POINTER\(\))3.365 E F0 .616(returns the contents)3.366 F .436 -(of the pointer \214eld as an)72 102 R F1 .436(unsigned long)3.186 F F0(\(dif) -3.186 E .436(ferent macros are pro)-.275 F .435(vided for types which ha)-.165 -F .765 -.165(ve t)-.22 H(heir).165 E -.275(va)72 117 S .837 -(lues stored directly in the).275 F F1(Object)3.588 E F0 .838 -(rather than in the heap\);)3.588 F F1(ISCONST\(\))3.588 E F0 .838 -(returns the v)3.588 F .838(alue of the)-.275 F 1.545(const bit; and)72 132 R -F1(SETCONST\(\))4.294 E F0 1.544 -(sets the const bit to 1 \(it cannot be cleared once it has been set\).)4.294 F -F1(ISCONST\(\))72 147 Q F0(and)3.343 E F1(SETCONST\(\))3.343 E F0 .593 -(may only be applied to)3.343 F F1(Objects)3.343 E F0 .593(that ha)3.343 F .923 --.165(ve t)-.22 H .593(heir v).165 F .593(alue stored on the)-.275 F 1.222 -(heap \(such as v)72 162 R 1.222 -(ectors, strings, etc.\); all other types of Scheme objects are)-.165 F F1 -1.221(ipso facto)3.971 F F0(read-only)3.971 E(.)-.715 E(Another macro,)72 177 Q -F1(SET\(\))2.75 E F0 2.75(,c)C -(an be used to set both the type and pointer \214eld of a ne)179.833 177 Q 2.75 -(wo)-.275 G(bject.)436.188 177 Q -1.1 -.88(Tw o)97 195.6 T .602 -(objects can be compared by means of the macro)4.232 F F1(EQ\(\))3.352 E F0 -3.353(,w)C .603(hich is also used as the basis)375.114 195.6 R -(for the Scheme predicate)72 209.6 Q F1(eq?)2.75 E F0(:)A/F2 10/Courier@0 SF -(EQ\(obj1,obj2\))100.346 232.103 Q F1(EQ\(\))72 254.603 Q F0 -.165(ex)3.733 G -.983(pands to a non-zero v).165 F .982 -(alue if the type \214elds and the pointer \214elds of the tw)-.275 F 3.732(oo) --.11 G .982(bjects are)461.174 254.603 R 1.035(identical, else zero \(re)72 -269.603 R -.055(ga)-.165 G 1.035 -(rdless of whether the pointer \214eld really holds a pointer or the object') -.055 F(s)-.605 E .609(actual v)72 284.603 R 3.359(alue\). As)-.275 F F1(EQ\(\)) -3.359 E F0 .609(may e)3.359 F -.275(va)-.275 G .609(luate its ar).275 F .608 -(guments twice, it should not be in)-.198 F -.22(vo)-.44 G -.11(ke).22 G 3.358 -(dw).11 G .608(ith function)452.363 284.603 R(calls or comple)72 299.603 Q 2.75 -(xe)-.165 G(xpressions.)152.014 299.603 Q/F3 11/Times-Bold@0 SF 2.75(8.1. T)72 -329.603 R(ype-speci\214c Macr)-.814 E(os)-.198 E F0 -.165(Fo)97 348.203 S 4.157 -(re).165 G 1.407(ach prede\214ned Scheme type, there e)121.155 348.203 R 1.407 -(xists a preprocessor symbol that e)-.165 F 1.408(xpands to the)-.165 F(inte)72 -363.203 Q 1.045(ger v)-.165 F 1.044(alue of that type \(the contents of the ty\ -pe \214eld of members of the type\).)-.275 F 1.044(The name of)6.544 F -(each such symbol is the name of the type with the pre\214x `)72 377.203 Q -(`T_')-.814 E(':)-.814 E F2 24(T_Boolean T_Pair T_Vector)100.346 399.706 R/F4 -10/Times-Roman@0 SF(etc...)328.346 399.706 Q F0 .587(These symbols are typical\ -ly used as case labels in switch-statements to discriminate the possible)72 -422.206 R(types of a gi)72 436.206 Q -.165(ve)-.275 G 2.75(no).165 G -(bject, or in if-statements to check whether a Scheme object is of a gi)149.77 -436.206 Q -.165(ve)-.275 G 2.75(nt).165 G(ype:)471.63 436.206 Q F2 -(if \(TYPE\(obj\) == T_Vector\))100.346 458.709 Q(...)127.846 472.709 Q F0 .3 -(In addition, each type de\214nes a macro to e)72 495.209 R .3 -(xtract the contents of an object of that type and to con-)-.165 F -.165(ve)72 -509.209 S(rt it to the correct C type.).165 E -.165(Fo)5.5 G 2.75(re).165 G -(xample, the macro)221.204 509.209 Q F2(CHAR\(obj\))100.346 531.712 Q F0 .34 -(is used to fetch the character v)72 554.212 R .341(alue \(a C)-.275 F F1(int) -3.091 E F0 3.091(\)f)C .341(rom members of the Scheme type)273.077 554.212 R F1 --.165(ch)3.091 G(ar).165 E(acter)-.165 E F0 3.091(,t)C .341(hat is,)477.38 -554.212 R(from objects whose type \214eld contains the v)72 568.212 Q(alue) --.275 E F1(T_Char)2.75 E(acter)-.165 E F0 5.5(.S)C(imilarly)357.846 568.212 Q -2.75(,t)-.715 G(he macro)400.526 568.212 Q F2(VECTOR\(obj\))100.346 590.715 Q -F0 .281(gets the heap pointer con)72 613.215 R -.165(vey)-.44 G .28 -(ed in objects of the Scheme type).165 F F1(vector)3.03 E F0 5.78(.F)C .28 -(or objects such as v)387.875 613.215 R(ectors,)-.165 E .341 -(pairs, and procedures, the heap address is coerced to a pointer to a C)72 -628.215 R F1(struct)3.091 E F0 .341(de\214ning the layout of)3.091 F .035 -(the object.)72 643.215 R .035(There e)5.535 F .035(xists one structure type d\ -eclaration for each such Scheme type; their names are)-.165 F 1 -(that of the type with `)72 658.215 R(`S_')-.814 E 3.751('p)-.814 G 3.751 -(repended. F)202.248 658.215 R 1.001(or e)-.165 F(xample,)-.165 E F1(VECT)3.751 -E(OR\(\))-.198 E F0 1.001(returns a pointer to a structure)3.751 F 1.386 -(with the components)72 673.215 R F1(size)4.136 E F0 1.386 -(\(the number of elements in the v)4.136 F 1.386(ector\) and)-.165 F F1(data) -4.136 E F0 1.385(\(the elements as an)4.136 F(array of)72 687.215 Q F1(Objects) -2.75 E F0 2.75(\). These)B(can be used from within C code lik)2.75 E 2.75(et) --.11 G(his:)348.661 687.215 Q EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(7-)288 51 S/F1 10/Courier@0 -SF(int i, num = VECTOR\(obj\)->size;)100.346 86 Q(for \(i = 0; i < num; i++\)) -100.346 108.4 Q(VECTOR\(obj\)->data[i] = ...;)127.846 122.4 Q F0(Similarly)72 -143.9 Q 2.75(,t)-.715 G(he structure underlying the Scheme type)120.796 143.9 Q -/F2 11/Times-Italic@0 SF(pair)2.75 E F0(is de\214ned as:)2.75 E F1 -(struct S_Pair { Object car, cdr; };)100.346 166.403 Q F0 .463(and the macro)72 -188.903 R F2 -.99(PA)3.214 G(IR\(\)).99 E F0 .464 -(returns a \(heap\) pointer to a member of the structure)3.214 F F2(S_P)3.214 E -(air)-.88 E F0 5.964(.M)C .464(acros such)457.413 188.903 R(as)72 203.903 Q F2 -(VECT)3.45 E(OR\(\))-.198 E F0(and)3.45 E F2 -.99(PA)3.45 G(IR\(\)).99 E F0 .7 -(just con)3.45 F -.165(ve)-.44 G .7 -(rt the contents of the pointer \214eld to a pointer of the correct).165 F -(type:)72 217.903 Q F1(#define VECTOR\(obj\))100.346 240.406 Q -(\(\(struct S_Vector *\)POINTER\(obj\)\))232.346 240.406 Q(#define PAIR\(obj\)) -100.346 254.406 Q(\(\(struct S_Pair)232.346 254.406 Q(*\)POINTER\(obj\)\)) -340.346 254.406 Q F0 1.297(Authors of Scheme e)97 280.506 R 1.297 -(xtensions and Elk-based applications are encouraged to follo)-.165 F 4.047(wt) --.275 G(hese)484.453 280.506 Q(con)72 295.506 Q -.165(ve)-.44 G .285 -(ntions in their code and, for each ne).165 F 3.035(wt)-.275 G(ype)271.048 -295.506 Q F2(xyz)3.035 E F0 3.034(,s)C .284(tore the ne)314.077 295.506 R 3.034 -(wt)-.275 G .284(ype v)374.835 295.506 R .284(alue \(which is allocated)-.275 F -.531(by the interpreter when the type is re)72 310.506 R .532 -(gistered\) in a v)-.165 F(ariable)-.275 E F2(T_Xyz)3.282 E F0 3.282(,a)C .532 -(nd de\214ne a structure or class)375.786 310.506 R F2(S_Xyz)72 325.506 Q F0 -2.808(,a)C .058(nd a macro)109.326 325.506 R F2(XYZ\(\))2.808 E F0 .058 -(that mak)2.808 F .058 -(es a pointer to this structure from a member of the type.)-.11 F(Capi-)5.557 E -(talization may v)72 340.506 Q(ary according to personal preference.)-.275 E/F3 -11/Times-Bold@0 SF 2.75(9. De\214ning)72 370.506 R(New Scheme Primiti)2.75 E --.11(ve)-.11 G(s).11 E F0 1.047(In Elk, there e)97 389.106 R 1.048 -(xists a one-to-one relationship between Scheme primiti)-.165 F -.165(ve)-.275 -G 3.798(sa).165 G 1.048(nd C functions:)434.067 389.106 R .179 -(each Scheme primiti)72 404.106 R -.165(ve)-.275 G .178 -(\212whether prede\214ned or user).165 F .178 -(-de\214ned\212is implemented by a corresponding)-.22 F 3.312(Cf)72 419.106 S -3.312(unction. This)86.312 419.106 R .562 -(includes special forms, which are treated as a special kind of primiti)3.312 F --.165(ve)-.275 G 3.313(si).165 G 3.313(nE)477.158 419.106 S(lk.)492.692 419.106 -Q .649(Extensions and applications use the function)72 434.106 R F2 -(De\214ne_Primitive\(\))3.399 E F0 .649(to re)3.399 F .649(gister a ne)-.165 F -3.398(wS)-.275 G .648(cheme primi-)444.392 434.106 R(ti)72 449.106 Q 1.777 --.165(ve w)-.275 H 1.447(ith the interpreter).165 F 4.197(,s)-.44 G 1.448 -(upplying its name and the C function that implements it.)190.252 449.106 R -1.448(In case of)6.948 F 3.043(dynamically loadable e)72 464.106 R 3.042 -(xtensions or application modules, the calls to)-.165 F F2 -(De\214ne_Primitive\(\))5.792 E F0(are)5.792 E 1.233(placed in the e)72 479.106 -R 1.233(xtension initialization functions that are called automatically as the\ - object \214le is)-.165 F(loaded.)72 493.106 Q F2(De\214ne_Primitive\(\))5.5 E -F0(is declared as)2.75 E F1 -(void Define_Primitive\(\(Object \(*func\)\(\)\), const char *name,)100.346 -515.609 Q(int minargs, int maxargs,)232.346 529.609 Q(enum discipline disc\);) -232.346 543.609 Q F0(The ar)72 566.109 Q(guments are:)-.198 E F2(func)97 -584.709 Q F0 2.75(ap)6.058 G(ointer to the C function implementing the ne) -135.134 584.709 Q 2.75(wp)-.275 G(rimiti)346.906 584.709 Q -.165(ve)-.275 G(;) -.165 E F2(name)97 603.309 Q F0(the name of the primiti)1.174 E .33 -.165(ve a) --.275 H 2.75(san).165 G(ull-terminated C string;)260.567 603.309 Q F2(minar)97 -621.909 Q(gs)-.407 E F0(the minimum number of ar)122 636.909 Q -(guments accepted by the primiti)-.198 E -.165(ve)-.275 G(;).165 E F2(maxar)97 -655.509 Q(gs)-.407 E F0(the maximum number of ar)122 670.509 Q -(guments \(identical to)-.198 E F2(minar)2.75 E(gs)-.407 E F0(in most cases\);) -2.75 E F2(disc)97 689.109 Q F0(the)7.279 E F2(calling discipline)2.75 E F0 -(\(usually)2.75 E F2(EV)2.75 E(AL)-.66 E F0(\).)A F2(De\214ne_Primitive\(\))97 -707.709 Q F0 .947(creates a Scheme v)3.697 F .946 -(ariable of the speci\214ed name in the current \(i.)-.275 F .946(e. the)1.833 -F(caller')72 722.709 Q 1.112(s\) le)-.605 F 1.112(xical en)-.165 F 1.112 -(vironment and binds it to the ne)-.44 F 1.112(wly created procedure.)-.275 F -1.113(Each C function that)6.613 F EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(8-)288 51 S .659 -(implements a primiti)72 87 R .989 -.165(ve h)-.275 H .659(as a return type of) -.165 F/F1 11/Times-Italic@0 SF(Object)3.409 E F0 .658 -(and, for a calling discipline of)3.409 F F1(EV)3.408 E(AL)-.66 E F0 3.408(,z)C -.658(ero or)477.382 87 R .125(more ar)72 102 R .126(guments of type)-.198 F F1 -(Object)2.876 E F0 .126(which are bound to the e)2.876 F -.275(va)-.275 G .126 -(luated ar).275 F .126(guments passed to the Scheme)-.198 F(primiti)72 117 Q -.33 -.165(ve w)-.275 H(hen it is called.).165 E -(The calling discipline must be one of the follo)5.5 E(wing:)-.275 E F1(EV)97 -135.6 Q(AL)-.66 E F0 1.685(The primiti)122 150.6 R 2.015 -.165(ve ex)-.275 H -1.684(pects a \214x).165 F 1.684(ed number of ar)-.165 F(guments;)-.198 E F1 -(minar)4.434 E(gs)-.407 E F0(and)4.434 E F1(maxar)4.434 E(gs)-.407 E F0 1.684 -(must be)4.434 F(identical)122 165.6 Q/F2 9/Times-Roman@0 SF(2)-3.6 I F0(.)3.6 -I F1 -.66(VA)97 184.2 S(RARGS).66 E F0 1.16(The primiti)122 199.2 R 1.49 -.165 -(ve h)-.275 H 1.16(as a v).165 F 1.16(ariable number of ar)-.275 F 1.159 -(guments, and the underlying C function is)-.198 F .613(called with an ar)122 -214.2 R .614(gument count and an array of ar)-.198 F 3.364(guments. De\214ning) --.198 F(primiti)3.364 E -.165(ve)-.275 G 3.364(sw).165 G .614(ith a)484.136 -214.2 R -.275(va)122 229.2 S(riable number of ar).275 E(guments will e)-.198 E -(xplained in more detail in section 9.2.)-.165 E F1(NOEV)97 247.8 Q(AL)-.66 E -F0 .396(The ar)122 262.8 R .395(guments are passed as a Scheme list of une) --.198 F -.275(va)-.275 G .395(luated objects\212a single ar).275 F(gument)-.198 -E .124(of the type)122 277.8 R F1(Object)2.874 E F0 5.624(.P)C(rimiti)215.985 -277.8 Q -.165(ve)-.275 G 2.874(su).165 G .124 -(sing this discipline will then use)263.035 277.8 R F1(Eval\(\))2.875 E F0 .125 -(as described in)2.875 F 1.265(section 12.2 to e)122 292.8 R -.275(va)-.275 G -1.265(luate some or all of the ar).275 F(guments.)-.198 E F1(NOEV)6.764 E(AL) --.66 E F0 1.264(is only rarely used)4.014 F 1.021(\(with the e)122 307.8 R -1.021(xception of the b)-.165 F 1.022(uilt-in special forms of Elk\); e)-.22 F -1.022(xtensions and applications)-.165 F(mostly use macros as a more con)122 -322.8 Q -.165(ve)-.44 G(nient w).165 E(ay to de\214ned ne)-.11 E 2.75(ws)-.275 -G(yntactical forms.)394.437 322.8 Q(Figure 2 sho)72 341.4 Q(ws a simple e)-.275 -E(xample for de\214ning a ne)-.165 E 2.75(wS)-.275 G(cheme primiti)310.205 -341.4 Q -.165(ve)-.275 G(.).165 E(____________________________________________\ -__________________________________)75 368.9 Q/F3 10/Courier@0 SF -(#include "scheme.h")72 388.4 Q(Object p_vector_reverse\(Object vec\) {)72 -410.8 Q(Object tmp, *s, *t;)99.5 424.8 Q(Check_Type\(vec, T_Vector\);)99.5 -447.2 Q -(for \(s = VECTOR\(vec\)->data, t = s+VECTOR\(vec\)->size; --t > s; s++\))99.5 -461.2 Q(tmp = *s, *s = *t, *t = tmp;)127 475.2 Q(return vec;)99.5 489.2 Q(})72 -503.2 Q(void elk_init_vector\(void\) {)72 525.6 Q -(Define_Primitive\(p_vector_reverse, "vector-reverse!", 1, 1, EVAL\);)99.5 -539.6 Q(})72 553.6 Q/F4 10/Times-Bold@0 SF(Figur)198.84 571.4 Q 2.5(e2)-.18 G -(:)234.49 571.4 Q/F5 10/Times-Roman@0 SF(De\214ning a ne)5 E 2.5(wS)-.25 G -(cheme Primiti)311.73 571.4 Q -.15(ve)-.25 G F0(______________________________\ -________________________________________________)75 590 Q 1.05(The primiti)97 -623.6 R -.165(ve)-.275 G F1(vector)3.965 E(-r)-.22 E -.165(ev)-.407 G(er).165 E -(se!)-.11 E F0 1.05(de\214ned by the e)3.8 F 1.05(xample e)-.165 F 1.049 -(xtension re)-.165 F -.165(ve)-.275 G 1.049(rses the elements of a).165 F .868 -(Scheme v)72 638.6 R .868(ector in place and returns its ar)-.165 F .868 -(gument \(note the \214nal e)-.198 F .868(xclamation mark indicating the)-.165 -F(destructi)72 653.6 Q 1.397 -.165(ve o)-.275 H(peration\).).165 E F1(Chec) -6.567 E(k_T)-.22 E(ype\(\))-.814 E F0 1.067 -(is a simple macro that compares the type \214eld of the \214rst)3.817 F(ar)72 -668.6 Q .532(gument \(an)-.198 F F1(Object)3.282 E F0 3.282(\)w)C .532 -(ith the second ar)178.173 668.6 R .533(gument and signals and error if the) --.198 F 3.283(yd)-.165 G 3.283(on)422.651 668.6 S .533(ot match.)436.934 668.6 -R(This)6.033 E 1.748(macro is used primarily for type-checking the ar)72 683.6 -R 1.748(guments to Scheme primiti)-.198 F -.165(ve)-.275 G 4.498(s. A).165 F -1.748(call to the)4.498 F .36 LW 76.5 694.6 72 694.6 DL 81 694.6 76.5 694.6 DL -85.5 694.6 81 694.6 DL 90 694.6 85.5 694.6 DL 94.5 694.6 90 694.6 DL 99 694.6 -94.5 694.6 DL 103.5 694.6 99 694.6 DL 108 694.6 103.5 694.6 DL 112.5 694.6 108 -694.6 DL 117 694.6 112.5 694.6 DL 121.5 694.6 117 694.6 DL 126 694.6 121.5 -694.6 DL 130.5 694.6 126 694.6 DL 135 694.6 130.5 694.6 DL 139.5 694.6 135 -694.6 DL 144 694.6 139.5 694.6 DL/F6 7/Times-Roman@0 SF(2)82 704.6 Q F2 1.228 -(Because of a limitation in the C language, primiti)4.5 2.8 N -.135(ve)-.225 G -3.478(so).135 G 3.478(ft)297.18 707.4 S(ype)306.157 707.4 Q/F7 9/Times-Italic@0 -SF(EV)3.478 E(AL)-.54 E F2 1.228(can only ha)3.478 F 1.499 -.135(ve a \214)-.18 -H -.135(xe).135 G 3.479(dm).135 G(aximum)438.498 707.4 Q(number of ar)72 718.4 -Q(guments \(currently 10\).)-.162 E(If more ar)4.5 E(guments are required,) --.162 E F7 -.54(VA)2.25 G(RARGS).54 E F2(must be used instead.)2.25 E EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(9-)288 51 S(macro)72 87 Q/F1 -11/Times-Italic@0 SF(Chec)3.215 E(k_Mutable\(\))-.22 E F0 .465(with the v)3.215 -F .466(ector as an ar)-.165 F .466(gument could ha)-.198 F .796 -.165(ve b)-.22 -H .466(een inserted before the loop).165 F .046(to check whether the v)72 102 R -.046 -(ector is read-only and to automatically raise an error if this is the case.) --.165 F(The)5.545 E -.165(ex)72 117 S .142(ample code forms a complete e).165 F -.143(xtension including an e)-.165 F .143 -(xtension initialization function and could)-.165 F(be link)72 131 Q -(ed with the interpreter)-.11 E 2.75(,o)-.44 G 2.75(rl)210.149 131 S -(oaded dynamically into the interpreter as follo)219.62 131 Q(ws:)-.275 E/F2 10 -/Courier-Bold@0 SF(%)100.346 153.503 Q/F3 10/Courier@0 SF -(cc \255c \255I/usr/elk/include vec.c; makedl vec.o vec.o)6 E F2(%)100.346 -167.503 Q F3(scheme)6 E F2(>)100.346 181.503 Q F3(\(load 'vec.o\))6 E F2(>) -100.346 195.503 Q F3(\(define v '#\(hello word\)\))6 E F2(v)100.346 209.503 Q -(>)100.346 223.503 Q F3(\(vector-reverse! v\))6 E F2(#\(world hello\))100.346 -237.503 Q(>)100.346 251.503 Q F3(v)6 E F2(#\(world hello\))100.346 265.503 Q(>) -100.346 279.503 Q/F4 11/Times-Bold@0 SF 2.75(9.1. Making)72 317.003 R -(Objects Kno)2.75 E(wn to the Garbage Collector)-.11 E F0 2.207 -(Consider the non-destructi)97 335.603 R 2.537 -.165(ve ve)-.275 H 2.207 -(rsion of the primiti).165 F -.165(ve)-.275 G F1(vector)5.122 E(-r)-.22 E -.165 -(ev)-.407 G(er).165 E(se)-.11 E F0(sho)4.957 E 2.207(wn in Figure 3,)-.275 F -(which returns a ne)72 350.603 Q 2.75(wv)-.275 G -(ector instead of altering the contents of the original v)168.701 350.603 Q -(ector)-.165 E(.)-.605 E(_____________________________________________________\ -_________________________)75 378.103 Q F3 -(Object p_vector_reverse\(Object vec\) {)72 397.603 Q(Object ret;)99.5 411.603 -Q(int i, j;)99.5 425.603 Q(Check_Type\(vec, T_Vector\);)99.5 448.003 Q -(ret = Make_Vector\(VECTOR\(vec\)->size, False\);)99.5 462.003 Q -(for \(i = 0, j = VECTOR\(vec\)->size; --j >= 0; i++\))99.5 476.003 Q -(VECTOR\(ret\)->data[i] = VECTOR\(vec\)->data[j];)127 490.003 Q(return ret;) -99.5 504.003 Q(})72 518.003 Q/F5 10/Times-Bold@0 SF(Figur)167.815 535.803 Q 2.5 -(e3)-.18 G(:)203.465 535.803 Q/F6 10/Times-Roman@0 SF(Non-destructi)5 E .3 -.15 -(ve S)-.25 H(cheme primiti).15 E -.15(ve)-.25 G/F7 10/Times-Italic@0 SF(vector) -2.65 E(-r)-.2 E -.15(ev)-.37 G(er).15 E(se)-.1 E F0(__________________________\ -____________________________________________________)75 554.403 Q .37 -(The code in Figure 3 is identical to that sho)97 588.003 R .371 -(wn in Figure 2, e)-.275 F .371(xcept that a ne)-.165 F 3.121(wv)-.275 G .371 -(ector is allo-)448.269 588.003 R .513 -(cated, \214lled with the contents of the original v)72 603.003 R .513 -(ector in re)-.165 F -.165(ve)-.275 G .513(rse order).165 F 3.263(,a)-.44 G -.513(nd returned as the result of)383.824 603.003 R(the primiti)72 617.003 Q --.165(ve)-.275 G(.).165 E F1(Mak)5.5 E(e_V)-.11 E(ector\(\))-1.221 E F0 -(is declared by Elk:)2.75 E F3(Object Make_Vector\(int size, Object fill\);) -100.346 639.506 Q F1(size)72 662.006 Q F0 1.035(is the length of the v)3.785 F -(ector)-.165 E 3.785(,a)-.44 G 1.035 -(nd all elements are initialized to the Scheme object)220.397 662.006 R F1 -(\214ll)3.785 E F0 6.535(.I)C 3.786(nt)481.272 662.006 S(he)493.616 662.006 Q --.165(ex)72 677.006 S 2.325(ample, the prede\214ned global v).165 F(ariable) --.275 E F1 -.825(Fa)5.075 G(lse).825 E F0 2.324(is used as the)5.075 F F1 -(\214ll)5.074 E F0 2.324(object; it holds the boolean)5.074 F -(Scheme constant #f \(an)72 692.006 Q(y)-.165 E F1(Object)2.75 E F0(could ha) -2.75 E .33 -.165(ve b)-.22 H(een used here\).).165 E .789 -(Although the C function may look right, there is a problem when it comes to g) -97 710.606 R .79(arbage col-)-.055 F 3.056(lection. T)72 725.606 R 3.056(ou) --.88 G .305(nderstand the problem and its solution, it may be helpful to ha) -130.395 725.606 R .635 -.165(ve a b)-.22 H .305(rief look at ho).165 F(w)-.275 -E EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(0-)288 51 S .627(the g)72 87 -R .627(arbage collector)-.055 F/F1 9/Times-Roman@0 SF(3)-3.6 I F0 -.11(wo)3.377 -3.6 O .627(rks \(the follo).11 F .627 -(wing description presents a simpli\214ed vie)-.275 F .626(w; the real algo-) --.275 F 2.402(rithm is more comple)72 102 R 5.153(x\). In)-.165 F 2.403 -(Elk, a g)5.153 F 2.403(arbage collection is triggered automatically whene) --.055 F -.165(ve)-.275 G 5.153(ra).165 G 1.444 -(request for heap space cannot be satis\214ed because the heap is full, or e)72 -117 R 1.444(xplicitly by calling the)-.165 F(primiti)72 132 Q -.165(ve)-.275 G -/F2 11/Times-Italic@0 SF(collect)3.42 E F0 .506(from within Scheme code.)3.255 -F .506(The g)6.006 F .506(arbage collector traces all `)-.055 F(`li)-.814 E --.165(ve)-.275 G 2.134 -.814('' o).165 H .506(bjects start-).814 F .002 -(ing with a kno)72 147 R(wn)-.275 E F2 -.495(ro)2.752 G .002(ot set).495 F F0 -.002(of pointers to reachable objects \(basically the interpreter')2.752 F -2.752(sg)-.605 G .002(lobal le)450.087 147 R(xical)-.165 E(en)72 162 Q 1.167 -(vironment and its symbol table\).)-.44 F -.165(Fo)6.667 G(llo).165 E 1.168 -(wing these pointers, all accessible Scheme objects are)-.275 F .368 -(located and copied to a ne)72 177 R 3.118(wh)-.275 G .367 -(eap space in memory \(`)204.679 177 R(`forw)-.814 E(arded')-.11 E .367 -('\), thereby compacting the heap.)-.814 F(Whene)72 192 Q -.165(ve)-.275 G -3.115(ra).165 G 3.115(no)124.758 192 S .365 -(bject is relocated in memory during g)138.873 192 R .365 -(arbage collection, the contents of the pointer)-.055 F .673 -(\214eld of the corresponding C)72 207 R F2(Object)3.423 E F0 .673 -(is updated to point to the ne)3.423 F 3.423(wl)-.275 G 3.422(ocation. After) -374.702 207 R .672(that, an)3.422 F 3.422(yc)-.165 G(on-)489.337 207 Q -(stituent objects \(e.)72 222 Q(g. the elements of a v)1.833 E -(ector\) are forw)-.165 E(arded in the same w)-.11 E(ay)-.11 E(.)-.715 E .706 -(As li)97 240.6 R 1.036 -.165(ve o)-.275 H .706(bjects are relocated in memory) -.165 F(,)-.715 E F2(all)3.457 E F0 .707 -(pointers to an object need to be updated prop-)3.457 F .056 -(erly when that object is forw)72 255.6 R .056(arded during g)-.11 F .056 -(arbage collection.)-.055 F .056(If a pointer to a li)5.556 F .386 -.165(ve o) --.275 H .056(bject were not).165 F 1.158 -(in the root set \(that is, not reachable by the g)72 270.6 R 1.158 -(arbage collector\), the object w)-.055 F 1.159(ould either become)-.11 F -.055 -(ga)72 285.6 S .884(rbage erroneously during the ne).055 F .884(xt g)-.165 F -.884(arbage collection, or)-.055 F 3.634(,i)-.44 G 3.634(fi)344.128 285.6 S -3.634(th)354.483 285.6 S .883(ad been reached through some)366.675 285.6 R -1.055(other pointer)72 300.6 R 3.805(,t)-.44 G 1.055(he original pointer w) -138.746 300.6 R 1.054(ould no)-.11 F 3.804(wp)-.275 G 1.054(oint to an in) -285.093 300.6 R -.275(va)-.44 G 1.054(lid location.).275 F F1(4)-3.6 I F0 1.054 -(This is e)3.804 3.6 N 1.054(xactly what)-.165 F(happens in the e)72 315.6 Q -(xample sho)-.165 E(wn in Figure 3.)-.275 E .178(The call to)97 334.2 R F2(Mak) -2.928 E(e_V)-.11 E(ector\(\))-1.221 E F0 .179(in the e)2.928 F .179 -(xample triggers a g)-.165 F .179(arbage collection if the heap is too full) --.055 F .201(to satisfy the request for heap space.)72 349.2 R .2(As the)5.701 -F F2(Object)2.95 E F0 .2(pointer stored in the ar)2.95 F(gument)-.198 E F2(vec) -2.95 E F0 .2(is in)2.95 F(visible)-.44 E .685(to the g)72 364.2 R .685 -(arbage collector)-.055 F 3.435(,i)-.44 G .686 -(ts pointer \214eld cannot be updated when the v)186.357 364.2 R .686 -(ector to which it points is)-.165 F(forw)72 379.2 Q .262(arded during the g) --.11 F .261(arbage collection started inside)-.055 F F2(Mak)3.011 E(e_V)-.11 E -(ector\(\))-1.221 E F0 5.761(.A)C 3.011(sar)395.786 379.2 S .261 -(esult, all further ref-)414.634 379.2 R 2.163(erences to)72 394.2 R F2(VECT) -4.913 E(OR\(vec\))-.198 E F0 2.163(will return an in)4.913 F -.275(va)-.44 G -2.164(lid address and may cause the program to crash).275 F .862 -(\(immediately or)72 409.2 R 3.612(,w)-.44 G .862(orse, at a later point\).) -157.192 409.2 R .862(The solution is simple: the primiti)6.362 F 1.192 -.165 -(ve j)-.275 H .862(ust needs to add).165 F F2(vec)72 423.2 Q F0 -(to the set of initial pointers used by the g)2.75 E(arbage collector)-.055 E -5.5(.T)-.605 G(his is done by inserting the line)353.622 423.2 Q/F3 10 -/Courier@0 SF(GC_Link\(vec\);)100.346 445.703 Q F0 .04(at the be)72 468.203 R -.041(ginning of the function before the call to)-.165 F F2(Mak)2.791 E(e_V)-.11 -E(ector\(\))-1.221 E F0(.)A F2(GC_Link\(\))5.541 E F0 .041(is a macro.)2.791 F -(Another)5.541 E(macro,)72 483.203 Q F2(GC_Unlink)3.145 E F0 3.145(,m)C .395 -(ust be called later \(e.)170.558 483.203 R .395 -(g. at the end of the function\) without an ar)1.833 F .394(gument list)-.198 F -.996(to remo)72 498.203 R 1.326 -.165(ve t)-.165 H .996 -(he object from the root set ag).165 F 3.746(ain. In)-.055 F .996 -(addition, a call to)3.746 F F2(GC_Node)3.747 E F0(\(ag)3.747 E .997 -(ain without an)-.055 F(ar)72 513.203 Q 1.389 -(gument list\) must be placed in the declarations at the be)-.198 F 1.388 -(ginning of the enclosing function or)-.165 F 2.75(block. Figure)72 528.203 R -2.75(4s)2.75 G(ho)148.692 528.203 Q(ws the re)-.275 E(vised, correct code.) --.275 E .171(Appendix A lists the C functions which can trigger a g)97 546.803 -R .172(arbage collection.)-.055 F(An)5.672 E 2.922(yl)-.165 G .172(ocal v) -447.596 546.803 R(ariable)-.275 E 1.038(or ar)72 561.803 R 1.038 -(gument of type)-.198 F F2(Object)3.788 E F0 1.038 -(must be protected in the manner sho)3.788 F 1.038(wn abo)-.275 F 1.367 -.165 -(ve i)-.165 H 3.787(fo).165 G 1.037(ne of these func-)427.277 561.803 R 1.398 -(tions is called during its lifetime.)72 576.803 R 1.398(This may sound more b) -6.898 F 1.399(urdensome than it really is, because)-.22 F 1.632(most of the `) -72 591.803 R(`dangerous')-.814 E 4.382('f)-.814 G 1.632 -(unctions are rarely or ne)195.425 591.803 R -.165(ve)-.275 G 4.382(ru).165 G -1.631(sed from within C/C++ e)332.351 591.803 R 1.631(xtensions or)-.165 F .36 -LW 76.5 602.803 72 602.803 DL 81 602.803 76.5 602.803 DL 85.5 602.803 81 -602.803 DL 90 602.803 85.5 602.803 DL 94.5 602.803 90 602.803 DL 99 602.803 -94.5 602.803 DL 103.5 602.803 99 602.803 DL 108 602.803 103.5 602.803 DL 112.5 -602.803 108 602.803 DL 117 602.803 112.5 602.803 DL 121.5 602.803 117 602.803 -DL 126 602.803 121.5 602.803 DL 130.5 602.803 126 602.803 DL 135 602.803 130.5 -602.803 DL 139.5 602.803 135 602.803 DL 144 602.803 139.5 602.803 DL/F4 7 -/Times-Roman@0 SF(3)82 612.803 Q F1 .507(Elk actually emplo)4.5 2.8 N .507 -(ys tw)-.09 F 2.757(og)-.09 G .507 -(arbage collectors, one based on the traditional stop-and-cop)190.299 615.603 R -2.758(ys)-.09 G(trate)418.969 615.603 Q(gy)-.135 E 2.758(,a)-.585 G .508(nd a) -452.246 615.603 R(generational, incremental g)72 626.603 Q -(arbage collector which is less disrupti)-.045 E .27 -.135(ve b)-.225 H -(ut not supported on all platforms.)-.045 E F4(4)82 636.603 Q F1 2.044 -(The problem of managing an `)4.5 2.8 N(`e)-.666 E 2.045(xact root set')-.135 F -4.295('c)-.666 G 2.045(an be a)277.843 639.403 R -.18(vo)-.18 G 2.045 -(ided by a technique called).18 F/F5 9/Times-Italic@0 SF(conservative)4.295 E -F1 -.045(ga)72 650.403 S .487(rbage collection.).045 F 2.737(Ac)4.987 G(onserv) -159.141 650.403 Q(ati)-.225 E .757 -.135(ve g)-.225 H .487 -(arbage collector treats the data se).09 F .486(gment, stack, and re)-.135 F -.486(gisters of the run-)-.135 F .059(ning program as)72 661.403 R F5 .059 -(ambiguous r)2.309 F(oots)-.405 E F1 4.559(.I)C 2.309(ft)202.633 661.403 S .059 -(he set of ambiguous roots is a superset of the)210.441 661.403 R F5(actual) -2.31 E F1 .06(roots, then a point-)2.31 F .109(er that looks lik)72 672.403 R -2.359(eah)-.09 G .109(eap pointer can safely be considered as pointing to an a\ -ccessible object that cannot be re-)145.697 672.403 R 2.508(claimed. At)72 -683.403 R .259(the time Elk w)2.508 F .259(as designed, conserv)-.09 F(ati) --.225 E .529 -.135(ve G)-.225 H 2.509(Cw).135 G .259(as still in its inf) -288.034 683.403 R(anc)-.09 E 2.509(ya)-.135 G .259(nd suf)367.854 683.403 R -.259(\214cient e)-.225 F .259(xperience did)-.135 F 1.178(not e)72 694.403 R -3.428(xist. F)-.135 F 1.177(or this reason, and because of the implied risks o\ -n certain machine architectures, the inherent)-.135 F .502(portability problem\ -s, and the inability to precisely determine the actual memory utilization, a t\ -raditional GC)72 705.403 R(strate)72 716.403 Q(gy w)-.135 E(as chosen for Elk.) --.09 E EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(1-)288 51 S(________________\ -______________________________________________________________)75 99.5 Q/F1 10 -/Courier@0 SF(Object p_vector_reverse\(Object vec\) {)72 119 Q(Object ret;)99.5 -133 Q(int i, j;)99.5 147 Q(GC_Node;)99.5 161 Q(GC_Link\(vec\);)99.5 183.4 Q -(Check_Type\(vec, T_Vector\);)99.5 197.4 Q -(ret = Make_Vector\(VECTOR\(vec\)->size, False\);)99.5 211.4 Q -(for \(i = 0, j = VECTOR\(vec\)->size; --j >= 0; i++\))99.5 225.4 Q -(VECTOR\(ret\)->data[i] = VECTOR\(vec\)->data[j];)127 239.4 Q(GC_Unlink;)99.5 -253.4 Q(return ret;)99.5 267.4 Q(})72 281.4 Q/F2 10/Times-Bold@0 SF(Figur) -130.82 299.2 Q 2.5(e4)-.18 G(:)166.47 299.2 Q/F3 10/Times-Roman@0 SF -(Non-destructi)5 E .3 -.15(ve S)-.25 H(cheme primiti).15 E -.15(ve)-.25 G/F4 10 -/Times-Italic@0 SF(vector)2.65 E(-r)-.2 E -.15(ev)-.37 G(er).15 E(se)-.1 E F3 -2.5(,c)C(orrected v)380.63 299.2 Q(ersion)-.15 E F0(__________________________\ -____________________________________________________)75 317.8 Q .949 -(applications in practice.)72 347.8 R .949(Most primiti)6.449 F -.165(ve)-.275 -G 3.699(st).165 G .949(hat require calls to)262.381 347.8 R/F5 11 -/Times-Italic@0 SF(GC_Link\(\))3.699 E F0 .95(use some function that)3.699 F -(creates a ne)72 362.8 Q 2.75(wS)-.275 G(cheme object, such as)139.837 362.8 Q -F5(Mak)2.75 E(e_V)-.11 E(ector\(\))-1.221 E F0(in the e)2.75 E(xample abo)-.165 -E -.165(ve)-.165 G(.).165 E 3.091 -.88(To s)97 381.4 T 1.33 -(implify GC protection of more than a single ar).88 F 1.33(gument or v)-.198 F -1.33(ariable, additional macros)-.275 F F5(GC_Link2\(\))72 396.4 Q F0(,)A F5 -(GC_Link3\(\))3.149 E F0 3.149(,a)C .399(nd so on up to)195.008 396.4 R F5 -(GC_Link7\(\))3.149 E F0 .4(are pro)3.149 F 3.15(vided. Each)-.165 F .4 -(of these can be called)3.15 F .388(with as man)72 411.4 R 3.138(ya)-.165 G --.198(rg)139.296 411.4 S .388(uments of type).198 F F5(Object)3.138 E F0 .387 -(as is indicated by the digit \(separate macros are required,)3.138 F .778 -(because macros with a v)72 426.4 R .778(ariable number of ar)-.275 F .779 -(guments cannot be de\214ned in C\).)-.198 F 3.529(Ac)6.279 G(orresponding) -445.953 426.4 Q(macro)72 441.4 Q F5(GC_Node2)6.619 E F0(,)A F5(GC_Node3)6.618 E -F0 6.618(,a)C 3.868(nd so on, must be placed in the declarations.)228.728 441.4 -R(Dif)9.368 E(ferent)-.275 E F5(GC_Link*\(\))72 456.4 Q F0 1.339 -(calls cannot be mix)4.088 F 4.089(ed. All)-.165 F 1.339(local v)4.089 F 1.339 -(ariables passed to one of the macros must ha)-.275 F -.165(ve)-.22 G 1.202 -(been initialized.)72 471.4 R 1.201(GC protection is not required for `)6.702 F -(`pointer)-.814 E(-less')-.22 E 3.951('o)-.814 G 1.201 -(bjects such as booleans and)378.218 471.4 R 2.165(small inte)72 486.4 R 2.165 -(gers, and for the ar)-.165 F 2.165(guments of primiti)-.198 F -.165(ve)-.275 G -4.915(sw).165 G 2.165(ith a v)321.629 486.4 R 2.166(ariable number of ar)-.275 -F 2.166(guments \(as)-.198 F .974(described in section 9.2\).)72 501.4 R .974 -(Section 12.3 will describe ho)6.474 F 3.724(wg)-.275 G .973(lobal \(e)340.487 -501.4 R(xternal\))-.165 E F5(Object)3.723 E F0 -.275(va)3.723 G .973 -(riables can).275 F(be added to the root set.)72 516.4 Q .81(Here is ho)97 535 -R 3.56(wt)-.275 G .81(he implementation of the primiti)158.115 535 R -.165(ve) --.275 G F5(cons)3.725 E F0(uses)3.56 E F5(GC_Link2\(\))3.56 E F0 .81 -(to protect its ar)3.56 F(gu-)-.198 E(ments \(the car and the cdr of the ne)72 -549 Q 2.75(wp)-.275 G(air\):)243.094 549 Q F1 -(Object P_Cons\(Object car, Object cdr\) {)100.346 571.503 Q(Object new_pair;) -127.846 585.503 Q(GC_Node2;)127.846 599.503 Q(GC_Link2\(car, cdr\);)127.846 -621.903 Q(new_pair =)127.846 635.903 Q F4 -(allocate heap space and initialize object)6 E F1(;)A(GC_Unlink;)127.846 -649.903 Q(return new_pair;)127.846 663.903 Q(})100.346 677.903 Q F0 .303 -(There are a fe)97 704.003 R 3.052(wp)-.275 G(itf)174.891 704.003 Q .302 -(alls to be a)-.11 F -.11(wa)-.165 G .302(re of when using `).11 F(`dangerous') --.814 E 3.052('f)-.814 G .302(unctions from within your)387.902 704.003 R .265 -(C/C++ code.)72 719.003 R -.165(Fo)5.765 G 3.015(re).165 G .265 -(xample, consider this code fragment which \214lls a Scheme v)157.286 719.003 R -.266(ector with the pro-)-.165 F(gram')72 733.003 Q 2.75(se)-.605 G -.44(nv) -109.576 733.003 S(ironment strings that are a).44 E -.275(va)-.22 G -(ilable through the null-terminated string array).275 E F5(en)2.75 E(vir)-.44 E -(on[])-.495 E F0(:)A EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 50 S 2.75(2-)288 50 S/F1 10/Courier@0 -SF(Object vec =)100.346 86 Q/F2 10/Times-Italic@0 SF(ne)6 E 2.5(wv)-.15 G -(ector of the right size)201.246 86 Q F1(;)A(int i;)100.346 100 Q(GC_Node;) -100.346 114 Q(GC_Link\(vec\);)100.346 136.4 Q -(for \(i = 0; environ[i] != 0; i++\))100.346 150.4 Q -(VECTOR\(vec\)->data[i] = Make_String\(environ[i], strlen\(environ[i]\)\);) -127.846 164.4 Q F0(\()72 186.9 Q/F3 11/Times-Italic@0 SF(Mak)A(e_String\(\)) --.11 E F0 .395(creates and initializes a ne)3.145 F 3.145(wS)-.275 G .395 -(cheme string.\))276.825 186.9 R .395(The body of the for)5.895 F .395 -(-loop contains a)-.22 F .636(subtle b)72 201.9 R .636(ug: depending on the co\ -mpiler used, the left hand side of the assignment \(the e)-.22 F(xpression) --.165 E(in)72 216.9 Q -.22(vo)-.44 G(lving).22 E F3(vec)3.062 E F0 3.062(\)m)C -.312(ay be e)146.511 216.9 R -.275(va)-.275 G .312(luated before).275 F F3(Mak) -3.062 E(e_String\(\))-.11 E F0 .312(is in)3.062 F -.22(vo)-.44 G -.11(ke).22 G -3.062(d. As).11 F 3.062(ar)3.062 G .312(esult, a cop)396.852 216.9 R 3.062(yo) --.11 G 3.062(ft)461.225 216.9 S .311(he con-)471.008 216.9 R 1.353(tents of)72 -231.9 R F3(vec)4.103 E F0 1.353(might be, for instance, stored in a re)4.103 F -1.354(gister before a g)-.165 F 1.354(arbage collection is triggered)-.055 F -.861(while e)72 246.9 R -.275(va)-.275 G .861 -(luating the right hand side of the assignment.).275 F .861(The g)6.361 F .861 -(arbage collector w)-.055 F .861(ould then mo)-.11 F -.165(ve)-.165 G 1.987 -(the v)72 261.9 R 1.987(ector object in memory)-.165 F 4.738(,u)-.715 G 1.988 -(pdating the\212properly GC-protected\212v)216.093 261.9 R(ariable)-.275 E F3 -(vec)4.738 E F0 4.738(,b)C 1.988(ut not the)458.466 261.9 R .011(temporary cop) -72 276.9 R 2.761(yi)-.11 G 2.761(nt)147.064 276.9 S .011(he re)158.383 276.9 R -(gister)-.165 E 2.761(,w)-.44 G .011(hich is no)217.365 276.9 R 2.761(wad)-.275 -G .011(angling reference.)283.739 276.9 R 1.771 -.88(To a)5.511 H -.22(vo).66 G -.01(id this, the loop must be).22 F(modi\214ed along these lines:)72 290.9 Q F1 -(for \(i = 0; environ[i]; i++\) {)100.346 313.403 Q -(Object temp = Make_String\(environ[i], strlen\(environ[i]\)\);)127.846 327.403 -Q(VECTOR\(vec\)->data[i] = temp;)127.846 341.403 Q(})100.346 355.403 Q F0 2.75 -(Ar)72 376.903 S(elated pitf)86.355 376.903 Q(all to w)-.11 E -(atch out for is e)-.11 E -.165(xe)-.165 G(mpli\214ed by this code fragment:) -.165 E F1(Object obj;)100.346 399.406 Q(...)100.346 413.406 Q(GC_Link\(obj\);) -100.346 427.406 Q(...)100.346 441.406 Q -(some_function\(obj, P_Cons\(car, cdr\)\);)100.346 455.406 Q F0 2.085 -(Here, the call to)72 477.906 R F3(P_Cons\(\))4.836 E F0 2.086(\212just lik)B -(e)-.11 E F3(Mak)4.836 E(e_String\(\))-.11 E F0(abo)4.836 E -.165(ve)-.165 G -2.086(\212can trigger a g).165 F 2.086(arbage collection.)-.055 F .112 -(Depending on the C compiler)72 492.906 R 2.861(,t)-.44 G .111 -(he properly GC-protected object pointer)210.829 492.906 R F3(obj)2.861 E F0 -.111(may be pushed on the)2.861 F(ar)72 507.906 Q .803(gument stack before) --.198 F F3(P_Cons\(\))3.553 E F0 .803(is in)3.553 F -.22(vo)-.44 G -.11(ke).22 -G .804(d, as the order in which function ar).11 F .804(guments\212just lik) --.198 F(e)-.11 E 1.088(the operands of the assignment operator\212are e)72 -522.906 R -.275(va)-.275 G 1.088(luated is unde\214ned in the C language.).275 -F 1.088(In this)6.588 F .062(case, if a g)72 537.906 R .062 -(arbage collection tak)-.055 F .062(es place and the heap object to which)-.11 -F F3(obj)2.812 E F0 .062(points is mo)2.812 F -.165(ve)-.165 G(d,).165 E F3 -(obj)2.813 E F0(will)2.813 E .181(be updated properly)72 552.906 R 2.931(,b) --.715 G .181(ut the cop)170.586 552.906 R 2.931(yo)-.11 G 2.931(nt)228.153 -552.906 S .181(he stack will not.)239.642 552.906 R(Ag)5.681 E .181 -(ain, the problem can be a)-.055 F -.22(vo)-.22 G .181(ided easily).22 F .087 -(by assigning the result of the nested function call to a temporary)72 567.906 -R F3(Object)2.837 E F0 -.275(va)2.837 G .088(riable and use this v).275 F(ari-) --.275 E(able in the enclosing function call:)72 581.906 Q F1 -(temp = P_Cons\(car, cdr\);)100.346 604.409 Q(some_function\(obj, temp\);) -100.346 618.409 Q/F4 11/Times-Bold@0 SF 2.75(9.2. Primiti)72 655.909 R -.11(ve) --.11 G 2.75(sw).11 G(ith V)152.74 655.909 Q(ariable-Length Ar)-1.012 E -(gument Lists)-.11 E F0(Primiti)97 674.509 Q -.165(ve)-.275 G 2.91(sw).165 G -.159(ith a v)152.644 674.509 R .159(ariable number of ar)-.275 F .159 -(guments are re)-.198 F .159(gistered with the interpreter by calling)-.165 F -F3(De\214ne_Primitive\(\))72 689.509 Q F0 1.619(with the calling discipline) -4.369 F F3 -.66(VA)4.37 G(RARGS).66 E F0 1.62(and with dif)4.37 F 1.62 -(ferent v)-.275 F 1.62(alues for)-.275 F F3(minar)4.37 E(gs)-.407 E F0(and)72 -704.509 Q F3(maxar)3.329 E(gs)-.407 E F0 6.079(.T)C .579(he special symbol) -144.24 704.509 R F3(MANY)3.329 E F0 .578(can be gi)3.329 F -.165(ve)-.275 G -3.328(na).165 G 3.328(st)324.741 704.509 S .578(he maximum number of ar)335.406 -704.509 R .578(guments to)-.198 F .945 -(indicate that there is no upper limit on the primiti)72 719.509 R -.165(ve) --.275 G 2.155 -.605('s n).165 H .945(umber of actual ar).605 F 3.695 -(guments. The)-.198 F(C/C++)3.696 E 2.781(function implementing a primiti)72 -734.509 R 3.11 -.165(ve w)-.275 H 2.78(ith a v).165 F 2.78 -(ariable number of ar)-.275 F 2.78(guments is called with tw)-.198 F(o)-.11 E -EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(3-)288 51 S(ar)72 87 Q .514 -(guments: an inte)-.198 F .514 -(ger count that speci\214es the number of actual ar)-.165 F .515 -(guments, and the Scheme ar)-.198 F(gu-)-.198 E 1.128(ments as an array of)72 -102 R/F1 11/Times-Italic@0 SF(Objects)3.878 E F0 1.128(\(that is, a pointer to) -3.878 F F1(Object)3.878 E F0 3.877(\). The)B 1.127(objects passed as the ar) -3.877 F(gument)-.198 E -.165(ve)72 117 S 3.742(ctor of).165 F F1 -.66(VA)6.492 -G(RARGS).66 E F0(primiti)6.492 E -.165(ve)-.275 G 6.492(sa).165 G 3.742 -(re already re)229.902 117 R 3.743(gistered with the g)-.165 F 3.743 -(arbage collector; calls to)-.055 F F1(GC_Link\(\))72 132 Q F0 1.503 -(are not required.)4.253 F 1.503(As an e)7.003 F 1.502(xample for a primiti) --.165 F 1.832 -.165(ve w)-.275 H 1.502(ith an arbitrary number of ar).165 F -(gu-)-.198 E 1.463(ments, here is the de\214nition of a simpli\214ed v)72 147 R -1.464(ariant of)-.275 F F1(append!)4.214 E F0 1.464 -(\(which does not handle empty)6.964 F(lists\):)72 161 Q/F2 10/Courier@0 SF -(Object p_append_set \(int argc, Object *argv\); {)100.346 183.503 Q(int i;) -127.846 197.503 Q(for \(i = 0; i < argc-1; i++\))127.846 219.903 Q -(\(void\)P_Set_Cdr \(P_Last_Pair \(argv[i]\), argv[i+1]\);)155.346 233.903 Q -(return *argv;)127.846 247.903 Q(})100.346 261.903 Q F0 -(The corresponding call to)72 283.403 Q F1(De\214ne_Primitive\(\))2.75 E F0 --.11(wo)2.75 G(uld read:).11 E F2 -(Define_Primitive\(p_append_set, "append!", 0, MANY, VARARGS\);)100.346 305.906 -Q F0 1.929(Besides implementing primiti)97 332.006 R -.165(ve)-.275 G 4.679(sw) -.165 G 1.928(ith an inde\214nite maximum number of ar)258.492 332.006 R 1.928 -(guments, the)-.198 F F1 -.66(VA)72 347.006 S(RARGS).66 E F0 .359 -(discipline is frequently used for primiti)3.109 F -.165(ve)-.275 G 3.109(sw) -.165 G .36(ith an optional ar)320.583 347.006 R 3.11(gument. F)-.198 F .36 -(or e)-.165 F .36(xample, a)-.165 F(primiti)72 362.006 Q 1.171 -.165(ve e)-.275 -H .841(ncapsulating the UNIX).165 F F1(open\(\))3.591 E F0 .84 -(system call, which has tw)3.59 F 3.59<6f8c>-.11 G -.165(xe)391.176 362.006 S -3.59(da).165 G -.198(rg)415.369 362.006 S .84(uments \(\214lename,).198 F 1.271 -(\215ags\) and an optional third ar)72 377.006 R 1.271 -(gument \(the mode for ne)-.198 F 1.271(wly created \214les, i.)-.275 F 1.272 -(e. calls with the \215ag)1.833 F F1(O_CREA)72 391.006 Q(T)-.407 E F0 -(\), could be de\214ned as follo)A(ws:)-.275 E F2 -(Object p_unix_open\(int argc, Object *argv\) {)100.346 413.509 Q -(char *name = get_file_name\(argv[0]\);)127.846 427.509 Q -(int flags = get_flags\(argv[1]\);)127.846 441.509 Q(mode_t mode;)127.846 -455.509 Q(if \(flags & O_CREAT\) {)127.846 477.909 Q(if \(argc < 3\))155.346 -491.909 Q/F3 10/Times-Italic@0 SF(err)182.846 505.909 Q(or)-.45 E(--too fe)-.2 -E 2.5(wa)-.15 G -.37(rg)246.486 505.909 S(uments).37 E F2 -(mode = get_mode\(argv[2]\);)155.346 519.909 Q(...)155.346 533.909 Q F0 -(The call to)72 555.409 Q F1(De\214ne_Primitive\(\))2.75 E F0 -(could then be written as:)2.75 E F2 -(Define_Primitive\(p_unix_open, "unix-open", 2, 3, VARARGS\);)100.346 577.912 Q -/F4 11/Times-Bold@0 SF 2.75(10. Pr)72 615.412 R(ede\214ned Scheme T)-.198 E -(ypes)-.814 E F0 1.108 -(This chapter introduces the Scheme types prede\214ned by Elk.)97 634.012 R -1.107(It be)6.607 F 1.107(gins with the `)-.165 F(`pointer)-.814 E(-)-.22 E -(less')72 649.012 Q 2.851('t)-.814 G .101(ypes such as boolean, whose v)100.921 -649.012 R .102(alues are stored directly in the pointer \214eld of an)-.275 F -F1(Object)2.852 E F0 2.852(;f)C(ol-)491.779 649.012 Q(lo)72 664.012 Q -(wed by the types whose members are C)-.275 E F1(structs)2.75 E F0 -(that reside on the Scheme heap.)2.75 E EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(4-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(10.1. Booleans)72 87 R(\(T_Boolean\))2.75 E/F2 11 -/Times-Italic@0 SF(Objects)97 105.6 Q F0 .502(of type)3.252 F F2(T_Boolean) -3.252 E F0 .502(can hold the v)3.252 F .502(alues #t and #f.)-.275 F -1.1 -.88 -(Tw o)6.002 H F2(Objects)4.132 E F0 .501(initialized to #t and)3.252 F -(#f, respecti)72 119.6 Q -.165(ve)-.275 G(ly).165 E 2.75(,a)-.715 G(re a) -149.044 119.6 Q -.275(va)-.22 G(ilable as the e).275 E(xternal C v)-.165 E -(ariables)-.275 E F2 -.605(Tr)2.75 G(ue).605 E F0(and)2.75 E F2 -.825(Fa)2.75 G -(lse).825 E F0 5.5(.T)C(he macro)400.845 119.6 Q/F3 10/Courier@0 SF -(Truep\(obj\))100.346 142.103 Q F0 .933 -(can be used to check whether an arbitrary Scheme object is re)72 164.603 R --.055(ga)-.165 G .933(rded as true.).055 F .933(Use of)6.433 F F2 -.605(Tr) -3.683 G(uep\(\)).605 E F0(is)3.683 E(not necessarily equi)72 178.603 Q -.275 -(va)-.275 G(lent to).275 E F3(!EQ\(obj,False\))100.346 201.106 Q F0 1.236 -(because the empty list may count as f)72 223.606 R 1.235 -(alse in addition to #f if backw)-.11 F 1.235(ards compatibility to older)-.11 -F .095(Scheme language v)72 238.606 R .095(ersions has been enabled.)-.165 F F2 --.605(Tr)5.595 G(uep\(\)).605 E F0 .095(may e)2.845 F -.275(va)-.275 G .096 -(luate its ar).275 F .096(gument twice and should)-.198 F(therefore not be in) -72 253.606 Q -.22(vo)-.44 G -.11(ke).22 G 2.75(dw).11 G -(ith a function call or a comple)189.755 253.606 Q 2.75(xe)-.165 G(xpression.) -334.537 253.606 Q(The tw)72 271.206 Q 2.75(of)-.11 G(unctions)114.658 271.206 Q -F3(int Eqv\(Object, Object\);)100.346 293.709 Q(int Equal\(Object, Object\);) -100.346 307.709 Q F0 .921(are identical to the primiti)72 330.209 R -.165(ve) --.275 G(s).165 E F2(P_Eqv\(\))3.67 E F0(and)3.67 E F2(P_Equal\(\))3.67 E F0 -3.67(,e)C .92(xcept that the)324.684 330.209 R 3.67(yr)-.165 G .92 -(eturn a C inte)398.46 330.209 R .92(ger rather)-.165 F -(than a Scheme boolean and therefore can be used more con)72 345.209 Q -.165 -(ve)-.44 G(niently in C/C++.).165 E F1 2.75(10.2. Characters)72 375.209 R -(\(T_Character\))2.75 E F0(The character v)97 392.809 Q(alue stored in an)-.275 -E F2(Object)2.75 E F0(of type)2.75 E F2(T_Char)2.75 E(acter)-.165 E F0 -(can be obtained by the macro)2.75 E F3(CHAR\(char_obj\))100.346 415.312 Q F0 -(as a non-ne)72 436.812 Q -.055(ga)-.165 G(ti).055 E -.165(ve)-.275 G F2(int) -2.915 E F0 5.5(.A)C(ne)181.626 436.812 Q 2.75(wc)-.275 G -(haracter object is created by calling the function)207.311 436.812 Q F3 -(Object Make_Char\(int c\);)100.346 459.315 Q F0(The prede\214ned e)72 481.815 -Q(xternal C v)-.165 E(ariable)-.275 E F2(Ne)2.75 E(wline)-.165 E F0 -(holds the ne)2.75 E(wline character as a Scheme)-.275 E F2(Object)2.75 E F0(.) -A F1 2.75(10.3. Empty)72 511.815 R(List \(T_Null\))2.75 E F0 .319(The type)97 -530.415 R F2(T_Null)3.069 E F0 .319(has e)3.069 F .32 -(xactly one member\212the empty list; hence all)-.165 F F2(Objects)3.07 E F0 -.32(of this type are)3.07 F 3.399(identical. The)72 545.415 R .648 -(empty list is a)3.399 F -.275(va)-.22 G .648(ilable as the e).275 F .648 -(xternal C v)-.165 F(ariable)-.275 E F2(Null)3.398 E F0 6.148(.T)C .648(his v) -392.31 545.415 R .648(ariable is often used)-.275 F .07(to initialize)72 -560.415 R F2(Objects)2.82 E F0 .07(that will be assigned their real v)2.82 F -.07(alues later)-.275 F 2.82(,f)-.44 G .071(or e)355.569 560.415 R .071 -(xample, as the \214ll element for)-.165 F(ne)72 575.415 Q 1.395(wly created v) --.275 F 1.395(ectors or to initialize)-.165 F F2(Objects)4.145 E F0 1.395 -(in order to)4.145 F F2(GC_Link\(\))4.144 E F0 4.144(them. A)4.144 F(macro) -4.144 E F2(Nullp\(\))4.144 E F0(is)4.144 E(pro)72 589.415 Q -(vided as a shorthand for checking if an)-.165 E F2(Object)2.75 E F0 -(is the empty list:)2.75 E F3(#define Nullp\(obj\))100.346 611.918 Q -(\(TYPE\(obj\) == T_Null\))220.346 611.918 Q F0 -(This macro is used frequently in the termination condition of for)72 633.418 Q -(-loops that scan a Scheme list:)-.22 E F3(Object tail;)100.346 655.921 Q(...) -100.346 669.921 Q(for \(tail = some_list; !Nullp\(tail\); tail = Cdr\(tail\)\)) -100.346 683.921 Q(process_element\(Car\(tail\)\);)127.846 697.921 Q F0(\()72 -720.421 Q F2(Car\(\))A F0(and)3.4 E F2(Cdr\(\))3.4 E F0 .65 -(essentially are shorthands for)3.4 F F2(P_Car\(\))3.4 E F0(and)3.4 E F2 -(P_Cdr\(\))3.4 E F0 .651(and will be re)3.4 F .651(visited in the)-.275 F EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(5-)288 51 S -(section on pairs\).)72 87 Q/F1 11/Times-Bold@0 SF 2.75(10.4. End)72 117 R -(of File \(T_End_Of_File\))2.75 E F0 .745(The type)97 135.6 R/F2 11 -/Times-Italic@0 SF(T_End_Of_F)3.495 E(ile)-.495 E F0 .745 -(has one member\212the end-of-\214le object\212and is only rarely used)3.495 F -.906(from within user)72 150.6 R .906(-supplied C/C++ code.)-.22 F .906(The e) -6.406 F .906(xternal C v)-.165 F(ariable)-.275 E F2(Eof)3.657 E F0 .907 -(is initialized to the end-of-)3.657 F(\214le object.)72 165.6 Q F1 2.75 -(10.5. Integers)72 195.6 R(\(T_Fixnum and T_Bignum\))2.75 E F0(Inte)97 214.2 Q -1.875(gers come in tw)-.165 F 4.624<6f8d>-.11 G -.22(avo)205.655 214.2 S(rs:) -.22 E F2(\214xnums)4.624 E F0(and)4.624 E F2(bignums)4.624 E F0 7.374(.T)C -1.874(he former ha)349.584 214.2 R 2.204 -.165(ve t)-.22 H 1.874(heir v).165 F -1.874(alue stored)-.275 F .493 -(directly in the pointer \214eld and are wide enough to hold most C)72 229.2 R -F2(ints)3.243 E F0 5.993(.B)C .493(ignums can hold inte)392.389 229.2 R(gers) --.165 E 1.481(of arbitrary size and are stored in the heap.)72 244.2 R -1.1 --.88(Tw o)6.981 H 1.481(macros are pro)5.111 F 1.481 -(vided to test whether a gi)-.165 F -.165(ve)-.275 G(n).165 E -(signed \(or unsigned, respecti)72 258.2 Q -.165(ve)-.275 G(ly\) inte).165 E -(ger \214ts into a \214xnum:)-.165 E/F3 10/Courier@0 SF(FIXNUM_FITS\(integer\)) -100.346 280.703 Q(UFIXNUM_FITS\(unsigned_integer\))100.346 294.703 Q F0 .001 -(The former al)72 317.203 R -.11(wa)-.11 G .001(ys returns 1 in Elk 3.0, b).11 -F .001(ut the range of inte)-.22 F .001(ger v)-.165 F .001 -(alues that can be represented as a)-.275 F .555 -(\214xnum may be restricted in future re)72 332.203 R 3.305(visions. It)-.275 F -.555(is guaranteed, ho)3.305 F(we)-.275 E -.165(ve)-.275 G 1.434 -.44(r, t).165 -H .554(hat at least tw).44 F 3.304(ob)-.11 G .554(its less)473.801 332.203 R -(than the machine')72 347.203 Q 2.75(sw)-.605 G(ord size will be a)165.071 -347.203 Q -.275(va)-.22 G(ilable for \214xnums in future v).275 E -(ersions of Elk.)-.165 E(The v)72 364.803 Q -(alue stored in a \214xnum can be obtained as a C)-.275 E F2(int)2.75 E F0 -(by calling the macro)2.75 E F3(FIXNUM\(fixnum_obj\))100.346 387.306 Q F0 2.75 -(Am)72 408.806 S(acro)91.25 408.806 Q F3(Check_Integer\(obj\))100.346 431.309 Q -F0 .082(can be used as a shorthand for checking whether an)72 453.809 R F2 -(Object)2.832 E F0 .082(is a \214xnum or a bignum and raising an)2.832 F -(error otherwise.)72 468.809 Q(The follo)72 486.409 Q(wing functions are pro) --.275 E(vided to con)-.165 E -.165(ve)-.44 G(rt C inte).165 E -(gers to Scheme inte)-.165 E(gers:)-.165 E F3(Object Make_Integer\(int\);) -100.346 508.912 Q(Object Make_Unsigned\(unsigned\);)100.346 522.912 Q -(Object Make_Long\(long\);)100.346 536.912 Q -(Object Make_Unsigned_Long\(unsigned long\);)100.346 550.912 Q F2(Mak)72 -573.412 Q(e_Inte)-.11 E -.11(ge)-.44 G(r\(\)).11 E F0 .832 -(returns a \214xnum object if)3.583 F F2(FIXNUM_FITS\(\))3.582 E F0 .832 -(returns true for the ar)3.582 F .832(gument, other)-.198 F(-)-.22 E 2.369 -(wise a bignum.)72 588.412 R(Lik)7.869 E -.275(ew)-.11 G(ise,).275 E F2(Mak) -5.119 E(e_Long\(\))-.11 E F0 2.369(usually returns a \214xnum b)5.119 F 2.37 -(ut may ha)-.22 F 2.7 -.165(ve t)-.22 H 5.12(or).165 G 2.37(esort to)468.938 -588.412 R 2.585(bignums on architectures where a C)72 603.412 R F2(long)5.335 E -F0 2.585(is wider than an)5.335 F F2(int)5.335 E F0(.)A F2(Mak)8.084 E -(e_Unsigned\(\))-.11 E F0 2.584(returns a)5.334 F 2.58 -(bignum if the speci\214ed inte)72 618.412 R 2.58(ger is lar)-.165 F 2.581 -(ger than the lar)-.198 F 2.581(gest positi)-.198 F -.165(ve)-.275 G F2(int) -5.496 E F0 2.581(that \214ts into a \214xnum)5.331 F(\()72 633.412 Q F2 -(UFIXNUM_FITS\(\))A F0 .168(returns zero in this case\).)2.918 F .167 -(Another set of functions con)5.667 F -.165(ve)-.44 G .167(rt a Scheme number) -.165 F(to a C inte)72 647.412 Q(ger:)-.165 E EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(6-)288 51 S/F1 10/Courier@0 -SF(int Get_Integer\(Object\);)100.346 86 Q(int Get_Exact_Integer\(Object\);) -100.346 100 Q(unsigned Get_Unsigned\(Object\);)100.346 122.4 Q -(unsigned Get_Exact_Unsigned\(Object\);)100.346 136.4 Q -(long Get_Long\(Object\);)100.346 158.8 Q(long Get_Exact_Long\(Object\);) -100.346 172.8 Q(unsigned long Get_Unsigned_Long\(Object\);)100.346 195.2 Q -(unsigned long Get_Exact_Unsigned_Long\(Object\);)100.346 209.2 Q F0 -(These functions signal an error if one of the follo)72 231.7 Q -(wing conditions is true:)-.275 E 21.15<8374>97 250.3 S 1.384(he ar)125.058 -250.3 R 1.385(gument is neither a \214xnum, nor a bignum, nor a \215onum \(rea\ -l number\) with a)-.198 F -(fractional part of zero \(more about \215onums in the ne)122 265.3 Q -(xt section\);)-.165 E 21.15<8374>97 283.9 S(he function is one of the `) -125.058 283.9 Q(`unsigned')-.814 E 2.75('v)-.814 G(ariants and the ar)295.151 -283.9 Q(gument is a ne)-.198 E -.055(ga)-.165 G(ti).055 E .33 -.165(ve n)-.275 -H(umber;).165 E 21.15<8374>97 302.5 S(he ar)125.058 302.5 Q -(gument is a bignum too lar)-.198 E(ge for the respecti)-.198 E .33 -.165(ve r) --.275 H(eturn type;).165 E 21.15<8374>97 321.1 S .456 -(he function is one of the `)125.058 321.1 R(`e)-.814 E(xact')-.165 E 3.205('v) --.814 G .455(ariants and the ar)281.665 321.1 R .455 -(gument is neither a \214xnum nor a)-.198 F(bignum;)122 336.1 Q 21.15<8374>97 -354.7 S(he ar)125.058 354.7 Q -(gument is a \215onum that cannot be coerced to the respecti)-.198 E .33 -.165 -(ve r)-.275 H(eturn type.).165 E .296(As all of the abo)72 373.3 R .627 -.165 -(ve f)-.165 H .297(unctions include suitable type-checks, primiti).165 F -.165 -(ve)-.275 G 3.047(sr).165 G(ecei)384.903 373.3 Q .297(ving inte)-.275 F .297 -(ger ar)-.165 F(guments)-.198 E .974 -(can be written in a simple and straightforw)72 388.3 R .974(ard w)-.11 F(ay) --.11 E 6.474(.F)-.715 G .974(or e)317.652 388.3 R .974(xample, a primiti)-.165 -F 1.304 -.165(ve e)-.275 H .974(ncapsulating the).165 F(UNIX)72 403.3 Q/F2 11 -/Times-Italic@0 SF(dup)3.982 E F0 1.232(system call \(which returns an inte) -3.982 F 1.233(ger \214le descriptor pointing to the same \214le as the)-.165 F -(original one\) can be written as:)72 417.3 Q F1 -(Object p_unix_dup\(Object fd\) {)100.346 439.803 Q -(return Make_Integer\(dup\(Get_Exact_Unsigned\(fd\)\)\);)124.346 453.803 Q F0 -.875(Note that if)72 476.303 R F2(Get_Unsigned\(\))3.625 E F0(\(or)3.625 E F2 -(Get_Inte)3.625 E -.11(ge)-.44 G(r\(\)).11 E F0 3.625(\)h)C .875 -(ad been used here in place of the `)291.145 476.303 R(`e)-.814 E(xact')-.165 E -3.624('c)-.814 G(on-)489.337 476.303 Q -.165(ve)72 490.303 S -(rsion function, it w).165 E(ould be possible to write e)-.11 E -(xpressions such as:)-.165 E F1(\(define fd \(unix-dup \(truncate 1.2\)\)\)) -100.346 512.806 Q/F3 11/Times-Bold@0 SF 2.75(10.6. Floating)72 550.306 R -.22 -(Po)2.75 G(int Numbers \(T_Flonum\)).22 E F0 .795(Real and ine)97 568.906 R -.795(xact numbers are represented as)-.165 F F2(Objects)3.545 E F0 .796 -(of type)3.545 F F2(T_Flonum)3.546 E F0 6.296(.E)C .796(ach such object)434.593 -568.906 R .17(holds a pointer to a structure on the heap with a component)72 -583.906 R F2(val)2.92 E F0 .17(of type)2.92 F F2(double)2.92 E F0 2.92(,s)C -2.92(ot)427.59 583.906 S .17(hat the e)439.068 583.906 R(xpres-)-.165 E(sion)72 -597.906 Q F1(FLONUM\(flonum_obj\)->val)100.346 620.409 Q F0 .213 -(can be used to obtain the)72 642.909 R F2(double)2.963 E F0 -.275(va)2.963 G -2.963(lue. T).275 F 2.963(oc)-.88 G(on)269.2 642.909 Q -.165(ve)-.44 G .213 -(rt a Scheme number to a).165 F F2(double)2.963 E F0(re)2.963 E -.055(ga)-.165 -G .214(rdless of its).055 F(type, the more general function)72 656.909 Q F1 -(double Get_Double\(Object\);)100.346 679.412 Q F0 1.144(can be used.)72 -701.912 R 1.144(It raises an error if the ar)6.644 F 1.144 -(gument is not a \214xnum, bignum, or \215onum, or if it is a)-.198 F -(bignum too lar)72 716.912 Q(ge to \214t into a)-.198 E F2(double)2.75 E F0(.)A -EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(7-)288 51 S(The functions)72 -86 Q/F1 10/Courier@0 SF(Object Make_Flonum\(double\);)100.346 108.503 Q -(Object Make_Reduced_Flonum\(double\);)100.346 122.503 Q F0(con)72 145.003 Q --.165(ve)-.44 G .18(rt a C).165 F/F2 11/Times-Italic@0 SF(double)2.93 E F0 .181 -(to a \215onum; the latter returns a \214xnum if the)2.93 F F2(double)2.931 E -F0 .181(is small enough to \214t into)2.931 F 2.75<618c>72 159.003 S -(xnum and has a fractional part of zero.)85.75 159.003 Q(The macro)5.5 E F1 -(Check_Number\(obj\))100.346 181.506 Q F0 .493(checks whether the gi)72 204.006 -R -.165(ve)-.275 G(n).165 E F2(Object)3.243 E F0 .493 -(is a number \(that is, a \214xnum, bignum, or \215onum in the current)3.243 F -(re)72 219.006 Q(vision of Elk\) and raises an error otherwise.)-.275 E/F3 11 -/Times-Bold@0 SF 2.75(10.7. P)72 249.006 R(airs \(T_P)-.11 E(air\))-.11 E F0 --.165(Pa)97 266.606 S(irs ha).165 E .33 -.165(ve t)-.22 H .22 -.11(wo c).165 H -(omponents of type).11 E F2(Object)2.75 E F0 2.75(,t)C(he car and the cdr) -291.26 266.606 Q 2.75(,t)-.44 G(hat can be accessed as:)377.566 266.606 Q F1 -(PAIR\(pair_obj\)->car)100.346 289.109 Q(PAIR\(pair_obj\)->cdr)100.346 303.109 -Q F0 -1.1 -.88(Tw o)72 325.609 T(macros)3.836 E F2(Car\(\))2.956 E F0(and)2.956 -E F2(Cdr\(\))2.956 E F0 .206(are pro)2.956 F .207 -(vided as shorthands for these e)-.165 F .207(xpressions, and another macro) --.165 F F2(Cons\(\))72 339.609 Q F0(can be used in place of)2.75 E F2 -(P_Cons\(\))2.75 E F0(to create a ne)2.75 E 2.75(wp)-.275 G(air)327.101 339.609 -Q 5.5(.T)-.605 G(he macro)353.072 339.609 Q F1(Check_List\(obj\))100.346 -362.112 Q F0 .932(checks whether the speci\214ed)72 384.612 R F2(Object)3.682 E -F0 .931(is either a pair or the empty list and signals an error other)3.682 F -(-)-.22 E 2.75(wise. The)72 398.612 R(prede\214ned function)2.75 E F1 -(int Fast_Length\(Object list\);)100.346 421.115 Q F0 .634 -(can be used to compute the length of the gi)72 443.615 R -.165(ve)-.275 G -3.385(nS).165 G .635(cheme list.)291.765 443.615 R .635 -(This function is more ef)6.135 F .635(\214cient than)-.275 F 1.859 -(the primiti)72 458.615 R -.165(ve)-.275 G F2(P_Length\(\))4.774 E F0 4.609(,b) -C 1.859(ecause it neither checks the type of the ar)197.521 458.615 R 1.858 -(gument nor whether the)-.198 F(gi)72 472.615 Q -.165(ve)-.275 G 2.75(nl).165 G -(ist is proper)101.81 472.615 Q 2.75(,a)-.44 G(nd the result need not be con) -163.696 472.615 Q -.165(ve)-.44 G(rted to a Scheme number).165 E 5.5(.T)-.605 G -(he function)424.297 472.615 Q F1(Object Copy_List\(Object list\);)100.346 -495.118 Q F0(returns a cop)72 517.618 Q 2.75(yo)-.11 G 2.75(ft)142.455 517.618 -S(he speci\214ed list \(including all its sublists\).)151.926 517.618 Q .349 -(As e)97 536.218 R .349(xplained in section 9.1, care must be tak)-.165 F .349 -(en when mixing calls to these macros, because)-.11 F F2(Cons\(\))72 550.218 Q -F0(may trigger a g)2.75 E(arbage collection: an e)-.055 E(xpression such as) --.165 E F1(Car\(x\) = Cons\(y, z\);)100.346 572.721 Q F0(is wrong, e)72 594.221 -Q -.165(ve)-.275 G 2.75(ni).165 G(f)141.828 594.221 Q F2(x)2.75 E F0 -(is properly `)2.75 E(`GC_Link)-.814 E(ed')-.11 E(', and should be replaced by) --.814 E F1(tmp = Cons\(x, y\);)100.346 616.724 Q(Car\(x\) = tmp;)100.346 -630.724 Q F0(or a similar sequence.)72 653.224 Q F3 2.75(10.8. Symbols)72 -683.224 R(\(T_Symbol\))2.75 E F2(Objects)97 701.824 Q F0 1.564(of type)4.314 F -F2(T_Symbol)4.314 E F0(ha)4.314 E 1.894 -.165(ve o)-.22 H 1.564 -(ne public component\212the symbol').165 F 4.314(sn)-.605 G 1.563 -(ame as a Scheme)423.861 701.824 R(string \(that is, an)72 715.824 Q F2(Object) -2.75 E F0(of type)2.75 E F2(T_String)2.75 E F0(\):)A EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 50 S 2.75(8-)288 50 S/F1 10/Courier@0 -SF(SYMBOL\(symbol_obj\)->name)100.346 86 Q F0 2.75(An)72 107.5 S .55 -.275 -(ew s)88.192 107.5 T(ymbol can be created by calling one of the functions).275 -E F1(Object Intern\(const char *\);)100.346 130.003 Q -(Object CI_Intern\(const char *\);)100.346 144.003 Q F0 2.465(with the ne)72 -166.503 R 5.215(ws)-.275 G(ymbol')142.975 166.503 Q 5.215(sn)-.605 G 2.465 -(ame as the ar)189.143 166.503 R(gument.)-.198 E/F2 11/Times-Italic@0 SF -(CI_Intern\(\))7.966 E F0 2.466(is the case-insensiti)5.216 F 2.796 -.165(ve v) --.275 H 2.466(ariant of)-.11 F F2(Intern\(\))72 181.503 Q F0 3.039(;i)C 3.039 -(tm)115.365 181.503 S .289(aps all upper case characters to lo)130.02 181.503 R -.289(wer case.)-.275 F F2(EQ\(\))5.788 E F0 .288(yields true for all)3.038 F F2 -(Objects)3.038 E F0(returned)3.038 E .953(by calls to)72 196.503 R F2 -(Intern\(\))3.703 E F0 .953(with strings with the same contents \(or calls to) -3.703 F F2(CI_Intern\(\))3.704 E F0 .954(with strings that)3.704 F 1.34 -(are identical after case con)72 211.503 R -.165(ve)-.44 G 4.089(rsion\). This) -.165 F 1.339(is the main property that distinguishes symbols from)4.089 F -(strings in Scheme.)72 226.503 Q 3.4(As)97 245.103 S .651 -(ymbol that is used by more than one function can be stored in a global v) -112.621 245.103 R .651(ariable to sa)-.275 F -.165(ve)-.22 G(calls to)72 -259.103 Q F2(Intern\(\))2.75 E F0 5.5(.T)C(his can be done using the con) -155.402 259.103 Q -.165(ve)-.44 G(nience function).165 E F1 -(void Define_Symbol\(Object *var, const char *name\);)100.346 281.606 Q F2 -(De\214ne_Symbol\(\))72 304.106 Q F0 2.09(is called with the address of a v) -4.84 F 2.09(ariable where the ne)-.275 F 2.089(wly-interned symbol is)-.275 F -.117(stored and the name of the symbol to be handed to)72 319.106 R F2 -(Intern\(\))2.867 E F0 5.617(.T)C .117(he function adds the ne)347.139 319.106 -R 2.868(ws)-.275 G .118(ymbol to)464.458 319.106 R(the g)72 333.106 Q -(arbage collector')-.055 E 2.75(sr)-.605 G(oot set to mak)177.941 333.106 Q -2.75(ei)-.11 G 2.75(tr)250.552 333.106 S -(eachable \(as described in section 12.3.)260.023 333.106 Q(Example:)5.5 E F1 -(static Object sym_else;)100.346 355.609 Q(...)100.346 369.609 Q -(void elk_init_example\(void\) {)100.346 383.609 Q -(Define_Symbol\(&sym_else, "else"\);)127.846 397.609 Q(...)127.846 411.609 Q(}) -100.346 425.609 Q/F3 11/Times-Bold@0 SF 2.75(10.8.1. The)72 463.109 R -(Non-Printing Symbol)2.75 E F0 1.077(By con)97 481.709 R -.165(ve)-.44 G 1.077 -(ntion, Scheme primiti).165 F -.165(ve)-.275 G 3.827(st).165 G 1.077 -(hat do not ha)258.234 481.709 R 1.406 -.165(ve a u)-.22 H 1.076 -(seful return v).165 F 1.076(alue \(for e)-.275 F 1.076(xample the)-.165 F .406 -(output primiti)72 496.709 R -.165(ve)-.275 G .406(s\) return the `).165 F .407 -(`non-printing symbol')-.814 F 3.157('i)-.814 G 3.157(nE)310.081 496.709 S -3.157(lk. The)325.459 496.709 R .407(name of this symbol consists of)3.157 F -.781(the empty string; it does not produce an)72 511.709 R 3.531(yo)-.165 G -.781(utput when it is printed, for e)266.293 511.709 R .78 -(xample, by the tople)-.165 F -.165(ve)-.275 G(l).165 E(read-e)72 526.709 Q --.275(va)-.275 G 1.642(l-print loop.).275 F 1.642 -(In Scheme code, the non-printing symbol can be generated by using the)7.142 F -.096(reader syntax `)72 541.709 R(`#v')-.814 E 2.846('o)-.814 G 2.846(rb) -166.261 541.709 S 2.846(yc)178.27 541.709 S(alling)191.5 541.709 Q F2(string) -2.846 E/F4 11/Symbol SF(-)A F2(>symbol)A F0 .096(with the empty string.)2.846 F -.096(On the C language le)5.596 F -.165(ve)-.275 G(l,).165 E .131 -(the non-printing symbol is a)72 556.709 R -.275(va)-.22 G .132 -(ilable as the e).275 F .132(xternal v)-.165 F(ariable)-.275 E F2 -1.221(Vo) -2.882 G(id)1.221 E F0 2.882(,s)C 2.882(ot)367.82 556.709 S .132(hat primiti) -379.26 556.709 R -.165(ve)-.275 G 2.882(sl).165 G .132(acking a use-)445.7 -556.709 R(ful return v)72 570.709 Q(alue can use)-.275 E F1(return Void;) -100.346 593.212 Q F3 2.75(10.9. Strings)72 630.712 R(\(T_String\))2.75 E F2 -(Objects)97 649.312 Q F0 .627(of type string ha)3.377 F .957 -.165(ve t)-.22 H -.847 -.11(wo c).165 H .627 -(omponents\212the length and the contents of the string as a).11 F(pointer to) -72 663.312 Q F2 -.165(ch)2.75 G(ar).165 E F0(:)A F1(STRING\(string_obj\)->size) -100.346 685.815 Q(STRING\(string_obj\)->data)100.346 699.815 Q F0(The)72 -722.315 Q F2(data)3.854 E F0 1.105(component is not null-terminated, as a stri\ -ng itself may contain a null-byte as a v)3.854 F(alid)-.275 E EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(9-)288 51 S -(character in Elk.)72 86 Q 2.75(AS)5.5 G -(cheme string is created by calling the function)166.699 86 Q/F1 10/Courier@0 -SF(Object Make_String\(const char *init, int size\);)100.346 108.503 Q/F2 11 -/Times-Italic@0 SF(size)72 131.003 Q F0 1.328(is the length of the ne)4.078 F -1.328(wly-created string.)-.275 F F2(init)6.828 E F0 1.327 -(is either the null-pointer or a pointer to)4.078 F F2(size)4.077 E F0 -(characters that are copied into the ne)72 145.003 Q 2.75(wS)-.275 G -(cheme string.)249.815 145.003 Q -.165(Fo)5.5 G 2.75(re).165 G -(xample, the sequence)337.166 145.003 Q F1(Object str;)100.346 167.506 Q(...) -100.346 181.506 Q(str = Make_String\(0, 100\);)100.346 195.506 Q -(bzero\(STRING\(str\)->data, 100\);)100.346 209.506 Q F0 -(generates a string holding 100 null-bytes.)72 232.006 Q .136(Most primiti)97 -250.606 R -.165(ve)-.275 G 2.886(st).165 G .136(hat recei)172.622 250.606 R -.466 -.165(ve a S)-.275 H .136(cheme string as one of their ar).165 F .137 -(guments pass the string')-.198 F 2.887(sc)-.605 G(on-)489.337 250.606 Q .009 -(tents to a C function \(for e)72 265.606 R .009 -(xample a C library function\) that e)-.165 F .008(xpects an ordinary)-.165 F -2.758(,n)-.715 G .008(ull-terminated C)431.579 265.606 R 2.75(string. F)72 -279.606 R(or this purpose Elk pro)-.165 E(vides a function)-.165 E F1 -(char *Get_String\(Object\);)100.346 302.109 Q F0 .318 -(that returns the contents of the Scheme string ar)72 324.609 R .318 -(gument as a null-terminated C string.)-.198 F .319(An error is)5.818 F 1.376 -(raised if the ar)72 339.609 R 1.376(gument is not a string.)-.198 F F2 -(Get_String\(\))6.876 E F0 1.376(has to create a cop)4.126 F 4.126(yo)-.11 G -4.126(ft)411.123 339.609 S 1.376(he contents of the)421.97 339.609 R .528 -(Scheme string in order to append the null-character)72 354.609 R 6.029(.T) --.605 G 3.279(oa)315.464 354.609 S -.22(vo)328.907 354.609 S .529 -(id requiring the caller to pro).22 F .529(vide and)-.165 F .858 -(release space for the cop)72 369.609 R -.715(y,)-.11 G F2(Get_String\(\))4.323 -E F0 .858(operates on and returns NUMSTRB)3.608 F .857(UFS internal, c)-.11 F -(ycli-)-.165 E .818(cally reused b)72 384.609 R(uf)-.22 E .818(fers \(the v) --.275 F .818(alue of NUMSTRB)-.275 F .818(UFS is 3 in Elk 3.0\).)-.11 F -(Consequently)6.318 E 3.569(,n)-.715 G 3.569(om)449.815 384.609 S .819 -(ore than)467.442 384.609 R(NUMSTRB)72 399.609 Q .266(UFS results of)-.11 F F2 -(Get_String\(\))3.016 E F0 .265 -(can be used simultaneously \(which is rarely a problem in)3.016 F 5.082 -(practice\). As)72 414.609 R 2.332(an e)5.082 F 2.332(xample, a Scheme primiti) --.165 F 2.663 -.165(ve t)-.275 H 2.333(hat calls the C library function).165 F -F2 -.11(ge)5.083 G(ten).11 E(v\(\))-.44 E F0(and)5.083 E -(returns #f on error can be written as)72 428.609 Q F1 -(Object p_getenv\(Object name\) {)100.346 451.112 Q -(char *ret = getenv\(Get_String\(name\)\);)127.846 465.112 Q -(return ret ? Make_String\(ret, strlen\(ret\)\) : False;)127.846 479.112 Q(}) -100.346 493.112 Q F0 1.488(If more strings are to be used simultaneously)97 -519.212 R 4.237(,t)-.715 G 1.487(he macro)314.416 519.212 R F2(Get_String_Stac) -4.237 E(k\(\))-.22 E F0 1.487(can be used)4.237 F 3.163(instead. It)72 534.212 -R .413(is called with the Scheme object and the name of a v)3.163 F .414 -(ariable of type `)-.275 F(`char*')-.814 E 3.164('t)-.814 G 3.164(ow)468.452 -534.212 S(hich)485.058 534.212 Q 2.674(the C string will be assigned.)72 -549.212 R F2(Get_String_Stac)8.174 E(k\(\))-.22 E F0 2.673 -(allocates space by means of)5.424 F F2(Alloca\(\))5.423 E F0(\(as)5.423 E --.165(ex)72 564.212 S .783(plained in section 7.5\); hence a call to).165 F F2 -(Alloca_Be)3.534 E(gin)-.44 E F0 .784 -(must be placed in the declarations of the)3.534 F -(enclosing function or block, and)72 579.212 Q F2(Alloca_End)2.75 E F0 -(must be called before returning from it.)2.75 E .97(An additional function)97 -597.812 R F2(Get_Str)3.719 E(sym\(\))-.11 E F0 .969(and an additional macro) -3.719 F F2(Get_Str)3.719 E(sym_Stac)-.11 E(k\(\))-.22 E F0 .969(are pro-)3.719 -F .333(vided by Elk; these are identical to)72 612.812 R F2(Get_String\(\)) -3.083 E F0(and)3.084 E F2(Get_String_Stac)3.084 E(k\(\))-.22 E F0 3.084(,r)C -(especti)401.703 612.812 Q -.165(ve)-.275 G(ly).165 E 3.084(,e)-.715 G .334 -(xcept that)460.59 612.812 R .198(the Scheme object may also be a symbol.)72 -627.812 R .198(In this case, the symbol')5.698 F 2.948(sn)-.605 G .198 -(ame is tak)380.715 627.812 R .197(en as the string to)-.11 F(be con)72 642.812 -Q -.165(ve)-.44 G(rted.).165 E 1.193(As an e)97 661.412 R 1.193 -(xample for the use of)-.165 F F2(Get_String_Stac)3.943 E(k\(\))-.22 E F0 3.944 -(,h)C 1.194(ere is a simple Scheme primiti)331.308 661.412 R -.165(ve)-.275 G -F2 -.22(ex)4.109 G(ec).22 E F0 .759 -(that is called with the name of a program and one more more ar)72 676.412 R -.758(guments and passes them to the)-.198 F F2 -.22(ex)72 690.412 S(ecv\(\)).22 -E F0(system call:)2.75 E EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(0-)288 51 S/F1 10/Courier@0 -SF(Object p_exec\(int argc, Object *argv\) {)100.346 86 Q(char **argp; int i;) -127.846 100 Q(Alloca_Begin;)127.846 114 Q -(Alloca\(argp, char**, argc*sizeof\(char *\)\);)127.846 136.4 Q -(for \(i = 1; i < argc; i++\))127.846 150.4 Q -(Get_String_Stack\(argv[i], argp[i-1]\);)155.346 164.4 Q(argp[i-1] = 0;)127.846 -178.4 Q(execv\(Get_String\(*argv\), argp\);)127.846 192.4 Q -(/* must not return */)331.846 192.4 Q/F2 10/Times-Italic@0 SF(err)127.846 -206.4 Q(or)-.45 E(...)-1.11 E F1(})100.346 220.4 Q(elk_init_example\(\) {) -100.346 242.8 Q(Define_Primitive\(p_exec, "exec", 2, MANY, VARARGS\);)127.846 -256.8 Q(})100.346 270.8 Q F0(The primiti)72 292.3 Q .33 -.165(ve c)-.275 H -(an be used as follo).165 E(ws:)-.275 E F1(\(exec "/bin/ls" "ls" "-l"\))100.346 -314.803 Q/F3 11/Times-Italic@0 SF(Get_String\(\))72 337.303 Q F0 1.507 -(could not be used in this primiti)4.256 F -.165(ve)-.275 G 4.257(,b).165 G -1.507(ecause the number of string ar)303.305 337.303 R 1.507(guments may)-.198 -F -.165(ex)72 352.303 S(ceed the number of static b).165 E(uf)-.22 E -(fers maintained by)-.275 E F3(Get_String\(\))2.75 E F0(.)A/F4 11/Times-Bold@0 -SF 2.75(10.10. V)72 382.303 R(ectors \(T_V)-1.1 E(ector\))-1.1 E F0 .31 -(The layout of)97 400.903 R F3(Objects)3.06 E F0 .31(of type v)3.06 F .31 -(ector is identical to that of strings, e)-.165 F .31(xcept that the)-.165 F F3 -(data)3.06 E F0(com-)3.059 E 2.465(ponent is an array of)72 415.903 R F3 -(Objects)5.215 E F0 7.965(.A)C(function)234.972 415.903 Q F3(Mak)5.215 E(e_V) --.11 E(ector\(\))-1.221 E F0 2.465(creates a ne)5.215 F 5.216(wv)-.275 G 2.466 -(ector as has been)421.769 415.903 R -.165(ex)72 430.903 S -(plained in section 9.1 abo).165 E -.165(ve)-.165 G(.).165 E F4 2.75(10.11. P) -72 460.903 R(orts \(T_P)-.22 E(ort\))-.22 E F0 .848(The components of)97 -479.503 R F3(Objects)3.598 E F0 .848(of type)3.598 F F3(T_P)3.598 E(ort)-.88 E -F0 .848(are not normally accessed directly from within)3.598 F(C/C++ code, e)72 -493.503 Q(xcept for)-.165 E F1(PORT\(port_obj\)->closefun)100.346 516.006 Q F0 -.099(which is a pointer to a function recei)72 538.506 R .099(ving an ar)-.275 -F .1(gument of type `)-.198 F(`FILE*')-.814 E 2.85('\()-.814 G .1(for e)395.316 -538.506 R .1(xample, a pointer to)-.165 F F3(fclose\(\))72 553.506 Q F0 1.967 -(\), pro)B 1.967(vided that the port is a \214le port.)-.165 F 1.967 -(It is called automatically whene)7.467 F -.165(ve)-.275 G 4.716(rt).165 G -1.966(he port is)459.126 553.506 R .194(closed, either because)72 568.506 R F3 -(close-input-port)2.944 E F0(or)2.944 E F3(close-output-port)2.944 E F0 .195 -(is applied to it or because the g)2.944 F(arbage)-.055 E -(collector has determined that the port is no longer reachable.)72 583.506 Q -2.75(An)72 601.106 S .55 -.275(ew \214)88.192 601.106 T -(le port is created by calling).275 E F1 -(Object Make_Port\(int flags, FILE *f, Object name\);)100.346 623.609 Q F0 .037 -(with a \214rst ar)72 646.109 R .037(gument of either zero \(output port\),) --.198 F F3(P_INPUT)2.787 E F0 .036(\(input port\) or)2.787 F F3(P_BIDIR)2.786 E -F0(\(bidirectional)2.786 E(port\), the \214le pointer)72 660.109 Q 2.75(,a)-.44 -G(nd the name of the \214le as a Scheme string.)172.991 660.109 Q(The macros) -5.5 E F1(Check_Input_Port\(obj\))100.346 682.612 Q(Check_Output_Port\(obj\)) -100.346 696.612 Q F0 .278(check whether the speci\214ed port is open and is ca\ -pable of input \(or output, respecti)72 719.112 R -.165(ve)-.275 G .279 -(ly\); an error).165 F(is raised otherwise.)72 734.112 Q EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(1-)288 51 S 2.313 -.88(To a) -97 87 T .553(rrange for a ne).88 F .552 -(wly-created port to be closed automatically when it becomes g)-.275 F .552 -(arbage, it)-.055 F(must be passed to the function)72 101 Q/F1 11 -/Times-Italic@0 SF(Re)2.75 E(gister_Object\(\))-.44 E F0(as follo)2.75 E(ws:) --.275 E/F2 10/Courier@0 SF(Register_Object\(the_port, 0, Terminate_File, 0\);) -100.346 123.503 Q F1(Re)72 146.003 Q(gister_Object\(\))-.44 E F0 .559 -(will be described in section 12.4.)3.309 F .56 -(The current input and output port as well as)6.059 F .002 -(ports pointing to the program')72 161.003 R 2.751(si)-.605 G .001 -(nitial standard input and output are a)214.096 161.003 R -.275(va)-.22 G .001 -(ilable as four e).275 F .001(xternal v)-.165 F(ari-)-.275 E(ables of type)72 -175.003 Q F1(Object)2.75 E F0(:)A F2 30(Curr_Input_Port Standard_Input_Port) -100.346 197.506 R 24(Curr_Output_Port Standard_Output_Port)100.346 211.506 R F0 -(The function)72 233.006 Q F2(void Reset_IO\(int destructive_flag\);)100.346 -255.509 Q F0 .641(clears an)72 278.009 R 3.391(yi)-.165 G .641(nput queued at \ -the current input port, then \215ushes the current output port \(if)123.211 -278.009 R F1(destruc-)3.392 E(tive_\215a)72 293.009 Q(g)-.11 E F0 .259 -(is zero\) or discards characters queued at the output port \(if)3.01 F F1 -(destructive_\215a)3.009 E(g)-.11 E F0 .259(is non-zero\),)3.009 F 1.179(and \ -\214nally resets the current input and current output port to their initial v) -72 308.009 R 1.179(alues \(the program')-.275 F(s)-.605 E .223 -(standard input and standard output\).)72 323.009 R .223 -(This function is typically used in error situations to reset the)5.723 F -(current ports to a de\214ned state.)72 338.009 Q 1.352 -(In addition to the standard Scheme primiti)97 356.609 R -.165(ve)-.275 G 4.102 -(sf).165 G 1.352(or output, e)312.868 356.609 R 1.352 -(xtensions and applications can)-.165 F(use a function)72 370.609 Q F2 -(void Printf\(Object port, char *fmt, ...\);)100.346 393.112 Q F0 .45 -(to send output to a Scheme port using C)72 415.612 R F1(printf)3.2 E F0 5.95 -(.T)C .45(he \214rst ar)294.674 415.612 R .449(gument to)-.198 F F1(Printf\(\)) -3.199 E F0 .449(is the Scheme port)3.199 F .723(to which the output will be se\ -nt \(it must be an output port\); the remaining ar)72 430.612 R .723 -(guments are that of)-.198 F(the C library function)72 445.612 Q F1(printf\(\)) -2.75 E F0(.)A 1.76 -.88(To o)72 463.212 T(utput a Scheme object, the follo).88 -E(wing function can be used in addition to the usual primiti)-.275 E -.165(ve) --.275 G(s:).165 E F2(void Print_Object\(Object obj, Object port, int raw_flag,) -100.346 485.715 Q(int print_depth, int print_length\);)167.346 499.715 Q F0 -.538(The ar)72 522.215 R .538(guments to)-.198 F F1(Print_Object\(\))3.288 E F0 -.538(are identical to the ar)3.288 F .538(guments of the `)-.198 F .538 -(`print function')-.814 F 3.288('t)-.814 G .538(hat must)465.875 522.215 R -2.114(be supplied for each user)72 537.215 R 2.115 -(-de\214ned Scheme type \(as described in section 11: the)-.22 F F1(Object) -4.865 E F0 2.115(to be)4.865 F .061(printed, the output port, a \215ag indicat\ -ing that the object should be printed in human-readable form)72 552.215 R(\()72 -567.215 Q F1(display)A F0 .108(sets the \215ag,)2.858 F F1(write)2.858 E F0 -.108(does not\), and the `)2.858 F .109(`print depth')-.814 F 2.859('a)-.814 G -.109(nd `)343.779 567.215 R .109(`print length')-.814 F 2.859('f)-.814 G .109 -(or that operation.)428.322 567.215 R -.165(Fo)72 581.215 S 2.75(rd).165 G(eb) -95.364 581.215 Q(ugging purposes, the macro)-.22 E F2(Print\(obj\);)100.346 -603.718 Q F0(may be used to output an)72 626.218 Q F1(Object)2.75 E F0 -(to the current output port.)2.75 E 2.75(Af)72 643.818 S(unction)86.355 643.818 -Q F2(void Load_Source_Port\(Object port\);)100.346 666.321 Q F0 1.217 -(can be used to load Scheme e)72 688.821 R 1.216 -(xpressions from a \214le that has already been opened as a Scheme)-.165 F -(port.)72 703.821 Q EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(2-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(10.12. Miscellaneous)72 87 R -.814(Ty)2.75 G(pes).814 E -F0 .377(Other b)97 105.6 R .377(uilt-in Scheme types are le)-.22 F .377 -(xical en)-.165 F .377(vironments, primiti)-.44 F .708 -.165(ve p)-.275 H .378 -(rocedures, compound pro-).165 F 3.44 -(cedures, macros, continuations \(also called `)72 120.6 R 3.439 -(`control points')-.814 F 6.189('a)-.814 G 6.189(taf)369.087 120.6 S 3.989 --.275(ew p)393.07 120.6 T 3.439(laces in Elk\), and).275 F 3.695 -(promises. These)72 135.6 R .946 -(types are not normally created or manipulated from within C or C++ code.)3.695 -F(If)6.446 E .544(you are writing a specialized e)72 150.6 R .543 -(xtension that depends on the C representation of these types, refer)-.165 F -2.146(to the declarations in the public include \214le `)72 165.6 R(`object.h') --.814 E 4.897('\()-.814 G 2.147(which is included automatically via)338.981 -165.6 R -.814(``)72 180.6 S(scheme.h').814 E('\).)-.814 E(Le)97 199.2 Q .066 -(xical en)-.165 F .066(vironments are identical to pairs e)-.44 F .066 -(xcept that the type is)-.165 F/F2 11/Times-Italic@0 SF(T_En)2.816 E(vir)-.44 E -(onment)-.495 E F0 .066(rather than)2.816 F F2(T_P)72 214.2 Q(air)-.88 E F0 -5.852(.T)C .352(he current en)117.617 214.2 R .353 -(vironment and the initial \(gobal\) en)-.44 F .353(vironment are a)-.44 F --.275(va)-.22 G .353(ilable as the e).275 F(xternal)-.165 E 3.026(Cv)72 229.2 S -(ariables)87.588 229.2 Q F2(The_En)3.026 E(vir)-.44 E(onment)-.495 E F0(and) -3.026 E F2(Global_En)3.026 E(vir)-.44 E(onment)-.495 E F0 5.776(.T)C .276 -(he prede\214ned type constants for primi-)331.847 229.2 R(ti)72 244.2 Q -.165 -(ve)-.275 G 2.968(s, compound procedures \(the results of e).165 F -.275(va) --.275 G 2.969(luating lambda e).275 F 2.969(xpressions\), and macros are)-.165 -F F2(T_Primitive)72 258.2 Q F0(,)A F2(T_Compound)2.75 E F0 2.75(,a)C(nd)200.337 -258.2 Q F2(T_Macr)2.75 E(o)-.495 E F0 2.75(,r)C(especti)263.697 258.2 Q -.165 -(ve)-.275 G(ly).165 E 5.5(.T)-.715 G(he function)327.002 258.2 Q/F3 10 -/Courier@0 SF(void Check_Procedure\(Object\);)100.346 280.703 Q F0 .253(checks\ - whether the speci\214ed object is either a compound procedure or a primiti)72 -303.203 R .582 -.165(ve p)-.275 H .252(rocedure with).165 F 3.43(ac)72 318.203 -S .68(alling discipline dif)85.198 318.203 R .68(ferent from)-.275 F F2(NOEV) -3.43 E(AL)-.66 E F0 .68(and raises an error otherwise.)3.43 F .681 -(The type constant for)6.18 F .806(continuations is)72 333.203 R F2(T_Contr) -3.556 E(ol)-.495 E F0 6.305(.`)C(`Promise')202.985 333.203 Q 3.555('i)-.814 G -3.555(st)255.831 333.203 S .805(he type of object returned by the special form) -266.723 333.203 R F2(delay)3.555 E F0(;)A -(the corresponding type constant is named)72 348.203 Q F2(T_Pr)2.75 E(omise) --.495 E F0(.)A F1 2.75(11. De\214ning)72 378.203 R(New Scheme T)2.75 E(ypes) --.814 E F0 3.916(An)97 396.803 S -.275(ew)114.358 396.803 S 3.916(,d)-.44 G -1.166(isjoint Scheme type is re)138.36 396.803 R 1.166 -(gistered with Elk by calling the function)-.165 F F2(De\214ne_T)3.916 E -(ype\(\))-.814 E F0(,)A .193(similar to)72 411.803 R F2(De\214ne_Primitive\(\)) -2.943 E F0 .193(for ne)2.943 F 2.942(wp)-.275 G(rimiti)244.685 411.803 Q -.165 -(ve)-.275 G 2.942(s. Making).165 F 2.942(an)2.942 G .742 -.275(ew t)342.292 -411.803 T .192(ype kno).275 F .192(wn to Elk in)-.275 F -.22(vo)-.44 G(lv).22 E -.192(es pass-)-.165 F 1.019(ing it information about the underlying C/C++ repr\ -esentation of the type and a number of C or)72 426.803 R .223 -(C++ functions that are `)72 441.803 R .223(`called back')-.814 F 2.973('b) --.814 G 2.973(yt)246.016 441.803 S .223(he interpreter in v)257.547 441.803 R -.222(arious situations to pass control to the)-.275 F -(code that implements the type.)72 455.803 Q(The prototype of)5.5 E F2 -(De\214ne_T)2.75 E(ype\(\))-.814 E F0(is:)2.75 E F3 -(int Define_Type\(int zero, const char *name,)100.346 478.306 Q -(int \(*size\)\(Object\), int const_size,)127.846 492.306 Q -(int \(*eqv\)\(Object, Object\),)127.846 506.306 Q -(int \(*equal\)\(Object, Object\),)127.846 520.306 Q -(int \(*print\)\(Object, Object, int, int, int\),)127.846 534.306 Q -(int \(*visit\)\(Object*, int \(*\)\(Object*\)\)\);)127.846 548.306 Q F0 -(The ar)72 570.806 Q(guments to)-.198 E F2(De\214ne_Primitive\(\))2.75 E F0 -(are in detail:)2.75 E F2(zer)97 589.406 Q(o)-.495 E F0 1.588(The \214rst ar) -102.5 604.406 R 1.588(gument must be zero \(in early v)-.198 F 1.589 -(ersions of Elk it could be used to request a)-.165 F<8c78>102.5 619.406 Q -(ed, prede\214ned type number for the ne)-.165 E 2.75(wt)-.275 G(ype\);)292.69 -619.406 Q F2(name)97 638.006 Q F0(The name of the ne)102.5 653.006 Q 2.75(wt) --.275 G(ype.)200.895 653.006 Q F2(size)97 671.606 Q 2.75(,c)-.11 G(onst_size) -123.774 671.606 Q F0 .09(The size of the corresponding C type \(usually a)102.5 -686.606 R F2(struct)2.839 E F0 2.839(\)i)C 2.839(nb)349.025 686.606 S .089 -(ytes, gi)362.864 686.606 R -.165(ve)-.275 G 2.839(na).165 G 2.839(so)417.899 -686.606 S .089(ne of tw)430.517 686.606 R .089(o, mutu-)-.11 F(ally-e)102.5 -701.606 Q(xclusi)-.165 E .444 -.165(ve a)-.275 H -.198(rg).165 G(uments:).198 E -F2(size)2.864 E F0 2.864(,ap)C .114 -(ointer to a function called by the interpreter to determine)253.381 701.606 R -.059(the size of an object \(for types whose indi)102.5 716.606 R .059 -(vidual members are of dif)-.275 F .059(ferent sizes, such as the)-.275 F F2 -(vector)102.5 731.606 Q F0 .819(type\); and)3.569 F F2(const_size)3.569 E F0 -3.569(,t)C .819(he size as a constant \(for all other types\).)236.841 731.606 -R 3.57(An)6.319 G .82(ull-pointer is)446.651 731.606 R EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(3-)288 51 S(gi)102.5 87 Q --.165(ve)-.275 G 2.75(nf).165 G(or)132.915 87 Q/F1 11/Times-Italic@0 SF -(const_size)2.75 E F0(if)2.75 E F1(size)2.75 E F0(is to be used instead.)2.75 E -F1(eqv)97 105.6 Q 2.75(,e)-.814 G(qual)121.838 105.6 Q F0 1.127 -(Pointers to \(callback\) functions that are in)102.5 120.6 R -.22(vo)-.44 G --.11(ke).22 G 3.877(db).11 G 3.876(yt)329.278 120.6 S 1.126 -(he interpreter whene)341.712 120.6 R -.165(ve)-.275 G 3.876(rt).165 G 1.126 -(he Scheme)454.914 120.6 R(predicate)102.5 135.6 Q F1(equal?)3.993 E F0 3.993 -(,o)C(r)188.993 135.6 Q F1(eqv?)3.994 E F0(respecti)3.994 E -.165(ve)-.275 G -(ly).165 E 3.994(,i)-.715 G 3.994(sa)283.211 135.6 S 1.244 -(pplied to members of the ne)296.368 135.6 R 1.244(wly de\214ned type.)-.275 F -.645(As an application-de\214ned type is opaque from the interpreter')102.5 -150.6 R 3.395(sp)-.605 G .645(oint of vie)392.116 150.6 R 2.074 -.715(w, t) --.275 H .644(he equality).715 F 1.435(predicates ha)102.5 165.6 R 1.765 -.165 -(ve t)-.22 H 4.185(ob).165 G 4.185(es)194.09 165.6 S 1.435 -(upplied by the application or e)207.438 165.6 R 4.185(xtension. Each)-.165 F -1.435(of these \(boolean\))4.185 F(functions is passed tw)102.5 180.6 Q 2.75 -(oo)-.11 G(bjects of the ne)212.995 180.6 Q 2.75(wt)-.275 G(ype as ar)293.372 -180.6 Q(guments when called back.)-.198 E F1(print)97 199.2 Q F0 2.889(Ap)102.5 -214.2 S .139(ointer to a function that is used by the interpreter to print a m\ -ember of this type.)118.831 214.2 R(When)5.638 E 1.994 -(calling the print function, the interpreter passes as ar)102.5 229.2 R 1.995 -(guments the Scheme object to be)-.198 F .164(printed, a Scheme)102.5 244.2 R -F1(port)2.913 E F0 .163 -(to which the output is to be sent, a \215ag indicating whether output is)2.913 -F 1.184(to be rendered in human-readable form \()102.5 259.2 R F1(display)A F0 -1.185(Scheme primiti)3.935 F -.165(ve)-.275 G 3.935(\)o).165 G 3.935(rm)415.464 -259.2 S(achine-readable,)431.62 259.2 Q(read-write-in)102.5 274.2 Q -.275(va) --.44 G 1.946(riance preserving form \().275 F F1(write)A F0 1.946 -(\), and \214nally the current remainders of the)B(maximum)102.5 289.2 Q F1 -.814(print depth)3.564 F F0(and)3.564 E F1 .814(print length)3.564 F F0 6.314 -(.T)C .814(he return v)291.337 289.2 R .814 -(alue of this function is not used \(the)-.275 F(type is)102.5 304.2 Q F1(int) -2.75 E F0(for historical reasons\).)2.75 E F1(visit)97 322.8 Q F0 3.51(Ap)102.5 -337.8 S .76(ointer to a `)119.452 337.8 R(`visit')-.814 E 3.51('f)-.814 G .76 -(unction called by the g)208.237 337.8 R .759 -(arbage collector when tracing the set of all)-.055 F 1.584 -(currently accessible objects.)102.5 352.8 R 1.585 -(This function is only required if other Scheme objects are)7.085 F .865 -(reachable from objects of the ne)102.5 367.8 R .865 -(wly de\214ned type \(a null pointer can be gi)-.275 F -.165(ve)-.275 G 3.615 -(no).165 G(therwise\).)460.319 367.8 Q .569(It is in)102.5 382.8 R -.22(vo)-.44 -G -.11(ke).22 G 3.32(dw).11 G .57(ith tw)169.131 382.8 R 3.32(oa)-.11 G -.198 -(rg)208.661 382.8 S .57(uments: a pointer to the object being visited by the g) -.198 F .57(arbage col-)-.055 F(lector)102.5 397.8 Q 3.49(,a)-.44 G .74(nd a po\ -inter to another function to be called once with the address of each object) -138.231 397.8 R 1.544(accessible through the original object.)102.5 412.8 R --.165(Fo)7.044 G 4.294(re).165 G 1.544(xample, the implementation of pairs w) -306.959 412.8 R(ould)-.11 E .995(supply a visit function that in)102.5 427.8 R --.22(vo)-.44 G -.11(ke).22 G 3.744(si).11 G .994(ts second ar)267.813 427.8 R -.994(gument twice\212once with the address of)-.198 F -(the car of the original object, and once with the address of the cdr)102.5 -442.8 Q(.)-.605 E .82(The return v)97 461.4 R .82(alue of)-.275 F F1 -(De\214ne_T)3.57 E(ype\(\))-.814 E F0 .821(is a small, unique inte)3.57 F .821 -(ger identifying the type; it is usu-)-.165 F(ally stored in a `)72 476.4 Q -(`T_*')-.814 E 2.75('\()-.814 G(or `)176.984 476.4 Q(`t_*')-.814 E('\) v)-.814 -E(ariable follo)-.275 E(wing the con)-.275 E -.165(ve)-.44 G -(ntion used for the b).165 E(uilt-in types.)-.22 E 1.422(In the current v)97 -495 R 1.422(ersion of Elk,)-.165 F F1(De\214ne_T)4.172 E(ype\(\))-.814 E F0 -1.421(cannot be used to de\214ne ne)4.172 F 4.171(w`)-.275 G(`pointer)442.719 -495 Q(-less')-.22 E(')-.814 E(types resembling b)72 510 Q -(uilt-in types such as)-.22 E F1(\214xnum)2.75 E F0(or)2.75 E F1(boolean)2.75 E -F0(.)A .063(The \214rst component of the C structure implementing a user)97 -528.6 R .063(-de\214ned Scheme type must be an)-.22 F F1(Object)72 543.6 Q F0 -3.527(;i)C .777(ts space is used by the g)110.969 543.6 R .777 -(arbage collector to store a special tag indicating that the object)-.055 F -1.023(has been forw)72 558.6 R 3.773(arded. If)-.11 F 1.023 -(you are de\214ning a type that has se)3.773 F -.165(ve)-.275 G 1.024 -(ral components one of which is an).165 F F1(Object)72 573.6 Q F0 3.18(,j)C .43 -(ust mo)110.314 573.6 R .76 -.165(ve t)-.165 H(he).165 E F1(Object)3.18 E F0 -.43(to the front of the)3.18 F F1(struct)3.179 E F0 3.179 -(declaration. Otherwise)3.179 F .429(insert an additional)3.179 F F1(Object)72 -588.6 Q F0(component.)2.75 E .173(The Scheme primiti)97 607.2 R .503 -.165 -(ve t)-.275 H .174(hat instantiates a ne).165 F 2.924(wt)-.275 G .174 -(ype can request heap space for the ne)301.286 607.2 R 2.924(wo)-.275 G(bject) -482.616 607.2 Q(by calling the function)72 621.2 Q F1(Alloc_Object\(\))2.75 E -F0(:)A/F2 10/Courier@0 SF -(Object Alloc_Object\(int size, int type, int const_flag\);)100.346 643.703 Q -F0 .401(The ar)72 666.203 R .401(guments to)-.198 F F1(Alloc_Object\(\))3.151 E -F0 .401(are the size of the object in bytes \(usually obtained by applying) -3.151 F F1(sizeof)72 681.203 Q F0 1.49(to the underlying)4.24 F F1(struct)4.24 -E F0 1.49(\), the type of which the ne)B 4.24(wo)-.275 G 1.49 -(bject is a member \(i.)350.256 681.203 R 1.491(e. the return)1.833 F -.275(va) -72 696.203 S 1.602(lue of).275 F F1(De\214ne_T)4.352 E(ype\(\))-.814 E F0 1.602 -(\), and a \215ag indicating whether the ne)B 1.601 -(wly created object is to be made)-.275 F(read-only)72 711.203 Q 5.5(.T)-.715 G -(he return v)128.408 711.203 Q(alue is a fully initialized)-.275 E F1(Object) -2.75 E F0(.)A EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(4-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(11.1. Example)72 87 R -.275(fo)2.75 G 2.75(raU).275 G -(ser)176.522 87 Q(-De\214ned Scheme T)-.407 E(ype)-.814 E F0 .608(Figure 5 sho) -97 105.6 R .608(ws the sk)-.275 F .609(eleton of an e)-.11 F .609 -(xtension that pro)-.165 F .609(vides a simple Scheme interf)-.165 F .609 -(ace to the)-.11 F(UNIX)72 120.6 Q/F2 11/Times-Italic@0 SF(ndbm)4.207 E F0 -1.456(library; it can be loaded dynamically into the Scheme interpreter)4.207 F -4.206(,o)-.44 G 4.206(ri)441.277 120.6 S 1.456(nto an Elk-)452.204 120.6 R -1.894 -(based application that needs access to a simple database from within the e)72 -135.6 R 1.895(xtension language.)-.165 F 1.33(Please refer to your system')72 -150.6 R 4.079(sd)-.605 G 1.329(ocumentation if you are not f)213.376 150.6 R -1.329(amiliar with)-.11 F F2(ndbm)4.079 E F0 6.829(.T)C 1.329(he e)447.539 -150.6 R(xtension)-.165 E .718(de\214nes a ne)72 165.6 R 2.148 -.715(w, \214) --.275 H .718(rst-class Scheme type).715 F F2(dbm-\214le)3.468 E F0 .718 -(corresponding to the)3.468 F F2(DBM)3.469 E F0 .719(type de\214ned by the C) -3.469 F(library)72 180.6 Q 6.593(.A)-.715 G -.055(ga)117.896 180.6 S 1.093 -(in, note the naming con).055 F -.165(ve)-.44 G 1.093(ntion to use lo).165 F -(wer)-.275 E 1.093(-case for ne)-.22 F 3.842(wi)-.275 G 1.092 -(denti\214ers \(in contrast to)395.927 180.6 R(the prede\214ned ones\).)72 -195.6 Q(______________________________________________________________________\ -________)75 223.1 Q/F3 10/Courier@0 SF(#include )72 242.6 Q -(#include )72 256.6 Q(int t_dbm;)72 279 Q(struct s_dbm {)72 301.4 Q -(Object unused;)99.5 315.4 Q(DBM *dbm;)99.5 329.4 Q(char alive;)99.5 343.4 Q -(/* 0: has been closed, else 1 */)183.5 343.4 Q(};)72 357.4 Q -(#define DBMF\(obj\) \(\(struct s_dbm *\)POINTER\(obj\)\))72 379.8 Q -(int dbm_equal\(Object a, Object b\) {)72 402.2 Q(return DBMF\(a\)->alive && D\ -BMF\(b\)->alive && DBMF\(a\)->dbm == DBMF\(b\)->dbm;)99.5 416.2 Q(})72 430.2 Q -(int dbm_print\(Object d, Object port, int raw, int length, int depth\) {)72 -452.6 Q(Printf\(port, "#[dbm-file %lu]", DBMF\(d\)->dbm\);)99.5 466.6 Q -(return 0;)99.5 480.6 Q(})72 494.6 Q(Object p_is_dbm\(Object d\) {)72 517 Q -(return TYPE\(d\) == t_dbm ? True : False;)99.5 531 Q(})72 545 Q -(void elk_init_dbm\(void\) {)72 567.4 Q -(t_dbm = Define_Type\(0, "dbm-file", 0, sizeof\(struct s_dbm\),)99.5 581.4 Q -(dbm_equal, dbm_equal, dbm_print, 0\);)127 595.4 Q 18 -(Define_Primitive\(p_is_dbm, "dbm-file?",)99.5 617.8 R(1, 1, EVAL\);)6 E 6 -(Define_Primitive\(p_dbm_open, "dbm-open", 2,)99.5 631.8 R(3, VARARGS\);)6 E -(Define_Primitive\(p_dbm_close, "dbm-close", 1, 1, EVAL\);)99.5 645.8 Q(})72 -659.8 Q/F4 10/Times-Bold@0 SF(Figur)192.95 677.6 Q 2.5(e5)-.18 G(:)228.6 677.6 -Q/F5 10/Times-Roman@0 SF(Sk)5 E(eleton of a UNIX ndbm e)-.1 E(xtension)-.15 E -F0(___________________________________________________________________________\ -___)75 696.2 Q EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(5-)288 51 S 3.502 -(The code sho)97 87 R 3.502(wn in Figure 5 declares a v)-.275 F(ariable)-.275 E -/F1 11/Times-Italic@0 SF(t_dbm)6.252 E F0 3.503(to hold the return v)6.253 F -3.503(alue of)-.275 F F1(De\214ne_Primitive\(\))72 102 Q F0 2.881(,a)C .131 -(nd the C structure)164.993 102 R F1(s_dbm)2.881 E F0 .131 -(that represents the ne)2.881 F 2.881(wt)-.275 G 2.881(ype. The)385.556 102 R -.131(structure is com-)2.881 F 3.427(posed of the required initial)72 117 R F1 -(Object)6.177 E F0 6.177(,t)C(he)254.79 117 Q F1(DBM)6.177 E F0 3.427 -(pointer returned by the C library function)6.177 F F1(dbm_open\(\))72 132 Q F0 -2.997(,a)C .246(nd a \215ag indicating whether the database pointed to by this\ - object has already been)135.783 132 R .374 -(closed \(in this case the \215ag is cleared\).)72 147 R .374(As a)5.874 F F1 -(dbm-\214le)3.124 E F0 .375(Scheme object can still be passed to primi-)3.125 F -(ti)72 162 Q -.165(ve)-.275 G 4.321(sa).165 G 1.571(fter the)101.544 162 R F1 -(DBM)4.321 E F0 1.571(handle has been closed by a call to)4.321 F F1 -(dbm_close\(\))4.321 E F0 4.321(,t)C(he)399.301 162 Q F1(alive)4.321 E F0 1.571 -(\215ag had to be)4.321 F .642(added to a)72 177 R -.22(vo)-.22 G .642 -(id further use of a `).22 F(`stale')-.814 E 3.393('o)-.814 G .643 -(bject: the `)255.294 177 R(`dbm')-.814 E 3.393('p)-.814 G(rimiti)341.439 177 Q --.165(ve)-.275 G 3.393(si).165 G .643(nclude an initial check for)386.566 177 R -(the \215ag and raise an error if it is zero.)72 192 Q .245(The macro)97 210.6 -R F1(DBMF)2.995 E F0 .244(is used to cast the pointer \214eld of an)2.995 F F1 -(Object)2.994 E F0 .244(of type)2.994 F F1(t_dbm)2.994 E F0 .244 -(to a pointer to)2.994 F 1.153(the correct structure type.)72 225.6 R F1 -(dbm_equal\(\))6.653 E F0 1.153(implements both the)3.903 F F1(eqv?)3.903 E F0 -1.153(and the)3.903 F F1(equal?)3.903 E F0 1.154(predicates; it)3.903 F .593 -(returns true if the)72 240.6 R F1(Objects)3.343 E F0 .592 -(compared point to an open database and contain identical)3.343 F F1(DBM)3.342 -E F0(point-)3.342 E 3.245(ers. The)72 255.6 R .495 -(print function just prints the numeric v)3.245 F .496(alue of the)-.275 F F1 -(DBM)3.246 E F0 .496(pointer; this could be impro)3.246 F -.165(ve)-.165 G(d) -.165 E 1.089(by printing the name of the database \214le instead, which must t\ -hen be included in each Scheme)72 270.6 R 3.203(object. The)72 285.6 R(primiti) -3.203 E -.165(ve)-.275 G F1(p_is_dbm\(\))3.368 E F0(pro)3.203 E .453 -(vides the usual type predicate.)-.165 F(Finally)5.954 E 3.204(,a)-.715 G 3.204 -(ne)420.757 285.6 S .454(xtension initial-)434.18 285.6 R .62(ization function\ - is supplied to enable dynamic loading of the compiled code; it re)72 300.6 R -.619(gisters the ne)-.165 F(w)-.275 E 2.709(type and three primiti)72 315.6 R --.165(ve)-.275 G 5.459(so).165 G 2.709(perating on it.)200.327 315.6 R 2.71 -(Note that a visit function \(the \214nal ar)8.209 F 2.71(gument to)-.198 F F1 -(De\214ne_T)72 330.6 Q(ype\(\))-.814 E F0 4.221(\)i)C 4.221(sn)145.048 330.6 S -1.471(ot required here, as the ne)159.048 330.6 R 4.221(wt)-.275 G 1.471 -(ype does not include an)294.979 330.6 R 4.221(yc)-.165 G 1.47 -(omponents of type)419.176 330.6 R F1(Object)72 345.6 Q F0 .736(that the g) -3.486 F .736(arbage collector must kno)-.055 F 3.486(wo)-.275 G .736 -(f\212the required initial)279.981 345.6 R F1(Object)3.486 E F0 .736 -(is not used here and)3.486 F .193(therefore can be ne)72 360.6 R 2.942 -(glected. The)-.165 F .192(type constructor primiti)2.942 F -.165(ve)-.275 G F1 -(dbm-open)3.107 E F0 .192(and the primiti)2.942 F -.165(ve)-.275 G F1 -(dbm-close)3.107 E F0(are sho)72 375.6 Q(wn in Figure 6.)-.275 E 1.136 -(The primiti)97 397.8 R -.165(ve)-.275 G F1(dbm-open)4.051 E F0(sho)3.886 E -1.137(wn in Figure 6 is called with the name of the database \214le, a)-.275 F -1.281(symbol indicating the type of access \()72 412.8 R F1 -.407(re)C(ader) -.407 E F0 1.281(for read-only access,)4.031 F F1(writer)4.031 E F0 1.28 -(for read/write access,)4.031 F(and)72 427.8 Q F1(cr)3.016 E(eate)-.407 E F0 -.266(for creating a ne)3.016 F 3.016<778c>-.275 G .266 -(le with read/write access\), and an optional third ar)210.37 427.8 R .266 -(gument specify-)-.198 F .977(ing the \214le permissions for a ne)72 442.8 R -.976(wly-created database \214le.)-.275 F 3.726(Ad)6.476 G(ef)353.992 442.8 Q -.976(ault of 0666 is used for the \214le)-.11 F .342 -(permissions if the primiti)72 457.8 R .672 -.165(ve i)-.275 H 3.092(si).165 G --2.09 -.44(nv o)210.473 457.8 T -.11(ke).44 G 3.092(dw).11 G .342(ith just tw) -253.121 457.8 R 3.092(oa)-.11 G -.198(rg)311.182 457.8 S 3.092(uments. Section) -.198 F .343(12.1 will introduce a set)3.092 F 1.594(of functions that a)72 -472.8 R -.22(vo)-.22 G 1.594(id clumsy if-cascades such as the one at the be) -.22 F 1.594(ginning of)-.165 F F1(p_dbm_open\(\))4.344 E F0(.)A F1 -(Primitive_Err)72 487.8 Q(or\(\))-.495 E F0 1.869(is called with a `)4.619 F -1.87(`format string')-.814 F 4.62('a)-.814 G 1.87(nd zero or more ar)313.007 -487.8 R 1.87(guments and signals a)-.198 F .347 -(Scheme error \(see section 12.5\).)72 502.8 R F1(dbm-open)5.847 E F0 .346 -(returns #f if the database \214le could not be opened, so)3.096 F -(that the caller can deal with the error)72 517.8 Q(.)-.605 E .885(Note that)97 -536.4 R F1(dbm-close)3.635 E F0 .885(\214rst checks the)3.635 F F1(alive)3.635 -E F0 .885(bit to raise an error if the database pointer is no)3.635 F 1.472 -(longer v)72 551.4 R 1.472(alid because of an earlier call to)-.275 F F1 -(dbm-close)4.222 E F0 6.972(.T)C 1.471(his check needs to be performed by all) -324.157 551.4 R(primiti)72 566.4 Q -.165(ve)-.275 G 4.924(sw).165 G 2.174 -(orking on)128.932 566.4 R F1(dbm-\214le)4.925 E F0 2.175 -(objects; it may be useful to wrap it in a separate function\212)4.925 F .258 -(together with the initial type-check.)72 581.4 R(Ideally)5.757 E 3.007(,d) --.715 G .257(atabase objects should be closed automatically dur)276.606 581.4 R -(-)-.22 E 1.266(ing g)72 596.4 R 1.266(arbage collection when the)-.055 F 4.016 -(yb)-.165 G 1.267(ecome inaccessible; section 12.4 will introduce functions to) -232.385 596.4 R(accomplish this.)72 611.4 Q .359(At least tw)97 630 R 3.109(op) --.11 G(rimiti)159.38 630 Q -.165(ve)-.275 G(s).165 E F1(dbm-stor)3.109 E(e) --.407 E F0(and)3.108 E F1(dbm-fetc)3.108 E(h)-.165 E F0 .358 -(need to be added to the database e)3.108 F(xtension)-.165 E 2.049(to mak)72 -645 R 4.799(ei)-.11 G 4.799(tr)116.93 645 S 2.049 -(eally useful; these are not sho)128.45 645 R 2.05 -(wn here \(their implementation is f)-.275 F 2.05(airly simple and)-.11 F -(straightforw)72 660 Q 3.98(ard\). Using)-.11 F 1.23(these primiti)3.98 F -.165 -(ve)-.275 G 1.229(s, the e).165 F 1.229 -(xtension discussed in this section can be used to)-.165 F .001(write Scheme c\ -ode such as this procedure \(which looks up an electronic mailbox name in the \ -mail)72 675 R(alias database maintained on most UNIX systems\):)72 689 Q EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(6-)288 51 S(________________\ -______________________________________________________________)75 99.5 Q/F1 10 -/Courier@0 SF(Object p_dbm_open\(int argc, Object *argv\) {)72 119 Q(DBM *dp;) -99.5 133 Q(int flags = O_RDWR|O_CREAT;)99.5 147 Q(Object d, sym = argv[1];)99.5 -161 Q(Check_Type\(sym, T_Symbol\);)99.5 183.4 Q -(if \(EQ\(sym, Intern\("reader"\)\)\))99.5 197.4 Q(flags = O_RDONLY;)127 211.4 -Q(else if \(EQ\(sym, Intern\("writer"\)\)\))99.5 225.4 Q(flags = O_RDWR;)127 -239.4 Q(else if \(!EQ\(sym, Intern\("create"\)\)\))99.5 253.4 Q -(Primitive_Error\("invalid argument: ~s", sym\);)127 267.4 Q -(if \(\(dp = dbm_open\(Get_String\(argv[0]\), flags,)99.5 281.4 Q -(argc == 3 ? Get_Integer\(argv[2]\) : 0666\)\) == 0\))154.5 295.4 Q -(return False;)127 309.4 Q 6(d=A)99.5 323.4 S -(lloc_Object\(sizeof\(struct s_dbm\), t_dbm, 0\);)129.5 323.4 Q -(DBMF\(d\)->dbm = dp;)99.5 337.4 Q(DBMF\(d\)->alive = 1;)99.5 351.4 Q -(return d;)99.5 365.4 Q(})72 379.4 Q(Object p_dbm_close\(Object d\) {)72 401.8 -Q(Check_Type\(d, t_dbm\);)99.5 415.8 Q(if \(!DBMF\(d\)->alive\))99.5 429.8 Q -(Primitive_Error\("invalid dbm-file: ~s", d\);)127 443.8 Q -(DBMF\(d\)->alive = 0;)99.5 457.8 Q(dbm_close\(DBMF\(d\)->dbm\);)99.5 471.8 Q -(return Void;)99.5 485.8 Q(})72 499.8 Q/F2 10/Times-Bold@0 SF(Figur)177.415 -517.6 Q 2.5(e6)-.18 G(:)213.065 517.6 Q/F3 10/Times-Roman@0 SF -(Implementation of)5 E/F4 10/Times-Italic@0 SF(dbm-open)2.5 E F3(and)2.5 E F4 -(dbm-close)2.5 E F0(__________________________________________________________\ -____________________)75 536.2 Q F1(\(define expand-mail-alias)100.346 565.2 Q -(\(lambda \(alias\))112.346 579.2 Q -(\(let \(\(d \(dbm-open "/etc/aliases" 'reader\)\)\))124.346 593.2 Q -(\(if \(not d\))136.346 607.2 Q -(\(error 'expand-mail-alias "cannot open database"\)\))160.346 621.2 Q -(\(unwind-protect)136.346 635.2 Q(\(dbm-fetch d alias\))148.346 649.2 Q -(\(dbm-close d\)\)\)\)\))148.346 663.2 Q -(\(define address-of-staff \(expand-mail-alias "staff"\)\))100.346 685.6 Q EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(7-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(12. Adv)72 87 R(anced T)-.11 E(opics)-1.012 E 2.75 -(12.1. Con)72 117 R -.11(ve)-.44 G -(rting between Symbols, Integers, and Bitmasks).11 E F0 .594 -(Symbols are frequently used as the ar)97 135.6 R .594 -(guments to Scheme primiti)-.198 F -.165(ve)-.275 G 3.344(sw).165 G .594 -(hich call an underly-)411.49 135.6 R .865(ing C or C++ function with some kin\ -d of bitmask or with a prede\214ned enumeration constant or)72 150.6 R .905 -(preprocessor symbol.)72 165.6 R -.165(Fo)6.405 G 3.655(re).165 G .905 -(xample, the primiti)196.892 165.6 R -.165(ve)-.275 G/F2 11/Times-Italic@0 SF -(dbm-open)3.819 E F0(sho)3.654 E .904(wn in Figure 6 abo)-.275 F 1.234 -.165 -(ve u)-.165 H .904(ses sym-).165 F 1.495 -(bols to represent the symbolic constants passed to)72 180.6 R F2(dbm_open\(\)) -4.245 E F0 6.995(.S)C(imilarly)374.786 180.6 Q 4.245(,aS)-.715 G 1.495 -(cheme primiti)431.148 180.6 R -.165(ve)-.275 G 1.124 -(corresponding to the UNIX system call)72 195.6 R F2(open\(\))3.874 E F0 1.124 -(could recei)3.874 F 1.454 -.165(ve a l)-.275 H 1.124 -(ist of symbols represending the).165 F(logical OR of the usual)72 209.6 Q F2 -(open\(\))2.75 E F0(\215ags, so that one can write Scheme code such as:)2.75 E -/F3 10/Courier@0 SF(\(let \(\(tty-fd \(unix-open "/dev/ttya")100.346 232.103 Q -('\(read write exclusive\)\)\))340.346 232.103 Q -(\(tmp-fd \(unix-open "/tmp/somefile '\(write create\)\)\)\))136.346 246.103 Q -(...)127.846 260.103 Q F0 2.711 -.88(To f)97 286.203 T .952(acilitate con).77 F --.165(ve)-.44 G .952(rsion of symbols to C inte).165 F .952 -(gers or enumeration constants and vice v)-.165 F(ersa,)-.165 E(these tw)72 -300.203 Q 2.75(of)-.11 G(unctions are pro)120.158 300.203 Q(vided:)-.165 E F3 -(unsigned long Symbols_To_Bits\(Object syms, int mask_flag,)100.346 322.706 Q -(SYMDESCR *table\);)124.346 336.706 Q -(Object Bits_To_Symbols\(unsigned long bits, int mask_flag,)100.346 350.706 Q -(SYMDESCR *table\);)124.346 364.706 Q F0(The type)72 386.206 Q F2(SYMDESCR)2.75 -E F0(is de\214ned as:)2.75 E F3(typedef struct {)100.346 408.709 Q(char *name;) -127.846 422.709 Q(unsigned long val;)127.846 436.709 Q 6(}S)100.346 450.709 S -(YMDESCR;)118.346 450.709 Q F2(Symbols_T)97 476.809 Q(o_Bits\(\))-1.012 E F0 -(con)3.494 E -.165(ve)-.44 G .743(rts a symbol or a list of symbols to an inte) -.165 F(ger;)-.165 E F2(Bits_T)3.493 E(o_Symbols\(\))-1.012 E F0 .097(is the re) -72 491.809 R -.165(ve)-.275 G .097 -(rse operation and is usually applied to the return v).165 F .097 -(alue of a C/C++ function to con)-.275 F -.165(ve)-.44 G .097(rt it).165 F .964 -(to a Scheme representation.)72 506.809 R .964(Both functions recei)6.464 F -1.294 -.165(ve a)-.275 H 3.714(st).165 G .964(he third ar)323.67 506.809 R .964 -(gument a table specifying the)-.198 F 1.66(correspondence between symbols and\ - C constants; each table entry is a pair consisting of the)72 521.809 R F2 -(name)72 536.809 Q F0 .316(of a symbol as a C string and an inte)3.066 F(ger) --.165 E F2(val)3.066 E F0 .315(\(typically an enumeration constant or a)3.066 F -F2(#de\214ne)3.065 E F0 2.75(constant\). Each)72 550.809 R F2(SYMDESCR)2.75 E -F0(array is terminated by an entry with a zero)2.75 E F2(name)2.75 E F0 -(component:)2.75 E F3(SYMDESCR lseek_syms[] = {)100.346 573.312 Q 6({")127.846 -587.312 S 30(set", SEEK_SET)145.846 587.312 R(},)6 E 6({")127.846 601.312 S 6 -(current", SEEK_CUR)145.846 601.312 R(},)6 E 6({")127.846 615.312 S 30 -(end", SEEK_END)145.846 615.312 R(},)6 E 6({0)127.846 629.312 S 6(,0})145.846 -629.312 S(};)100.346 643.312 Q F0 .794(The second ar)97 669.412 R .794 -(gument to the con)-.198 F -.165(ve)-.44 G .795 -(rsion functions controls whether a single symbol is con-).165 F -.165(ve)72 -684.412 S .392(rted to an inte).165 F .392(ger or vice v)-.165 F .392(ersa \() --.165 F F2(mask_\215a)A(g)-.11 E F0 .391 -(is zero\), or whether a list of symbols is con)3.142 F -.165(ve)-.44 G .391 -(rted to).165 F 3.44(the logical OR of a set of matching v)72 699.412 R 3.441 -(alues or vice v)-.275 F 3.441(ersa \()-.165 F F2(mask_\215a)A(g)-.11 E F0 -3.441(is non-zero\).)6.191 F F2(Sym-)8.941 E(bols_T)72 714.412 Q(o_Bits\(\)) --1.012 E F0 .652(signals an error if the symbol does not match an)3.402 F 3.401 -(yo)-.165 G 3.401(ft)370.998 714.412 S .651(he names in the gi)381.12 714.412 R --.165(ve)-.275 G 3.401(nt).165 G(able)485.674 714.412 Q(or)72 729.412 Q 5.325 -(,i)-.44 G(f)91.856 729.412 Q F2(mask_\215a)5.325 E(g)-.11 E F0 2.575 -(is non-zero, if an)5.325 F 5.325(yo)-.165 G 5.325(ft)249.085 729.412 S 2.575 -(he list elements does not match.)261.131 729.412 R 2.576(The empty list is) -8.075 F EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(8-)288 51 S(con)72 87 Q -.165 -(ve)-.44 G 1.02(rted to zero.).165 F(If)6.52 E/F1 11/Times-Italic@0 SF(Bits_T) -3.77 E(o_Symbols\(\))-1.012 E F0 1.02(is called with a non-zero)3.77 F F1 -(mask_\215a)3.769 E(g)-.11 E F0 3.769(,i)C 3.769(tm)426.704 87 S 1.019 -(atches the)442.089 87 R F1(val)3.769 E F0 6.198(components ag)72 102 R 6.198 -(ainst the)-.055 F F1(bits)8.948 E F0(ar)8.948 E 6.198 -(gument using logical AND.)-.198 F(Re)381.646 102 Q -.055(ga)-.165 G 6.199 -(rdless of).055 F F1(mask_\215a)8.949 E(g)-.11 E F0(,)A F1(Bits_T)72 117 Q -(o_Symbols)-1.012 E F0 .606(returns the empty list if no match occurs.)3.356 F -.605(Figure 7 sho)6.105 F .605(ws an impro)-.275 F -.165(ve)-.165 G 3.355(dv) -.165 G(ersion)477.116 117 Q(of)72 132 Q F1(p_dbm_open\(\))2.75 E F0(using)2.75 -E F1(Symbols_T)2.75 E(o_Bits\(\))-1.012 E F0(in place of nested if-statements.) -2.75 E(_______________________________________________________________________\ -_______)75 159.5 Q/F2 10/Courier@0 SF(static SYMDESCR flag_syms[] = {)72 179 Q -6({")99.5 193 S(reader", O_RDONLY },)117.5 193 Q 6({")99.5 207 S -(writer", O_RDWR },)117.5 207 Q 6({")99.5 221 S(create", O_RDWR|O_CREAT },) -117.5 221 Q 6({0)99.5 235 S 6(,0})117.5 235 S(};)72 249 Q -(Object p_dbm_open\(int argc, Object *argv\) {)72 271.4 Q(DBM *dp;)99.5 285.4 Q -(Object d;)99.5 299.4 Q(dp = dbm_open\(Get_String\(argv[0]\),)99.5 321.8 Q -(Symbols_To_Bits\(argv[1], 0, flag_syms\),)123.5 335.8 Q -(argc == 3 ? Get_Integer\(argv[2]\) : 0666\);)123.5 349.8 Q(if \(dp == 0\))99.5 -363.8 Q(return False;)127 377.8 Q 6(d=A)99.5 391.8 S -(lloc_Object\(sizeof\(struct s_dbm\), t_dbm, 0\);)129.5 391.8 Q -(DBMF\(d\)->dbm = dp;)99.5 405.8 Q(DBMF\(d\)->alive = 1;)99.5 419.8 Q -(return d;)99.5 433.8 Q(})72 447.8 Q/F3 10/Times-Bold@0 SF(Figur)153.235 465.6 -Q 2.5(e7)-.18 G(:)188.885 465.6 Q/F4 10/Times-Roman@0 SF(Impro)5 E -.15(ve)-.15 -G 2.5(dv).15 G(ersion of)243.145 465.6 Q/F5 10/Times-Italic@0 SF(dbm-open)2.5 E -F4(using)2.5 E F5(Symbols_T)2.5 E(o_Bits\(\))-.92 E F0(_______________________\ -_______________________________________________________)75 484.2 Q 4.47(AS)97 -517.8 S 1.72(cheme primiti)115.528 517.8 R 2.05 -.165(ve c)-.275 H 1.72 -(alling the UNIX system call).165 F F1(access\(\))4.47 E F0 1.72(could use)4.47 -F F1(Symbols_T)4.47 E(o_Bits\(\))-1.012 E F0(with a non-zero)72 531.8 Q F1 -(mask_\215a)2.75 E(g)-.11 E F0(to construct a bitmask:)2.75 E F2 -(Object p_access\(Object fn, Object mode\) {)100.346 554.303 Q -(access\(Get_String\(fn\), \(int\)Symbols_To_Bits\(mode, 1, access_syms\)\);) -127.846 568.303 Q(...)127.846 582.303 Q F0(where)72 603.803 Q F1(access_syms) -2.75 E F0(is de\214ned as:)2.75 E F2(static SYMDESCR access_syms[] = {)100.346 -626.306 Q 6({")127.846 640.306 S 36(read", R_OK)145.846 640.306 R(},)6 E 6({") -127.846 654.306 S 30(write", W_OK)145.846 654.306 R(},)6 E 6({")127.846 668.306 -S 18(execute", X_OK)145.846 668.306 R(},)6 E 6({0)127.846 682.306 S 6(,0}) -145.846 682.306 S(};)100.346 696.306 Q F0 .471(Note that in this e)72 718.806 R -.471(xample the empty list can be passed as the)-.165 F F1(mode)3.221 E F0(ar) -3.221 E .471(gument to test for e)-.198 F(xistence)-.165 E -(of the \214le, because in this case)72 733.806 Q F1(Symbols_T)2.75 E -(o_Bits\(\))-1.012 E F0(returns zero \(the v)2.75 E(alue of)-.275 E F1(F_OK) -2.75 E F0(\).)A EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(9-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(12.2. Calling)72 87 R(Scheme Pr)2.75 E(ocedur)-.198 E -(es, Ev)-.198 E(aluating Scheme Code)-.11 E F0 2.75(AS)97 104.6 S -(cheme procedure can be called from within C or C++ code using the function) -113.808 104.6 Q/F2 10/Courier@0 SF -(Object Funcall\(Object fun, Object argl, int eval_flag\);)100.346 127.103 Q F0 -2.092(The \214rst ar)72 149.603 R 2.092 -(gument is the Scheme procedure\212either a primiti)-.198 F 2.423 -.165(ve p) --.275 H 2.093(rocedure \().165 F/F3 11/Times-Italic@0 SF(T_Primitive)A F0 4.843 -(\)o)C 4.843(ra)490.61 149.603 S .525(compound procedure \()72 164.603 R F3 -(T_Compound)A F0 3.275(\). The)B .525(second ar)3.275 F .524 -(gument is the list of ar)-.198 F .524(guments to be passed)-.198 F .679 -(to the procedure, as a Scheme list.)72 179.603 R .68(The third ar)6.18 F .68 -(gument, if non-zero, speci\214es that the ar)-.198 F(guments)-.198 E .315 -(need to be e)72 194.603 R -.275(va)-.275 G .315 -(luated before calling the Scheme procedure.).275 F .314 -(This is usually not the case \(e)5.815 F .314(xcept in)-.165 F -(some special forms\).)72 209.603 Q(The return v)5.5 E(alue of)-.275 E F3 -(Funcall\(\))2.75 E F0(is the result of the Scheme procedure.)2.75 E F3 -(Funcall\(\))97 228.203 Q F0 .339 -(is frequently used from within C callback functions that can be re)3.089 F .34 -(gistered for cer)-.165 F(-)-.22 E .862(tain e)72 243.203 R -.165(ve)-.275 G -.862(nts, such as the user).165 F .862(-supplied X11 error handlers, X11 e)-.22 -F -.165(ve)-.275 G .862(nt handlers, timeout handlers,).165 F .34(the C++)72 -258.203 R F3(ne)3.09 E(w)-.165 E F0(handler)3.09 E 3.09(,e)-.44 G 3.09 -(tc. Here,)175.286 258.203 R .34(use of)3.09 F F3(Funcall\(\))3.09 E F0(allo) -3.09 E .34(ws to re)-.275 F .34(gister a user)-.165 F .34 -(-de\214ned Scheme proce-)-.22 F .916(dure for this e)72 273.203 R -.165(ve) --.275 G .916(nt from within a Scheme program.).165 F .915(As an e)6.416 F .915 -(xample, Figure 8 sho)-.165 F .915(ws the generic)-.275 F -(signal handler that is associated with v)72 288.203 Q -(arious UNIX signals by the UNIX e)-.275 E(xtension.)-.165 E(_________________\ -_____________________________________________________________)75 315.703 Q F2 -(void scheme_signal_handler\(int sig\) {)72 335.203 Q(Object fun, args;)99.5 -349.203 Q(Set_Error_Tag\("signal-handler"\);)99.5 371.603 Q(Reset_IO\(1\);)99.5 -385.603 Q(args = Bits_To_Symbols\(\(unsigned long\)sig, 0, signal_syms\);)99.5 -399.603 Q(args = Cons\(args, Null\);)99.5 413.603 Q -(fun = VECTOR\(handlers\)->data[sig];)99.5 427.603 Q -(if \(TYPE\(fun\) != T_Compound\))99.5 441.603 Q -(Fatal_Error\("no handler for signal %d", sig\);)127 455.603 Q -(\(void\)Funcall\(fun, args, 0\);)99.5 469.603 Q -(Printf\(Curr_Output_Port, "\\n\\7Signal!\\n"\);)99.5 483.603 Q -(\(void\)P_Reset\(\);)99.5 497.603 Q(/*NOTREACHED*/)99.5 511.603 Q(})72 525.603 -Q/F4 10/Times-Bold@0 SF(Figur)178.53 543.403 Q 2.5(e8)-.18 G(:)214.18 543.403 Q -/F5 10/Times-Roman@0 SF(Using)5 E/F6 10/Times-Italic@0 SF(Funcall\(\))2.5 E F5 -(to call a Scheme procedure)2.5 E F0(_________________________________________\ -_____________________________________)75 562.003 Q 1.669 -(The signal handler sho)97 595.603 R 1.67 -(wn in Figure 8 uses the signal number supplied by the system to)-.275 F(inde) -72 610.603 Q 5.904(xav)-.165 G 3.154(ector of user)118.304 610.603 R 3.154 -(-de\214ned Scheme procedures \(that is,)-.22 F F3(Objects)5.904 E F0 3.154 -(of type)5.904 F F3(T_Compound)5.904 E F0(\).)A F3(Reset_IO\(\))72 625.603 Q F0 -.559(is used here to ensure that the current input and output port are in de\ -\214ned state when)3.308 F .343(the Scheme signal handler starts e)72 640.603 R --.165(xe)-.165 G 3.092(cuting. The).165 F(ar)3.092 E .342 -(gument list is constructed by calling)-.198 F F3(Cons\(\))3.092 E F0 3.092(;i) -C(t)500.942 640.603 Q .427 -(consists of a single element\212the signal number as a Scheme symbol.)72 -655.603 R F3(signal_syms)5.928 E F0 .428(is an array of)3.178 F F3(SYMDESCR)72 -670.603 Q F0 1.68(records that maps the UNIX signal names \()4.43 F F3(sighup)A -F0(,)A F3(sigint)4.43 E F0 4.43(,e)C 4.43(tc.\) to)406.546 670.603 R -(corresponding)4.43 E .184(Scheme symbols of the same names.)72 685.603 R .185 -(The Scheme procedure called from the signal handler is not)5.684 F .296 -(supposed to return \(it usually in)72 700.603 R -.22(vo)-.44 G -.11(ke).22 G -3.045(sac).11 G .295(ontinuation\); therefore the result of)253.863 700.603 R -F3(Funcall\(\))3.045 E F0 .295(is ignored.)3.045 F .541 -(In case the Scheme handler \(and thus the call to)72 715.603 R F3(Funcall\(\)) -3.291 E F0 3.292(\)d)C .542(oes return, a message is printed and)344.031 -715.603 R(the primiti)72 730.603 Q -.165(ve)-.275 G F3 -.407(re)2.915 G(set) -.407 E F0(is called to return to the application')2.75 E 2.75(st)-.605 G(ople) -323.526 730.603 Q -.165(ve)-.275 G 2.75(lo).165 G 2.75(rs)363.72 730.603 S -(tandard Scheme tople)374.412 730.603 Q -.165(ve)-.275 G(l.).165 E EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(0-)288 51 S(An S-e)97 86 Q -(xpression can be e)-.165 E -.275(va)-.275 G(luated by calling the function) -.275 E/F1 10/Courier@0 SF(Object Eval\(Object expr\);)100.346 108.503 Q F0 .692 -(which is identical to the primiti)72 131.003 R -.165(ve)-.275 G/F2 11 -/Times-Italic@0 SF -.165(ev)3.606 G(al).165 E F0(\()3.441 E F2(P_Eval\(\))A F0 -.691(in C\), e)3.441 F .691(xcept that no optional en)-.165 F .691 -(vironment can)-.44 F .447(be supplied.)72 146.003 R F2(Eval\(\))5.947 E F0 -.447(is v)3.197 F .447(ery rarely used by e)-.165 F .448 -(xtensions or applications, mainly by implementations)-.165 F .797(of ne)72 -161.003 R 3.547(ws)-.275 G .797(pecial forms.)110.587 161.003 R(Both)6.297 E F2 -(Eval\(\))3.547 E F0(and)3.547 E F2(Funcall\(\))3.547 E F0 .797 -(can trigger a g)3.547 F .797(arbage collection; all local v)-.055 F(ari-)-.275 -E 1.216(ables holding Scheme)72 176.003 R F2(Objects)3.966 E F0 1.217 -(with heap pointers must be properly re)3.966 F 1.217(gistered with the g)-.165 -F(arbage)-.055 E(collector to survi)72 191.003 Q .33 -.165(ve c)-.275 H -(alls to these functions.).165 E 1.084(Occasionally an S-e)97 209.603 R 1.084 -(xpression needs to be e)-.165 F -.275(va)-.275 G 1.084(luated that e).275 F -1.083(xists as a C string, for e)-.165 F(xample,)-.165 E .02(when a Scheme e)72 -224.603 R .02(xpression has been entered through a `)-.165 F(`te)-.814 E .02 -(xt widget')-.165 F 2.771('i)-.814 G 2.771(nag)382.157 224.603 S .021 -(raphical user interf)403.583 224.603 R(ace.)-.11 E .719(Here, e)72 239.603 R --.275(va)-.275 G .718 -(luation requires calling the Scheme reader to parse the e).275 F .718 -(xpression; therefore a straight-)-.165 F(forw)72 254.603 Q .659 -(ard solution is to create a string port holding the string and then just `) --.11 F(`load')-.814 E 3.41('t)-.814 G .66(he contents of)440.97 254.603 R -(the port:)72 268.603 Q F1(void eval_string\(char *expr\) {)100.346 291.106 Q -(Object port; GC_Node;)127.846 305.106 Q -(port = P_Open_Input_String\(Make_String\(expr, strlen\(expr\)\)\);)127.846 -327.506 Q(GC_Link\(port\);)127.846 341.506 Q(Load_Source_Port\(port\);)127.846 -355.506 Q(GC_Unlink;)127.846 369.506 Q(\(void\)P_Close_Input_Port\(port\);) -127.846 383.506 Q(})100.346 397.506 Q F0 .192 -(If a more sophisticated function is required, the)72 420.006 R F2 -.165(ev) -2.941 G(al-string).165 E F0 -.165(ex)2.941 G .191 -(tension included in the Elk distrib).165 F(u-)-.22 E(tion can be used \(`)72 -434.006 Q(`lib/misc/elk-e)-.814 E -.275(va)-.275 G(l.c').275 E 2.75('\). This) --.814 F -.165(ex)2.75 G(tension pro).165 E(vides a function)-.165 E F1 -(char *Elk_Eval\(char *expr\);)100.346 456.509 Q F0 .005(that con)72 479.009 R --.165(ve)-.44 G .006(rts the result of e).165 F -.275(va)-.275 G .006 -(luating the stringized e).275 F .006 -(xpression back to a C string and returns it as a)-.165 F 2.75(result. A)72 -494.009 R(null pointer is returned if an error occurs during e)2.75 E -.275(va) --.275 G(luation.).275 E .166 -(Applications should not use this function as the primary interf)97 512.609 R -.166(ace to the e)-.11 F .165(xtension language.)-.165 F .327(In contrast to l\ -anguages such as Tcl, the semantic concepts and data structures of Scheme are \ -not)72 527.609 R 3.38(centered around strings, and strings are not a practicab\ -le representation for S-e)72 542.609 R(xpressions.)-.165 E .345 -(Instead, applications should pass control to the e)72 557.609 R .346 -(xtension language by calling Scheme procedures)-.165 F(\(using)72 572.609 Q F2 -(Funcall\(\))3.257 E F0 3.257(\)o)C 3.257(rb)156.724 572.609 S 3.257(yl)169.144 -572.609 S .507(oading \214les containing Scheme code.)180.959 572.609 R .506 -(The e)6.006 F .506(xtension language then calls)-.165 F .718 -(back into the application')72 587.609 R 3.469(sC)-.605 G .719 -(/C++ layer by in)200.757 587.609 R -.22(vo)-.44 G .719 -(king application-supplied Scheme primiti).22 F -.165(ve)-.275 G 3.469(sa).165 -G(nd)493 587.609 Q(other forms of callbacks as e)72 602.609 Q -(xplained in section 6.3.)-.165 E/F3 11/Times-Bold@0 SF 2.75(12.3. GC-Pr)72 -632.609 R(otecting Global Objects)-.198 E F0 .043(Section 9.1 e)97 651.209 R -.043(xplained when\212and ho)-.165 F .043(w\212to re)-.275 F .043 -(gister with the g)-.165 F .043(arbage collector function-local)-.055 F F2 -(Object)72 666.209 Q F0 -.275(va)3.551 G .801(riables holding heap pointers.) -.275 F(Similarly)6.301 E 3.551(,g)-.715 G .801(lobal v)305.881 666.209 R .801 -(ariables must usually be added to the)-.275 F 1.048 -(set of reachable objects as well if the)72 681.209 R 3.798(ya)-.165 G 1.048 -(re to survi)255.559 681.209 R 1.377 -.165(ve g)-.275 H 1.047 -(arbage collections \(a useful e).11 F 1.047(xception to)-.165 F 1.239 -(this rule will be introduced in section 12.4\).)72 696.209 R 1.239 -(In contrast to local v)6.739 F 1.239(ariables, global v)-.275 F 1.24 -(ariables are)-.275 F .99(only made kno)72 711.209 R .99(wn to the g)-.275 F -.99 -(arbage collector once\212after initialization\212as their lifetime is that of) --.055 F(the entire program.)72 725.209 Q 1.76 -.88(To a)5.5 H(dd a global v).88 -E(ariable to the g)-.275 E(arbage collector')-.055 E 2.75(sr)-.605 G -(oot set, the macro)387.271 725.209 Q EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 50 S 2.75(1-)288 50 S/F1 10/Courier@0 -SF(Global_GC_Link\(obj\))100.346 86 Q F0 .455 -(must be called with the properly initialized v)72 108.5 R .455 -(ariable of type)-.275 F/F2 11/Times-Italic@0 SF(Object)3.205 E F0 5.955(.T)C -.455(he macro tak)384.378 108.5 R .456(es the address)-.11 F -(of the speci\214ed object.)72 122.5 Q(If that is a problem, an equi)5.5 E --.275(va)-.275 G(lent functional interf).275 E(ace can be used:)-.11 E F1 -(void Func_Global_GC_Link\(Object *obj_ptr\);)100.346 145.003 Q F0 .07 -(This function must be supplied the address of the global v)72 167.503 R .07 -(ariable to be re)-.275 F .07(gistered with the g)-.165 F(arbage)-.055 E -(collector)72 182.503 Q(.)-.605 E 3.04(When writing e)97 201.103 R 3.041 -(xtensions that maintain global)-.165 F F2(Object)5.791 E F0 -.275(va)5.791 G -(riables,).275 E F2(Global_GC_Link\(\))5.791 E F0(\(or)5.791 E F2 -(Func_Global_GC_Link\(\))72 216.103 Q F0 3.313(\)i)C 3.313(su)193.86 216.103 S -.563(sually called from within the e)206.952 216.103 R .563 -(xtension initialization function right)-.165 F .483(after each v)72 231.103 R -.483(ariable is assigned a v)-.275 F 3.233(alue. F)-.275 F .483 -(or instance, the global Scheme v)-.165 F(ector)-.165 E F2(handler)3.233 E(s) --.11 E F0 .484(that w)3.233 F(as)-.11 E .102(used in Figure 8 to associate pro\ -cedures with UNIX signals is initialized and GC-protected as fol-)72 246.103 R -(lo)72 260.103 Q(ws:)-.275 E F1(void elk_init_unix_signal\(void\) {)100.346 -282.606 Q(handlers = Make_Vector\(NSIG, False\);)127.846 296.606 Q -(Global_GC_Link\(handlers\);)127.846 310.606 Q(...)127.846 324.606 Q(})100.346 -338.606 Q F2(NSIG)72 361.106 Q F0 .521 -(is the number of UNIX signal types as de\214ned by the system include \214le.) -3.27 F .521(The signal han-)6.021 F 1.43 -(dling Scheme procedures that are inserted into the v)72 376.106 R 1.43 -(ector later need not be re)-.165 F 1.429(gistered with the)-.165 F -.055(ga)72 -391.106 S 1.159(rbage collector).055 F 3.909(,b)-.44 G 1.159(ecause the)160.877 -391.106 R 3.909(ya)-.165 G 1.159(re no)221.671 391.106 R 3.909(wr)-.275 G 1.159 -(eachable through another object which itself is reach-)260.366 391.106 R -(able.)72 406.106 Q/F3 11/Times-Bold@0 SF 2.75(12.3.1. Dynamic)72 436.106 R -2.75(CD)2.75 G(ata Structur)171.297 436.106 Q(es)-.198 E F0 .318 -(Dynamic data structures, such as the nodes of a link)97 454.706 R .318 -(ed list containing Scheme)-.11 F F2(Objects)3.068 E F0 3.068(,c)C(an-)489.953 -454.706 Q 1.189(not be easily re)72 469.706 R 1.189(gistered with the g)-.165 F -1.189(arbage collector)-.055 F 6.689(.T)-.605 G 1.189 -(he simplest solution is to b)314.69 469.706 R 1.19(uild these data)-.22 F -1.626(structures in Scheme rather than in C or C++ in the \214rst place.)72 -484.706 R -.165(Fo)7.126 G 4.376(re).165 G 1.626(xample, a link)396.472 484.706 -R 1.626(ed list of)-.11 F 1.132(Scheme objects can be b)72 499.706 R 1.132 -(uilt from Scheme pairs much more naturally and more straightforw)-.22 F(ard) --.11 E .425(than from C structures or the lik)72 514.706 R .424 -(e, in particular if the list will be tra)-.11 F -.165(ve)-.22 G .424 -(rsed and manipulated using).165 F 1.13(Scheme primiti)72 529.706 R -.165(ve) --.275 G 3.88(sa).165 G -.165(ny)163.646 529.706 S -.11(wa).165 G 5.31 -.715 -(y. B).11 H 1.131 -(esides, data structures programmed in Scheme bene\214t from auto-).715 F 1.497 -(matic memory management, whereas use of)72 544.706 R F2(malloc\(\))4.247 E F0 -(and)4.247 E F2(fr)4.247 E(ee\(\))-.407 E F0 1.496 -(in C frequently is a source of)4.246 F(memory leaks and related errors.)72 -559.706 Q 2.288(If for some reason a dynamic data structure must be b)97 -578.306 R 2.288(uilt in C or C++ rather than in)-.22 F 3.113 -(Scheme, reachability problems can be a)72 593.306 R -.22(vo)-.22 G 3.113 -(ided by inserting all).22 F F2(Objects)5.863 E F0 3.112(into a global, GC-) -5.863 F 1.497(protected v)72 608.306 R 1.497(ector \(such as)-.165 F F2 -(handler)4.247 E(s)-.11 E F0 1.497 -(in Figure 8\) and then use the corresponding v)4.247 F 1.498(ector inde)-.165 -F -.165(xe)-.165 G(s).165 E .339(rather than the actual)72 623.306 R F2 -(Objects)3.089 E F0 5.839(.T)C .339(his sounds more dif)217.575 623.306 R .339 -(\214cult than it really is; Appendix B sho)-.275 F .338(ws the)-.275 F 1.632 -(complete source code of a small module to re)72 638.306 R(gister)-.165 E F2 -(Objects)4.382 E F0 1.632(in a Scheme v)4.382 F(ector)-.165 E 7.133(.T)-.605 G -1.633(he module)456.233 638.306 R -.165(ex)72 653.306 S .185 -(ports three functions:).165 F F2 -.407(re)2.935 G(gister_object\(\))-.033 E F0 -.185(inserts an)2.935 F F2(Object)2.935 E F0 .184(into the v)2.934 F .184 -(ector and returns the inde)-.165 F 2.934(xa)-.165 G(s)499.721 653.306 Q(an)72 -668.306 Q F2(int)2.855 E F0(;)A F2(der)2.855 E -.44(eg)-.407 G -(ister_object\(\)).44 E F0(remo)2.855 E -.165(ve)-.165 G 2.855(sa).165 G(n) -233.768 668.306 Q F2(Object)2.855 E F0 .105(with a gi)2.855 F -.165(ve)-.275 G -2.855(ni).165 G(nde)334.371 668.306 Q 2.855(xf)-.165 G .105(rom the v)362.108 -668.306 R .105(ector; and)-.165 F F2 -.11(ge)2.856 G(t_object\(\)).11 E F0 .688 -(returns the)72 683.306 R F2(Object)3.438 E F0 .688(stored under a gi)3.438 F --.165(ve)-.275 G 3.438(ni).165 G(nde)253.256 683.306 Q(x.)-.165 E F2 -.407(re) -6.188 G(gister_object\(\))-.033 E F0 .687(dynamically gro)3.438 F .687 -(ws the v)-.275 F .687(ector to)-.165 F -.22(avo)72 698.306 S -(id arti\214cial limits.).22 E 4.45(Ad)97 716.906 S 1.7 -(ynamic data structure \(e.)114.892 716.906 R 1.701(g. link)1.833 F 1.701 -(ed list\) implementation using this module w)-.11 F 1.701(ould call)-.11 F F2 --.407(re)72 731.906 S(gister_object\(\))-.033 E F0 .29(when inserting a ne)3.04 -F(w)-.275 E F2(Object)3.039 E F0 .289(into the list and then use the inte)3.039 -F .289(ger return v)-.165 F .289(alue in)-.275 F EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(2-)288 51 S .066 -(place of the)72 87 R/F1 11/Times-Italic@0 SF(Object)2.816 E F0 2.816 -(itself. Similarly)2.816 F 2.816(,i)-.715 G 2.817(tw)237.583 87 S .067 -(ould call)251.29 87 R F1(der)2.817 E -.44(eg)-.407 G(ister_object\(\)).44 E F0 -(whene)2.817 E -.165(ve)-.275 G 2.817(ran).165 G .067(ode is remo)436.986 87 R --.165(ve)-.165 G(d).165 E .948(from the list.)72 102 R F1 -.11(ge)6.448 G -(t_object\(\)).11 E F0 -.11(wo)3.698 G .948(uld be used to retrie).11 F 1.278 --.165(ve t)-.275 H(he).165 E F1(Object)3.698 E F0 .948(associated with a gi) -3.698 F -.165(ve)-.275 G 3.697(nl).165 G .947(ist ele-)473.419 102 R 3.026 -(ment. Note)72 117 R .276(that with these functions the same)3.026 F F1(Object) -3.026 E F0 .276(can be re)3.026 F .277(gistered multiple times \(each time) --.165 F .971(under a ne)72 132 R 3.72(wi)-.275 G(nde)134.202 132 Q .97 -(x\) without ha)-.165 F .97(ving to maintain reference counts: the g)-.22 F .97 -(arbage collector does not)-.055 F 1.479(care ho)72 147 R 4.229(wo)-.275 G -1.479(ften a particular)122.94 147 R F1(Object)4.229 E F0 1.479(is tra)4.229 F --.165(ve)-.22 G 1.479(rsed during g).165 F 1.48 -(arbage collection, as long as it will be)-.055 F(reached at least once.)72 162 -Q/F2 11/Times-Bold@0 SF 2.75(12.4. W)72 192 R(eak P)-.715 E -(ointers and Object T)-.22 E(ermination)-1.012 E F0 4.753(Ad)97 210.6 S 2.003 -(ata structure implementation may deliberately use)115.195 210.6 R F1(Objects) -4.753 E F0 2.003(that are not added to the)4.753 F .313 -(global set of reachable pointers \(as described in the pre)72 225.6 R .314 -(vious section\) and are thus in)-.275 F .314(visible to the)-.44 F -.055(ga)72 -240.6 S .862(rbage collector).055 F 6.362(.I)-.605 G 3.612(nt)161.031 240.6 S -.862(his case, it becomes possible to determine whether or not g)173.201 240.6 -R .861(arbage collec-)-.055 F .516(tion has found an)72 255.6 R(y)-.165 E F1 -(other)3.267 E F0 .517(pointers to the same Scheme objects.)3.267 F .517 -(This property can be e)6.017 F .517(xploited in)-.165 F(se)72 270.6 Q -.165 -(ve)-.275 G(ral w).165 E(ays by e)-.11 E(xtensions or applications using Elk.) --.165 E .099(Pointers that are not included in the g)97 289.2 R .099 -(arbage collector')-.055 F 2.849(sr)-.605 G .099 -(eachability search are called `)346.821 289.2 R(`weak)-.814 E(pointers')72 -304.2 Q 3.858('. The)-.814 F 1.108 -(memory occupied by a Scheme object that is only referenced by weak pointers) -3.858 F 1.08(will be reclaimed.)72 319.2 R 1.079(The term)6.58 F F1(weak)3.829 -E F0 -.165(ex)3.829 G 1.079 -(presses the notion that the pointer is not strong enough to).165 F(pre)72 -334.2 Q -.165(ve)-.275 G .665(nt the object it points to from being g).165 F -.666(arbage collected.)-.055 F .666(Code using weak pointers can scan)6.166 F -1.317(the pointers immediately after each g)72 349.2 R 1.316 -(arbage collection and check whether the tar)-.055 F 1.316(get object has)-.198 -F .166(been visited by the just-\214nished g)72 364.2 R .166 -(arbage collection.)-.055 F .166 -(If this is the case, normal \(strong\) pointers to)5.666 F .234 -(the object must e)72 379.2 R .234(xist \(which can therefore be considered `) --.165 F(`li)-.814 E -.165(ve)-.275 G -.814('').165 G .233 -(\), and the weak pointer is updated).814 F .472 -(manually to point to the object')72 394.2 R 3.223(sn)-.605 G 1.023 -.275(ew l) -225.172 394.2 T 3.223(ocation. On).275 F .473 -(the other hand, if the object has not been vis-)3.223 F -(ited, no more \(normal\) references to it e)72 409.2 Q -(xist and the memory occupied by it has been reclaimed.)-.165 E -.88(We)97 -427.8 S 1.508(ak pointers are useful in implementing certain types of data str\ -uctures where the sole).88 F -.165(ex)72 442.8 S 1.622(istence of a \(weak\) p\ -ointer to an object from within this data structure should not k).165 F 1.623 -(eep the)-.11 F .093(object ali)72 457.8 R .423 -.165(ve \()-.275 H F1 .093 -(weak sets).165 F F0(,)A F1(populations)2.842 E F0 2.842(,c)C .092 -(ertain kinds of hash tables, etc.\).)239.146 457.8 R .092 -(Objects that are not reach-)5.592 F .556 -(able through strong pointers are then remo)72 472.8 R -.165(ve)-.165 G 3.306 -(df).165 G .556(rom the weak data structure after g)284.826 472.8 R .557 -(arbage collec-)-.055 F 3.207(tion. In)72 487.8 R .456 -(this case, it is frequently useful to in)3.207 F -.22(vo)-.44 G .676 -.11 -(ke a `).22 H .456(`termination function')-.704 F 3.206('f)-.814 G .456 -(or each such object,)415.27 487.8 R -.917(e. g.)72 502.8 R .853 -(for objects that contain resources of which only a \214nite amount is a)3.603 -F -.275(va)-.22 G .854(ilable, such as UNIX).275 F .844 -(\214le descriptors \(or FILE structures\), X displays and windo)72 517.8 R -.844(ws, etc.)-.275 F .844(The termination function for)6.344 F .848(Scheme po\ -rts closes the \214le pointer encapsulated in a port object if it is still ope\ -n; lik)72 532.8 R -.275(ew)-.11 G .849(ise, the).275 F .703 -(termination function for X windo)72 547.8 R .703(ws closes the windo)-.275 F -3.453(wa)-.275 G .703(nd thereby remo)327.599 547.8 R -.165(ve)-.165 G 3.453 -(si).165 G 3.453(tf)421.943 547.8 S .703(rom the display)432.117 547.8 R(,) --.715 E 1.019(and so on.)72 562.8 R 1.019(Thus, should an object holding some \ -kind of resource go inaccessible before it w)6.519 F(as)-.11 E .146 -(terminated `)72 577.8 R(`properly')-.814 E 2.895('b)-.814 G 2.895(yc)180.63 -577.8 S .145(alling the respecti)193.909 577.8 R .475 -.165(ve S)-.275 H .145 -(cheme primiti).165 F .475 -.165(ve \()-.275 H F1(close-input-port).165 E F0(,) -A F1(close-output-)2.895 E(port)72 592.8 Q F0(,)A F1(destr)2.75 E(oy-window) --.495 E F0 2.75(,e)C(tc.\), then resource will be reclaimed after the ne) -176.005 592.8 Q(xt g)-.165 E(arbage collection run.)-.055 E F2 2.75 -(12.4.1. Using)72 622.8 R -.715(We)2.75 G(ak P).715 E(ointers)-.22 E F0 .189 -(Code using weak pointers must scan the pointers immediately after each g)97 -641.4 R .189(arbage collection,)-.055 F -.22(bu)72 656.4 S(t).22 E F1(befor) -3.133 E(e)-.407 E F0 .382(the interpreter resumes normal operation, because th\ -e memory referenced by the weak)3.133 F .29(pointers can be reused the ne)72 -671.4 R .291(xt time heap space is requested.)-.165 F .291 -(This can be accomplished by re)5.791 F(gis-)-.165 E 2.165 -(tering a so-called `)72 686.4 R(`after)-.814 E 2.165(-GC function.)-.22 F -(Elk')7.665 E 4.915(sg)-.605 G 2.165(arbage collector in)287.357 686.4 R -.22 -(vo)-.44 G -.11(ke).22 G 4.914(sa).11 G 2.164(ll after)408.24 686.4 R 2.164 -(-GC functions)-.22 F(\(without ar)72 700.4 Q(guments\) upon completion.)-.198 -E 1.76 -.88(To r)5.5 H -.165(eg).88 G(ister an after).165 E -(-GC functions, the function)-.22 E EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(3-)288 51 S/F1 10/Courier@0 -SF(void Register_After_GC\(\(void \(*func\)\(void\)\)\);)100.346 86 Q F0 1.32 -(is used, typically in an e)72 108.5 R 1.321(xtension initializer)-.165 F 6.821 -(.S)-.605 G(imilarly)283.357 108.5 Q 4.071(,e)-.715 G 1.321 -(xtensions and applications can re)329.019 108.5 R(gister)-.165 E -.814(``)72 -122.5 S(before-GC functions').814 E 2.75('u)-.814 G(sing)184.002 122.5 Q F1 -(void Register_Before_GC\(\(void \(*func\)\(void\)\)\);)100.346 145.003 Q F0 -2.077(These functions are called immediately before each g)72 167.503 R 2.077 -(arbage collection and may be used, for)-.055 F 1.64 -(instance, to change the application')72 182.503 R 4.39(sc)-.605 G 1.641 -(ursor to an hour)247.004 182.503 R 1.641(glass symbol.)-.198 F(After)7.141 E -1.641(-GC and before-GC)-.22 F(functions must not trigger another g)72 197.503 -Q(arbage collection.)-.055 E 2.606(An after)97 216.103 R 2.606 -(-GC function scanning a set of weak pointers mak)-.22 F 2.605 -(es use of the three macros)-.11 F/F2 11/Times-Italic@0 SF(IS_ALIVE\(\))72 -231.103 Q F0(,)A F2 -.66(WA)4.908 G(S_FOR).66 E -.66(WA)-.198 G(RDED\(\)).66 E -F0 4.908(,a)C(nd)243.417 231.103 Q F2(UPD)4.908 E -.407(AT)-.385 G(E_OBJ\(\)) -.407 E F0 7.658(.F)C 2.158(or e)349.428 231.103 R 2.159(xample, an after)-.165 -F 2.159(-GC function)-.22 F 1.302(scanning a table of elements holding)72 -246.103 R F2(Objects)4.052 E F0 1.301 -(with weak pointers could be written as sho)4.052 F 1.301(wn in)-.275 F -(Figure 9.)72 261.103 Q(______________________________________________________\ -________________________)75 288.603 Q F1(void scan_weak_table\(void\) {)72 -308.103 Q(int i;)99.5 322.103 Q(for \(i = 0; i < table_size; i++\) {)99.5 -344.503 Q(Object obj = table[i].obj;)127 358.503 Q(if \(IS_ALIVE\(obj\)\) {)127 -372.503 Q(/* object is still reachable */)319 372.503 Q -(if \(WAS_FORWARDED\(obj\)\))154.5 386.503 Q(UPDATE_OBJ\(obj\);)182 400.503 Q 6 -(}e)127 414.503 S(lse {)145 414.503 Q 6(terminate_object\(obj\); /*)154.5 -428.503 R(object is dead; finalize... */)6 E(table[i] = 0;)154.5 442.503 Q -(/* and remove it from the table */)298.5 442.503 Q(})127 456.503 Q(})99.5 -470.503 Q(})72 484.503 Q/F3 10/Times-Bold@0 SF(Figur)142.245 502.303 Q 2.5(e9) --.18 G(:)177.895 502.303 Q/F4 10/Times-Roman@0 SF(After)5 E -(-GC function that scans a table containing weak pointers)-.2 E F0(___________\ -___________________________________________________________________)75 520.903 -Q 1.303(The function)97 554.503 R F2(scan_weak_table\(\))4.053 E F0(sho)4.053 E -1.303(wn in Figure 9 can then be re)-.275 F 1.303(gistered as an after)-.165 F -(-GC)-.22 E(function by in)72 568.503 Q -.22(vo)-.44 G(king).22 E F1 -(Register_After_GC\(scan_weak_table\);)100.346 591.006 Q F0 2.534 -(The then-part of the if-statement in)97 617.106 R F2(scan_weak_table\(\))5.284 -E F0 2.534(is entered if the just-completed)5.284 F -.055(ga)72 632.106 S 1.012 -(rbage collection has encountered an).055 F 3.762(yp)-.165 G 1.013 -(ointers to the Scheme object pointed to by)258.593 632.106 R F2(obj)3.763 E F0 -3.763(;i)C 3.763(nt)478.842 632.106 S(his)491.163 632.106 Q .069 -(case the pointer con)72 647.106 R -.165(vey)-.44 G .069(ed in).165 F F2(obj) -2.819 E F0 .069(is updated manually using)2.819 F F2(UPD)2.819 E -.407(AT)-.385 -G(E_OBJ\(\)).407 E F0 .069(\(when using the gen-)2.819 F .993(erational g)72 -662.106 R .993(arbage collector included in Elk, reachability of an object doe\ -s not necessarily imply)-.055 F .481(that it w)72 677.106 R .48(as forw)-.11 F -.48(arded, hence the additional call to)-.11 F F2 -.66(WA)3.23 G(S_FOR).66 E --.66(WA)-.198 G(RDED\(\)).66 E F0 3.23(\). If)B F2(IS_ALIVE\(\))3.23 E F0 -(returns)3.23 E -.11(fa)72 692.106 S .719 -(lse, no more strong pointers to the object e).11 F .72 -(xist and it can be terminated and remo)-.165 F -.165(ve)-.165 G 3.47(df).165 G -.72(rom the)469.367 692.106 R .539(weak data structure.)72 707.106 R F2 -(terminate_object\(\))6.039 E F0 .539(typically w)3.289 F .539(ould release an) --.11 F 3.288(ye)-.165 G .538(xternal resources contained)382.573 707.106 R .322 -(in the Scheme object, b)72 722.106 R .322(ut it must neither create an)-.22 F -3.072(yn)-.165 G .872 -.275(ew o)308.552 722.106 T .322 -(bjects nor attempt to `).275 F(`re)-.814 E(vi)-.275 E -.165(ve)-.275 G 1.95 --.814('' t).165 H .323(he dead).814 F EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(4-)288 51 S(object in an)72 -87 Q 2.75(yw)-.165 G(ay \(e.)139.243 87 Q(g. create a ne)1.833 E 2.75(ws)-.275 -G(trong pointer to it by inserting it into another)238.228 87 Q 2.75(,l)-.44 G --2.365 -.275(iv e)443.125 87 T(object\).)3.025 E/F1 11/Times-Bold@0 SF 2.75 -(12.4.2. Functions)72 117 R -.275(fo)2.75 G 2.75(rA).275 G(utomatic Object T) -180.867 117 Q(ermination)-1.012 E F0 1.614 -(As automatic termination of Scheme objects using user)97 135.6 R 1.613 -(-supplied termination functions is)-.22 F .171 -(the most frequent use of weak pointers, Elk of)72 150.6 R .172 -(fers a set of con)-.275 F -.165(ve)-.44 G .172 -(nience functions for this purpose.).165 F 1.464 -(Extensions and applications can insert)72 165.6 R/F2 11/Times-Italic@0 SF -(Objects)4.214 E F0 1.463(into a weak list maintained by Elk and remo)4.214 F --.165(ve)-.165 G(them from the list using the tw)72 179.6 Q 2.75(of)-.11 G -(unctions)218.861 179.6 Q/F3 10/Courier@0 SF -(void Register_Object\(Object obj, char *group,)100.346 202.103 Q -(\(Object \(*term\)\(Object\)\), int leader_flag\);)226.346 216.103 Q -(void Deregister_Object\(Object obj\);)100.346 230.103 Q F2(term)97 256.203 Q -F0 2.705(is the termination function that is called automatically with)5.455 F -F2(obj)5.455 E F0 2.706(when the object)5.455 F .001 -(becomes unreachable \(its result is not used\);)72 271.203 R F2(gr)2.751 E -(oup)-.495 E F0(is an opaque `)2.751 E(`cookie')-.814 E 2.75('a)-.814 G -(ssociated with)405.924 271.203 Q F2(obj)2.75 E F0(and)2.75 E 3.098 -(can be used to e)72 286.203 R 3.098 -(xplicitly terminate all objects with the same v)-.165 F 3.098(alue for)-.275 F -F2(gr)5.848 E(oup)-.495 E F0 5.849(;an)C(on-zero)470.406 286.203 Q F2 -(leader_\215a)72 301.203 Q(g)-.11 E F0 .82(indicates that)3.57 F F2(obj)3.57 E -F0 .82(is the `)3.57 F(`leader')-.814 E 3.57('o)-.814 G 3.57(ft)282.824 301.203 -S .82(he speci\214ed)293.115 301.203 R F2(gr)3.569 E(oup)-.495 E F0 6.319(.E)C -.819(lk automatically re)391.317 301.203 R(gisters)-.165 E .433(an after)72 -316.203 R .433(-GC function to scan the weak list maintained by these tw)-.22 F -3.184(of)-.11 G .434(unctions and to call the)376.87 316.203 R F2(term)3.184 E -F0 .791(function for all objects that could be pro)72 331.203 R -.165(ve)-.165 -G 3.54(nu).165 G .79(nreachable by the g)279.02 331.203 R .79(arbage collector) --.055 F 3.54(,s)-.44 G .79(imilar to the)448.641 331.203 R(function sho)72 -346.203 Q(wn in Figure 9.)-.275 E 3.254(Object termination tak)97 364.803 R -3.254(es place in tw)-.11 F 6.004(op)-.11 G 3.254 -(hases: \214rst all objects re)289.224 364.803 R 3.255(gistered with a zero) --.165 F F2(leader_\215a)72 379.803 Q(g)-.11 E F0 1.104 -(are terminated, after that the termination functions of the leaders are in) -3.854 F -.22(vo)-.44 G -.11(ke).22 G 3.854(d. This).11 F 1.201 -(group and leader notion is used, for e)72 394.803 R 1.202 -(xample, by the Xlib e)-.165 F 1.202(xtension to associate windo)-.165 F 1.202 -(ws \(and)-.275 F .898 -(other resources\) with an X display: the ID of the display to which a windo)72 -409.803 R 3.648(wb)-.275 G .898(elongs is used as)427.672 409.803 R .978 -(the windo)72 424.803 R(w')-.275 E 3.728(sg)-.605 G .979 -(roup, and the display is mark)140.902 424.803 R .979(ed as the group leader) --.11 F 6.479(.T)-.605 G .979(hus, if a display becomes)389.182 424.803 R .916 -(unreachable or is closed by the program, all its windo)72 439.803 R .915 -(ws are closed before the display is \214nally)-.275 F(destro)72 454.803 Q(yed) --.11 E/F4 9/Times-Roman@0 SF(5)-3.6 I F0(.)3.6 I -1.1 -.88(Tw o)72 472.403 T -(additional functions are pro)3.63 E(vided for e)-.165 E -(xplicitly calling the termination functions:)-.165 E F3 -(void Terminate_Type\(int type\);)100.346 494.906 Q -(void Terminate_Group\(char *group\);)100.346 508.906 Q F2 -1.012(Te)72 531.406 -S(rminate_T)1.012 E(ype\(\))-.814 E F0(in)4.464 E -.22(vo)-.44 G -.11(ke).22 G -4.464(st).11 G 1.714(he termination function \(if an)195.042 531.406 R 1.713 -(y\) for all objects of a gi)-.165 F -.165(ve)-.275 G 4.463(nt).165 G 1.713 -(ype and)467.769 531.406 R .63(deletes them from the weak list.)72 546.406 R --.165(Fo)6.131 G 3.381(re).165 G .631 -(xample, to close all ports currently held open by Elk \(and)245.031 546.406 R -(thus apply)72 560.406 Q F2(fclose\(\))2.75 E F0 -(to the FILE pointers embedded in them\), one w)2.75 E(ould call)-.11 E F3 -(Terminate_Type\(T_Port\))100.346 582.909 Q F2 -1.012(Te)72 605.409 S -(rminate_Gr)1.012 E(oup\(\))-.495 E F0 .075(calls the termination functions of\ - all non-leader objects belonging to the spec-)2.825 F(i\214ed)72 620.409 Q F2 -(gr)2.75 E(oup)-.495 E F0(.)A(Finally)72 638.009 Q 2.75(,a)-.715 G -(nother function,)112.843 638.009 Q F2 -.495(Fi)2.75 G(nd_Object\(\)).495 E F0 -2.75(,l)C(ocates an object in the weak list:)256.855 638.009 Q .36 LW 76.5 -681.2 72 681.2 DL 81 681.2 76.5 681.2 DL 85.5 681.2 81 681.2 DL 90 681.2 85.5 -681.2 DL 94.5 681.2 90 681.2 DL 99 681.2 94.5 681.2 DL 103.5 681.2 99 681.2 DL -108 681.2 103.5 681.2 DL 112.5 681.2 108 681.2 DL 117 681.2 112.5 681.2 DL -121.5 681.2 117 681.2 DL 126 681.2 121.5 681.2 DL 130.5 681.2 126 681.2 DL 135 -681.2 130.5 681.2 DL 139.5 681.2 135 681.2 DL 144 681.2 139.5 681.2 DL/F5 7 -/Times-Roman@0 SF(5)82 691.2 Q F4 .437(This interf)4.5 2.8 N .437(ace has e) --.09 F -.18(vo)-.225 G(lv).18 E .437(ed in a slightly)-.135 F/F6 9 -/Times-Italic@0 SF .438(ad hoc)2.688 F F4 -.09(wa)2.688 G .438(y; the tw).09 F -.438(o-stage relationship e)-.09 F .438(xpressed by groups and)-.135 F -(group leaders may not be suf)72 705 Q(\214cient for more comple)-.225 E 2.25 -(xh)-.135 G(ierarchies than those used in X.)271.854 705 Q EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(5-)288 51 S/F1 10/Courier@0 -SF(Object Find_Object\(int type, char *group,)100.346 86 Q -(\(int \(*match_func\)\(Object, ...\)\), ...\);)173.346 100 Q F0(Ar)72 122.5 Q -.895(guments are a Scheme type, a group, and a match function called once for \ -each object in the)-.198 F .558 -(weak list that has the speci\214ed type and group.)72 137.5 R .557 -(The match function is passed the)6.058 F/F2 11/Times-Italic@0 SF(Object)3.307 -E F0 .557(and the)3.307 F 1.249(remaining ar)72 152.5 R 1.249(guments to)-.198 -F F2 -.495(Fi)3.999 G(nd_Object\(\)).495 E F0 3.999(,i)C 3.999(fa)255.031 152.5 -S -.165(ny)267.577 152.5 S 6.749(.I)-.55 G 3.999(ft)290.859 152.5 S 1.249 -(he match function returns true for an object,)301.579 152.5 R -(this object becomes the return v)72 167.5 Q(alue of)-.275 E F2 -.495(Fi)2.75 G -(nd_Object\(\)).495 E F0 2.75(;o)C(therwise it returns)318.686 167.5 Q F2(Null) -2.75 E F0(.)A .087(Complicated as it may seem,)97 186.1 R F2 -.495(Fi)2.836 G -(nd_Object\(\)).495 E F0 .086(is quite useful\212e)2.836 F .086 -(xtensions can check whether a)-.165 F .096 -(Scheme object with certain properties has already been re)72 201.1 R .096 -(gistered with the weak list earlier and, if)-.165 F 1.923 -(this is the case, return)72 216.1 R F2(this)4.672 E F0 1.922 -(object instead of creating a ne)4.672 F 4.672(wo)-.275 G 4.672(ne. This) -359.662 216.1 R 1.922(is critical for Scheme)4.672 F 2.033 -(objects encapsulating some kind of e)72 231.1 R 2.033 -(xternal resource, such as \214le descriptors or X windo)-.165 F(ws.)-.275 E -(Consider)72 246.1 Q 3.049(,f)-.44 G .299(or e)120.743 246.1 R .299 -(xample, a Scheme primiti)-.165 F .629 -.165(ve t)-.275 H .299 -(hat obtains the topmost windo).165 F 3.049(wo)-.275 G 3.049(nag)417.697 246.1 -S -2.365 -.275(iv e)439.679 246.1 T 3.049(nXd).275 G(isplay)477.721 246.1 Q -1.784(and returns it as a Scheme)72 261.1 R F2(window)4.534 E F0 4.534 -(object. If)4.534 F 1.784(the primiti)4.534 F 2.114 -.165(ve j)-.275 H 1.784 -(ust were to instantiate a Scheme).165 F .488 -(object encapsulating the corresponding X windo)72 276.1 R 3.238(wI)-.275 G -3.238(Df)301.946 276.1 S .488(or each call, it w)316.789 276.1 R .487 -(ould become possible for)-.11 F(tw)72 291.1 Q 3.773(oo)-.11 G 3.773(rm)97.663 -291.1 S 1.023(ore distinct Scheme)113.657 291.1 R F2(window)3.773 E F0 1.024 -(objects to reference the same real X windo)3.773 F 5.204 -.715(w. T)-.275 H -1.024(his is not).715 F .643(acceptable, because tw)72 306.1 R 3.393(oS)-.11 G -.642(cheme objects pointing to the same X object should certainly be equal) -188.67 306.1 R .7(in the sense of)72 321.1 R F2(eq?)3.45 E F0 3.451(,n)C .701 -(ot to mention the problems that w)168.374 321.1 R .701 -(ould ensue if one of the Scheme)-.11 F F2(window)3.451 E F0 .597 -(objects were closed \(thereby destro)72 336.1 R .597 -(ying the underlying X windo)-.11 F .597(w\) and the second one were still) --.275 F 1.279(be operated on afterw)72 351.1 R 4.029(ards. Example)-.11 F 1.28 -(uses of)4.03 F F2 -.495(Fi)4.03 G(nd_Object\(\)).495 E F0 1.28 -(can be found in the Xlib e)4.03 F(xtension)-.165 E(and in the Xt e)72 366.1 Q -(xtension that are included in the Elk distrib)-.165 E(ution.)-.22 E/F3 11 -/Times-Bold@0 SF 2.75(12.5. Err)72 396.1 R(ors)-.198 E F0(User)97 414.7 Q .131 -(-supplied code can signal an error by calling)-.22 F F2(Primitive_Err)2.881 E -(or\(\))-.495 E F0 .131(with a format string and)2.881 F(as man)72 428.7 Q 2.75 -(ya)-.165 G(dditional ar)115.824 428.7 Q(guments \()-.198 E F2(Objects)A F0 -2.75(\)a)C 2.75(st)254.633 428.7 S -(here are format speci\214ers in the format string:)264.72 428.7 Q F1 -(void Primitive_Error\(char *fmt, ...\);)100.346 451.203 Q F2(Primitive_Err)72 -473.703 Q(or\(\))-.495 E F0 .232(calls the def)2.982 F .232(ault or user)-.11 F -.233(-de\214ned error handler as described in the Elk Reference)-.22 F 1.106 -(Manual, passing it an `)72 488.703 R 1.106(`error tag')-.814 F 3.855('i)-.814 -G 1.105(dentifying the source of the error)231.887 488.703 R 3.855(,t)-.44 G -1.105(he format string, and the)391.736 488.703 R 1.53(remaining ar)72 503.703 -R 4.28(guments. A)-.198 F 1.53(special format speci\214er `)4.28 F(`~E')-.814 E -4.28('c)-.814 G 1.531(an be used to interpolate the standard)331.068 503.703 R -1.18(error message te)72 518.703 R 1.179 -(xt corresponding to the UNIX error number)-.165 F F2(errno)3.929 E F0 3.929 -(;t)C 1.179(his is useful for primiti)384.224 518.703 R -.165(ve)-.275 G(s).165 -E .143(that in)72 533.703 R -.22(vo)-.44 G .363 -.11(ke U).22 H .143 -(NIX system calls or certain C library functions \(if `).11 F(`~e')-.814 E -2.894('i)-.814 G 2.894(su)382.313 533.703 S .144(sed, the \214rst character of) -394.986 533.703 R 1.357(the te)72 548.703 R 1.357(xt is con)-.165 F -.165(ve) --.44 G 1.357(rted to lo).165 F 1.357(wer case\).)-.275 F 1.357 -(If this format speci\214er is used, the current)6.857 F F2(errno)4.106 E F0 -1.356(must be)4.106 F 1.573(assigned to a v)72 563.703 R(ariable)-.275 E F2 -(Saved_Errno)4.323 E F0 1.574(prior to calling)4.323 F F2(Primitive_Err)4.324 E -(or\(\))-.495 E F0 1.574(to pre)4.324 F -.165(ve)-.275 G 1.574 -(nt it from being).165 F -.165(ove)72 578.703 S(rwritten by the ne).165 E -(xt system call or C library function.)-.165 E F2(Primitive_Err)5.5 E(or\(\)) --.495 E F0(does not return.)2.75 E .138 -(Applications that need to supply their o)97 597.303 R .137 -(wn error handler by rede\214ning)-.275 F F2(err)2.887 E(or)-.495 E(-handler) --.22 E F0(usually)2.887 E(do so in Scheme, typically at the be)72 612.303 Q -(ginning of the initial Scheme \214le loaded in)-.165 E F2(main\(\))2.75 E F0 -(.)A(If)97 630.903 Q F2(Primitive_Err)3.012 E(or\(\))-.495 E F0 .262 -(is called from within a C function that implements a Scheme primiti)3.012 F --.165(ve)-.275 G(,).165 E 1.231 -(an error tag is supplied by Elk \(the name of the primiti)72 645.903 R -.165 -(ve)-.275 G 3.98(\). Applications).165 F 1.23(may set the error tag)3.98 F --.165(ex)72 660.903 S .578(plicitly at the be).165 F .578 -(ginning of sections of C/C++ code that reside outside of primiti)-.165 F -.165 -(ve)-.275 G .579(s, for e).165 F(xam-)-.165 E .41 -(ple, before loading an initial Scheme \214le in the application')72 675.903 R -(s)-.605 E F2(main\(\))3.16 E F0 5.91(.T)C .63 -.11(wo f)387.876 675.903 T .41 -(unctions are pro).11 F(vided)-.165 E(to set and query the current error tag:) -72 689.903 Q EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(6-)288 51 S/F1 10/Courier@0 -SF(void Set_Error_Tag\(const char *tag\);)100.346 86 Q -(char *Get_Error_Tag\(void\);)100.346 100 Q F0 .924(The follo)72 122.5 R .924 -(wing three functions can be used by primiti)-.275 F -.165(ve)-.275 G 3.675(st) -.165 G 3.675(os)331.658 122.5 S .925(ignal errors with standardized mes-) -345.112 122.5 R(sages in certain situations:)72 136.5 Q F1 -(void Range_Error\(Object offending_obj\);)100.346 159.003 Q -(void Wrong_Type\(Object offending_obj, int expected_type\);)100.346 173.003 Q -(void Wrong_Type_Combination\(Object offending_obj, char *expected_type\);) -100.346 187.003 Q/F2 11/Times-Italic@0 SF(Rang)72 209.503 Q(e_Err)-.11 E -(or\(\))-.495 E F0 .499(can be used when an ar)3.249 F .498 -(gument to a primiti)-.198 F .828 -.165(ve i)-.275 H 3.248(so).165 G .498 -(ut of range \(typically some kind)360.666 209.503 R .292(of inde)72 224.503 R -(x\).)-.165 E F2(Wr)5.792 E(ong_T)-.495 E(ype\(\))-.814 E F0 .292(signals a f) -3.042 F .292(ailed type-check for the gi)-.11 F -.165(ve)-.275 G(n).165 E F2 -(Object)3.042 E F0 3.042(;t)C .292(he second ar)405.256 224.503 R .293 -(gument is)-.198 F 4.15(the e)72 239.503 R 4.15(xpected type of the)-.165 F F2 -(Object)6.899 E F0 9.649(.T)C 4.149(his function is used, for e)248.863 239.503 -R 4.149(xample, by)-.165 F F2(Chec)6.899 E(k_T)-.22 E(ype\(\))-.814 E F0(.)A F2 -(Wr)72 254.503 Q(ong_T)-.495 E(ype_Combination\(\))-.814 E F0 .103 -(is similar to)2.853 F F2(Wr)2.853 E(ong_T)-.495 E(ype\(\))-.814 E F0 2.853(;t) -C .103(he e)327.473 254.503 R .104(xpected type is speci\214ed as a string.) --.165 F .937(This is useful if an)72 269.503 R F2(Object)3.687 E F0 .937 -(can be a member of one out of tw)3.687 F 3.686(oo)-.11 G 3.686(rm)364.253 -269.503 S .936(ore types, e.)380.16 269.503 R .936(g. a string or a)1.833 F -(symbol.)72 284.503 Q -.165(Fa)72 302.103 S -(tal errors can be signaled using the functions).165 E F1 -(void Fatal_Error\(char *fmt, ...\);)100.346 324.606 Q -(void Panic\(char *msg\);)100.346 338.606 Q F2 -.825(Fa)72 361.106 S(tal_Err) -.825 E(or\(\))-.495 E F0 .257(passes its ar)3.007 F .257(guments to)-.198 F F2 -(printf\(\))3.007 E F0 .258(and then terminates the program.)3.007 F F2 -.88 -(Pa)5.758 G(nic\(\)).88 E F0 .258(is used in)3.008 F .134(situations that `)72 -376.106 R .134(`cannot happen')-.814 F 2.884('\()-.814 G -.11(fa)219.991 -376.106 S .134(iled consistenc).11 F 2.884(yc)-.165 G .133(hecks or f)306.741 -376.106 R .133(ailed assertions\); it prints the spec-)-.11 F -(i\214ed message and terminates the program with a core dump.)72 391.106 Q/F3 -11/Times-Bold@0 SF 2.75(12.6. Exceptions)72 421.106 R F0 .132(As e)97 439.706 R -.132(xplained in the Elk Reference Manual, a user)-.165 F .132 -(-supplied Scheme procedure is called each)-.22 F .653(time an)72 454.706 R F2 --.22(ex)3.403 G(ception).22 E F0 .653(is raised.)3.403 F(Currently)6.152 E -3.402(,t)-.715 G .652 -(he set of UNIX signals that are caught by the interpreter)250.651 454.706 R -1.754(or an e)72 469.706 R 1.754(xtension \(at least)-.165 F F2(interrupt)4.504 -E F0(and)4.505 E F2(alarm)4.505 E F0 4.505(\)a)C 1.755(re used as e)291.174 -469.706 R 4.505(xceptions. As)-.165 F 1.755(signals occur asyn-)4.505 F -(chronously)72 484.706 Q 2.901(,e)-.715 G .151(xtensions and applications must\ - be able to protect non-reentrant or otherwise critical)130.539 484.706 R .113 -(code sections from the deli)72 499.706 R -.165(ve)-.275 G .113(ry of signals.) -.165 F .113(In particular)5.613 F 2.864(,c)-.44 G .114(alls to e)328.141 -499.706 R .114(xternal library functions are fre-)-.165 F -(quently not reentrant)72 514.706 Q/F4 9/Times-Roman@0 SF(6)-3.6 I F0 -(and need to be protected from being disrupted.)2.75 3.6 M 1.486 -(Extensions may call the macros)97 533.306 R F2(Disable_Interrupts)4.236 E F0 -(and)4.236 E F2(Enable_Interrupts)4.236 E F0 1.487(\(without ar)4.237 F(gu-) --.198 E .624(ments\) to enclose code fragments that must be protected from e)72 -548.306 R 3.373(xceptions. Calls)-.165 F .623(to these macros)3.373 F 1.247 -(can be nested, and the)72 563.306 R 3.997(ya)-.165 G 1.247(re also a)188.037 -563.306 R -.275(va)-.22 G 1.248(ilable as Scheme primiti).275 F -.165(ve)-.275 -G 3.998(so).165 G 3.998(nt)371.171 563.306 S 1.248(he Scheme-language le) -383.727 563.306 R -.165(ve)-.275 G(l.).165 E .037(As all modern UNIX v)72 -578.306 R .036(ersions pro)-.165 F .036(vide a f)-.165 F .036 -(acility to temporarily block the deli)-.11 F -.165(ve)-.275 G .036 -(ry of signals, a sig-).165 F 1.527(nal that occurs after a call to)72 593.306 -R F2(Disable_Interrupts)4.277 E F0 1.527 -(will be delayed until the outermost matching)4.277 F F2(Enable_Interrupts)72 -608.306 Q F0 7.569(is e)162.983 608.306 R -.165(xe)-.165 G 10.319(cuted. T).165 -F 7.789 -.11(wo a)-.88 H 7.569(dditional macros,).11 F F2 -1.155(Fo)363.87 -608.306 S -.407(rc)1.155 G(e_Disable_Interrupts).407 E F0(and)488.116 608.306 Q -F2 -1.155(Fo)72 623.306 S -.407(rc)1.155 G(e_Enable_Interrupts).407 E F0 .056 -(can be used to enable and disable signal deli)2.806 F -.165(ve)-.275 G .057 -(ry re).165 F -.055(ga)-.165 G .057(rless of the current).055 F .129 -(nesting le)72 638.306 R -.165(ve)-.275 G 2.879(l. Extensions).165 F .129 -(that use additional signals \(such as the)2.879 F F2(alarm)2.878 E F0 .128 -(signal\) must re)2.878 F .128(gister these)-.165 F .574 -(with the interpreter core to mak)72 653.306 R 3.324(es)-.11 G .574(ure the) -226.243 653.306 R 3.324(ya)-.165 G .574(re included in the)270.599 653.306 R F2 -(mask)3.325 E F0 .575(of signals that is maintained)3.325 F(by)72 668.306 Q F2 -(Disable_Interrupts)4.246 E F0(and)4.246 E F2(Enable_Interrupts)4.246 E F0 -1.496(\(the interf)4.246 F 1.496(ace for re)-.11 F 1.495 -(gistering signals is still being)-.165 F(re)72 683.306 Q -(vised; refer to the source code of the UNIX e)-.275 E(xtension for an e)-.165 -E(xample\).)-.165 E .36 LW 76.5 694.306 72 694.306 DL 81 694.306 76.5 694.306 -DL 85.5 694.306 81 694.306 DL 90 694.306 85.5 694.306 DL 94.5 694.306 90 -694.306 DL 99 694.306 94.5 694.306 DL 103.5 694.306 99 694.306 DL 108 694.306 -103.5 694.306 DL 112.5 694.306 108 694.306 DL 117 694.306 112.5 694.306 DL -121.5 694.306 117 694.306 DL 126 694.306 121.5 694.306 DL 130.5 694.306 126 -694.306 DL 135 694.306 130.5 694.306 DL 139.5 694.306 135 694.306 DL 144 -694.306 139.5 694.306 DL/F5 7/Times-Roman@0 SF(6)82 704.306 Q F4 -.135(Fo)4.5 -2.8 O(rtunately).135 E 2.667(,w)-.585 G .417(ith the adv)142.194 707.106 R .417 -(ent of multithreading, v)-.135 F .417(endors are no)-.135 F 2.667(wb)-.225 G --.135(eg)329.76 707.106 S .417(inning to pro).135 F .416(vide reentrant v)-.135 -F(ersions)-.135 E(of their system libraries.)72 718.106 Q EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(7-)288 51 S 1.484 -(The ability to protect code from e)97 87 R 1.484 -(xceptions is particularly useful for primiti)-.165 F -.165(ve)-.275 G 4.235 -(st).165 G 1.485(hat tem-)466.16 87 R 1.244(porarily open a \214le or allocate\ - some other kind of resource that must subsequently be released)72 102 R(ag)72 -117 Q 5.642(ain. If)-.055 F 2.892(the rele)5.642 F -.275(va)-.275 G 2.893 -(nt code fragment were not enclosed by calls to).275 F/F1 11/Times-Italic@0 SF -(Disable_Interrupts)5.643 E F0(and)5.643 E F1(Enable_Interrupts)72 132 Q F0 -2.931(,a)C 2.931(ne)163.228 132 S .181(xception handler could abandon e)176.378 -132 R -.165(xe)-.165 G .181(cution of the code section by calling a).165 F .687 -(continuation, thus causing the \214le to remain open fore)72 147 R -.165(ve) --.275 G 4.648 -.605(r. W).165 H .688(hile situations lik).605 F 3.438(et)-.11 G -.688(his can be han-)435.65 147 R .248(dled by)72 162 R F1(dynamic-wind)2.998 E -F0 .248(on the Scheme le)2.998 F -.165(ve)-.275 G .247(l, some form of).165 F -F1(try/catc)2.997 E(h)-.165 E F0 -.11(fa)2.997 G .247(cility is not a).11 F --.275(va)-.22 G .247(ilable on the).275 F 1.073(C-language le)72 177 R -.165 -(ve)-.275 G 1.073(l, and using the C function implementing the).165 F F1 -(dynamic-wind)3.823 E F0(primiti)3.823 E 1.404 -.165(ve w)-.275 H 1.074 -(ould be).055 F(cumbersome.)72 192 Q(The function)72 209.6 Q/F2 10/Courier@0 SF -(void Signal_Exit\(int signal_number\);)100.346 232.103 Q F0 .162(may be used \ -as the handler for signals that must terminate the application; it ensures tha\ -t the tem-)72 254.603 R 1.126(porary \214les maintained by Elk are remo)72 -269.603 R -.165(ve)-.165 G 3.876(da).165 G 1.127(nd calls the e)277.816 269.603 -R 1.127(xtension \214nalization functions in the)-.165 F(normal w)72 284.603 Q -(ay)-.11 E(.)-.715 E/F3 11/Times-Bold@0 SF 2.75(12.7. De\214ning)72 314.603 R -(Scheme V)2.75 E(ariables)-1.012 E F0(User)97 333.203 Q .288 -(-supplied C/C++ code can de\214ne global Scheme v)-.22 F .288 -(ariables that are maintained as corre-)-.275 F(sponding)72 348.203 Q F1 -(Object)4.439 E F0 4.439(Cv)4.439 G 4.439(ariables. The)167.542 348.203 R 1.689 -(Scheme interpreter itself de\214nes se)4.439 F -.165(ve)-.275 G 1.689 -(ral such v).165 F 1.69(ariables, for)-.275 F -.165(ex)72 363.203 S 2.631 -(ample, the v).165 F(ariable)-.275 E F1(load-path)5.381 E F0 2.63 -(\(see section 5\) which can be modi\214ed and read both from)5.381 F 1.592 -(Scheme and from C.)72 378.203 R 1.592(The function)7.092 F F1(De\214ne_V)4.342 -E(ariable\(\))-1.221 E F0 1.593(is used to de\214ne a Scheme v)4.342 F 1.593 -(ariable and)-.275 F(bind an initial v)72 392.203 Q(alue to it:)-.275 E F2 -(void Define_Variable\(Object *var, const char *name, Object init\);)100.346 -414.706 Q F1(var)72 437.206 Q F0 .425(is the address of the C v)3.175 F .424 -(ariable corresponding to the ne)-.275 F .424(wly-created Scheme v)-.275 F -(ariable,)-.275 E F1(name)3.174 E F0(is)3.174 E .892(the name of the Scheme v) -72 452.206 R .892(ariable, and)-.275 F F1(init)3.642 E F0 .892 -(is its initial v)3.642 F(alue.)-.275 E F1(De\214ne_V)6.393 E(ariable\(\)) --1.221 E F0(calls)3.643 E F1(Intern\(\))3.643 E F0(to)3.643 E 1.27 -(create the v)72 467.206 R 1.269(ariable name included in the ne)-.275 F 4.019 -(wb)-.275 G 1.269(inding and)286.272 467.206 R F1(Func_Global_GC_Link\(\))4.019 -E F0 1.269(to properly)4.019 F(re)72 482.206 Q(gister the C v)-.165 E -(ariable with the g)-.275 E(arbage collector)-.055 E(.)-.605 E -(The C side of a Scheme v)72 499.806 Q -(ariable cannot be accessed directly; the functions)-.275 E F2 -(Var_Set\(Object variable, Object value\);)100.346 522.309 Q -(Var_Get\(Object variable\))100.346 536.309 Q(Var_Is_True\(Object variable\)) -100.346 550.309 Q F0 .521(must be used instead to assign a v)72 572.809 R .521 -(alue to the v)-.275 F .521(ariable and to read its current v)-.275 F .521 -(alue; the \214rst ar)-.275 F(gu-)-.198 E 5.332(ment to each function is the)72 -587.809 R F1(Object)8.082 E F0 5.332(whose address w)8.082 F 5.332 -(as passed to)-.11 F F1(De\214ne_V)8.082 E(ariable\(\))-1.221 E F0(.)A F1 --1.221(Va)72 602.809 S(r_Is_T)1.221 E(rue\(\))-.605 E F0 .258(is con)3.008 F --.165(ve)-.44 G .258(nient for boolean v).165 F .258 -(ariables and tests whether the contents of the v)-.275 F .259(ariable is)-.275 -F 1.418(true in the sense of)72 617.809 R F1 -.605(Tr)4.168 G(uep\(\)).605 E F0 -6.918(.A)C 4.168(sa)215.544 617.809 S 4.168(ne)228.875 617.809 S 1.417 -(xample, Figure 10 sho)243.262 617.809 R 1.417(ws ho)-.275 F 4.167(wt)-.275 G -1.417(he Xt e)387.903 617.809 R 1.417(xtension de\214nes a)-.165 F 2.031 -(Scheme v)72 632.809 R 2.031(ariable that is associated with the user)-.275 F -2.031(-de\214ned `)-.22 F(`w)-.814 E 2.032(arning handler')-.11 F 4.782('c) --.814 G 2.032(alled by the Xt)432.828 632.809 R(library to output w)72 647.809 -Q(arning messages.)-.11 E 1.498(In the e)97 666.409 R 1.498 -(xample in Figure 10, the function)-.165 F F1(Xt_W)4.248 E(arning\(\))-1.012 E -F0 1.497(is re)4.247 F 1.497(gistered as the Xt `)-.165 F(`w)-.814 E(arning) --.11 E(handler')72 681.409 Q 3.75('b)-.814 G 3.75(yp)120.751 681.409 S 1 -(assing it to)135.501 681.409 R F1(XtSetW)3.75 E(arningHandler\(\))-1.012 E F0 -6.5(.I)C 3.75(ti)306.536 681.409 S 3.75(si)316.402 681.409 S -2.09 -.44(nv o) -327.489 681.409 T -.11(ke).44 G 3.75(db).11 G 3.75(yX)368.353 681.409 S 3.75 -(tw)385.545 681.409 S 1(ith a w)400.295 681.409 R 1(arning message.)-.11 F .239 -(The message is con)72 696.409 R -.165(ve)-.44 G .239 -(rted to a Scheme string, and, if the Scheme v).165 F(ariable)-.275 E F1 -(xt-warning-handler)2.988 E F0(has)2.988 E .154 -(been assigned a procedure, this procedure is called with the string using)72 -711.409 R F1(Funcall\(\))2.905 E F0 5.655(.O)C .155(therwise the)450.385 -711.409 R 2.393(string is just sent to the current output port.)72 726.409 R -2.393(The call to)7.893 F F1(De\214ne_V)5.142 E(ariable\(\))-1.221 E F0 2.392 -(in the e)5.142 F(xtension)-.165 E EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(8-)288 51 S(________________\ -______________________________________________________________)75 99.5 Q/F1 10 -/Courier@0 SF(Object V_Xt_Warning_Handler;)72 119 Q -(void Xt_Warning\(char *msg\) {)72 141.4 Q(Object args, fun;)99.5 155.4 Q -(args = Cons\(Make_String\(msg, strlen\(msg\)\), Null\);)99.5 177.8 Q -(fun = Var_Get\(V_Xt_Warning_Handler\);)99.5 191.8 Q -(if \(TYPE\(fun\) == T_Compound\))99.5 205.8 Q -(\(void\)Funcall\(fun, args, 0\);)127 219.8 Q(else)99.5 233.8 Q -(Printf\(Curr_Output_Port, "%s\\n", msg\);)127 247.8 Q(})72 261.8 Q -(void elk_init_xt_error\(void\) {)72 284.2 Q -(Define_Variable\(&V_Xt_Warning_Handler, "xt-warning-handler", Null\);)99.5 -298.2 Q(XtSetWarningHandler\(Xt_Warning\);)99.5 312.2 Q(})72 326.2 Q/F2 10 -/Times-Bold@0 SF(Figur)116.2 344 Q 2.5(e1)-.18 G(0:)151.85 344 Q/F3 10 -/Times-Roman@0 SF(The Xt e)5 E(xtension de\214nes a Scheme v)-.15 E -(ariable holding a `)-.25 E(`w)-.74 E(arning handler')-.1 E(')-.74 E F0(______\ -________________________________________________________________________)75 -362.6 Q 2.315(initialization function associates the Scheme v)72 392.6 R -(ariable)-.275 E/F4 11/Times-Italic@0 SF(xt-warning-handler)5.065 E F0 2.316 -(with the C v)5.065 F(ariable)-.275 E F4(V_Xt_W)72 407.6 Q(arning_Handler) --1.012 E F0(\(as a con)2.75 E -.165(ve)-.44 G(ntion, Elk uses the pre\214x `) -.165 E(`V_')-.814 E 2.75('f)-.814 G(or v)376.095 407.6 Q -(ariables of this kind\).)-.275 E/F5 11/Times-Bold@0 SF 2.75(12.8. De\214ning) -72 437.6 R(Readers)2.75 E F0 .449(In addition or as an alternati)97 456.2 R -.779 -.165(ve t)-.275 H 3.199(ot).165 G .449(he constructor primiti)250.931 -456.2 R .779 -.165(ve f)-.275 H .449(or a ne).165 F 3.198(wS)-.275 G .448 -(cheme type, applica-)411.771 456.2 R .271(tions and e)72 471.2 R .272 -(xtensions may de\214ne a)-.165 F F4 -.407(re)3.022 G(ader).407 E F0 .272 -(function for each ne)3.022 F 3.022(wt)-.275 G 3.022(ype. The)359.175 471.2 R -.272(bitstring e)3.022 F .272(xtension, for)-.165 F -.165(ex)72 486.2 S .751 -(ample, de\214nes a reader to allo).165 F 3.501(wi)-.275 G .751 -(nput of bitstring literals using the)232.167 486.2 R F4(#*10110001)3.501 E F0 -3.5(syntax. Each)3.501 F(user)72 501.2 Q .571 -(-de\214ned read syntax is introduced by the `#' symbol follo)-.22 F .571 -(wed by one more character)-.275 F 3.321(,i)-.44 G(denti-)478.337 501.2 Q .922 -(fying the type of the object.)72 516.2 R 2.682 -.88(To d)6.422 H .922 -(e\214ne a reader).88 F 3.672(,t)-.44 G .922(he follo)295.269 516.2 R .921 -(wing function is called \(typically from)-.275 F(within an e)72 530.2 Q -(xtension initialization function\):)-.165 E F1(void Define_Reader\(int c,) -100.346 552.703 Q -(\(Object \(*func\)\(Object port, int c, int const_flag\)\)\);)124.346 566.703 -Q F0 .282(The ar)97 592.803 R .282(guments to)-.198 F F4(De\214ne_Reader\(\)) -3.032 E F0 .282(are the as yet unused character identifying the type \(e.)3.032 -F(g.)1.833 E .735(`*' for bitstrings\) and a pointer to a)72 607.803 R F4 -.407 -(re)3.485 G .735(ader function).407 F F0 .735(that is in)3.485 F -.22(vo)-.44 G --.11(ke).22 G 3.485(db).11 G 3.485(yt)381.932 607.803 S .734 -(he Scheme parser when-)393.975 607.803 R -2.365 -.275(ev e)72 622.803 T 3.023 -(rt).275 G .273(he ne)96.572 622.803 R .273 -(wly de\214ned syntax is encountered.)-.275 F .274 -(This reader function is passed a Scheme input port)5.773 F .52 -(from which it reads the ne)72 637.803 R .52(xt tok)-.165 F .52 -(en, the character follo)-.11 F .519(wing the `#' symbol \(to f)-.275 F .519 -(acilitate using the)-.11 F 3.055(same reader for dif)72 652.803 R 3.055 -(ferent types\), and a \215ag indicating whether the ne)-.275 F 3.056 -(wly-created object is)-.275 F -.165(ex)72 667.803 S .521 -(pected to be made read-only \(this is true when e).165 F .521 -(xpressions are loaded from a \214le\).)-.165 F .52(The reader)6.021 F -(function must return a ne)72 682.803 Q 2.75(wo)-.275 G(bject of the gi)198.511 -682.803 Q -.165(ve)-.275 G 2.75(nt).165 G(ype.)280.56 682.803 Q -1.21(Yo)97 -701.403 S 4.678(um)1.21 G 1.928(ay w)127.968 701.403 R 1.928 -(ant to refer to the bitstring e)-.11 F 1.929 -(xtension included in the Elk distrib)-.165 F 1.929(ution for an)-.22 F -.165 -(ex)72 716.403 S 1.292(ample de\214nition of a reader function \(`).165 F -(`lib/misc/bitstring.c')-.814 E 1.292('\), and for the macros that can be)-.814 -F(used by reader functions to ef)72 731.403 Q -(\214ciently read characters from a port.)-.275 E EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4)276.087 51 S 2.75(9-)288 51 S/F1 11 -/Times-Bold@0 SF 2.75(12.9. F)72 87 R(ork Handlers)-.275 E F0 .711 -(Extensions may need to be noti\214ed when a cop)97 105.6 R 3.461(yo)-.11 G -3.461(ft)324.18 105.6 S .711(he running interpreter \(or application\))334.362 -105.6 R 1.624(is created by means of the)72 120.6 R/F2 11/Times-Italic@0 SF -(fork\(\))4.374 E F0 1.623(UNIX system call.)4.373 F -.165(Fo)7.123 G 4.373(re) -.165 G 1.623(xample, consider an e)345.224 120.6 R 1.623(xtension that)-.165 F -1.549(stores information in a temporary \214le and remo)72 135.6 R -.165(ve) --.165 G 4.299(st).165 G 1.55(his \214le on termination of the program.)312.587 -135.6 R(If)7.05 E 1.485(another e)72 150.6 R 1.485(xtension created a cop)-.165 -F 4.235(yo)-.11 G 4.235(ft)231.577 150.6 S 1.485 -(he running interpreter by calling)242.533 150.6 R F2(fork\(\))4.235 E F0 4.234 -(,t)C 1.484(he child process)430.159 150.6 R -.11(wo)72 165.6 S .589(uld remo) -.11 F .919 -.165(ve t)-.165 H .589(he temporary \214le on e).165 F .589 -(xit\212the \214le w)-.165 F .59(ould not be a)-.11 F -.275(va)-.22 G .59 -(ilable to the original instance).275 F .906(of the interpreter \(i.)72 180.6 R -.906(e. the parent process\) an)1.833 F 3.656(yl)-.165 G(onger)284.966 180.6 Q -6.406(.T)-.605 G 3.656(op)324.405 180.6 S(re)339.061 180.6 Q -.165(ve)-.275 G -.906(nt premature remo).165 F -.275(va)-.165 G 3.655(lo).275 G 3.655(ft)462.777 -180.6 S .905(he \214le,)473.153 180.6 R .168(the e)72 195.6 R .169 -(xtension that o)-.165 F .169(wns it can de\214ne a)-.275 F F2 .169 -(fork handler)2.919 F F0 .169(by calling)2.919 F F2(Re)2.919 E -(gister_Onfork\(\))-.44 E F0 .169(with a pointer to)2.919 F 2.75(aCf)72 209.6 S -(unction:)93.384 209.6 Q/F3 10/Courier@0 SF -(void Register_Onfork\(\(void \(*func\)\(void\)\)\);)100.346 232.103 Q F0 .493 -(The function could create an additional link to the \214le, so that a child p\ -rocess w)72 254.603 R .492(ould just remo)-.11 F -.165(ve)-.165 G -(this link on e)72 269.603 Q(xit, lea)-.165 E(ving the original link intact.) --.22 E 1.138(Extensions that use)97 288.203 R F2(fork\(\))3.888 E F0 1.139 -(without e)3.889 F -.165(xe)-.165 G 1.139(cuting a ne).165 F 3.889(wp)-.275 G -1.139(rogram in the child process \(e.)337.087 288.203 R 1.139(g. the)1.833 F -4.839(UNIX e)72 303.203 R 4.839(xtension which de\214nes a)-.165 F F2 -(unix-fork)7.589 E F0(primiti)7.589 E -.165(ve)-.275 G 7.589(\)a).165 G 4.839 -(re required to call the function)346.311 303.203 R F2(Call_Onfork\(\))72 -317.203 Q F0(in the ne)2.75 E(wly created child process to in)-.275 E -.22(vo) --.44 G .22 -.11(ke a).22 H(ll currently de\214ned fork handlers:).11 E F3 -(void Call_Onfork\(void\);)100.346 339.706 Q F1 -.275(Ap)72 377.206 S -(pendix A: Functions that can T).275 E(rigger a Garbage Collection)-.814 E F0 -1.854(This appendix lists the functions e)97 395.806 R 1.854 -(xported by Elk that may trigger a g)-.165 F 1.854(arbage collection.)-.055 F --.44(Wi)72 410.806 S .262 -(thin C/C++ code, local Scheme objects must be protected as sho).44 F .261 -(wn in section 9.1 when one of)-.275 F -(these functions is called during the objects' lifetime.)72 425.806 Q .229 -(The C functions corresponding to the follo)97 444.406 R .229 -(wing Scheme primiti)-.275 F -.165(ve)-.275 G 2.979(sc).165 G .23(an cause a g) -400.516 444.406 R .23(arbage col-)-.055 F(lection:)72 458.406 Q EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(0-)288 51 S/F1 10/Courier@0 -SF 102(append load)100.346 86 R(read-string)388.346 86 Q 108(apply macro-body) -100.346 100 R(require)388.346 100 Q 90(autoload macro-expand)100.346 114 R -(reverse)388.346 114 Q 54(backtrace-list make-list)100.346 128 R(string)388.346 -128 Q 18(call-with-input-file make-string)100.346 142 R(string->list)388.346 -142 Q 12(call-with-output-file make-vector)100.346 156 R(string->number)388.346 -156 Q 96(call/cc map)100.346 170 R(string->symbol)388.346 170 Q 36 -(command-line-args oblist)100.346 184 R(string-append)388.346 184 Q 114 -(cons open-input-file)100.346 198 R(string-copy)388.346 198 Q 114 -(dump open-input-output-file)100.346 212 R(substring)388.346 212 Q 66 -(dynamic-wind open-input-string)100.346 226 R(symbol-plist)388.346 226 Q 114 -(eval open-output-file)100.346 240 R(tilde-expand)388.346 240 Q 90 -(for-each open-output-string)100.346 254 R(type)388.346 254 Q 108 -(force port-line-number)100.346 268 R(vector)388.346 268 Q 36 -(get-output-string procedure-lambda)100.346 282 R(vector->list)388.346 282 Q -114(list provide)100.346 296 R(vector-copy)388.346 296 Q 66(list->string put) -100.346 310 R(with-input-from-file)388.346 310 Q 66(list->vector read)100.346 -324 R(with-output-to-file)388.346 324 Q/F2 10/Times-Italic@0 SF -(all special forms)100.346 346.4 Q(all mathematical primitives e)100.346 360.4 -Q(xcept pr)-.2 E(edicates)-.37 E -(all output primitives if output is sent to a string port)100.346 374.4 Q F0 -.444(In practice, most of these functions, in particular the special forms, ar\ -e rarely or ne)97 400.5 R -.165(ve)-.275 G 3.193(ru).165 G(sed)489.337 400.5 Q -.158(in e)72 415.5 R .159(xtensions or Elk-based applications.)-.165 F .159 -(In addition to these primiti)5.659 F -.165(ve)-.275 G .159(s, the follo).165 F -.159(wing C functions)-.275 F(can trigger a g)72 429.5 Q(arbage collection:) --.055 E F1 54(Alloc_Object\(\) Make_Reduced_Flonum\(\))100.346 452.003 R -(Make_String\(\))388.346 452.003 Q 72(Make_Port\(\) Make_Flonum\(\))100.346 -466.003 R(Make_Const_String\(\))388.346 466.003 Q 30 -(Load_Source_Port\(\) Define_Primitive\(\) Intern\(\))100.346 480.003 R 72 -(Load_File\(\) Printf\(\))100.346 494.003 R(CI_Intern\(\))388.346 494.003 Q 72 -(Copy_List\(\) Print_Object\(\))100.346 508.003 R(Define_Variable\(\))388.346 -508.003 Q 66(Const_Cons\(\) General_Print_Object\(\))100.346 522.003 R -(Define_Symbol\(\))388.346 522.003 Q 54(Make_Integer\(\) Format\(\))100.346 -536.003 R(Bits_To_Symbols\(\))388.346 536.003 Q 48(Make_Unsigned\(\) Eval\(\)) -100.346 550.003 R(Make_Vector\(\))388.346 550.003 Q 72 -(Make_Long\(\) Funcall\(\))100.346 564.003 R(Make_Const_Vector\(\))388.346 -564.003 Q(Make_Unsigned_Long\(\))100.346 578.003 Q F0(Note:)72 604.103 Q/F3 11 -/Times-Italic@0 SF(Mak)4.82 E(e_Inte)-.11 E -.11(ge)-.44 G(r\(\)).11 E F0(,)A -F3(Mak)4.819 E(e_Unsigned\(\))-.11 E F0(,)A F3(Mak)4.819 E(e_Long\(\))-.11 E F0 -4.819(,a)C(nd)336.291 604.103 Q F3(Mak)4.819 E(e_Unsigned_Long\(\))-.11 E F0 -2.069(can only)4.819 F .33(trigger a g)72 619.103 R .331(arbage collection if) --.055 F F3(FIXNUM_FITS\(\))3.081 E F0(\(or)3.081 E F3(UFIXNUM_FITS\(\))3.081 E -F0 3.081(,r)C(especti)395.648 619.103 Q -.165(ve)-.275 G .331 -(ly\) returns zero).165 F(for the gi)72 634.103 Q -.165(ve)-.275 G 2.75(na).165 -G -.198(rg)135.404 634.103 S(ument.).198 E/F4 11/Times-Bold@0 SF -.275(Ap)72 -664.103 S(pendix B: Con).275 E -.11(ve)-.44 G(nience Functions f).11 E -(or GC-Safe Data Structur)-.275 E(es)-.198 E F0 .12(Figure 11 sho)97 682.703 R -.12 -(ws the source code for a set of functions to insert Scheme objects into a v) --.275 F(ector)-.165 E 2.144(that has been re)72 697.703 R 2.144 -(gistered with the g)-.165 F 2.144(arbage collector)-.055 F 4.894(,t)-.44 G -4.894(od)317.908 697.703 S 2.144(elete objects from the v)333.802 697.703 R -(ector)-.165 E 4.894(,a)-.44 G 2.145(nd to)479.547 697.703 R(retrie)72 712.703 -Q .565 -.165(ve t)-.275 H .235(he object stored under a gi).165 F -.165(ve) --.275 G 2.985(nv).165 G .235(ector inde)252.527 712.703 R 2.985(x. These)-.165 -F .234(functions help b)2.985 F .234(uilding dynamic data)-.22 F 2.475 -(structures \(such as link)72 727.703 R 2.476 -(ed lists or hash tables\) containing Scheme objects.)-.11 F 2.476 -(There is nothing)7.976 F EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(1-)288 51 S .117(application\ --speci\214c in the code; if you \214nd it useful, you can directly include it \ -in your Elk e)72 87 R(xten-)-.165 E(sion or Elk-based application without an)72 -102 Q 2.75(yc)-.165 G 2.75(hanges. See)263.092 102 R -(section 12.3 for a detailed description.)2.75 E EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(2-)288 51 S(________________\ -______________________________________________________________)75 99.5 Q/F1 10 -/Courier@0 SF(static int max_objects = 32;)72 119 Q(/* initial size */)270 119 -Q(static int num_objects;)72 133 Q(static Object objects;)72 147 Q -(static int inx;)72 161 Q(int register_object\(Object x\) {)72 183.4 Q -(Object v;)99.5 197.4 Q(int n;)99.5 211.4 Q(GC_Node;)99.5 225.4 Q -(if \(num_objects == max_objects\) {)99.5 247.8 Q(max_objects *= 2;)127 261.8 Q -(GC_Link\(x\);)127 275.8 Q 6(v=M)127 289.8 S(ake_Vector\(max_objects, Null\);) -157 289.8 Q(GC_Unlink;)127 303.8 Q -(memcpy\(VECTOR\(v\)->data, VECTOR\(objects\)->data,)127 317.8 Q -(num_objects * sizeof\(Object\)\);)154.5 331.8 Q(objects = v;)127 345.8 Q -(inx = num_objects;)127 359.8 Q(})99.5 373.8 Q -(for \(n = 0; !Nullp\(VECTOR\(objects\)->data[inx]\);)99.5 387.8 Q -(inx++, inx %= max_objects\) {)154.5 401.8 Q(n++;)127 415.8 Q -(assert\(n < max_objects\);)127 429.8 Q(})99.5 443.8 Q -(VECTOR\(objects\)->data[inx] = x;)99.5 457.8 Q(num_objects++;)99.5 471.8 Q -(return inx;)99.5 485.8 Q(})72 499.8 Q(void deregister_object\(int i\) {)72 -522.2 Q(VECTOR\(objects\)->data[i] = Null;)99.5 536.2 Q(--num_objects;)99.5 -550.2 Q(assert\(num_objects >= 0\);)99.5 564.2 Q(})72 578.2 Q -(Object get_object\(int i\) {)72 600.6 Q(return VECTOR\(objects\)->data[i];) -99.5 614.6 Q(})72 628.6 Q(void elk_init_gcroot\(void\) {)72 651 Q -(objects = Make_Vector\(max_objects, Null\);)99.5 665 Q -(Global_GC_Link\(objects\);)99.5 679 Q(})72 693 Q/F2 10/Times-Bold@0 SF(Figur) -130.695 710.8 Q 2.5(e1)-.18 G(1:)166.345 710.8 Q/F3 10/Times-Roman@0 SF -(Functions to map Scheme objects to inde)5 E -.15(xe)-.15 G 2.5(si).15 G -(nto a GC-safe v)362.425 710.8 Q(ector)-.15 E F0(_____________________________\ -_________________________________________________)75 729.4 Q EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(3-)288 51 S/F1 11 -/Times-Bold@0 SF -.275(Ap)72 87 S(pendix C: Summary of Functions, Macr).275 E -(os, T)-.198 E(ypes, and V)-.814 E(ariables)-1.012 E F0 .475(This appendix pro) -97 105.6 R .475(vides a quick o)-.165 F -.165(ve)-.165 G(rvie).165 E 3.225(wo) --.275 G 3.226(ft)289.105 105.6 S .476(he functions and other de\214nitions e) -299.052 105.6 R .476(xported by)-.165 F .859(the Elk k)72 120.6 R 3.609 -(ernel. The)-.11 F .859(list is di)3.609 F .858 -(vided in groups of de\214nitions with related functionality; the entries)-.275 -F .491(are presented in roughly the same order in which the)72 135.6 R 3.241 -(ya)-.165 G .492(re introduced in the abo)321.132 135.6 R .822 -.165(ve c)-.165 -H 3.242(hapters. Full).165 F 1.071(function prototypes are gi)72 150.6 R -.165 -(ve)-.275 G 3.821(nf).165 G 1.071(or functions; in some prototypes, ar)211.485 -150.6 R 1.071(guments are gi)-.198 F -.165(ve)-.275 G 3.821(nn).165 G 1.071 -(ames for)464.748 150.6 R 3.851(clari\214cation. The)72 165.6 R 1.101 -(initial k)3.851 F -.165(ey)-.11 G -.11(wo).165 G(rds).11 E F1(function)3.851 E -F0(,)A F1(macr)3.851 E(o)-.198 E F0(,)A F1(typedef)3.852 E F0 3.852(,a)C(nd) -358.977 165.6 Q F1 -.11(va)3.852 G(riable).11 E F0 1.102(indicate the type of) -3.852 F .737(each entry \(function, preprocessor symbol with or without ar)72 -180.6 R .736(guments, type de\214nition, and e)-.198 F(xter)-.165 E(-)-.22 E -.479(nal v)72 195.6 R .479(ariable de\214ned by Elk, respecti)-.275 F -.165(ve) --.275 G 3.229(ly\). The).165 F .479(functions corresponding to Scheme primiti) -3.229 F -.165(ve)-.275 G 3.23(s\().165 G(as)494.837 195.6 Q -(described in section 7.4\) ha)72 210.6 Q .33 -.165(ve b)-.22 H -(een omitted from the list.).165 E F1(Accessing the Scheme Object Repr)72 240.6 -Q(esentation)-.198 E/F2 10/Times-Bold@0 SF(typedef)100.346 266.703 Q/F3 10 -/Courier@0 SF(Object)6 E F2(macr)100.346 289.103 Q(o)-.18 E F3(TYPE\(obj\))6 E -F2(macr)100.346 303.103 Q(o)-.18 E F3(POINTER\(obj\))6 E F2(macr)100.346 -317.103 Q(o)-.18 E F3(ISCONST\(obj\))6 E F2(macr)100.346 331.103 Q(o)-.18 E F3 -(SETCONST\(obj\))6 E F2(macr)100.346 345.103 Q(o)-.18 E F3 -(SET\(obj, type, ptr\))6 E F2(macr)100.346 359.103 Q(o)-.18 E F3 -(EQ\(obj1, obj2\))6 E F1(De\214ning Scheme Primiti)72 389.103 Q -.11(ve)-.11 G -(s).11 E F2(function)100.346 415.206 Q F3 -(void Define_Primitive\(\(Object \(*func\)\(\)\), const char *name,)6 E -(int minargs, int maxargs, enum discipline disc\);)190.346 429.206 Q F1 -(Making Objects Kno)72 459.206 Q(wn to the Garbage Collector)-.11 E F2(macr) -100.346 485.309 Q(o)-.18 E F3(GC_Node, GC_Node2, ...)6 E F2(macr)100.346 -499.309 Q(o)-.18 E F3(GC_Link\(obj\), GC_Link2\(obj1, obj2\), ...)6 E F2(macr) -100.346 513.309 Q(o)-.18 E F3(GC_Unlink)6 E F2(macr)100.346 527.309 Q(o)-.18 E -F3(Global_GC_Link\(obj\))6 E F2(function)100.346 541.309 Q F3 -(void Func_Global_GC_Link\(obj_ptr\);)6 E F1(Booleans)72 571.309 Q F2(macr) -100.346 597.412 Q(o)-.18 E F3(T_Boolean)6 E F2(macr)100.346 611.412 Q(o)-.18 E -F3(Truep\(obj\))6 E F2 -.1(va)100.346 633.812 S(riable).1 E F3(Object True)6 E -F2 -.1(va)100.346 647.812 S(riable).1 E F3(Object False)6 E F2(function)100.346 -670.212 Q F3(int Eqv\(Object, Object\);)6 E F2(function)100.346 684.212 Q F3 -(int Equal\(Object, Object\);)6 E EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(4-)288 51 S/F1 11 -/Times-Bold@0 SF(Characters)72 87 Q/F2 10/Times-Bold@0 SF(macr)100.346 113.103 -Q(o)-.18 E/F3 10/Courier@0 SF(T_Character)6 E F2(macr)100.346 127.103 Q(o)-.18 -E F3(CHAR\(char_obj\))6 E F2(function)100.346 141.103 Q F3 -(Object Make_Char\(int\);)6 E F2 -.1(va)100.346 155.103 S(riable).1 E F3 -(Object Newline)6 E F1 -.11(Pa)72 185.103 S(irs and Lists).11 E F2(macr)100.346 -211.206 Q(o)-.18 E F3(T_Null)6 E F2(macr)100.346 225.206 Q(o)-.18 E F3 -(Nullp\(obj\))6 E F2 -.1(va)100.346 239.206 S(riable).1 E F3(Null)6 E F2(macr) -100.346 261.606 Q(o)-.18 E F3(T_Pair)6 E F2(macr)100.346 275.606 Q(o)-.18 E F3 -(PAIR\(pair_obj\))6 E F2(macr)100.346 289.606 Q(o)-.18 E F3(Car\(obj\))6 E F2 -(macr)100.346 303.606 Q(o)-.18 E F3(Cdr\(obj\))6 E F2(macr)100.346 317.606 Q(o) --.18 E F3(Cons\(obj1, obj2\))6 E F2(macr)100.346 340.006 Q(o)-.18 E F3 -(Check_List\(obj\))6 E F2(function)100.346 354.006 Q F3 -(int Fast_Length\(Object\);)6 E F2(function)100.346 368.006 Q F3 -(Object Copy_List\(Object\);)6 E F1(Integers \(Fixnums and Bignums\))72 398.006 -Q F2(macr)100.346 424.109 Q(o)-.18 E F3(T_Fixnum)6 E F2(macr)100.346 438.109 Q -(o)-.18 E F3(T_Bignum)6 E F2(macr)100.346 452.109 Q(o)-.18 E F3 -(FIXNUM_FITS\(integer\))6 E F2(macr)100.346 466.109 Q(o)-.18 E F3 -(UFIXNUM_FITS\(unsigned_integer\))6 E F2(macr)100.346 480.109 Q(o)-.18 E F3 -(FIXNUM\(fixnum_obj\))6 E F2(macr)100.346 494.109 Q(o)-.18 E F3 -(BIGNUM\(bignum_obj\))6 E F2(macr)100.346 516.509 Q(o)-.18 E F3 -(Check_Integer\(obj\))6 E F2(macr)100.346 530.509 Q(o)-.18 E F3 -(Check_Number\(obj\))6 E F2(function)100.346 552.909 Q F3 -(Object Make_Integer\(int\);)6 E F2(function)100.346 566.909 Q F3 -(Object Make_Unsigned\(unsigned\);)6 E F2(function)100.346 580.909 Q F3 -(Object Make_Long\(long\);)6 E F2(function)100.346 594.909 Q F3 -(Object Make_Unsigned_Long\(unsigned long\);)6 E F2(function)100.346 617.309 Q -F3(int Get_Integer\(Object\);)6 E F2(function)100.346 631.309 Q F3 -(unsigned Get_Unsigned\(Object\);)6 E F2(function)100.346 645.309 Q F3 -(long Get_Long\(Object\);)6 E F2(function)100.346 659.309 Q F3 -(unsigned long Get_Unsigned_Long\(Object\);)6 E F2(function)100.346 681.709 Q -F3(int Get_Exact_Integer\(Object\);)6 E F2(function)100.346 695.709 Q F3 -(unsigned Get_Exact_Unsigned\(Object\);)6 E F2(function)100.346 709.709 Q F3 -(long Get_Exact_Long\(Object\);)6 E F2(function)100.346 723.709 Q F3 -(unsigned long Get_Exact_Unsigned_Long\(Object\);)6 E EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 50 S 2.75(5-)288 50 S/F1 11 -/Times-Bold@0 SF(Floating P)72 87 Q(oint Numbers \(Reals\))-.22 E/F2 10 -/Times-Bold@0 SF(macr)100.346 113.103 Q(o)-.18 E/F3 10/Courier@0 SF(T_Flonum)6 -E F2(macr)100.346 127.103 Q(o)-.18 E F3(FLONUM\(flonum_obj\))6 E F2(function) -100.346 141.103 Q F3(Object Make_Flonum\(double\);)6 E F2(function)100.346 -155.103 Q F3(Object Make_Reduced_Flonum\(double\);)6 E F2(function)100.346 -169.103 Q F3(double Get_Double\(Object\);)6 E F1(Symbols)72 199.103 Q F2(macr) -100.346 225.206 Q(o)-.18 E F3(T_Symbol)6 E F2(macr)100.346 239.206 Q(o)-.18 E -F3(SYMBOL\(symbol_obj\))6 E F2(function)100.346 253.206 Q F3 -(Object Intern\(const char *\);)6 E F2(function)100.346 267.206 Q F3 -(Object CI_Intern\(const char *\);)6 E F2(function)100.346 281.206 Q F3 -(void Define_Symbol\(Object *var, const char *name\);)6 E F2 -.1(va)100.346 -295.206 S(riable).1 E F3(Object Void)6 E F2(typedef)100.346 317.606 Q F3 -(SYMDESCR)6 E F2(function)100.346 331.606 Q F3 -(unsigned long Symbols_To_Bits\(Object syms, int mask_flag,)6 E -(SYMDESCR *table\);)190.346 345.606 Q F2(function)100.346 359.606 Q F3 -(Object Bits_To_Symbols\(unsigned long bits, int mask_flag,)6 E -(SYMDESCR *table\);)190.346 373.606 Q F1(Strings)72 403.606 Q F2(macr)100.346 -429.709 Q(o)-.18 E F3(T_String)6 E F2(macr)100.346 443.709 Q(o)-.18 E F3 -(STRING\(string_obj\))6 E F2(function)100.346 457.709 Q F3 -(Object Make_String\(const char *init, int size\);)6 E F2(function)100.346 -471.709 Q F3(char *Get_String\(Object\);)6 E F2(function)100.346 485.709 Q F3 -(char *Get_Strsym\(Object\);)6 E F2(macr)100.346 499.709 Q(o)-.18 E F3 -(Get_String_Stack\(obj, char_ptr\))6 E F2(macr)100.346 513.709 Q(o)-.18 E F3 -(Get_Strsym_Stack\(obj, char_ptr\))6 E F1 -1.1(Ve)72 543.709 S(ctors)1.1 E F2 -(macr)100.346 569.812 Q(o)-.18 E F3(T_Vector)6 E F2(macr)100.346 583.812 Q(o) --.18 E F3(VECTOR\(vector_obj\))6 E F2(function)100.346 597.812 Q F3 -(Object Make_Vector\(int size, Object fill\);)6 E F1 -.22(Po)72 627.812 S(rts) -.22 E F2(macr)100.346 653.915 Q(o)-.18 E F3(T_Port)6 E F2(macr)100.346 667.915 -Q(o)-.18 E F3(PORT\(port_obj\))6 E F2(function)100.346 681.915 Q F3 -(Object Make_Port\(int flags, FILE *f, Object name\);)6 E F2(function)100.346 -695.915 Q F3(Object Terminate_File\(Object port\);)6 E F2(macr)100.346 709.915 -Q(o)-.18 E F3(Check_Input_Port\(obj\))6 E F2(macr)100.346 723.915 Q(o)-.18 E F3 -(Check_Output_Port\(obj\))6 E EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 50 S 2.75(6-)288 50 S/F1 10 -/Times-Bold@0 SF -.1(va)100.346 86 S(riable).1 E/F2 10/Courier@0 SF -(Object Curr_Input_Port, Curr_Output_Port)6 E F1 -.1(va)100.346 100 S(riable).1 -E F2(Object Standard_Input_Port, Standard_Output_Port)6 E F1(function)100.346 -114 Q F2(void Reset_IO\(int destructive_flag\);)6 E F1(function)100.346 128 Q -F2(void Printf\(Object port, char *fmt, ...\);)6 E F1(function)100.346 142 Q F2 -(void Print_Object\(Object obj, Object port, int raw_flag,)6 E -(int print_depth, int print_length\);)190.346 156 Q F1(macr)100.346 170 Q(o) --.18 E F2(Print\(obj\))6 E F1(function)100.346 184 Q F2 -(void Load_Source_Port\(Object port\);)6 E F1(function)100.346 198 Q F2 -(void Load_File\(char *filename\);)6 E/F3 11/Times-Bold@0 SF(Miscellaneous T)72 -228 Q(ypes)-.814 E F1(macr)100.346 254.103 Q(o)-.18 E F2(T_End_Of_File)6 E F1 --.1(va)100.346 268.103 S(riable).1 E F2(Object Eof)6 E F1(macr)100.346 290.503 -Q(o)-.18 E F2(T_Environment)6 E F1 -.1(va)100.346 304.503 S(riable).1 E F2 -(Object The_Environment, Global_Environment)6 E F1(macr)100.346 326.903 Q(o) --.18 E F2(T_Primitive)6 E F1(macr)100.346 340.903 Q(o)-.18 E F2(T_Compound)6 E -F1(function)100.346 354.903 Q F2(void Check_Procedure\(Object\);)6 E F1(macr) -100.346 377.303 Q(o)-.18 E F2(T_Control_Point)6 E F1(macr)100.346 391.303 Q(o) --.18 E F2(T_Promise)6 E F1(macr)100.346 405.303 Q(o)-.18 E F2(T_Macro)6 E F3 -(De\214ning Scheme T)72 435.303 Q(ypes and Allocating Objects)-.814 E F1 -(function)100.346 461.406 Q F2(int Define_Type\(int zero, const char *name,)6 E -(int \(*size\)\(Object\), int const_size,)190.346 475.406 Q -(int \(*eqv\)\(Object, Object\),)190.346 489.406 Q -(int \(*equal\)\(Object, Object\),)190.346 503.406 Q -(int \(*print\)\(Object, Object, int, int, int\),)190.346 517.406 Q -(int \(*visit\)\(Object*, int \(*\)\(Object*\)\)\);)190.346 531.406 Q F1 -(function)100.346 545.406 Q F2 -(Object Alloc_Object\(int size, int type, int const_flag\);)6 E F3 -(Calling Scheme Pr)72 575.406 Q(ocedur)-.198 E(es and Ev)-.198 E -(aluating Scheme Code)-.11 E F1(function)100.346 601.509 Q F2 -(Object Funcall\(Object fun, Object argl, int eval_flag\);)6 E F1(function) -100.346 615.509 Q F2(Object Eval\(Object expr\);)6 E F1(function)100.346 -629.509 Q F2(char *String_Eval\(char *expr\);)6 E F3 -.715(We)72 659.509 S -(ak P).715 E(ointers and Object T)-.22 E(ermination)-1.012 E F1(function) -100.346 685.612 Q F2(void Register_Before_GC\(\(void \(*func\)\(void\)\)\);)6 E -F1(function)100.346 699.612 Q F2 -(void Register_After_GC\(\(void \(*func\)\(void\)\)\);)6 E F1(macr)100.346 -722.012 Q(o)-.18 E F2(IS_ALIVE\(obj\))6 E EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 50 S 2.75(7-)288 50 S/F1 10 -/Times-Bold@0 SF(macr)100.346 86 Q(o)-.18 E/F2 10/Courier@0 SF -(WAS_FORWARDED\(obj\))6 E F1(macr)100.346 100 Q(o)-.18 E F2(UPDATE_OBJ\(obj\))6 -E F1(function)100.346 122.4 Q F2 -(void Register_Object\(Object obj, char *group,)6 E -(\(Object \(*term\)\(Object\)\), int leader_flag\);)190.346 136.4 Q F1 -(function)100.346 150.4 Q F2(void Deregister_Object\(Object obj\);)6 E F1 -(function)100.346 164.4 Q F2(void Terminate_Type\(int type\);)6 E F1(function) -100.346 178.4 Q F2(void Terminate_Group\(char *group\);)6 E F1(function)100.346 -192.4 Q F2(Object Find_Object\(int type, char *group,)6 E -(\(int \(*match_func\)\(Object, ...\)\), ...\);)190.346 206.4 Q/F3 11 -/Times-Bold@0 SF(Signaling Err)72 236.4 Q(ors)-.198 E F1(function)100.346 -262.503 Q F2(void Primitive_Error\(char *fmt, ...\);)6 E F1(function)100.346 -276.503 Q F2(void Set_Error_Tag\(const char *tag\);)6 E F1(function)100.346 -290.503 Q F2(char *Get_Error_Tag\(void\);)6 E F1(function)100.346 304.503 Q F2 -(void Set_App_Name\(char *name\);)6 E F1(function)100.346 318.503 Q F2 -(void Range_Error\(Object offending_obj\);)6 E F1(function)100.346 332.503 Q F2 -(void Wrong_Type\(Object offending_obj, int expected_type\);)6 E F1(function) -100.346 346.503 Q F2(void Wrong_Type_Combination\(Object offending_obj,)6 E -(char *expected_type\);)169.846 360.503 Q F1(function)100.346 374.503 Q F2 -(void Fatal_Error\(char *fmt, ...\);)6 E F1(function)100.346 388.503 Q F2 -(void Panic\(char *msg\);)6 E F1 -.1(va)100.346 402.503 S(riable).1 E F2 -(int Saved_Errno)6 E F3(Exceptions \(Signals\))72 432.503 Q F1(macr)100.346 -458.606 Q(o)-.18 E F2(Disable_Interrupts, Enable_Interrupts)6 E F1(macr)100.346 -472.606 Q(o)-.18 E F2(Force_Disable_Interrupts, Force_Enable_Interrupts)6 E F1 -(function)100.346 486.606 Q F2(void Signal_Exit\(int signal_number\);)6 E F3 -(De\214ning and Using Scheme V)72 516.606 Q(ariables)-1.012 E F1(function) -100.346 542.709 Q F2 -(void Define_Variable\(Object *var, const char *name, Object init\);)6 E F1 -(function)100.346 556.709 Q F2(void Var_Set\(Object var, Object val\);)6 E F1 -(function)100.346 570.709 Q F2(Object Var_Get\(Object var\);)6 E F1(function) -100.346 584.709 Q F2(int Var_Is_True\(Object var\);)6 E F3 -(De\214ning Reader Functions)72 614.709 Q F1(function)100.346 640.812 Q F2 -(void Define_Reader\(int c,)6 E -(\(Object \(*func\)\(Object port, int c, int const_flag\)\)\);)190.346 654.812 -Q F3 -.275(Fo)72 684.812 S(rk Handlers).275 E F1(function)100.346 710.915 Q F2 -(void Register_Onfork\(\(void \(*func\)\(void\)\)\);)6 E F1(function)100.346 -724.915 Q F2(void Call_Onfork\(void\);)6 E EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 50 S 2.75(8-)288 50 S/F1 11 -/Times-Bold@0 SF(Allocating Memory)72 87 Q/F2 10/Times-Bold@0 SF(function) -100.346 113.103 Q/F3 10/Courier@0 SF(char *Safe_Malloc\(unsigned size\);)6 E F2 -(function)100.346 127.103 Q F3 -(char *Safe_Realloc\(char *old_pointer, unsigned size\);)6 E F2(macr)100.346 -149.503 Q(o)-.18 E F3(Alloca_Begin, Alloca_End)6 E F2(macr)100.346 163.503 Q(o) --.18 E F3(Alloca\(char_ptr, type, size\))6 E F1(Initializing Elk fr)72 193.503 -Q(om an A)-.198 E(pplication')-.275 E 2.75(sm)-.407 G(ain\(\))259.671 193.503 Q -F2(function)100.346 219.606 Q F3 -(void Elk_Init\(int argc, char **argv, int init_flag,)6 E(char *filename\);) -169.846 233.606 Q F1(Miscellaneous Macr)72 263.606 Q(os)-.198 E F2(macr)100.346 -289.709 Q(o)-.18 E F3(ELK_MAJOR, ELK_MINOR)6 E F2(macr)100.346 303.709 Q(o)-.18 -E F3(NO_PROTOTYPES, WANT_PROTOTYPES)6 E EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5)276.087 51 S 2.75(9-)288 51 S/F1 13 -/Times-Bold@0 SF(Index)272.108 123 Q(<)72 174 Q F0(, 12)72 204 Q -(, 12)72 219 Q F1(A)72 249 Q F0(after)72 279 Q(-GC function, 42, 44) --.22 E(Alloca\(\), 14)72 294 Q(alloca\(\), 14)72 309 Q(Alloca\(\), 29)72 324 Q -(Alloca_Be)72 339 Q(gin, 14, 29)-.165 E(Alloca_End, 14, 29)72 354 Q -(Alloc_Object\(\), 33)72 369 Q(ANSI/ISO C, 12)72 384 Q(append!, 23)72 399 Q -(application architecture, 2)72 414 Q(ar)72 429 Q(gv[0], 9)-.198 E -(Athena widgets, 8)72 444 Q F1(B)72 474 Q F0(bcmp\(\), 15)72 504 Q(bcop)72 519 -Q(y\(\), 15)-.11 E(before-GC function, 43)72 534 Q(bignums, 25)72 549 Q -(bitmask, 37)72 564 Q(bitstring e)72 579 Q(xtension, 4, 48)-.165 E(Bits_T)72 -594 Q(o_Symbols\(\), 37)-.88 E(bzero\(\), 15)72 609 Q F1(C)72 639 Q F0 2.75(Cc) -72 669 S(ompiler)86.971 669 Q 2.75(,1)-.44 G(2)131.752 669 Q 2.75(Cl)72 684 S -(ibrary)85.145 684 Q 2.75(,6)-.715 G(C++ compiler)72 699 Q 2.75(,7)-.44 G 2.75 -(,1)144.16 699 S(2)155.16 699 Q(C++ static constructor)72 714 Q 2.75(,7)-.44 G -2.75(,9)180.515 714 S 2.75(,1)191.515 714 S(0)202.515 714 Q -(C++ static destructor)72 729 Q 2.75(,7)-.44 G 2.75(,9)175.015 729 S -(calling discipline, 17, 22)302.4 174 Q(Call_Onfork\(\), 49)302.4 189 Q(car) -302.4 204 Q 2.75(,2)-.44 G(1, 27)326.391 204 Q(Car\(\), 27)302.4 219 Q(cdr) -302.4 234 Q 2.75(,2)-.44 G(1, 27)327.007 234 Q(Cdr\(\), 27)302.4 249 Q -(CHAR\(\), 16, 24)302.4 264 Q(Check_Input_Port\(\), 30)302.4 279 Q(Check_Inte) -302.4 294 Q(ger\(\), 25)-.165 E(Check_List\(\), 27)302.4 309 Q -(Check_Mutable\(\), 19)302.4 324 Q(Check_Number\(\), 27)302.4 339 Q -(Check_Output_Port\(\), 30)302.4 354 Q(Check_Procedure\(\), 32)302.4 369 Q -(Check_T)302.4 384 Q(ype\(\), 18, 46)-.88 E(CI_Intern\(\), 28)302.4 399 Q -(collect, 20)302.4 414 Q(cons, 21)302.4 429 Q(Cons\(\), 27, 39)302.4 444 Q -(const bit, 15)302.4 459 Q(continuation, 14)302.4 474 Q(Cop)302.4 489 Q -(y_List\(\), 27)-.11 E(Curr_Input_Port, 31)302.4 504 Q(Curr_Output_Port, 31) -302.4 519 Q F1(D)302.4 549 Q F0(De\214ne_Primiti)302.4 579 Q -.165(ve)-.275 G -(\(\), 17, 22).165 E(De\214ne_Reader\(\), 48)302.4 594 Q -(De\214ne_Symbol\(\), 28)302.4 609 Q(De\214ne_T)302.4 624 Q(ype\(\), 32)-.88 E -(De\214ne_V)302.4 639 Q(ariable\(\), 47)-1.221 E(Dere)302.4 654 Q -(gister_Object\(\), 44)-.165 E(Disable_Interrupts, 46)302.4 669 Q EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6)276.087 51 S 2.75(0-)288 51 S -(dynamic loading, 5, 35)72 87 Q/F1 13/Times-Bold@0 SF(E)72 117 Q F0(Elk_Ev)72 -147 Q(al\(\), 40)-.275 E(elk_\214nit_, 7)72 162 Q(Elk_Init\(\), 9, 11, 13)72 -177 Q(elk_init_, 7, 9)72 192 Q(ELK_MAJOR, 15)72 207 Q(ELK_MINOR, 15)72 222 Q -(Enable_Interrupts, 46)72 237 Q(end-of-\214le object, 25)72 252 Q(Eof, 25)72 -267 Q(EQ\(\), 16)72 282 Q(eq?, 16)72 297 Q(Equal\(\), 24)72 312 Q(Eqv\(\), 24) -72 327 Q(errno, 45)72 342 Q(error handler)72 357 Q 2.75(,1)-.44 G(1, 45)139.672 -357 Q(error tag, 45)72 372 Q(EV)72 387 Q(AL, 18)-1.485 E(Ev)72 402 Q -(al\(\), 40)-.275 E -.165(ex)72 417 S(ception, 46).165 E -.165(ex)72 432 S -(tensible application, 2).165 E -.165(ex)72 447 S -(tension \214nalization function, 7).165 E -.165(ex)72 462 S -(tension \214nalization functions, 47).165 E(Extension \214nalizer)72 477 Q -2.75(,9)-.44 G -.165(ex)72 492 S 3.015 -(tension initialization function, 7, 17, 19,).165 F(35, 41, 48)72 507 Q -.165 -(ex)72 522 S(tension initializer).165 E 2.75(,7)-.44 G 2.75(,9)169.471 522 S -2.75(,4)180.471 522 S(3)191.471 522 Q -.165(ex)72 537 S(tension language, 2) -.165 E F1(F)72 567 Q F0 -.165(Fa)72 597 S(lse, 19).165 E -.165(Fa)72 612 S -(st_Length\(\), 27).165 E -.165(Fa)72 627 S(tal_Error\(\), 46).165 E -(Find_Object\(\), 44)72 642 Q(FIXNUM\(\), 25)72 657 Q(\214xnums, 25)72 672 Q -(FIXNUM_FITS\(\), 25)72 687 Q(FLONUM\(\), 26)72 702 Q(\215onums, 26)72 717 Q -(\215uid-let, 6)72 732 Q -.165(Fo)302.4 87 S(rce_Disable_Interrupts, 46).165 E --.165(Fo)302.4 102 S(rce_Enable_Interrupts, 46).165 E(fork handler)302.4 117 Q -2.75(,4)-.44 G(9)367.025 117 Q(format speci\214er)302.4 132 Q 2.75(,4)-.44 G(5) -382.304 132 Q(format string, 35, 45)302.4 147 Q(Funcall\(\), 39, 40, 47)302.4 -162 Q(function prototypes, 12)302.4 177 Q(Func_Global_GC_Link\(\), 41, 47)302.4 -192 Q F1(G)302.4 222 Q F0 -.055(ga)302.4 252 S -(rbage collection, 20, 35, 40, 42, 49).055 E -.055(ga)302.4 267 S -(rbage collector).055 E 2.75(,1)-.44 G(9, 33, 40, 42)388.959 267 Q -(GC_Link\(\), 20)302.4 282 Q(GC_Link2\(\), 21)302.4 297 Q(GC_Link3\(\), 21) -302.4 312 Q(GC_Node, 20)302.4 327 Q(GC_Node2, 21)302.4 342 Q(GC_Node3, 21)302.4 -357 Q(GC_Unlink, 20)302.4 372 Q(Get_Double\(\), 26)302.4 387 Q(Get_Error_T) -302.4 402 Q(ag\(\), 45)-.88 E(Get_Exact_Inte)302.4 417 Q(ger\(\), 25)-.165 E -(Get_Exact_Long\(\), 25)302.4 432 Q(Get_Exact_Unsigned\(\), 25)302.4 447 Q -(Get_Exact_Unsigned_Long\(\), 25)302.4 462 Q(Get_Inte)302.4 477 Q(ger\(\), 25) --.165 E(Get_Long\(\), 25)302.4 492 Q(Get_String\(\), 29)302.4 507 Q -(Get_String_Stack\(\), 29)302.4 522 Q(Get_Strsym\(\), 29)302.4 537 Q -(Get_Strsym_Stack\(\), 29)302.4 552 Q(Get_Unsigned\(\), 25)302.4 567 Q -(Get_Unsigned_Long\(\), 25)302.4 582 Q(global v)302.4 597 Q(ariable, 40)-.275 E -(Global_En)302.4 612 Q(vironment, 32)-.44 E(Global_GC_Link\(\), 41)302.4 627 Q -F1(H)302.4 657 Q F0(heap, 15, 20)302.4 687 Q(hooks, 4)302.4 702 Q -.055(hy) -302.4 717 S(brid application, 2).055 E EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6)276.087 51 S 2.75(1-)288 51 S -.055(hy)72 87 S -(brid e).055 E(xtension, 5, 6)-.165 E/F1 13/Times-Bold@0 SF(I)72 117 Q F0 -(implementation language, 2)72 147 Q(include \214les, 12)72 162 Q -(incremental loading, 6)72 177 Q(inde)72 192 Q(x\(\), 15)-.165 E(ine)72 207 Q -(xact number)-.165 E 2.75(,2)-.44 G(6)150.518 207 Q(Intern\(\), 28, 47)72 222 Q -(ISCONST\(\), 15)72 237 Q(IS_ALIVE\(\), 43)72 252 Q F1(L)72 282 Q F0 -(ld\215ags, 9)72 312 Q(linkscheme, 8, 11)72 327 Q(load libraries, 6)72 342 Q -(load primiti)72 357 Q -.165(ve)-.275 G 2.75(,5).165 G(load-path, 11, 47)72 372 -Q(Load_File\(\), 11)72 387 Q(Load_Source_Port\(\), 31)72 402 Q(local v)72 417 Q -(ariable, 20, 21, 40)-.275 E F1(M)72 447 Q F0(main\(\), 4, 8)72 477 Q(mak)72 -492 Q(edl script, 5)-.11 E(Mak)72 507 Q(e_Char\(\), 24)-.11 E(Mak)72 522 Q -(e_Flonum\(\), 27)-.11 E(Mak)72 537 Q(e_Inte)-.11 E(ger\(\), 25)-.165 E(Mak)72 -552 Q(e_Long\(\), 25)-.11 E(Mak)72 567 Q(e_Port\(\), 30)-.11 E(Mak)72 582 Q -(e_Reduced_Flonum\(\), 27)-.11 E(Mak)72 597 Q(e_String\(\), 22, 29)-.11 E(Mak) -72 612 Q(e_Unsigned\(\), 25)-.11 E(Mak)72 627 Q(e_Unsigned_Long\(\), 25)-.11 E -(Mak)72 642 Q(e_V)-.11 E(ector\(\), 19, 30)-1.221 E(MANY)72 657 Q 2.75(,2) --1.419 G(2)115.186 657 Q(module.o, 8, 11)302.4 87 Q F1(N)302.4 117 Q F0(Ne) -302.4 147 Q(wline, 24)-.275 E(NOEV)302.4 162 Q(AL, 18)-1.485 E -(non-printing symbol, 28)302.4 177 Q(NO_PR)302.4 192 Q -2.068 -.44(OT OT)-.44 H -(YPES, 13).44 E(Null, 24)302.4 207 Q(Nullp\(\), 24)302.4 222 Q(NUMSTRB)302.4 -237 Q(UFS, 29)-.11 E F1(O)302.4 267 Q F0(Object, 15)302.4 297 Q F1(P)302.4 327 -Q F0(pair)302.4 357 Q 2.75(,1)-.44 G(7)330.065 357 Q -1.012(PA)302.4 372 S -(IR\(\), 27)1.012 E -.165(Pa)302.4 387 S(nic\(\), 46).165 E -(pointer \214eld, 15, 20)302.4 402 Q(POINTER\(\), 15)302.4 417 Q(Primiti)302.4 -432 Q -.165(ve)-.275 G(_Error\(\), 35, 45).165 E(Print\(\), 31)302.4 447 Q -(Printf\(\), 31)302.4 462 Q(Print_Object\(\), 31)302.4 477 Q -(P_Cons\(\), 22, 27)302.4 492 Q F1(R)302.4 522 Q F0(Range_Error\(\), 46)302.4 -552 Q(rapid prototyping, 4)302.4 567 Q(reader function, 48)302.4 582 Q -(real numbers, 26)302.4 597 Q(record e)302.4 612 Q(xtension, 4)-.165 E(Re)302.4 -627 Q(gister_After_GC\(\), 42)-.165 E(Re)302.4 642 Q(gister_Before_GC\(\), 43) --.165 E(Re)302.4 657 Q(gister_Object\(\), 31, 44)-.165 E(Re)302.4 672 Q -(gister_Onfork\(\), 49)-.165 E(Reset_IO\(\), 31, 39)302.4 687 Q -(root set, 20, 28)302.4 702 Q EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6)276.087 51 S 2.75(2-)288 51 S(R)72 87 Q/F1 9 -/Times-Roman@0 SF(4)79.337 81.5 Q F0(RS, 1)83.837 87 Q/F2 13/Times-Bold@0 SF(S) -72 117 Q F0(Safe_Malloc\(\), 15)72 147 Q(Safe_Realloc\(\), 15)72 162 Q(Sa)72 -177 Q -.165(ve)-.22 G(d_Errno, 45).165 E(Scheme e)72 192 Q(xtensions, 4, 13) --.165 E(Scheme primiti)72 207 Q -.165(ve)-.275 G(s, 13, 17).165 E(scheme.h, 12) -72 222 Q(SET\(\), 15)72 237 Q(SETCONST\(\), 15)72 252 Q(Set_App_Name\(\), 11)72 -267 Q(Set_Error_T)72 282 Q(ag\(\), 11, 45)-.88 E(signals, 46)72 297 Q -(Signal_Exit\(\), 47)72 312 Q(special forms, 17, 18)72 327 Q(standalone.o, 8)72 -342 Q(Standard_Input_Port, 31)72 357 Q(Standard_Output_Port, 31)72 372 Q -(static linking, 5, 8)72 387 Q(string port, 40)72 402 Q(strong pointers, 42)72 -417 Q(SYMBOL, 28)72 432 Q(Symbols_T)72 447 Q(o_Bits\(\), 37)-.88 E -(SYMDESCR, 37, 39)72 462 Q F2(T)72 492 Q F0(tag \214eld, 15)72 522 Q -(Tcl, 12, 40)72 537 Q -.77(Te)72 552 S(rminate_File\(\), 31).77 E -.77(Te)72 -567 S(rminate_Group\(\), 44).77 E -.77(Te)72 582 S(rminate_T).77 E(ype\(\), 44) --.88 E(termination function, 42, 44)72 597 Q(The_En)72 612 Q(vironment, 32)-.44 -E -.385(Tr)72 627 S(uep\(\), 24).385 E(type \214eld, 15)72 642 Q -(type predicate, 35)72 657 Q(TYPE\(\), 15)72 672 Q(T_Bignum, 25)72 687 Q -(T_Boolean, 24)72 702 Q(T_Character)72 717 Q 2.75(,2)-.44 G(4)137.538 717 Q -(T_Compound, 32)72 732 Q(T_Control, 32)302.4 87 Q(T_End_Of_File, 25)302.4 102 Q -(T_En)302.4 117 Q(vironment, 32)-.44 E(T_Fixnum, 25)302.4 132 Q(T_Flonum, 26) -302.4 147 Q(T_Macro, 32)302.4 162 Q(T_Null, 24)302.4 177 Q(T_P)302.4 192 Q(air) --.165 E 2.75(,2)-.44 G(7)342.737 192 Q(T_Port, 30, 44)302.4 207 Q(T_Primiti) -302.4 222 Q -.165(ve)-.275 G 2.75(,3).165 G(2)366.134 222 Q(T_Promise, 32)302.4 -237 Q(T_String, 28)302.4 252 Q(T_Symbol, 27)302.4 267 Q(T_V)302.4 282 Q(ector) --1.221 E 2.75(,3)-.44 G(0)353.891 282 Q F2(U)302.4 312 Q F0 -(UFIXNUM_FITS\(\), 25)302.4 342 Q(UNIX e)302.4 357 Q(xtension, 6, 49)-.165 E -(unresolv)302.4 372 Q(ed reference, 6)-.165 E(unrof)302.4 387 Q(f, 1)-.275 E -(UPD)302.4 402 Q -1.221(AT)-.44 G(E_OBJ\(\), 43)1.221 E F2(V)302.4 432 Q F0 --1.485(VA)302.4 462 S(RARGS, 18, 22)1.485 E -1.221(Va)302.4 477 S -(r_Get\(\), 47)1.221 E -1.221(Va)302.4 492 S(r_Set\(\), 47)1.221 E -.165(ve) -302.4 507 S(ctor).165 E 2.75(,1)-.44 G(6, 18)340.284 507 Q(VECT)302.4 522 Q -(OR\(\), 16)-.198 E -.165(ve)302.4 537 S(ctor).165 E(-re)-.22 E -.165(ve)-.275 -G(rse!, 18).165 E -.165(ve)302.4 552 S(ctor).165 E(-re)-.22 E -.165(ve)-.275 G -(rse, 19).165 E(visit function, 33, 35)302.4 567 Q -1.419(Vo)302.4 582 S -(id, 28)1.419 E F2(W)302.4 612 Q F0 -1.32(WA)302.4 642 S(NT_PR)1.32 E -2.068 --.44(OT OT)-.44 H(YPES, 13).44 E -1.32(WA)302.4 657 S(S_FOR)1.32 E -1.32(WA) --.605 G(RDED\(\), 43)1.32 E(weak data structure, 42)302.4 672 Q(weak list, 44) -302.4 687 Q(weak pointers, 42, 44)302.4 702 Q(Wrong_T)302.4 717 Q(ype\(\), 46) --.88 E EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6)276.087 51 S 2.75(3-)288 51 S(Wrong_T)72 87 Q -(ype_Combination\(\), 46)-.88 E/F1 13/Times-Bold@0 SF(X)72 117 Q F0 2.75(Xw)72 -147 S(indo)90.634 147 Q 2.75(ws)-.275 G(ystem, 6)124.888 147 Q(X11 e)72 162 Q -(xtension, 4, 6, 8, 12)-.165 E(Xlib e)72 177 Q(xtension, 6, 8, 44, 45)-.165 E -(Xt e)72 192 Q(xtension, 45, 47)-.165 E F1(_)72 222 Q F0 .916(__)72 252 S -(cplusplus, 12)-.916 E .916(__)72 267 S -1.834(STDC_ _,)-.916 F(12)2.75 E EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF(1. Additional Documentation)72 177.6 Q 19.25(...............\ -..............................................................................\ -...... 1)3.616 F(2. Introduction)72 196.2 Q 19.25(............................\ -..............................................................................\ -................ 2)3.616 F(3. The Architecture of Extensible Applications)72 -214.8 Q 19.25 -(....................................................................... 2) -3.341 F(3.1. Scheme Extensions)83 233.4 Q 19.25(..............................\ -......................................................................... 4) -5.145 F(3.2. Applications v)83 252 Q(ersus Extensions)-.165 E 19.25(..........\ -.......................................................................... 4) -5.31 F(4. Linking Applications and Extensions with Elk)72 270.6 Q 19.25 -(................................................................... 5)5.442 F -(5. Dynamic Loading)72 289.2 Q 19.25(.........................................\ -........................................................................ 5) -3.011 F(5.1. Load Libraries)83 307.8 Q 19.25(.................................\ -..............................................................................\ - 6)3.935 F(5.2. Extension Initializers and Finalizers)83 326.4 Q 19.25(.......\ -...................................................................... 7)3.935 -F(5.3. C++ Static Constructors and Destructors)83 345 Q 19.25 -(...................................................................... 7)3.132 -F(6. Static Linking)72 363.6 Q 19.25(.........................................\ -..............................................................................\ - 8)3.605 F(6.1. Linking the Scheme Interpreter with Extensions)83 382.2 Q 19.25 -(.......................................................... 8)3.638 F -(6.1.1. Automatic Extension Initialization)94 400.8 Q 19.25 -(........................................................................ 9) -4.837 F(6.2. Linking the Scheme Interpreter with an Application)83 419.4 Q -19.25(.................................................... 9)3.341 F -(6.2.1. An Example `)94 438 Q(`main\(\)')-.814 E 2.75('F)-.814 G .987(unction \ -............................................................................) -230.763 438 R(10)493 438 Q(6.3. Who is in Control?)83 456.6 Q 13.75(..........\ -..............................................................................\ -............... 11)6.971 F(7. Notes for Writing C/C++ Code Using Elk)72 475.2 Q -13.75(........................................................................\ -... 12)3.121 F(7.1. Elk Include Files)83 493.8 Q 13.75(.......................\ -..............................................................................\ -...... 12)4.837 F(7.2. Standard C and Function Prototypes)83 512.4 Q 13.75(...\ -.......................................................................... 12)3 -F(7.3. External Symbols De\214ned by Elk)83 531 Q 13.75(......................\ -........................................................... 13)3.616 F -(7.4. Calling Scheme Primiti)83 549.6 Q -.165(ve)-.275 G 3.737(s.).165 G 13.75 -(.............................................................................\ -.............. 13)226.25 549.6 R(7.5. Portable alloca\(\))83 568.2 Q 13.75(...\ -..............................................................................\ -........................... 14)4.243 F(7.6. Other Useful Macros and Functions) -83 586.8 Q 13.75(.............................................................\ -................ 15)4.859 F(8. The Anatomy of Scheme Objects)72 605.4 Q 13.75(\ -..............................................................................\ -.......... 15)4.859 F(8.1. T)83 624 Q(ype-speci\214c Macros)-.88 E 13.75(.....\ -..............................................................................\ -................. 16)4.518 F(9. De\214ning Ne)72 642.6 Q 2.75(wS)-.275 G -(cheme Primiti)153.609 642.6 Q -.165(ve)-.275 G 4.639(s.).165 G 13.75(........\ -..............................................................................\ -. 17)237.25 642.6 R(9.1. Making Objects Kno)83 661.2 Q -(wn to the Garbage Collector)-.275 E 13.75 -(........................................................ 19)3.616 F -(9.2. Primiti)83 679.8 Q -.165(ve)-.275 G 2.75(sw).165 G(ith V)157.734 679.8 Q -(ariable-Length Ar)-1.221 E(gument Lists)-.198 E 13.75 -(......................................................... 22)4.87 F -(10. Prede\214ned Scheme T)72 698.4 Q 2.373(ypes .............................\ -.....................................................................)-.88 F -(23)493 698.4 Q(10.1. Booleans \(T_Boolean\))83 717 Q 13.75(..................\ -..............................................................................\ - 24)4.848 F EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF(10.2. Characters \(T_Character\))83 87 Q 13.75(.......\ -..............................................................................\ -....... 24)3.66 F(10.3. Empty List \(T_Null\))83 105.6 Q 13.75(...............\ -..............................................................................\ -...... 24)5.442 F(10.4. End of File \(T_End_Of_File\))83 124.2 Q 13.75(.......\ -..............................................................................\ -. 25)3.011 F(10.5. Inte)83 142.8 Q(gers \(T_Fixnum and T_Bignum\))-.165 E 13.75 -(.......................................................................... 25) -4.397 F(10.6. Floating Point Numbers \(T_Flonum\))83 161.4 Q 13.75 -(.......................................................................... 26) -2.989 F(10.7. P)83 180 Q(airs \(T_P)-.165 E 1.812(air\) ......................\ -..............................................................................\ -..........)-.165 F(27)493 180 Q(10.8. Symbols \(T_Symbol\))83 198.6 Q 13.75(..\ -..............................................................................\ -.................. 27)4.21 F(10.8.1. The Non-Printing Symbol)94 217.2 Q 13.75(\ -..............................................................................\ -...... 28)3.605 F(10.9. Strings \(T_String\))83 235.8 Q 13.75(................\ -..............................................................................\ -......... 28)5.134 F(10.10. V)83 254.4 Q(ectors \(T_V)-1.221 E 1.504(ector\) .\ -..............................................................................\ -.....................)-1.221 F(30)493 254.4 Q(10.11. Ports \(T_Port\))83 273 Q -13.75(........................................................................\ -.................................... 30)3 F(10.12. Miscellaneous T)83 291.6 Q -1.449(ypes ...................................................................\ -..............................)-.88 F(32)493 291.6 Q(11. De\214ning Ne)72 310.2 -Q 2.75(wS)-.275 G(cheme T)159.109 310.2 Q 1.427(ypes .........................\ -....................................................................)-.88 F(32) -493 310.2 Q(11.1. Example for a User)83 328.8 Q(-De\214ned Scheme T)-.22 E -1.097(ype .................................................................) --.88 F(34)493 328.8 Q(12. Adv)72 347.4 Q(anced T)-.275 E 1.119(opics .........\ -..............................................................................\ -.........................)-.88 F(37)493 347.4 Q(12.1. Con)83 366 Q -.165(ve) --.44 G(rting between Symbols, Inte).165 E(gers, and Bitmasks)-.165 E 13.75 -(............................................... 37)4.089 F -(12.2. Calling Scheme Procedures, Ev)83 384.6 Q(aluating Scheme Code)-.275 E -13.75(.............................................. 39)4.221 F -(12.3. GC-Protecting Global Objects)83 403.2 Q 13.75(.........................\ -........................................................... 40)4.54 F -(12.3.1. Dynamic C Data Structures)94 421.8 Q 13.75(..........................\ -....................................................... 41)5.464 F(12.4. W)83 -440.4 Q(eak Pointers and Object T)-.88 E .096(ermination .....................\ -..................................................)-.77 F(42)493 440.4 Q -(12.4.1. Using W)94 459 Q(eak Pointers)-.88 E 13.75(..........................\ -.................................................................. 42)3.891 F -(12.4.2. Functions for Automatic Object T)94 477.6 Q 1.647 -(ermination ......................................................)-.77 F(44) -493 477.6 Q(12.5. Errors)83 496.2 Q 13.75(....................................\ -..............................................................................\ -......... 45)3.011 F(12.6. Exceptions)83 514.8 Q 13.75(.......................\ -..............................................................................\ -.............. 46)3.616 F(12.7. De\214ning Scheme V)83 533.4 Q 1.493(ariables \ -..............................................................................\ -...........)-1.221 F(47)493 533.4 Q(12.8. De\214ning Readers)83 552 Q 13.75(..\ -..............................................................................\ -......................... 48)3.319 F(12.9. F)83 570.6 Q(ork Handlers)-.165 E -13.75(........................................................................\ -...................................... 49)3.176 F -(Appendix A: Functions that can T)72 589.2 Q(rigger a Garbage Collection)-.385 -E 13.75(............................................... 49)3.121 F -(Appendix B: Con)72 607.8 Q -.165(ve)-.44 G -(nience Functions for GC-Safe Data Structures).165 E 13.75 -(........................................ 50)4.562 F -(Appendix C: Summary of Functions, Macros, T)72 626.4 Q(ypes, and V)-.88 E -2.076(ariables ......................................)-1.221 F(53)493 626.4 Q -(Inde)72 645 Q 2.868(x.)-.165 G 13.75(........................................\ -..............................................................................\ -.................. 59)102.5 645 R EP -%%Trailer -end -%%EOF diff --git a/doc/kernel/Makefile.am b/doc/kernel/Makefile.am index 38e82d5..49ea6dd 100644 --- a/doc/kernel/Makefile.am +++ b/doc/kernel/Makefile.am @@ -1 +1,32 @@ -EXTRA_DIST = kernel.ms kernel.ps +EXTRA_DIST = kernel.ms + +if HAVE_GROFF +doc_DATA = kernel.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= kernel +TROFF= groff -ms -t +UNROFF= unroff -ms + +kernel.ps: kernel.ms index.ms + (cat kernel.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > kernel.ps + +kernel.html: kernel.ms + (cat $?; echo ".Tc") | $(UNROFF) document=kernel + +index.ms: kernel.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: kernel.ms + $(TROFF) kernel.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] kernel.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms kernel.ps kernel.html + diff --git a/doc/kernel/kernel.ps b/doc/kernel/kernel.ps deleted file mode 100644 index 5b82bd3..0000000 --- a/doc/kernel/kernel.ps +++ /dev/null @@ -1,2720 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 37 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Elk \212 The Extension Language Kit)196.482 120 Q -(Scheme Refer)241.296 138 Q(ence)-.216 E/F1 10/Times-Italic@0 SF -(Oliver Laumann)255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R -(oduction)-.198 E/F3 11/Times-Roman@0 SF 2.418 -(This reference manual lists the primiti)97 252.6 R 2.748 -.165(ve p)-.275 H -2.418(rocedures, special forms, and other f).165 F(acilities)-.11 E 1.396 -(implemented by the Scheme interpreter included in Elk.)72 267.6 R(This)6.896 E -/F4 11/Times-Italic@0 SF -.11(ke)4.146 G(rnel).11 E F3 1.396 -(functionality can be aug-)4.146 F .646 -(mented by applications using Elk as their e)72 282.6 R .646 -(xtension language implementation or by reusable Elk)-.165 F -.165(ex)72 297.6 -S .039(tensions \(such as the UNIX or X11 e).165 F .039 -(xtensions included in the distrib)-.165 F 2.789(ution\). The)-.22 F .04 -(prede\214ned Elk)2.789 F -.165(ex)72 312.6 S -(tensions and the C/C++ programmer').165 E 2.75(si)-.605 G(nterf)256.261 312.6 -Q(ace to Elk are described in separate documents.)-.11 E .462 -(Only the procedures and special forms that are not de\214ned by the of)97 -331.2 R .462(\214cial Scheme language)-.275 F 2.384(speci\214cation `)72 346.2 -R(`R)-.814 E/F5 9/Times-Roman@0 SF(4)146.588 340.7 Q F3(RS')151.088 346.2 Q -5.134('\()-.814 G -.44(Wi)179.85 346.2 S 2.384 -(lliam Clinger and Jonathan Rees \(editors\),).44 F F4(Re)5.135 E(vised)-.165 E -/F6 9/Times-Italic@0 SF(4)429.711 340.7 Q F4 2.385(Report on the)439.346 346.2 -R .41(Algorithmic Langua)72 361.2 R .63 -.11(ge S)-.11 H -.165(ch).11 G(eme) -.165 E F3 3.16(,1)C .409(991\) are described in detail.)219.497 361.2 R .409 -(The language features that are part)5.909 F(of the of)72 376.2 Q -(\214cial language are only mentioned without a description or e)-.275 E -(xamples.)-.165 E F2 2.75(2. Lambda)72 406.2 R(Expr)2.75 E(essions, Pr)-.198 E -(ocedur)-.198 E(es)-.198 E(\(lambda)72 436.2 Q F4(formals body)4.583 E F2 -296.33(\)s)C(yntax)477.721 436.2 Q F3(See R)72 454.8 Q F5(4)97.971 449.3 Q F3 -(RS.)102.471 454.8 Q F2(\(pr)72 484.8 Q(ocedur)-.198 E(e-lambda)-.198 E F4(pr) -4.583 E(ocedur)-.495 E(e)-.407 E F2 240.923(\)p)C -.198(ro)462.244 484.8 S -(cedur).198 E(e)-.198 E F3 .332(Returns a cop)72 503.4 R 3.082(yo)-.11 G 3.082 -(ft)147.125 503.4 S(he)156.928 503.4 Q F4(lambda)3.082 E F3 -.165(ex)3.082 G -.332(pression which has been e).165 F -.275(va)-.275 G .332 -(luated to create the gi).275 F -.165(ve)-.275 G 3.082(np).165 G(rocedure.) -462.772 503.4 Q(Example:)72 518.4 Q/F7 10/Courier@0 SF -(\(define \(square x\) \(* x x\)\))100.346 540.903 Q -(\(procedure-lambda square\))100.346 554.903 Q 6(==> \(lambda)298.346 554.903 R -(\(x\) \(* x x\)\))6 E F2(\(pr)72 591.903 Q(ocedur)-.198 E(e?)-.198 E F4(obj) -4.583 E F2 304.789(\)p)C -.198(ro)462.244 591.903 S(cedur).198 E(e)-.198 E F3 -(See R)72 610.503 Q F5(4)97.971 605.003 Q F3(RS.)102.471 610.503 Q F2 -(\(primiti)72 640.503 Q -.11(ve)-.11 G(?).11 E F4(obj)4.583 E F2 309.497(\)p)C --.198(ro)462.244 640.503 S(cedur).198 E(e)-.198 E F3(Returns #t if)72 659.103 Q -F4(obj)2.75 E F3(is a primiti)2.75 E .33 -.165(ve p)-.275 H -(rocedure, #f otherwise.).165 E EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(compound?)72 87 Q/F2 11/Times-Italic@0 SF -(obj)4.583 E F1 303.15(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0 -1.527(Returns #t if)72 105.6 R F2(obj)4.277 E F0 1.527 -(is a compound procedure \(a procedure that has been created by e)4.277 F -.275 -(va)-.275 G 1.526(luating a).275 F(lambda e)72 120.6 Q -(xpression\), #f otherwise.)-.165 E F1 2.75(3. Local)72 150.6 R(Bindings)2.75 E -(\(let)72 180.6 Q F2(bindings body)4.583 E F1 315.899(\)s)C(yntax)477.721 180.6 -Q(\(let*)72 195.6 Q F2(bindings body)4.583 E F1 310.399(\)s)C(yntax)477.721 -195.6 Q(\(letr)72 210.6 Q(ec)-.198 E F2(bindings body)4.583 E F1 301.445(\)s)C -(yntax)477.721 210.6 Q F0(See R)72 229.2 Q/F3 9/Times-Roman@0 SF(4)97.971 223.7 -Q F0(RS.)102.471 229.2 Q F1 2.75(4. Fluid)72 259.2 R(Binding)2.75 E -(\(\215uid-let)72 289.2 Q F2(bindings body)4.583 E F1 290.83(\)s)C(yntax) -477.721 289.2 Q F2(bindings)72 307.8 Q F0 .643(is of the form \(\()3.393 F F2 -(variable)A/F4 10/Times-Italic@0 SF(1)3.3 I F2(init1)3.393 -3.3 M F0 3.393(\).) -C 3.393(..\). The)260.548 307.8 R F2(init)3.393 E F0 3.393(sa)C .644 -(re temporarily assigned to the)326.332 307.8 R F2(variable)3.394 E F0(s)A .378 -(and the)72 322.8 R F2(body)3.128 E F0 .378(is e)3.128 F -.165(xe)-.165 G 3.128 -(cuted. The).165 F -.275(va)3.128 G .378 -(riables must be bound in an enclosing scope.).275 F .377(When the body is) -5.877 F -.165(ex)72 337.8 S .261(ited normally or by in).165 F -.22(vo)-.44 G -.261(king a control point, the old v).22 F .261(alues of the v)-.275 F .262 -(ariables are restored.)-.275 F .262(In the)5.762 F 1.046(latter case, when th\ -e control returns back to the body of the \215uid-let by in)72 352.8 R -.22(vo) --.44 G 1.046(cation of a control).22 F 1.317(point created within the body)72 -367.8 R 4.068(,t)-.715 G 1.318(he bindings are changed ag)215.36 367.8 R 1.318 -(ain to the v)-.055 F 1.318(alues the)-.275 F 4.068(yh)-.165 G 1.318 -(ad when the)448.212 367.8 R(body e)72 382.8 Q(xited.)-.165 E(Examples:)72 -397.8 Q/F5 10/Courier@0 SF(\(\(lambda \(x\))100.346 420.303 Q -(\(+ x \(fluid-let \(\(x 3\)\) x\)\)\) 1\))112.346 434.303 Q 6(==> 4)328.346 -434.303 R(\(fluid-let \(\(print-length 2\)\))100.346 463.806 Q -(\(write '\(a b c d\)\)\))112.346 477.806 Q 6(==> '\(a)328.346 477.806 R 6(b.)6 -G(..\))400.346 477.806 Q(\(define \(errset thunk\))100.346 507.309 Q -(\(call-with-current-continuation)112.346 521.309 Q(\(lambda \(catch\))124.346 -535.309 Q(\(fluid-let)136.346 549.309 Q(\(\(error-handler)160.346 563.309 Q -(\(lambda msg \(catch #f\)\)\)\))172.346 577.309 Q(\(list \(thunk\)\)\)\)\)\)) -148.346 591.309 Q(\(errset \(lambda \(\) \(+ 1 2\)\)\))100.346 619.309 Q 6 -(==> \(3\))328.346 619.309 R(\(errset \(lambda \(\) \(/ 1 0\)\)\))100.346 -633.309 Q 6(==> #f)328.346 633.309 R EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(5. De\214nitions)72 87 R(\(de\214ne)72 -117 Q/F2 11/Times-Italic@0 SF(variable e)4.583 E(xpr)-.22 E(ession)-.407 E F1 -275.584(\)s)C(yntax)477.721 117 Q(\(de\214ne)72 132 Q F2 -(\(variable formals\) body)4.583 E F1 256.928(\)s)C(yntax)477.721 132 Q -(\(de\214ne)72 147 Q F2(\(variable . formal\) body)4.583 E F1 255.707(\)s)C -(yntax)477.721 147 Q F0(See R)72 165.6 Q/F3 9/Times-Roman@0 SF(4)97.971 160.1 Q -F0(RS.)102.471 165.6 Q .601 -(Returns a symbol, the identi\214er that has been bound.)72 180.6 R .601 -(De\214nitions may appear an)6.101 F .6(ywhere within a)-.165 F 1.738 -(local body \(e.)72 195.6 R 1.739(g. a lambda body or a)1.833 F F2(let)4.489 E -F0 4.489(\). If)B(the)4.489 E F2 -.22(ex)4.489 G(pr).22 E(ession)-.407 E F0 -1.739(is omitted,)4.489 F F2(void)4.489 E F0 1.739(\(the non-printing)4.489 F -(object\) is used.)72 210.6 Q(Examples:)72 225.6 Q/F4 10/Courier@0 SF -(\(define nil #f\))100.346 248.103 Q(\(define \(\(f x\) y\) \(cons x y\)\)) -100.346 277.606 Q(\(define \(g x\) \(\(f x\) 5\)\))100.346 291.606 Q(\(g 'a\)) -100.346 305.606 Q 6(==> \(a)298.346 305.606 R 6(.5)6 G(\))364.346 305.606 Q F1 -2.75(6. Assignment)72 342.606 R(\(set!)72 372.606 Q F2(variable e)4.583 E(xpr) --.22 E(ession)-.407 E F1 287.211(\)s)C(yntax)477.721 372.606 Q F0(See R)72 -391.206 Q F3(4)97.971 385.706 Q F0(RS.)102.471 391.206 Q(Returns the pre)72 -406.206 Q(vious v)-.275 E(alue of)-.275 E F2(variable)2.75 E F0(.)A(Examples:) -72 421.206 Q F4(\(define-macro \(swap x y\))100.346 443.709 Q -(`\(set! ,x \(set! ,y ,x\)\)\))112.346 457.709 Q F1 2.75(7. Pr)72 494.709 R -(ocedur)-.198 E 2.75(eA)-.198 G(pplication)144.644 494.709 Q(\(operator)72 -524.709 Q F2(oper)4.583 E(and)-.165 E/F5 10/Times-Italic@0 SF(1)3.3 I F2(...) -2.75 -3.3 M F1 296.104(\)s)C(yntax)477.721 524.709 Q F0(See R)72 543.309 Q F3 -(4)97.971 537.809 Q F0(RS.)102.471 543.309 Q F2(oper)5.5 E(ator)-.165 E F0 -(can be a macro \(see belo)2.75 E(w\).)-.275 E F1(\(apply)72 573.309 Q F2(ar) -4.583 E(g)-.407 E F5(1)3.3 I F2(... ar)2.75 -3.3 M(gs)-.407 E F1 293.156(\)p)C --.198(ro)462.244 573.309 S(cedur).198 E(e)-.198 E F0(See R)72 591.909 Q F3(4) -97.971 586.409 Q F0(RS.)102.471 591.909 Q F1 2.75(8. Quotation,)72 621.909 R -(Quasiquotation)2.75 E(\(quote)72 651.909 Q F2(datum)4.583 E F1 335.754(\)s)C -(yntax)477.721 651.909 Q(')72 666.909 Q F2(datum)A F1(syntax)473.442 666.909 Q -F2(constant)72 681.909 Q F1(syntax)473.442 681.909 Q F0(See R)72 700.509 Q F3 -(4)97.971 695.009 Q F0(RS.)102.471 700.509 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(quasiquote)72 87 Q/F2 11/Times-Italic@0 SF --.22(ex)4.583 G(pr).22 E(ession)-.407 E F1 291.765(\)s)C(yntax)477.721 87 Q -(\(unquote)72 102 Q F2 -.22(ex)4.583 G(pr).22 E(ession)-.407 E F1 304.602(\)s)C -(yntax)477.721 102 Q(\(unquote-splicing)72 117 Q F2 -.22(ex)4.583 G(pr).22 E -(ession)-.407 E F1 264.87(\)s)C(yntax)477.721 117 Q F0(See R)72 135.6 Q/F3 9 -/Times-Roman@0 SF(4)97.971 130.1 Q F0(RS.)102.471 135.6 Q F1 2.75 -(9. Sequencing)72 165.6 R(\(begin)72 195.6 Q F2 -.22(ex)4.583 G(pr).22 E -(ession)-.407 E/F4 10/Times-Italic@0 SF(1)3.3 I F2 -.22(ex)2.75 -3.3 O(pr).22 E -(ession)-.407 E F4(2)3.3 I F2(...)2.75 -3.3 M F1 247.269(\)s)C(yntax)477.721 -195.6 Q F0(See R)72 214.2 Q F3(4)97.971 208.7 Q F0(RS.)102.471 214.2 Q F1 -(\(begin1)72 244.2 Q F2 -.22(ex)4.583 G(pr).22 E(ession)-.407 E F4(1)3.3 I F2 --.22(ex)2.75 -3.3 O(pr).22 E(ession)-.407 E F4(2)3.3 I F2(...)2.75 -3.3 M F1 -241.769(\)s)C(yntax)477.721 244.2 Q F0(Identical to)72 262.8 Q F2(be)2.75 E -(gin)-.44 E F0 2.75(,e)C(xcept that the result of the \214rst)158.768 262.8 Q -F2 -.22(ex)2.75 G(pr).22 E(ession)-.407 E F0(is returned.)2.75 E F1 2.75 -(10. Conditionals)72 292.8 R(\(if)72 322.8 Q F2(test consequent alternate)4.583 -E F1 272.823(\)s)C(yntax)477.721 322.8 Q(\(if)72 337.8 Q F2(test consequent) -4.583 E F1 315.294(\)s)C(yntax)477.721 337.8 Q F0(See R)72 356.4 Q F3(4)97.971 -350.9 Q F0(RS.)102.471 356.4 Q(In the \214rst form,)72 371.4 Q F2(alternate) -2.75 E F0(can be a sequence of e)2.75 E(xpressions \(implicit)-.165 E F2(be) -2.75 E(gin)-.44 E F0(\).)A F1(\(case)72 401.4 Q F2 -.11(ke)4.583 G 2.75(yc)-.22 -G(lause)121.639 401.4 Q F4(1)3.3 I F2(clause)2.75 -3.3 M F4(2)3.3 I F2(...)2.75 --3.3 M F1 273.064(\)s)C(yntax)477.721 401.4 Q F0(See R)72 420 Q F3(4)97.971 -414.5 Q F0(RS.)102.471 420 Q(Each)72 435 Q F2(clause)2.75 E F0(not be)2.75 E -(ginning with)-.165 E F2(else)2.75 E F0(can be of the form)2.75 E(\(\()108 456 -Q F2(datum)A F4(1)3.3 I F0(...\))2.75 -3.3 M F2 -.22(ex)2.75 G(pr).22 E(ession) --.407 E F4(1)3.3 I F2 -.22(ex)2.75 -3.3 O(pr).22 E(ession)-.407 E F4(2)3.3 I F0 -(...\))2.75 -3.3 M(or)72 477 Q(\()108 498 Q F2(datum e)A(xpr)-.22 E(ession) --.407 E F4(1)3.3 I F2 -.22(ex)2.75 -3.3 O(pr).22 E(ession)-.407 E F4(2)3.3 I F0 -(...\))2.75 -3.3 M(In the latter case, the)72 519 Q F2 -.11(ke)2.75 G(y)-.22 E -F0(is matched ag)2.75 E(ainst the)-.055 E F2(datum)2.75 E F0(.)A F1(\(cond)72 -549 Q F2(clause)4.583 E F4(1)3.3 I F2(clause)2.75 -3.3 M F4(2)3.3 I F2(...)2.75 --3.3 M F1 286.957(\)s)C(yntax)477.721 549 Q F0(See R)72 567.6 Q F3(4)97.971 -562.1 Q F0(RS.)102.471 567.6 Q F1(\(and)72 597.6 Q F2(test)4.583 E F4(1)3.3 I -F2(...)2.75 -3.3 M F1 340.522(\)s)C(yntax)477.721 597.6 Q(\(or)72 612.6 Q F2 -(test)4.583 E F4(1)3.3 I F2(...)2.75 -3.3 M F1 347.87(\)s)C(yntax)477.721 612.6 -Q F0(See R)72 631.2 Q F3(4)97.971 625.7 Q F0(RS.)102.471 631.2 Q F1 2.75 -(11. Booleans)72 661.2 R EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(not)72 87 Q/F2 11/Times-Italic@0 SF(obj) -4.583 E F1 342.882(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See R) -72 105.6 Q/F3 9/Times-Roman@0 SF(4)97.971 100.1 Q F0(RS.)102.471 105.6 Q F1 -(\(boolean?)72 135.6 Q F2(obj)4.583 E F1 315.987(\)p)C -.198(ro)462.244 135.6 S -(cedur).198 E(e)-.198 E F0(See R)72 154.2 Q F3(4)97.971 148.7 Q F0(RS.)102.471 -154.2 Q F1 2.75(12. Iteration)72 184.2 R(\(let)72 214.2 Q F2 -(variable bindings body)4.583 E F1 276.486(\)s)C(yntax)477.721 214.2 Q F0 -.814 -(``)72 232.8 S(Named).814 E F2(let)2.75 E F0 -.814('')C 5.5(.S).814 G(ee R) -144.908 232.8 Q F3(4)164.763 227.3 Q F0(RS.)169.263 232.8 Q F1(\(map)72 262.8 Q -F2(pr)4.583 E(ocedur)-.495 E 2.75(el)-.407 G(ist)151.141 262.8 Q/F4 10 -/Times-Italic@0 SF(1)3.3 I F2(list)2.75 -3.3 M F4(2)3.3 I F2(...)2.75 -3.3 M F1 -253.726(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E(e)-.198 E(\(f)72 277.8 Q -(or)-.275 E(-each)-.407 E F2(pr)4.583 E(ocedur)-.495 E 2.75(el)-.407 G(ist) -168.774 277.8 Q F4(1)3.3 I F2(list)2.75 -3.3 M F4(2)3.3 I F2(...)2.75 -3.3 M F1 -236.093(\)p)C -.198(ro)462.244 277.8 S(cedur).198 E(e)-.198 E F0(See R)72 296.4 -Q F3(4)97.971 290.9 Q F0(RS.)102.471 296.4 Q F2(for)5.5 E(-eac)-.22 E(h)-.165 E -F0(returns the empty list.)2.75 E F1(\(do)72 326.4 Q F2 -(initializations test body)4.583 E F1 275.232(\)s)C(yntax)477.721 326.4 Q F0 -(See R)72 345 Q F3(4)97.971 339.5 Q F0(RS.)102.471 345 Q F1 2.75 -(13. Continuations)72 375 R(\(call-with-curr)72 405 Q(ent-continuation)-.198 E -F2(pr)4.583 E(ocedur)-.495 E(e)-.407 E F1 185.12(\)p)C -.198(ro)462.244 405 S -(cedur).198 E(e)-.198 E F0(See R)72 423.6 Q F3(4)97.971 418.1 Q F0(RS.)102.471 -423.6 Q F1(\(contr)72 453.6 Q(ol-point?)-.198 E F2(obj)4.583 E F1 291.138(\)p)C --.198(ro)462.244 453.6 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 472.2 Q F2 -(obj)2.75 E F0(is a control point \(a continuation\), #f otherwise.)2.75 E F1 -(\(dynamic-wind)72 502.2 Q F2(thunk thunk thunk)4.583 E F1 226.161(\)p)C -.198 -(ro)462.244 502.2 S(cedur).198 E(e)-.198 E F2(dynamic-wind)72 520.8 Q F0 -(is a generalization of the)2.75 E F2(unwind-pr)2.75 E(otect)-.495 E F0 -.11 -(fa)2.75 G(cility pro).11 E(vided by man)-.165 E 2.75(yL)-.165 G(isp systems.) -440.434 520.8 Q 1.66(All three ar)72 535.8 R 1.66 -(guments are procedures of no ar)-.198 F 4.409(guments. In)-.198 F 1.659 -(the normal case, all three thunks are)4.409 F .772(applied in order)72 550.8 R -6.272(.T)-.605 G .772(he \214rst thunk is also applied when the body \(the sec\ -ond thunk\) is entered by)158.334 550.8 R 3.11 -(the application of a control point created within the body \(by means of)72 -565.8 R F2(call-with-curr)5.86 E(ent-)-.407 E(continuation)72 580.8 Q F0 2.779 -(\). Similarly)B 2.779(,t)-.715 G .029(he third thunk is also applied whene) -188.383 580.8 R -.165(ve)-.275 G 2.78(rt).165 G .03(he body is e)366.878 580.8 -R .03(xited by in)-.165 F -.22(vo)-.44 G(cation).22 E -(of a control point created outside the body)72 595.8 Q(.)-.715 E(Examples:)72 -610.8 Q/F5 10/Courier@0 SF -(\(define-macro \(unwind-protect body . unwind-forms\))100.346 633.303 Q -(`\(dynamic-wind)112.346 647.303 Q(\(lambda \(\) #f\))124.346 661.303 Q -(\(lambda \(\) ,body\))124.346 675.303 Q(\(lambda \(\) ,@unwind-forms\)\)\)) -124.346 689.303 Q EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(let \(\(f \(open-input-file "foo"\)\)\)) -100.346 94.503 Q(\(dynamic-wind)112.346 108.503 Q(\(lambda \(\) #f\))124.346 -122.503 Q(\(lambda \(\))124.346 136.503 Q/F2 10/Times-Italic@0 SF -(do something with)6 E F1(f\))6 E(\(lambda \(\) \(close-input-port f\)\)\)\)) -124.346 150.503 Q/F3 11/Times-Bold@0 SF 2.75(14. Delay)72 187.503 R(ed Ev)-.11 -E(aluation)-.11 E(\(delay)72 217.503 Q/F4 11/Times-Italic@0 SF -.22(ex)4.583 G -(pr).22 E(ession)-.407 E F3 318.055(\)s)C(yntax)477.721 217.503 Q(\(f)72 -232.503 Q(or)-.275 E(ce)-.198 E F4(pr)4.583 E(omise)-.495 E F3 313.93(\)p)C --.198(ro)462.244 232.503 S(cedur).198 E(e)-.198 E F0(See R)72 251.103 Q/F5 9 -/Times-Roman@0 SF(4)97.971 245.603 Q F0(RS.)102.471 251.103 Q F3(\(pr)72 -281.103 Q(omise?)-.198 E F4(obj)4.583 E F3 314.975(\)p)C -.198(ro)462.244 -281.103 S(cedur).198 E(e)-.198 E F0 1.402(Returns #t if)72 299.703 R F4(obj) -4.152 E F0 1.402(is a promise, an object returned by the application of)4.152 F -F4(delay)4.152 E F0 6.902(.O)C 1.402(therwise #f is)441.928 299.703 R -(returned.)72 314.703 Q F3 2.75(15. Equi)72 344.703 R -.11(va)-.11 G(lence Pr) -.11 E(edicates)-.198 E(\(eq?)72 374.703 Q F4(obj)4.583 E F2(1)3.3 I F4(obj)2.75 --3.3 M F2(2)3.3 I F3 314.853(\)p)-3.3 K -.198(ro)462.244 374.703 S(cedur).198 E -(e)-.198 E(\(eqv?)72 389.703 Q F4(obj)4.583 E F2(1)3.3 I F4(obj)2.75 -3.3 M F2 -(2)3.3 I F3 309.353(\)p)-3.3 K -.198(ro)462.244 389.703 S(cedur).198 E(e)-.198 -E(\(equal?)72 404.703 Q F4(obj)4.583 E F2(1)3.3 I F4(obj)2.75 -3.3 M F2(2)3.3 I -F3 300.179(\)p)-3.3 K -.198(ro)462.244 404.703 S(cedur).198 E(e)-.198 E F0 -(See R)72 423.303 Q F5(4)97.971 417.803 Q F0(RS.)102.471 423.303 Q F3 2.75 -(16. P)72 453.303 R(airs and Lists)-.11 E(\(cons)72 483.303 Q F4(obj)4.583 E F2 -(1)3.3 I F4(obj)2.75 -3.3 M F2(2)3.3 I F3 310.574(\)p)-3.3 K -.198(ro)462.244 -483.303 S(cedur).198 E(e)-.198 E F0(See R)72 501.903 Q F5(4)97.971 496.403 Q F0 -(RS.)102.471 501.903 Q F3(\(car)72 531.903 Q F4(pair)4.583 E F3 338.614(\)p)C --.198(ro)462.244 531.903 S(cedur).198 E(e)-.198 E(\(cdr)72 546.903 Q F4(pair) -4.583 E F3 337.998(\)p)C -.198(ro)462.244 546.903 S(cedur).198 E(e)-.198 E F0 -(See R)72 565.503 Q F5(4)97.971 560.003 Q F0(RS.)102.471 565.503 Q F3(\(cxr)72 -595.503 Q F4(pair pattern)4.583 E F3 304.085(\)p)C -.198(ro)462.244 595.503 S -(cedur).198 E(e)-.198 E F4(pattern)72 614.103 Q F0 .442(is either a symbol or \ -a string consisting of a combination of the characters `a' and `d'.)3.192 F(It) -5.943 E .826(encodes a sequence of)72 629.103 R F4(car)3.576 E F0(and)3.576 E -F4(cdr)3.576 E F0 .825(operations; each `a' denotes the application of)3.576 F -F4(car)3.575 E F0 3.575(,a)C .825(nd each)469.273 629.103 R -(`d' denotes the application of)72 644.103 Q F4(cdr)2.75 E F0 5.5(.F)C(or e) -232.534 644.103 Q(xample,)-.165 E F4(\(cxr p "ada"\))2.75 E F0(is equi)2.75 E --.275(va)-.275 G(lent to).275 E F4(\(cadar p\))2.75 E F0(.)A F3(\(caar)72 -674.103 Q F4(pair)4.583 E F3 333.114(\)p)C -.198(ro)462.244 674.103 S(cedur) -.198 E(e)-.198 E(...)80.25 689.103 Q EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-7-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(cddddr)72 87 Q/F2 11/Times-Italic@0 SF -(pair)4.583 E F1 319.65(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0 -(See R)72 105.6 Q/F3 9/Times-Roman@0 SF(4)97.971 100.1 Q F0(RS.)102.471 105.6 Q -F1(\(set-car!)72 135.6 Q F2(pair obj)4.583 E F1 301.654(\)p)C -.198(ro)462.244 -135.6 S(cedur).198 E(e)-.198 E(\(set-cdr!)72 150.6 Q F2(pair obj)4.583 E F1 -301.038(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0(See R)72 169.2 -Q F3(4)97.971 163.7 Q F0(RS.)102.471 169.2 Q(Both procedures return)72 184.2 Q -F2(obj)2.75 E F0(.)A F1(\(mak)72 214.2 Q(e-list)-.11 E F2 2.75(ko)4.583 G(bj) -136.654 214.2 Q F1 307.253(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 -E F0(Returns a list of length)72 232.8 Q F2(k)2.75 E F0(initialized with)2.75 E -F2(obj)2.75 E F0(.)A(Examples:)72 247.8 Q/F4 10/Courier@0 SF -(\(make-list 0 'a\))100.346 270.303 Q 6(==> \(\))298.346 270.303 R -(\(make-list 2 \(make-list 2 1\)\))100.346 284.303 Q 6(==> \(\(1)298.346 -284.303 R(1\) \(1 1\)\))6 E F1(\(list)72 321.303 Q F2(obj ...)4.583 E F1 -333.103(\)p)C -.198(ro)462.244 321.303 S(cedur).198 E(e)-.198 E F0(See R)72 -339.903 Q F3(4)97.971 334.403 Q F0(RS.)102.471 339.903 Q F1(\(length)72 369.903 -Q F2(list)4.583 E F1 329.429(\)p)C -.198(ro)462.244 369.903 S(cedur).198 E(e) --.198 E F0(See R)72 388.503 Q F3(4)97.971 383.003 Q F0(RS.)102.471 388.503 Q F1 -(\(list-r)72 418.503 Q(ef)-.198 E F2(list k)4.583 E F1 320.178(\)p)C -.198(ro) -462.244 418.503 S(cedur).198 E(e)-.198 E F0(See R)72 437.103 Q F3(4)97.971 -431.603 Q F0(RS.)102.471 437.103 Q F1(\(list-tail)72 467.103 Q F2(list k)4.583 -E F1 318.132(\)p)C -.198(ro)462.244 467.103 S(cedur).198 E(e)-.198 E F0(See R) -72 485.703 Q F3(4)97.971 480.203 Q F0(RS.)102.471 485.703 Q F1(\(last-pair)72 -515.703 Q F2(list)4.583 E F1 319.045(\)p)C -.198(ro)462.244 515.703 S(cedur) -.198 E(e)-.198 E F0(See R)72 534.303 Q F3(4)97.971 528.803 Q F0(RS.)102.471 -534.303 Q F1(\(append)72 564.303 Q F2(list ...)4.583 E F1 312.918(\)p)C -.198 -(ro)462.244 564.303 S(cedur).198 E(e)-.198 E F0(See R)72 582.903 Q F3(4)97.971 -577.403 Q F0(RS.)102.471 582.903 Q F1(\(append!)72 612.903 Q F2(list ...)4.583 -E F1 309.255(\)p)C -.198(ro)462.244 612.903 S(cedur).198 E(e)-.198 E F0(Lik)72 -631.503 Q(e)-.11 E F2(append)4.044 E F0 4.044(,e)C 1.294 -(xcept that the original ar)139.994 631.503 R 1.294 -(guments are modi\214ed \(destructi)-.198 F -.165(ve)-.275 G F2(append)4.21 E -F0 4.045(\). The)B 1.295(cdr of)4.045 F(each ar)72 646.503 Q -(gument is changed to point to the ne)-.198 E(xt ar)-.165 E(gument.)-.198 E -(Examples:)72 661.503 Q EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-8-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(define x '\(a b\)\))100.346 94.503 Q -(\(append x '\(c d\)\))100.346 108.503 Q 6(==> \(a)298.346 108.503 R 6(bcd)6 G -(\))376.346 108.503 Q 192(x=)100.346 122.503 S 6(=> \(a)304.346 122.503 R(b\))6 -E(\(append! x '\(c d\)\))100.346 136.503 Q 6(==> \(a)298.346 136.503 R 6(bcd)6 -G(\))376.346 136.503 Q 192(x=)100.346 150.503 S 6(=> \(a)304.346 150.503 R 6 -(bcd)6 G(\))376.346 150.503 Q/F2 11/Times-Bold@0 SF(\(r)72 187.503 Q -2.53 --.165(ev e)-.198 H(rse).165 E/F3 11/Times-Italic@0 SF(list)4.583 E F2 325.04 -(\)p)C -.198(ro)462.244 187.503 S(cedur).198 E(e)-.198 E F0(See R)72 206.103 Q -/F4 9/Times-Roman@0 SF(4)97.971 200.603 Q F0(RS.)102.471 206.103 Q F2(\(r)72 -236.103 Q -2.53 -.165(ev e)-.198 H(rse!).165 E F3(list)4.583 E F2 321.377(\)p)C --.198(ro)462.244 236.103 S(cedur).198 E(e)-.198 E F0(Destructi)72 254.703 Q --.165(ve)-.275 G F3 -2.101 -.407(re v)2.915 H(er).407 E(se)-.11 E F0(.)A F2 -(\(memq)72 284.703 Q F3(obj list)4.583 E F2 312.632(\)p)C -.198(ro)462.244 -284.703 S(cedur).198 E(e)-.198 E(\(memv)72 299.703 Q F3(obj list)4.583 E F2 -313.248(\)p)C -.198(ro)462.244 299.703 S(cedur).198 E(e)-.198 E(\(member)72 -314.703 Q F3(obj list)4.583 E F2 302.864(\)p)C -.198(ro)462.244 314.703 S -(cedur).198 E(e)-.198 E F0(See R)72 333.303 Q F4(4)97.971 327.803 Q F0(RS.) -102.471 333.303 Q F2(\(assq)72 363.303 Q F3(obj alist)4.583 E F2 316.284(\)p)C --.198(ro)462.244 363.303 S(cedur).198 E(e)-.198 E(\(assv)72 378.303 Q F3 -(obj alist)4.583 E F2 316.9(\)p)C -.198(ro)462.244 378.303 S(cedur).198 E(e) --.198 E(\(assoc)72 393.303 Q F3(obj alist)4.583 E F2 312.016(\)p)C -.198(ro) -462.244 393.303 S(cedur).198 E(e)-.198 E F0(See R)72 411.903 Q F4(4)97.971 -406.403 Q F0(RS.)102.471 411.903 Q F2(\(null?)72 441.903 Q F3(obj)4.583 E F2 -334.313(\)p)C -.198(ro)462.244 441.903 S(cedur).198 E(e)-.198 E(\(pair?)72 -456.903 Q F3(obj)4.583 E F2 333.103(\)p)C -.198(ro)462.244 456.903 S(cedur).198 -E(e)-.198 E F0(See R)72 475.503 Q F4(4)97.971 470.003 Q F0(RS.)102.471 475.503 -Q F2(\(list?)72 505.503 Q F3(obj)4.583 E F2 338.603(\)p)C -.198(ro)462.244 -505.503 S(cedur).198 E(e)-.198 E F0(See R)72 524.103 Q F4(4)97.971 518.603 Q F0 -(RS.)102.471 524.103 Q F2 2.75(17. Numbers)72 554.103 R(\(=)72 584.103 Q F3(z) -4.583 E/F5 10/Times-Italic@0 SF(1)3.3 I F3(z)2.75 -3.3 M F5(2)3.3 I F3(...)2.75 --3.3 M F2 333.641(\)p)C -.198(ro)462.244 584.103 S(cedur).198 E(e)-.198 E(\(<) -72 599.103 Q F3(z)4.583 E F5(1)3.3 I F3(z)2.75 -3.3 M F5(2)3.3 I F3(...)2.75 --3.3 M F2 333.641(\)p)C -.198(ro)462.244 599.103 S(cedur).198 E(e)-.198 E(\(>) -72 614.103 Q F3(z)4.583 E F5(1)3.3 I F3(z)2.75 -3.3 M F5(2)3.3 I F3(...)2.75 --3.3 M F2 333.641(\)p)C -.198(ro)462.244 614.103 S(cedur).198 E(e)-.198 E(\(<=) -72 629.103 Q F3(z)4.583 E F5(1)3.3 I F3(z)2.75 -3.3 M F5(2)3.3 I F3(...)2.75 --3.3 M F2 327.371(\)p)C -.198(ro)462.244 629.103 S(cedur).198 E(e)-.198 E(\(>=) -72 644.103 Q F3(z)4.583 E F5(1)3.3 I F3(z)2.75 -3.3 M F5(2)3.3 I F3(...)2.75 --3.3 M F2 327.371(\)p)C -.198(ro)462.244 644.103 S(cedur).198 E(e)-.198 E F0 -(See R)72 662.703 Q F4(4)97.971 657.203 Q F0(RS.)102.471 662.703 Q EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-9-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(1+)72 87 Q/F2 11/Times-Italic@0 SF(z)4.583 -E F1 356.17(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E(\(-1+)72 102 Q -F2(z)4.583 E F1 352.507(\)p)C -.198(ro)462.244 102 S(cedur).198 E(e)-.198 E F0 -(Returns)72 120.6 Q F2(z)2.75 E F0(plus 1 or)2.75 E F2(z)2.75 E F0 -(minus 1, respecti)2.75 E -.165(ve)-.275 G(ly).165 E(.)-.715 E F1(\(1-)72 150.6 -Q F2(z)4.583 E F1 358.777(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E -F0 2.75(As)72 169.2 S(ynon)86.971 169.2 Q(ym for)-.165 E F2(-1+)2.75 E F0 -(\(for backw)2.75 E(ards compatibility\).)-.11 E F1(\(+)72 199.2 Q F2(z)4.583 E -/F3 10/Times-Italic@0 SF(1)3.3 I F2(...)2.75 -3.3 M F1 345.67(\)p)C -.198(ro) -462.244 199.2 S(cedur).198 E(e)-.198 E(\(*)72 214.2 Q F2(z)4.583 E F3(1)3.3 I -F2(...)2.75 -3.3 M F1 346.44(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e) --.198 E F0(See R)72 232.8 Q/F4 9/Times-Roman@0 SF(4)97.971 227.3 Q F0(RS.) -102.471 232.8 Q F1(\(-)72 262.8 Q F2(z)4.583 E F3(1)3.3 I F2(z)2.75 -3.3 M F3 -(2)3.3 I F2(...)2.75 -3.3 M F1 336.248(\)p)C -.198(ro)462.244 262.8 S(cedur) -.198 E(e)-.198 E(\(/)72 277.8 Q F2(z)4.583 E F3(1)3.3 I F2(z)2.75 -3.3 M F3(2) -3.3 I F2(...)2.75 -3.3 M F1 336.853(\)p)C -.198(ro)462.244 277.8 S(cedur).198 E -(e)-.198 E F0(See R)72 296.4 Q F4(4)97.971 290.9 Q F0(RS.)102.471 296.4 Q F1 -(\(zer)72 326.4 Q(o?)-.198 E F2(z)4.583 E F1 342.486(\)p)C -.198(ro)462.244 -326.4 S(cedur).198 E(e)-.198 E(\(positi)72 341.4 Q -.11(ve)-.11 G(?).11 E F2(z) -4.583 E F1 326.602(\)p)C -.198(ro)462.244 341.4 S(cedur).198 E(e)-.198 E -(\(negati)72 356.4 Q -.11(ve)-.11 G(?).11 E F2(z)4.583 E F1 323.555(\)p)C -.198 -(ro)462.244 356.4 S(cedur).198 E(e)-.198 E(\(odd?)72 371.4 Q F2(z)4.583 E F1 -344.708(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e)-.198 E(\(e)72 386.4 Q --.11(ve)-.165 G(n?).11 E F2(z)4.583 E F1 341.331(\)p)C -.198(ro)462.244 386.4 S -(cedur).198 E(e)-.198 E(\(exact?)72 401.4 Q F2(z)4.583 E F1 338.009(\)p)C -.198 -(ro)462.244 401.4 S(cedur).198 E(e)-.198 E(\(inexact?)72 416.4 Q F2(z)4.583 E -F1 328.835(\)p)C -.198(ro)462.244 416.4 S(cedur).198 E(e)-.198 E F0(See R)72 -435 Q F4(4)97.971 429.5 Q F0(RS.)102.471 435 Q F1(\(abs)72 465 Q F2(z)4.583 E -F1 352.045(\)p)C -.198(ro)462.244 465 S(cedur).198 E(e)-.198 E F0(See R)72 -483.6 Q F4(4)97.971 478.1 Q F0(RS.)102.471 483.6 Q F1(\(quotient)72 513.6 Q F2 -(n)4.583 E F3(1)3.3 I F2(n)2.75 -3.3 M F3(2)3.3 I F1 309.353(\)p)-3.3 K -.198 -(ro)462.244 513.6 S(cedur).198 E(e)-.198 E(\(r)72 528.6 Q(emainder)-.198 E F2 -(n)4.583 E F3(1)3.3 I F2(n)2.75 -3.3 M F3(2)3.3 I F1 299.178(\)p)-3.3 K -.198 -(ro)462.244 528.6 S(cedur).198 E(e)-.198 E(\(modulo)72 543.6 Q F2(n)4.583 E F3 -(1)3.3 I F2(n)2.75 -3.3 M F3(2)3.3 I F1 313.016(\)p)-3.3 K -.198(ro)462.244 -543.6 S(cedur).198 E(e)-.198 E F0(See R)72 562.2 Q F4(4)97.971 556.7 Q F0(RS.) -102.471 562.2 Q F1(\(gcd)72 592.2 Q F2(n)4.583 E F3(1)3.3 I F2(...)2.75 -3.3 M -F1 334.219(\)p)C -.198(ro)462.244 592.2 S(cedur).198 E(e)-.198 E(\(lcm)72 607.2 -Q F2(n)4.583 E F3(1)3.3 I F2(...)2.75 -3.3 M F1 333.614(\)p)C -.198(ro)462.244 -607.2 S(cedur).198 E(e)-.198 E F0(See R)72 625.8 Q F4(4)97.971 620.3 Q F0(RS.) -102.471 625.8 Q F1(\(\215oor)72 655.8 Q F2(x)4.583 E F1 345.335(\)p)C -.198(ro) -462.244 655.8 S(cedur).198 E(e)-.198 E(\(ceiling)72 670.8 Q F2(x)4.583 E F1 -336.777(\)p)C -.198(ro)462.244 670.8 S(cedur).198 E(e)-.198 E(\(truncate)72 -685.8 Q F2(x)4.583 E F1 327.625(\)p)C -.198(ro)462.244 685.8 S(cedur).198 E(e) --.198 E(\(r)72 700.8 Q(ound)-.198 E F2(x)4.583 E F1 338.801(\)p)C -.198(ro) -462.244 700.8 S(cedur).198 E(e)-.198 E EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(See R)72 87 Q/F1 9/Times-Roman@0 SF(4)97.971 81.5 Q F0(RS.)102.471 -87 Q/F2 11/Times-Bold@0 SF(\(sqrt)72 117 Q/F3 11/Times-Italic@0 SF(z)4.583 E F2 -348.998(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e)-.198 E F0(See R)72 135.6 Q -F1(4)97.971 130.1 Q F0(RS.)102.471 135.6 Q F2(\(expt)72 165.6 Q F3(z)4.583 E/F4 -10/Times-Italic@0 SF(1)3.3 I F3(z)2.75 -3.3 M F4(2)3.3 I F2 330.748(\)p)-3.3 K --.198(ro)462.244 165.6 S(cedur).198 E(e)-.198 E F0(See R)72 184.2 Q F1(4)97.971 -178.7 Q F0(RS.)102.471 184.2 Q F2(\(exp)72 214.2 Q F3(z)4.583 E F2 351.44(\)p)C --.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 E(\(log)72 229.2 Q F3(z)4.583 E -F2 353.882(\)p)C -.198(ro)462.244 229.2 S(cedur).198 E(e)-.198 E(\(sin)72 244.2 -Q F3(z)4.583 E F2 354.487(\)p)C -.198(ro)462.244 244.2 S(cedur).198 E(e)-.198 E -(\(cos)72 259.2 Q F3(z)4.583 E F2 353.277(\)p)C -.198(ro)462.244 259.2 S(cedur) -.198 E(e)-.198 E(\(tan)72 274.2 Q F3(z)4.583 E F2 352.661(\)p)C -.198(ro) -462.244 274.2 S(cedur).198 E(e)-.198 E(\(asin)72 289.2 Q F3(z)4.583 E F2 -348.987(\)p)C -.198(ro)462.244 289.2 S(cedur).198 E(e)-.198 E(\(acos)72 304.2 Q -F3(z)4.583 E F2 347.777(\)p)C -.198(ro)462.244 304.2 S(cedur).198 E(e)-.198 E -(\(atan)72 319.2 Q F3(z)4.583 E F2 347.161(\)p)C -.198(ro)462.244 319.2 S -(cedur).198 E(e)-.198 E(\(atan)72 334.2 Q F3 2.75(yx)4.583 G F2 338.922(\)p) -113.543 334.2 S -.198(ro)462.244 334.2 S(cedur).198 E(e)-.198 E F0(See R)72 -352.8 Q F1(4)97.971 347.3 Q F0(RS.)102.471 352.8 Q F2(\(min)72 382.8 Q F3(x) -4.583 E F4(1)3.3 I F3(x)2.75 -3.3 M F4(2)3.3 I F3(...)2.75 -3.3 M F2 320.364 -(\)p)C -.198(ro)462.244 382.8 S(cedur).198 E(e)-.198 E(\(max)72 397.8 Q F3(x) -4.583 E F4(1)3.3 I F3(x)2.75 -3.3 M F4(2)3.3 I F3(...)2.75 -3.3 M F2 318.538 -(\)p)C -.198(ro)462.244 397.8 S(cedur).198 E(e)-.198 E F0(See R)72 416.4 Q F1 -(4)97.971 410.9 Q F0(RS.)102.471 416.4 Q F2 -.917(\(random \))72 446.4 R(pr) -456.128 446.4 Q(ocedur)-.198 E(e)-.198 E F0(Returns an inte)72 465 Q -(ger pseudo-random number in the range from 0 to 2)-.165 E/F5 10/Times-Roman@0 -SF(31)-3.3 I F0(-1.)3.3 I F2(\(srandom)72 495 Q F3(n)4.583 E F2 325.161(\)p)C --.198(ro)462.244 495 S(cedur).198 E(e)-.198 E F0 -(Sets the random number generator to the starting point)72 513.6 Q F3(n)2.75 E -F0(.)A F3(sr)5.5 E(andom)-.165 E F0(returns)2.75 E F3(n)2.75 E F0(.)A F2 -(\(number?)72 543.6 Q F3(obj)4.583 E F2 315.382(\)p)C -.198(ro)462.244 543.6 S -(cedur).198 E(e)-.198 E(\(complex?)72 558.6 Q F3(obj)4.583 E F2 313.556(\)p)C --.198(ro)462.244 558.6 S(cedur).198 E(e)-.198 E(\(r)72 573.6 Q(eal?)-.198 E F3 -(obj)4.583 E F2 334.533(\)p)C -.198(ro)462.244 573.6 S(cedur).198 E(e)-.198 E -(\(rational?)72 588.6 Q F3(obj)4.583 E F2 315.382(\)p)C -.198(ro)462.244 588.6 -S(cedur).198 E(e)-.198 E(\(integer?)72 603.6 Q F3(obj)4.583 E F2 319.672(\)p)C --.198(ro)462.244 603.6 S(cedur).198 E(e)-.198 E F0(See R)72 622.2 Q F1(4)97.971 -616.7 Q F0(RS.)102.471 622.2 Q F2(\(exact)72 652.2 Q/F6 11/Symbol SF(-)A F2 -(>inexact)A F3(z)4.583 E F2 297.595(\)p)C -.198(ro)462.244 652.2 S(cedur).198 E -(e)-.198 E(\(inexact)72 667.2 Q F6(-)A F2(>exact)A F3(z)4.583 E F2 297.595(\)p) -C -.198(ro)462.244 667.2 S(cedur).198 E(e)-.198 E F0(See R)72 685.8 Q F1(4) -97.971 680.3 Q F0(RS.)102.471 685.8 Q EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(number)72 87 Q/F2 11/Symbol SF(-)A F1 -(>string)A/F3 11/Times-Italic@0 SF(number)4.583 E F1 261.526(\)p)C -.198(ro) -462.244 87 S(cedur).198 E(e)-.198 E(\(number)72 102 Q F2(-)A F1(>string)A F3 -(number r)4.583 E(adix)-.165 E F1 235.72(\)p)C -.198(ro)462.244 102 S(cedur) -.198 E(e)-.198 E F0(See R)72 120.6 Q/F4 9/Times-Roman@0 SF(4)97.971 115.1 Q F0 -(RS.)102.471 120.6 Q F1(\(string)72 150.6 Q F2(-)A F1(>number)A F3(string)4.583 -E F1 269.457(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E(\(string)72 -165.6 Q F2(-)A F1(>number)A F3(string r)4.583 E(adix)-.165 E F1 243.651(\)p)C --.198(ro)462.244 165.6 S(cedur).198 E(e)-.198 E F0(See R)72 184.2 Q F4(4)97.971 -178.7 Q F0(RS.)102.471 184.2 Q F1 2.75(18. Characters)72 214.2 R(\(char)72 -244.2 Q F2(-)A F1(>integer)A F3 -.165(ch)4.583 G(ar).165 E F1 285.539(\)p)C --.198(ro)462.244 244.2 S(cedur).198 E(e)-.198 E(\(integer)72 259.2 Q F2(-)A F1 -(>char)A F3(n)4.583 E F1 300.037(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E(e) --.198 E F0(See R)72 277.8 Q F4(4)97.971 272.3 Q F0(RS.)102.471 277.8 Q F1 -(\(char)72 307.8 Q(-upper)-.407 E(-case?)-.407 E F3 -.165(ch)4.583 G(ar).165 E -F1 271.162(\)p)C -.198(ro)462.244 307.8 S(cedur).198 E(e)-.198 E(\(char)72 -322.8 Q(-lo)-.407 E(wer)-.11 E(-case?)-.407 E F3 -.165(ch)4.583 G(ar).165 E F1 -273.12(\)p)C -.198(ro)462.244 322.8 S(cedur).198 E(e)-.198 E F0(See R)72 341.4 -Q F4(4)97.971 335.9 Q F0(RS.)102.471 341.4 Q F1(\(char)72 371.4 Q(-alphabetic?) --.407 E F3 -.165(ch)4.583 G(ar).165 E F1 273.186(\)p)C -.198(ro)462.244 371.4 S -(cedur).198 E(e)-.198 E(\(char)72 386.4 Q(-numeric?)-.407 E F3 -.165(ch)4.583 G -(ar).165 E F1 282.976(\)p)C -.198(ro)462.244 386.4 S(cedur).198 E(e)-.198 E -(\(char)72 401.4 Q(-whitespace?)-.407 E F3 -.165(ch)4.583 G(ar).165 E F1 -270.755(\)p)C -.198(ro)462.244 401.4 S(cedur).198 E(e)-.198 E F0(See R)72 420 Q -F4(4)97.971 414.5 Q F0(RS.)102.471 420 Q F1(\(char)72 450 Q(-upcase)-.407 E F3 --.165(ch)4.583 G(ar).165 E F1 295.802(\)p)C -.198(ro)462.244 450 S(cedur).198 E -(e)-.198 E(\(char)72 465 Q(-do)-.407 E(wncase)-.11 E F3 -.165(ch)4.583 G(ar) -.165 E F1 282.47(\)p)C -.198(ro)462.244 465 S(cedur).198 E(e)-.198 E F0(See R) -72 483.6 Q F4(4)97.971 478.1 Q F0(RS.)102.471 483.6 Q F1(\(char=?)72 513.6 Q F3 --.165(ch)4.583 G(ar).165 E/F5 10/Times-Italic@0 SF(1)3.3 I F3 -.165(ch)2.75 --3.3 O(ar).165 E F5(2)3.3 I F1 286.319(\)p)-3.3 K -.198(ro)462.244 513.6 S -(cedur).198 E(e)-.198 E(\(char?)72 543.6 Q F3 -.165(ch) -4.583 G(ar).165 E F5(1)3.3 I F3 -.165(ch)2.75 -3.3 O(ar).165 E F5(2)3.3 I F1 -286.319(\)p)-3.3 K -.198(ro)462.244 543.6 S(cedur).198 E(e)-.198 E(\(char<=?)72 -558.6 Q F3 -.165(ch)4.583 G(ar).165 E F5(1)3.3 I F3 -.165(ch)2.75 -3.3 O(ar) -.165 E F5(2)3.3 I F1 280.049(\)p)-3.3 K -.198(ro)462.244 558.6 S(cedur).198 E -(e)-.198 E(\(char>=?)72 573.6 Q F3 -.165(ch)4.583 G(ar).165 E F5(1)3.3 I F3 --.165(ch)2.75 -3.3 O(ar).165 E F5(2)3.3 I F1 280.049(\)p)-3.3 K -.198(ro) -462.244 573.6 S(cedur).198 E(e)-.198 E F0(See R)72 592.2 Q F4(4)97.971 586.7 Q -F0(RS.)102.471 592.2 Q F1(\(char)72 622.2 Q(-ci=?)-.407 E F3 -.165(ch)4.583 G -(ar).165 E F5(1)3.3 I F3 -.165(ch)2.75 -3.3 O(ar).165 E F5(2)3.3 I F1 275.121 -(\)p)-3.3 K -.198(ro)462.244 622.2 S(cedur).198 E(e)-.198 E(\(char)72 637.2 Q -(-ci?)-.407 E F3 -.165(ch)4.583 G(ar).165 E F5(1) -3.3 I F3 -.165(ch)2.75 -3.3 O(ar).165 E F5(2)3.3 I F1 275.121(\)p)-3.3 K -.198 -(ro)462.244 652.2 S(cedur).198 E(e)-.198 E(\(char)72 667.2 Q(-ci<=?)-.407 E F3 --.165(ch)4.583 G(ar).165 E F5(1)3.3 I F3 -.165(ch)2.75 -3.3 O(ar).165 E F5(2) -3.3 I F1 268.851(\)p)-3.3 K -.198(ro)462.244 667.2 S(cedur).198 E(e)-.198 E -(\(char)72 682.2 Q(-ci>=?)-.407 E F3 -.165(ch)4.583 G(ar).165 E F5(1)3.3 I F3 --.165(ch)2.75 -3.3 O(ar).165 E F5(2)3.3 I F1 268.851(\)p)-3.3 K -.198(ro) -462.244 682.2 S(cedur).198 E(e)-.198 E F0(See R)72 700.8 Q F4(4)97.971 695.3 Q -F0(RS.)102.471 700.8 Q EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(char?)72 87 Q/F2 11/Times-Italic@0 SF(obj) -4.583 E F1 331.277(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See R) -72 105.6 Q/F3 9/Times-Roman@0 SF(4)97.971 100.1 Q F0(RS.)102.471 105.6 Q F1 -2.75(19. Strings)72 135.6 R(\(string)72 165.6 Q F2 -.165(ch)4.583 G(ar ...).165 -E F1 313.721(\)p)C -.198(ro)462.244 165.6 S(cedur).198 E(e)-.198 E F0 -(Returns a string containing the speci\214ed characters.)72 184.2 Q(Examples:) -72 199.2 Q/F4 10/Courier@0 SF 144(\(string\) ==>)100.346 221.703 R("")328.346 -221.703 Q(\(string #\\a #\\space #\\b\))100.346 235.703 Q 6(==> "a)298.346 -235.703 R(b")6 E F1(\(string?)72 272.703 Q F2(obj)4.583 E F1 325.161(\)p)C --.198(ro)462.244 272.703 S(cedur).198 E(e)-.198 E F0(See R)72 291.303 Q F3(4) -97.971 285.803 Q F0(RS.)102.471 291.303 Q F1(\(mak)72 321.303 Q(e-string)-.11 E -F2 2.75(kc)4.583 G(har)149.315 321.303 Q F1 287.871(\)p)C -.198(ro)462.244 -321.303 S(cedur).198 E(e)-.198 E F0(See R)72 339.903 Q F3(4)97.971 334.403 Q F0 -(RS.)102.471 339.903 Q F1(\(string-length)72 369.903 Q F2(string)4.583 E F1 -286.045(\)p)C -.198(ro)462.244 369.903 S(cedur).198 E(e)-.198 E F0(See R)72 -388.503 Q F3(4)97.971 383.003 Q F0(RS.)102.471 388.503 Q F1(\(string-r)72 -418.503 Q(ef)-.198 E F2(string k)4.583 E F1 294.515(\)p)C -.198(ro)462.244 -418.503 S(cedur).198 E(e)-.198 E F0(See R)72 437.103 Q F3(4)97.971 431.603 Q F0 -(RS.)102.471 437.103 Q F1(\(string-set!)72 467.103 Q F2(string k c)4.583 E(har) --.165 E F1 268.511(\)p)C -.198(ro)462.244 467.103 S(cedur).198 E(e)-.198 E F0 -(See R)72 485.703 Q F3(4)97.971 480.203 Q F0(RS.)102.471 485.703 Q -(Returns the pre)72 500.703 Q(vious v)-.275 E(alue of element)-.275 E F2(k)2.75 -E F0(of the gi)2.75 E -.165(ve)-.275 G 2.75(ns).165 G(tring.)308.082 500.703 Q -F1(\(substring)72 530.703 Q F2(string start end)4.583 E F1 260.976(\)p)C -.198 -(ro)462.244 530.703 S(cedur).198 E(e)-.198 E F0(See R)72 549.303 Q F3(4)97.971 -543.803 Q F0(RS.)102.471 549.303 Q F1(\(string-copy)72 579.303 Q F2(string) -4.583 E F1 293.382(\)p)C -.198(ro)462.244 579.303 S(cedur).198 E(e)-.198 E F0 -(See R)72 597.903 Q F3(4)97.971 592.403 Q F0(RS.)102.471 597.903 Q F1 -(\(string-append)72 627.903 Q F2(string ...)4.583 E F1 269.534(\)p)C -.198(ro) -462.244 627.903 S(cedur).198 E(e)-.198 E F0(See R)72 646.503 Q F3(4)97.971 -641.003 Q F0(RS.)102.471 646.503 Q F1(\(list)72 676.503 Q/F5 11/Symbol SF(-)A -F1(>string)A F2 -.165(ch)4.583 G(ar).165 E(s)-.11 E F1 294.185(\)p)C -.198(ro) -462.244 676.503 S(cedur).198 E(e)-.198 E(\(string)72 691.503 Q F5(-)A F1(>list) -A F2(string)4.583 E F1 292.678(\)p)C -.198(ro)462.244 691.503 S(cedur).198 E(e) --.198 E F0(See R)72 710.103 Q F3(4)97.971 704.603 Q F0(RS.)102.471 710.103 Q EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(string-\214ll!)72 87 Q/F2 11/Times-Italic@0 -SF(string c)4.583 E(har)-.165 E F1 276.739(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E F0(See R)72 105.6 Q/F3 9/Times-Roman@0 SF(4)97.971 100.1 Q F0 -(RS.)102.471 105.6 Q(Returns)72 120.6 Q F2(string)2.75 E F0(.)A F1 -(\(substring-\214ll!)72 150.6 Q F2(string start end c)4.583 E(har)-.165 E F1 -218.67(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0(Stores)72 169.2 -Q F2 -.165(ch)2.75 G(ar).165 E F0(in e)2.75 E -.165(ve)-.275 G(ry element of) -.165 E F2(string)2.75 E F0(from)2.75 E F2(start)2.75 E F0(\(inclusi)2.75 E --.165(ve)-.275 G 2.75(\)t).165 G(o)340.433 169.2 Q F2(end)2.75 E F0(\(e)2.75 E -(xclusi)-.165 E -.165(ve)-.275 G 2.75(\). Returns).165 F F2(string)2.75 E F0(.) -A F1(\(string=?)72 199.2 Q F2(string)4.583 E/F4 10/Times-Italic@0 SF(1)3.3 I F2 -(string)2.75 -3.3 M F4(2)3.3 I F1 268.851(\)p)-3.3 K -.198(ro)462.244 199.2 S -(cedur).198 E(e)-.198 E(\(string?)72 229.2 Q F2(string)4.583 E F4(1)3.3 I F2 -(string)2.75 -3.3 M F4(2)3.3 I F1 268.851(\)p)-3.3 K -.198(ro)462.244 229.2 S -(cedur).198 E(e)-.198 E(\(string<=?)72 244.2 Q F2(string)4.583 E F4(1)3.3 I F2 -(string)2.75 -3.3 M F4(2)3.3 I F1 262.581(\)p)-3.3 K -.198(ro)462.244 244.2 S -(cedur).198 E(e)-.198 E(\(string>=?)72 259.2 Q F2(string)4.583 E F4(1)3.3 I F2 -(string)2.75 -3.3 M F4(2)3.3 I F1 262.581(\)p)-3.3 K -.198(ro)462.244 259.2 S -(cedur).198 E(e)-.198 E F0(See R)72 277.8 Q F3(4)97.971 272.3 Q F0(RS.)102.471 -277.8 Q F1(\(string-ci=?)72 307.8 Q F2(string)4.583 E F4(1)3.3 I F2(string)2.75 --3.3 M F4(2)3.3 I F1 257.246(\)p)-3.3 K -.198(ro)462.244 307.8 S(cedur).198 E -(e)-.198 E(\(string-ci?)72 337.8 Q F2(string)4.583 E F4(1)3.3 I F2(string)2.75 --3.3 M F4(2)3.3 I F1 257.246(\)p)-3.3 K -.198(ro)462.244 337.8 S(cedur).198 E -(e)-.198 E(\(string-ci<=?)72 352.8 Q F2(string)4.583 E F4(1)3.3 I F2(string) -2.75 -3.3 M F4(2)3.3 I F1 250.976(\)p)-3.3 K -.198(ro)462.244 352.8 S(cedur) -.198 E(e)-.198 E(\(string-ci>=?)72 367.8 Q F2(string)4.583 E F4(1)3.3 I F2 -(string)2.75 -3.3 M F4(2)3.3 I F1 250.976(\)p)-3.3 K -.198(ro)462.244 367.8 S -(cedur).198 E(e)-.198 E F0(See R)72 386.4 Q F3(4)97.971 380.9 Q F0(RS.)102.471 -386.4 Q F1(\(substring?)72 416.4 Q F2(string)4.583 E F4(1)3.3 I F2(string)2.75 --3.3 M F4(2)3.3 I F1 258.61(\)p)-3.3 K -.198(ro)462.244 416.4 S(cedur).198 E(e) --.198 E(\(substring-ci?)72 431.4 Q F2(string)4.583 E F4(1)3.3 I F2(string)2.75 --3.3 M F4(2)3.3 I F1 247.005(\)p)-3.3 K -.198(ro)462.244 431.4 S(cedur).198 E -(e)-.198 E F0(If)72 450 Q F2(string)3.265 E F4(1)3.3 I F0 .515 -(is a substring of)3.265 -3.3 N F2(string)3.265 E F4(2)3.3 I F0 3.265(,t)-3.3 K -.514(hese procedures return the starting position of the \214rst occur)231.058 -450 R(-)-.22 E .471(rence of the substring within)72 465 R F2(string)3.221 E F4 -(2)3.3 I F0 5.971(.O)-3.3 K .472(therwise #f is returned.)250.315 465 R F2 -(substring-ci?)5.972 E F0 .472(is the case insensi-)3.222 F(ti)72 480 Q .33 --.165(ve ve)-.275 H(rsion of).165 E F2(substring?)2.75 E F0(.)A(Examples:)72 -495 Q/F5 10/Courier@0 SF(\(define s "Hello world"\))100.346 517.503 Q -(\(substring? "foo" x\))100.346 531.503 Q 6(==> #f)298.346 531.503 R -(\(substring? "hello" x\))100.346 545.503 Q 6(==> #f)298.346 545.503 R -(\(substring-ci? "hello" x\))100.346 559.503 Q 6(==> 0)298.346 559.503 R -(\(substring? "!" x\))100.346 573.503 Q 6(==> 11)298.346 573.503 R F1 2.75 -(20. V)72 610.503 R(ectors)-1.1 E(\(v)72 640.503 Q(ector?)-.11 E F2(obj)4.583 E -F1 323.456(\)p)C -.198(ro)462.244 640.503 S(cedur).198 E(e)-.198 E F0(See R)72 -659.103 Q F3(4)97.971 653.603 Q F0(RS.)102.471 659.103 Q EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(mak)72 87 Q(e-v)-.11 E(ector)-.11 E/F2 11 -/Times-Italic@0 SF(k)4.583 E F1 308.914(\)p)C -.198(ro)462.244 87 S(cedur).198 -E(e)-.198 E(\(mak)72 102 Q(e-v)-.11 E(ector)-.11 E F2 2.75<6b8c>4.583 G(ll) -151.801 102 Q F1 294.548(\)p)C -.198(ro)462.244 102 S(cedur).198 E(e)-.198 E F0 -(See R)72 120.6 Q/F3 9/Times-Roman@0 SF(4)97.971 115.1 Q F0(RS.)102.471 120.6 Q -F1(\(v)72 150.6 Q(ector)-.11 E F2(obj ...)4.583 E F1 317.956(\)p)C -.198(ro) -462.244 150.6 S(cedur).198 E(e)-.198 E F0(See R)72 169.2 Q F3(4)97.971 163.7 Q -F0(RS.)102.471 169.2 Q F1(\(v)72 199.2 Q(ector)-.11 E(-length)-.407 E F2 -(vector)4.583 E F1 282.932(\)p)C -.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 -E F0(See R)72 217.8 Q F3(4)97.971 212.3 Q F0(RS.)102.471 217.8 Q F1(\(v)72 -247.8 Q(ector)-.11 E(-r)-.407 E(ef)-.198 E F2(vector k)4.583 E F1 291.402(\)p)C --.198(ro)462.244 247.8 S(cedur).198 E(e)-.198 E F0(See R)72 266.4 Q F3(4)97.971 -260.9 Q F0(RS.)102.471 266.4 Q F1(\(v)72 296.4 Q(ector)-.11 E(-set!)-.407 E F2 -(vector k obj)4.583 E F1 271.338(\)p)C -.198(ro)462.244 296.4 S(cedur).198 E(e) --.198 E F0(See R)72 315 Q F3(4)97.971 309.5 Q F0(RS.)102.471 315 Q -(Returns the pre)72 330 Q(vious v)-.275 E(alue of element)-.275 E F2(k)2.75 E -F0(of the v)2.75 E(ector)-.165 E(.)-.605 E F1(\(v)72 360 Q(ector)-.11 E/F4 11 -/Symbol SF(-)A F1(>list)A F2(vector)4.583 E F1 289.158(\)p)C -.198(ro)462.244 -360 S(cedur).198 E(e)-.198 E(\(list)72 375 Q F4(-)A F1(>v)A(ector)-.11 E F2 -(list)4.583 E F1 303.194(\)p)C -.198(ro)462.244 375 S(cedur).198 E(e)-.198 E F0 -(See R)72 393.6 Q F3(4)97.971 388.1 Q F0(RS.)102.471 393.6 Q F1(\(v)72 423.6 Q -(ector)-.11 E(-\214ll!)-.407 E F2(vector \214ll)4.583 E F1 282.008(\)p)C -.198 -(ro)462.244 423.6 S(cedur).198 E(e)-.198 E F0(See R)72 442.2 Q F3(4)97.971 -436.7 Q F0(RS.)102.471 442.2 Q(Returns)72 457.2 Q F2(vector)2.75 E F0(.)A F1 -(\(v)72 487.2 Q(ector)-.11 E(-copy)-.407 E F2(vector)4.583 E F1 290.269(\)p)C --.198(ro)462.244 487.2 S(cedur).198 E(e)-.198 E F0(Returns a cop)72 505.8 Q -2.75(yo)-.11 G(f)146.129 505.8 Q F2(vector)2.75 E F0(.)A F1 2.75(21. Symbols)72 -535.8 R(\(string)72 565.8 Q F4(-)A F1(>symbol)A F2(string)4.583 E F1 273.12 -(\)p)C -.198(ro)462.244 565.8 S(cedur).198 E(e)-.198 E(\(symbol)72 580.8 Q F4 -(-)A F1(>string)A F2(symbol)4.583 E F1 267.631(\)p)C -.198(ro)462.244 580.8 S -(cedur).198 E(e)-.198 E F0(See R)72 599.4 Q F3(4)97.971 593.9 Q F0(RS.)102.471 -599.4 Q F1(\(put)72 629.4 Q F2(symbol k)4.583 E .66 -.33(ey v)-.11 H(alue).33 E -F1 281.623(\)p)C -.198(ro)462.244 629.4 S(cedur).198 E(e)-.198 E(\(put)72 644.4 -Q F2(symbol k)4.583 E -.33(ey)-.11 G F1 308.199(\)p).33 G -.198(ro)462.244 -644.4 S(cedur).198 E(e)-.198 E F0(Associates)72 663 Q F2(value)2.774 E F0(with) -2.774 E F2 -.11(ke)2.773 G(y)-.22 E F0 .023(in the property list of the gi) -2.773 F -.165(ve)-.275 G 2.773(ns).165 G(ymbol.)330.755 663 Q F2 -.11(ke)5.523 -G(y)-.22 E F0 .023(must be a symbol.)2.773 F(Returns)5.523 E F2 -.11(ke)72 678 -S(y)-.22 E F0(.)A(If)72 693 Q F2(value)2.75 E F0 -(is omitted, the property is remo)2.75 E -.165(ve)-.165 G 2.75(df).165 G -(rom the symbol')268.724 693 Q 2.75(sp)-.605 G(roperty list.)353.369 693 Q EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(get)72 87 Q/F2 11/Times-Italic@0 SF -(symbol k)4.583 E -.33(ey)-.11 G F1 310.047(\)p).33 G -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0 .37(Returns the v)72 105.6 R .37 -(alue associated with)-.275 F F2 -.11(ke)3.12 G(y)-.22 E F0 .37 -(in the property list of)3.12 F F2(symbol)3.12 E F0(.)A F2 -.11(ke)5.87 G(y) --.22 E F0 .37(must be a symbol.)3.12 F .371(If no)5.871 F -.275(va)72 120.6 S -(lue is associated with).275 E F2 -.11(ke)2.75 G(y)-.22 E F0(in the symbol') -2.75 E 2.75(sp)-.605 G(roperty list, #f is returned.)271.1 120.6 Q(Examples:)72 -135.6 Q/F3 10/Courier@0 SF(\(put 'norway 'capital "Oslo"\))100.346 158.103 Q -(\(put 'norway 'continent "Europe"\))100.346 172.103 Q -(\(get 'norway 'capital\))100.346 186.103 Q 6(==> "Oslo")298.346 186.103 R F1 -(\(symbol-plist)72 223.103 Q F2(symbol)4.583 E F1 283.603(\)p)C -.198(ro) -462.244 223.103 S(cedur).198 E(e)-.198 E F0(Returns a cop)72 241.703 Q 2.75(yo) --.11 G 2.75(ft)146.129 241.703 S(he property list of)155.6 241.703 Q F2(symbol) -2.75 E F0(as an)2.75 E F2(alist)2.75 E F0(.)A(Examples:)72 256.703 Q F3 -(\(put 'norway 'capital "Oslo"\))100.346 279.206 Q -(\(put 'norway 'continent "Europe"\))100.346 293.206 Q -(\(symbol-plist 'norway\))100.346 307.206 Q 6(==> \(\(capital)118.346 321.206 R -6(.")6 G(Oslo"\) \(continent . "Europe"\)\))226.346 321.206 Q -(\(symbol-plist 'foo\))100.346 335.206 Q 6(==> \(\))298.346 335.206 R F1 -(\(symbol?)72 372.206 Q F2(obj)4.583 E F1 319.045(\)p)C -.198(ro)462.244 -372.206 S(cedur).198 E(e)-.198 E F0(See R)72 390.806 Q/F4 9/Times-Roman@0 SF(4) -97.971 385.306 Q F0(RS.)102.471 390.806 Q F1 -.917(\(oblist \))72 420.806 R(pr) -456.128 420.806 Q(ocedur)-.198 E(e)-.198 E F0 .677 -(Returns a list of lists containing all currently interned symbols.)72 439.406 -R .677(Each sublist represents a b)6.177 F(uck)-.22 E(et)-.11 E -(of the interpreters internal hash array)72 454.406 Q(.)-.715 E(Examples:)72 -469.406 Q F3(\(define \(apropos what\))100.346 491.909 Q -(\(let \(\(ret \(\)\)\))112.346 505.909 Q -(\(do \(\(tail \(oblist\) \(cdr tail\)\)\) \(\(null? tail\)\))124.346 519.909 Q -(\(do \(\(l \(car tail\) \(cdr l\)\)\) \(\(null? l\)\))136.346 533.909 Q -(\(if \(substring? what \(symbol->string \(car l\)\)\))148.346 547.909 Q -(\(set! ret \(cons \(car l\) ret\)\)\)\)\))172.346 561.909 Q(ret\)\))124.346 -575.909 Q(\(apropos "let"\))100.346 605.412 Q 6(==> \(let*)232.346 605.412 R -(let letrec fluid-let\))6 E(\(apropos "make"\))100.346 619.412 Q 6 -(==> \(make-list)232.346 619.412 R(make-vector make-string\))6 E -(\(apropos "foo"\))100.346 633.412 Q 6(==> \(\))232.346 633.412 R EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(22. En)72 87 R(vir)-.44 E(onments)-.198 -E(\(the-en)72 117 Q(vir)-.44 E -.917(onment \))-.198 F(pr)456.128 117 Q(ocedur) --.198 E(e)-.198 E F0(Returns the current en)72 135.6 Q(vironment.)-.44 E F1 -(\(global-en)72 165.6 Q(vir)-.44 E -.917(onment \))-.198 F(pr)456.128 165.6 Q -(ocedur)-.198 E(e)-.198 E F0 .924(Returns the global en)72 184.2 R .924 -(vironment \(the `)-.44 F(`root')-.814 E 3.675('e)-.814 G -.44(nv)277.108 184.2 -S .925(ironment in which all prede\214ned procedures are).44 F(bound\).)72 -199.2 Q F1(\(en)72 229.2 Q(vir)-.44 E(onment)-.198 E/F2 11/Symbol SF(-)A F1 -(>list)A/F3 11/Times-Italic@0 SF(en)4.583 E(vir)-.44 E(onment)-.495 E F1 -232.552(\)p)C -.198(ro)462.244 229.2 S(cedur).198 E(e)-.198 E F0 .539 -(Returns a list representing the speci\214ed en)72 247.8 R 3.289 -(vironment. The)-.44 F .539(list is a list of)3.289 F F3(fr)3.289 E(ames)-.165 -E F0 3.289(,e)C .538(ach frame is a)440.995 247.8 R 1.393 -(list of bindings \(an)72 262.8 R F3(alist)4.144 E F0 4.144(\). The)B 1.394 -(car of the list represents the most recently established en)4.144 F(viron-) --.44 E 2.75(ment. The)72 277.8 R(list returned by)2.75 E F3(en)2.75 E(vir)-.44 -E(onment)-.495 E F2(-)A F3(>list)A F0(can contain c)2.75 E(ycles.)-.165 E -(Examples:)72 292.8 Q/F4 10/Courier@0 SF(\(let \(\(x 1\) \(y 2\)\))100.346 -315.303 Q(\(car \(environment->list)112.346 329.303 Q 66 -(\(the-environment\)\)\)\) ==>)124.346 343.303 R(\(\(y . 2\) \(x . 1\)\)) -346.346 343.303 Q(\(\(lambda \(foo\))100.346 372.806 Q -(\(caar \(environment->list)118.346 386.806 Q -(\(the-environment\)\)\)\) "abc"\))130.346 400.806 Q 6(==> \(foo)316.346 -400.806 R 6(.")6 G(abc"\))394.346 400.806 Q(\(eq?)100.346 430.309 Q -(\(car \(last-pair \(environment->list)112.346 444.309 Q -(\(the-environment\)\)\)\))124.346 458.309 Q(\(car \(environment->list)112.346 -472.309 Q 48(\(global-environment\)\)\)\) ==>)124.346 486.309 R(#t)346.346 -486.309 Q F1(\(pr)72 523.309 Q(ocedur)-.198 E(e-en)-.198 E(vir)-.44 E(onment) --.198 E F3(pr)4.583 E(ocedur)-.495 E(e)-.407 E F1 217.13(\)p)C -.198(ro)462.244 -523.309 S(cedur).198 E(e)-.198 E(\(pr)72 538.309 Q(omise-en)-.198 E(vir)-.44 E -(onment)-.198 E F3(pr)4.583 E(omise)-.495 E F1 236.677(\)p)C -.198(ro)462.244 -538.309 S(cedur).198 E(e)-.198 E(\(contr)72 553.309 Q(ol-point-en)-.198 E(vir) --.44 E(onment)-.198 E F3(contr)4.583 E(ol-point)-.495 E F1 190.224(\)p)C -.198 -(ro)462.244 553.309 S(cedur).198 E(e)-.198 E F0 .522(Returns the en)72 571.909 -R .522(vironment in which the the body of the)-.44 F F3(pr)3.272 E(ocedur)-.495 -E(e)-.407 E F0 .522(is e)3.272 F -.275(va)-.275 G .522(luated, the en).275 F -.521(vironment in)-.44 F 1.676(which a v)72 586.909 R 1.676(alue for the)-.275 -F F3(pr)4.426 E(omise)-.495 E F0 1.676(is computed when)4.426 F F3(for)4.426 E -(ce)-.407 E F0 1.677(is applied to it, or the en)4.426 F 1.677(vironment in) --.44 F(which the)72 601.909 Q F3(contr)2.75 E(ol-point)-.495 E F0 -(has been created, respecti)2.75 E -.165(ve)-.275 G(ly).165 E(.)-.715 E F1 -(\(en)72 631.909 Q(vir)-.44 E(onment?)-.198 E F3(obj)4.583 E F1 293.415(\)p)C --.198(ro)462.244 631.909 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 650.509 Q -F3(obj)2.75 E F0(is an en)2.75 E(vironment, #f otherwise.)-.44 E EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(7-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(23. P)72 87 R(orts and Files)-.22 E F0 -(Generally)72 105.6 Q 2.961(,a\214)-.715 G .211 -(le name can either be a string or a symbol.)134.33 105.6 R .21 -(If a symbol is gi)5.71 F -.165(ve)-.275 G .21(n, it is con).165 F -.165(ve) --.44 G .21(rted into).165 F 3.112(as)72 120.6 S .362(tring by applying)84.275 -120.6 R/F2 11/Times-Italic@0 SF(symbol)3.113 E/F3 11/Symbol SF(-)A F2(>string)A -F0 5.863(.A)C .363(tilde at the be)253.86 120.6 R .363 -(ginning of a \214le name is e)-.165 F .363(xpanded accord-)-.165 F -(ing to the rules emplo)72 135.6 Q(yed by the C-Shell \(see)-.11 E F2(csh)2.75 -E F0(\(1\)\).)A 1.407(Elk adds a third type of ports,)72 154.2 R F2 -(input-output)4.157 E F0 1.407(\(bidirectional\) ports.)4.157 F(Both)6.907 E F2 -(input-port?)4.157 E F0(and)4.157 E F2(output-)4.156 E(port?)72 169.2 Q F0 .556 -(return #t when applied to an input-output port, and both input primiti)3.305 F --.165(ve)-.275 G 3.306(sa).165 G .556(nd output primi-)430.772 169.2 R(ti)72 -184.2 Q -.165(ve)-.275 G 2.994(sm).165 G .243 -(ay be applied to input-output ports.)103.891 184.2 R .243 -(An input-output port \(in f)5.743 F(act,)-.11 E F2(any)2.993 E F0 .243 -(port\) may be closed)2.993 F(with an)72 199.2 Q 2.75(yo)-.165 G 2.75(ft) -118.277 199.2 S(he primiti)127.748 199.2 Q -.165(ve)-.275 G(s).165 E F2 -(close-input-port)2.75 E F0(and)2.75 E F2(close-output-port)2.75 E F0(.)A .62 -(The only w)72 217.8 R .621 -(ay to create an input-output-port is by means of the procedure)-.11 F F2 -(open-input-output-\214le)3.371 E F0(.)A(Extensions may pro)72 232.8 Q -(vide additional means to create bidirectional ports.)-.165 E F1 -(\(call-with-input-\214le)72 262.8 Q F2(\214le pr)4.583 E(ocedur)-.495 E(e) --.407 E F1 224.324(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E(e)-.198 E -(\(call-with-output-\214le)72 277.8 Q F2(\214le pr)4.583 E(ocedur)-.495 E(e) --.407 E F1 218.219(\)p)C -.198(ro)462.244 277.8 S(cedur).198 E(e)-.198 E F0 -(See R)72 296.4 Q/F4 9/Times-Roman@0 SF(4)97.971 290.9 Q F0(RS.)102.471 296.4 Q -F1(\(input-port?)72 326.4 Q F2(obj)4.583 E F1 303.766(\)p)C -.198(ro)462.244 -326.4 S(cedur).198 E(e)-.198 E(\(output-port?)72 341.4 Q F2(obj)4.583 E F1 -297.661(\)p)C -.198(ro)462.244 341.4 S(cedur).198 E(e)-.198 E F0(See R)72 360 Q -F4(4)97.971 354.5 Q F0(RS.)102.471 360 Q F1(\(curr)72 390 Q -.917 -(ent-input-port \))-.198 F(pr)456.128 390 Q(ocedur)-.198 E(e)-.198 E(\(curr)72 -405 Q -.917(ent-output-port \))-.198 F(pr)456.128 405 Q(ocedur)-.198 E(e)-.198 -E F0(See R)72 423.6 Q F4(4)97.971 418.1 Q F0(RS.)102.471 423.6 Q F1 -(\(with-input-fr)72 453.6 Q(om-\214le)-.198 E F2(\214le thunk)4.583 E F1 -237.678(\)p)C -.198(ro)462.244 453.6 S(cedur).198 E(e)-.198 E -(\(with-output-to-\214le)72 468.6 Q F2(\214le thunk)4.583 E F1 245.422(\)p)C --.198(ro)462.244 468.6 S(cedur).198 E(e)-.198 E F0(See R)72 487.2 Q F4(4)97.971 -481.7 Q F0(RS.)102.471 487.2 Q F2(\214le)72 502.2 Q F0 -(can be a string as well as a symbol.)2.75 E F1(\(open-input-\214le)72 532.2 Q -F2(\214le)4.583 E F1 289.708(\)p)C -.198(ro)462.244 532.2 S(cedur).198 E(e) --.198 E(\(open-output-\214le)72 547.2 Q F2(\214le)4.583 E F1 283.603(\)p)C --.198(ro)462.244 547.2 S(cedur).198 E(e)-.198 E(\(open-input-output-\214le)72 -562.2 Q F2(\214le)4.583 E F1 254.871(\)p)C -.198(ro)462.244 562.2 S(cedur).198 -E(e)-.198 E F0(See R)72 580.8 Q F4(4)97.971 575.3 Q F0(RS.)102.471 580.8 Q F2 -(\214le)72 595.8 Q F0 .199(can be a string as well as a symbol.)2.949 F F2 -(open-input-output-\214le)5.698 E F0 .198 -(opens the \214le for reading and writ-)2.948 F -(ing and returns an input-output port; the \214le must e)72 610.8 Q -(xist and is not truncated.)-.165 E F1(\(close-input-port)72 640.8 Q F2(port) -4.583 E F1 278.719(\)p)C -.198(ro)462.244 640.8 S(cedur).198 E(e)-.198 E -(\(close-output-port)72 655.8 Q F2(port)4.583 E F1 272.614(\)p)C -.198(ro) -462.244 655.8 S(cedur).198 E(e)-.198 E F0(See R)72 674.4 Q F4(4)97.971 668.9 Q -F0(RS.)102.471 674.4 Q .042(Calls to)72 689.4 R F2(close-input-port)2.792 E F0 -(and)2.792 E F2(close-output-port)2.792 E F0 .042 -(are ignored when applied to string ports or to ports)2.792 F -(connected with the standard input or standard output of the process.)72 704.4 -Q EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(8-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(clear)72 87 Q -.917(-output-port \))-.407 F -(pr)456.128 87 Q(ocedur)-.198 E(e)-.198 E(\(clear)72 102 Q(-output-port)-.407 E -/F2 11/Times-Italic@0 SF(output-port)4.583 E F1 240.637(\)p)C -.198(ro)462.244 -102 S(cedur).198 E(e)-.198 E F0(If the ar)72 120.6 Q(gument is omitted, it def) --.198 E(aults to the current output port.)-.11 E .066(In case of `)72 135.6 R -(`b)-.814 E(uf)-.22 E(fered')-.275 E 2.815('o)-.814 G .065 -(utput, this procedure is used to discard all characters that ha)175.805 135.6 -R .395 -.165(ve b)-.22 H .065(een output).165 F(to the port b)72 150.6 Q(ut ha) --.22 E .33 -.165(ve n)-.22 H -(ot yet been sent to the \214le associated with the port.).165 E F1 -.917 -(\(\215ush-output-port \))72 180.6 R(pr)456.128 180.6 Q(ocedur)-.198 E(e)-.198 -E(\(\215ush-output-port)72 195.6 Q F2(output-port)4.583 E F1 240.813(\)p)C --.198(ro)462.244 195.6 S(cedur).198 E(e)-.198 E F0(If the ar)72 214.2 Q -(gument is omitted, it def)-.198 E(aults to the current output port.)-.11 E -.638(In case of `)72 229.2 R(`b)-.814 E(uf)-.22 E(fered')-.275 E 3.388('o)-.814 -G .639(utput, this procedure is used to force all characters that ha)178.095 -229.2 R .969 -.165(ve b)-.22 H .639(een output).165 F 1.174 -(to the port to be printed immediately)72 244.2 R 6.674(.T)-.715 G 1.173 -(his may be necessary to force output that is not termi-)255.8 244.2 R .14 -(nated with a ne)72 259.2 R .141(wline to appear on the terminal.)-.275 F .141 -(An output port is \215ushed automatically when it is)5.641 F(closed.)72 274.2 -Q F1(\(clear)72 304.2 Q -.917(-input-port \))-.407 F(pr)456.128 304.2 Q(ocedur) --.198 E(e)-.198 E(\(clear)72 319.2 Q(-input-port)-.407 E F2(input-port)4.583 E -F1 252.242(\)p)C -.198(ro)462.244 319.2 S(cedur).198 E(e)-.198 E F0(If the ar) -72 337.8 Q(gument is omitted, it def)-.198 E(aults to the current input port.) --.11 E 1.474(In case of `)72 352.8 R(`b)-.814 E(uf)-.22 E(fered')-.275 E 4.224 -('i)-.814 G 1.474(nput, this procedure discards all characters that ha)178.997 -352.8 R 1.803 -.165(ve a)-.22 H 1.473(lready been read).165 F 1.21 -(from the \214le associated with the port b)72 367.8 R 1.21(ut ha)-.22 F 1.54 --.165(ve n)-.22 H 1.21(ot been processed using).165 F F2 -.407(re)3.96 G(ad) -.407 E F0 1.21(or similar proce-)3.96 F(dures.)72 382.8 Q F1 -(\(port-\214le-name)72 412.8 Q F2(port)4.583 E F1 286.672(\)p)C -.198(ro) -462.244 412.8 S(cedur).198 E(e)-.198 E F0 -(Returns the name of the \214le associated with)72 431.4 Q F2(port)2.75 E F0 -(if it is a \214le port, #f otherwise.)2.75 E F1 -.917(\(port-line-number \))72 -461.4 R(pr)456.128 461.4 Q(ocedur)-.198 E(e)-.198 E F0 .1(Returns the current \ -line number of a \214le input port or string input port, i.)72 480 R .099 -(e. the number of ne)1.833 F(wline)-.275 E .781(characters that ha)72 495 R -1.111 -.165(ve b)-.22 H .781(een read from this port plus one.).165 F -.814(``) -6.282 G(Unreading').814 E 3.532('an)-.814 G -.275(ew)400.103 495 S .782 -(line character decre-).275 F .58(ments the line number)72 510 R 3.33(,b)-.44 G -.58(ut it ne)182.736 510 R -.165(ve)-.275 G 3.33(rd).165 G .58(rops belo) -236.891 510 R 3.33(wo)-.275 G 3.33(ne. The)294.602 510 R .58 -(result of applying)3.33 F F2(port-line-number)3.329 E F0(to)3.329 E -(an output port is unde\214ned.)72 525 Q F1(\(tilde-expand)72 555 Q F2(\214le) -4.583 E F1 300.103(\)p)C -.198(ro)462.244 555 S(cedur).198 E(e)-.198 E F0(If)72 -573.6 Q F2(\214le)3.14 E F0 .39(starts with a tilde, performs tilde e)3.14 F -.39(xpansion as described abo)-.165 F .72 -.165(ve a)-.165 H .39 -(nd returns the result of the).165 F -.165(ex)72 588.6 S -(pansion \(a string\); returns).165 E F2(\214le)2.75 E F0(otherwise.)2.75 E F2 -(\214le)5.5 E F0(is a string or a symbol.)2.75 E F1(\(\214le-exists?)72 618.6 Q -F2(\214le)4.583 E F1 309.893(\)p)C -.198(ro)462.244 618.6 S(cedur).198 E(e) --.198 E F0 .084(Returns #t if)72 637.2 R F2(\214le)2.834 E F0 .084 -(is accessible, #f otherwise.)2.834 F F2(\214le)5.584 E F0 .084 -(is a string or a symbol; tilde e)2.834 F .083(xpansion is not per)-.165 F(-) --.22 E(formed.)72 652.2 Q EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(9-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(24. Input)72 87 R(\(r)72 117 Q -.917 -(ead \))-.198 F(pr)456.128 117 Q(ocedur)-.198 E(e)-.198 E(\(r)72 132 Q(ead) --.198 E/F2 11/Times-Italic@0 SF(input-port)4.583 E F1 306.417(\)p)C -.198(ro) -462.244 132 S(cedur).198 E(e)-.198 E F0(See R)72 150.6 Q/F3 9/Times-Roman@0 SF -(4)97.971 145.1 Q F0(RS.)102.471 150.6 Q F1(\(r)72 180.6 Q -.917(ead-char \)) --.198 F(pr)456.128 180.6 Q(ocedur)-.198 E(e)-.198 E(\(r)72 195.6 Q(ead-char) --.198 E F2(input-port)4.583 E F1 281.37(\)p)C -.198(ro)462.244 195.6 S(cedur) -.198 E(e)-.198 E F0(See R)72 214.2 Q F3(4)97.971 208.7 Q F0(RS.)102.471 214.2 Q -F1(\(r)72 244.2 Q -.917(ead-string \))-.198 F(pr)456.128 244.2 Q(ocedur)-.198 E -(e)-.198 E(\(r)72 259.2 Q(ead-string)-.198 E F2(input-port)4.583 E F1 275.254 -(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E(e)-.198 E F0(If the ar)72 277.8 Q -(gument is omitted, it def)-.198 E(aults to the current input port.)-.11 E(Ret\ -urns the rest of the current input line as a string \(not including the termin\ -ating ne)72 292.8 Q(wline\).)-.275 E F1(\(unr)72 322.8 Q(ead-char)-.198 E F2 --.165(ch)4.583 G(ar).165 E F1 293.756(\)p)C -.198(ro)462.244 322.8 S(cedur).198 -E(e)-.198 E(\(unr)72 337.8 Q(ead-char)-.198 E F2 -.165(ch)4.583 G -(ar input-port).165 E F1 246.39(\)p)C -.198(ro)462.244 337.8 S(cedur).198 E(e) --.198 E F0(If the second ar)72 356.4 Q(gument is omitted, it def)-.198 E -(aults to the current input port.)-.11 E(Pushes)72 371.4 Q F2 -.165(ch)3.531 G -(ar).165 E F0 .781(back on the stream of input characters.)3.531 F .781(It is) -6.281 F F2(not)3.531 E F0 .782(an error for)3.531 F F2 -.165(ch)3.532 G(ar).165 -E F0 .782(not to be the last)3.532 F .158(character read from the port.)72 -386.4 R .158 -(It is unde\214ned whether more than one character can be pushed back)5.658 F -.419(without an intermittent read operation, and whether a character can be pu\ -shed back before some-)72 401.4 R(thing has been read from the port.)72 416.4 Q -(The procedure returns)5.5 E F2 -.165(ch)2.75 G(ar).165 E F0(.)A F1 -.917 -(\(peek-char \))72 446.4 R(pr)456.128 446.4 Q(ocedur)-.198 E(e)-.198 E -(\(peek-char)72 461.4 Q F2(input-port)4.583 E F1 280.556(\)p)C -.198(ro)462.244 -461.4 S(cedur).198 E(e)-.198 E F0(See R)72 480 Q F3(4)97.971 474.5 Q F0(RS.) -102.471 480 Q F2(peek-c)72 498.6 Q(har)-.165 E F0(uses)2.75 E F2(unr)2.75 E -(ead-c)-.407 E(har)-.165 E F0(to push back the character)2.75 E(.)-.605 E F1 -(\(eof-object?)72 528.6 Q F2(obj)4.583 E F1 306.241(\)p)C -.198(ro)462.244 -528.6 S(cedur).198 E(e)-.198 E F0(See R)72 547.2 Q F3(4)97.971 541.7 Q F0(RS.) -102.471 547.2 Q F1(\(char)72 577.2 Q(-r)-.407 E(eady?)-.198 E F2(input-port) -4.583 E F1 270.777(\)p)C -.198(ro)462.244 577.2 S(cedur).198 E(e)-.198 E F0 -(See R)72 595.8 Q F3(4)97.971 590.3 Q F0(RS.)102.471 595.8 Q F2 -.165(ch)72 -614.4 S(ar).165 E(-r)-.22 E(eady)-.407 E F0 1.204 -(cannot be implemented correctly based on C FILE pointers.)3.954 F 1.203 -(In the current v)6.704 F(ersion,)-.165 E F2 -.165(ch)72 629.4 S(ar).165 E(-r) --.22 E(eady)-.407 E F0(can return #f although a call to)2.75 E F2 -.407(re)2.75 -G(ad-c).407 E(har)-.165 E F0 -.11(wo)2.75 G(uld not block.).11 E F1 2.75 -(25. Output)72 659.4 R EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 334.023(print-length v)72 87 R(ariable)-.11 E -336.465(print-depth v)72 102 R(ariable)-.11 E F0 1.501(These v)72 120.6 R 1.501 -(ariables are de\214ned in the global en)-.275 F 4.252(vironment. The)-.44 F -4.252(yc)-.165 G 1.502(ontrol the maximum length and)359.271 120.6 R 1.622 -(maximum depth, respecti)72 135.6 R -.165(ve)-.275 G(ly).165 E 4.372(,o)-.715 G -4.372(fal)217.171 135.6 S 1.622(ist or v)237.52 135.6 R 1.621 -(ector that is printed.)-.165 F 1.621(If one of the v)7.121 F 1.621 -(ariables is not)-.275 F 1.654(bound to an inte)72 150.6 R(ger)-.165 E 4.404 -(,o)-.44 G 4.404(ri)174.25 150.6 S 4.404(fi)185.375 150.6 S 1.654(ts v)196.5 -150.6 R 1.654(alue e)-.275 F 1.654(xceeds a certain, lar)-.165 F 1.655 -(ge maximum v)-.198 F 1.655(alue \(which is at least)-.275 F .883 -(2^20\), a def)72 165.6 R .883(ault v)-.11 F .883(alue is tak)-.275 F 3.633 -(en. The)-.11 F(def)3.633 E .883(ault v)-.11 F .883(alue for)-.275 F/F2 11 -/Times-Italic@0 SF(print-length)3.632 E F0 .882(is 1000, and the def)3.632 F -.882(ault v)-.11 F(alue)-.275 E(for)72 180.6 Q F2(print-depth)3.183 E F0 .433 -(is 20.)3.183 F(Ne)5.933 E -.055(ga)-.165 G(ti).055 E .763 -.165(ve v)-.275 H -.433(alues of)-.11 F F2(print-length)3.183 E F0(and)3.183 E F2(print-depth) -3.183 E F0 .433(are treated as `)3.183 F(`unlimited')-.814 E(',)-.814 E -.917 -(i. e.)72 195.6 R(output is not truncated.)2.75 E F1(\(write)72 225.6 Q F2(obj) -4.583 E F1 333.73(\)p)C -.198(ro)462.244 225.6 S(cedur).198 E(e)-.198 E -(\(write)72 240.6 Q F2(obj output-port)4.583 E F1 280.864(\)p)C -.198(ro) -462.244 240.6 S(cedur).198 E(e)-.198 E F0(See R)72 259.2 Q/F3 9/Times-Roman@0 -SF(4)97.971 253.7 Q F0(RS.)102.471 259.2 Q F1(\(display)72 289.2 Q F2(obj)4.583 -E F1 324.534(\)p)C -.198(ro)462.244 289.2 S(cedur).198 E(e)-.198 E(\(display)72 -304.2 Q F2(obj output-port)4.583 E F1 271.668(\)p)C -.198(ro)462.244 304.2 S -(cedur).198 E(e)-.198 E F0(See R)72 322.8 Q F3(4)97.971 317.3 Q F0(RS.)102.471 -322.8 Q F1(\(write-char)72 352.8 Q F2 -.165(ch)4.583 G(ar).165 E F1 302.743 -(\)p)C -.198(ro)462.244 352.8 S(cedur).198 E(e)-.198 E(\(write-char)72 367.8 Q -F2 -.165(ch)4.583 G(ar output-port).165 E F1 249.877(\)p)C -.198(ro)462.244 -367.8 S(cedur).198 E(e)-.198 E F0(See R)72 386.4 Q F3(4)97.971 380.9 Q F0(RS.) -102.471 386.4 Q F1 -.917(\(newline \))72 416.4 R(pr)456.128 416.4 Q(ocedur) --.198 E(e)-.198 E(\(newline)72 431.4 Q F2(output-port)4.583 E F1 286.045(\)p)C --.198(ro)462.244 431.4 S(cedur).198 E(e)-.198 E F0(See R)72 450 Q F3(4)97.971 -444.5 Q F0(RS.)102.471 450 Q F1(\(print)72 480 Q F2(obj)4.583 E F1 334.324(\)p) -C -.198(ro)462.244 480 S(cedur).198 E(e)-.198 E(\(print)72 495 Q F2 -(obj output-port)4.583 E F1 281.458(\)p)C -.198(ro)462.244 495 S(cedur).198 E -(e)-.198 E F0(If the second ar)72 513.6 Q(gument is omitted, it def)-.198 E -(aults to the current output port.)-.11 E(Prints)72 528.6 Q F2(obj)2.75 E F0 -(using)2.75 E F2(write)2.75 E F0(and then prints a ne)2.75 E(wline.)-.275 E F2 -(print)5.5 E F0(returns)2.75 E F2(void)2.75 E F0(.)A F1(\(f)72 558.6 Q(ormat) --.275 E F2(destination format-string obj ...)4.583 E F1 201.994(\)p)C -.198(ro) -462.244 558.6 S(cedur).198 E(e)-.198 E F0 .774(Prints the third and the follo) -72 577.2 R .774(wing ar)-.275 F .774 -(guments according to the speci\214cations in the string)-.198 F F2(format-) -3.523 E(string)72 592.2 Q F0 5.615(.C)C .115 -(haracters from the format string are copied to the output.)113.376 592.2 R -.116(When a tilde is encountered in)5.615 F .672 -(the format string, the tilde and the immediately follo)72 607.2 R .671 -(wing character are replaced in the output as)-.275 F(follo)72 622.2 Q(ws:) --.275 E 14.308(~s is)72 640.8 R -(replaced by the printed representation of the ne)2.75 E(xt)-.165 E F2(obj)2.75 -E F0(in the sense of)2.75 E F2(write)2.75 E F0(.)A 13.703(~a is)72 659.4 R -(replaced by the printed representation of the ne)2.75 E(xt)-.165 E F2(obj)2.75 -E F0(in the sense of)2.75 E F2(display)2.75 E F0(.)A 14.924(~~ is)72 678 R -(replaced by a single tilde.)2.75 E 9.424(~% is)72 696.6 R(replaced by a ne) -2.75 E(wline.)-.275 E .029(An error is signaled if fe)72 715.2 R(wer)-.275 E F2 -(obj)2.78 E F0 2.78(sa)C .03(re pro)224.974 715.2 R .03 -(vided than required by the gi)-.165 F -.165(ve)-.275 G 2.78(nf).165 G .03 -(ormat string.)399.622 715.2 R .03(If the for)5.53 F(-)-.22 E -(mat string ends in a tilde, the tilde is ignored.)72 730.2 Q EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(If)72 87 Q/F1 11/Times-Italic@0 SF(destination)4.716 E F0 1.966 -(is #t, the output is sent to the current output port; if #f is gi)4.716 F --.165(ve)-.275 G 1.966(n, the output is).165 F -(returned as a string; otherwise,)72 102 Q F1(destination)2.75 E F0 -(must be an output or input-output port.)2.75 E(Examples:)72 117 Q/F2 10 -/Courier@0 SF(\(format #f "Hello world!"\))100.346 139.503 Q 6(==> "Hello) -298.346 139.503 R(world")6 E(\(format #f "~s world!" "Hello"\))100.346 153.503 -Q 6(==> "\\"Hello\\")298.346 153.503 R(world")6 E -(\(format #f "~a world!" "Hello"\))100.346 167.503 Q 6(==> "Hello)298.346 -167.503 R(world")6 E(\(format #f "Hello~a"\))100.346 181.503 Q 6(==> "Hello!") -298.346 181.503 R(\(define \(flat-size s\))100.346 211.006 Q -(\(fluid-let \(\(print-length 1000\) \(print-depth 100\)\))112.346 225.006 Q -(\(string-length \(format #f "~a" s\)\)\)\))124.346 239.006 Q -(\(flat-size 1.5\))100.346 268.509 Q 6(==> 3)298.346 268.509 R -(\(flat-size '\(a b c\)\))100.346 282.509 Q 6(==> 7)298.346 282.509 R/F3 11 -/Times-Bold@0 SF 2.75(26. String)72 319.509 R -.22(Po)2.75 G(rts).22 E F0 1.482 -(String ports are similar to \214le ports, e)72 338.109 R 1.482 -(xcept that characters are appended to a string instead of)-.165 F .414 -(being sent to a \214le, or tak)72 353.109 R .413 -(en from a string instead of being read from a \214le.)-.11 F .413 -(It is not necessary to)5.913 F .848(close string ports.)72 368.109 R .849 -(When an string input port has reached the end of the input string, successi) -6.349 F -.165(ve)-.275 G(read operations return end-of-\214le.)72 383.109 Q F3 -(\(open-input-string)72 413.109 Q F1(string)4.583 E F3 264.034(\)p)C -.198(ro) -462.244 413.109 S(cedur).198 E(e)-.198 E F0(Returns a ne)72 431.709 Q 2.75(ws) --.275 G(tring input port initialized with)141.685 431.709 Q F1(string)2.75 E F0 -(.)A(Examples:)72 446.709 Q F2 -(\(define p \(open-input-string "Hello world!"\)\))100.346 469.212 Q -(\(read-char p\))100.346 483.212 Q 6(==> #\\H)298.346 483.212 R(\(read p\)) -100.346 497.212 Q 6(==> ello)298.346 497.212 R(\(read p\))100.346 511.212 Q 6 -(==> world!)298.346 511.212 R(\(read p\))100.346 525.212 Q(==>)298.346 525.212 -Q/F4 10/Times-Italic@0 SF(end of \214le)328.346 525.212 Q F2 -(\(define p \(open-input-string "\(cons 'a 'b\)"\)\))100.346 554.715 Q -(\(eval \(read p\)\))100.346 568.715 Q 6(==> \(a)298.346 568.715 R 6(.b)6 G(\)) -364.346 568.715 Q F3 -.917(\(open-output-string \))72 605.715 R(pr)456.128 -605.715 Q(ocedur)-.198 E(e)-.198 E F0(Returns a ne)72 624.315 Q 2.75(ws)-.275 G -(tring output port.)141.685 624.315 Q F3(\(get-output-string)72 654.315 Q F1 -(string-output-port)4.583 E F3 212.719(\)p)C -.198(ro)462.244 654.315 S(cedur) -.198 E(e)-.198 E F0 .566(Returns the string currently associated with the spec\ -i\214ed string output port.)72 672.915 R .565(As a side-ef)6.065 F .565 -(fect, the)-.275 F(string is reset to zero length.)72 687.915 Q(Examples:)72 -702.915 Q EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(define p \(open-output-string\)\))100.346 -94.503 Q(\(display '\(a b c\) p\))100.346 108.503 Q(\(get-output-string p\)) -100.346 122.503 Q 6(==> "\(a)298.346 122.503 R 6(bc)6 G(\)")370.346 122.503 Q -(\(get-output-string p\))100.346 136.503 Q 6(==> "")298.346 136.503 R -(\(define \(flat-size s\))100.346 166.006 Q -(\(let \(\(p \(open-output-string\)\)\))112.346 180.006 Q(\(display s p\)) -124.346 194.006 Q(\(string-length \(get-output-string p\)\)\)\))124.346 208.006 -Q/F2 11/Times-Bold@0 SF 2.75(27. Loading)72 245.006 R(\(load)72 275.006 Q/F3 11 -/Times-Italic@0 SF(\214le)4.583 E F2 338.603(\)p)C -.198(ro)462.244 275.006 S -(cedur).198 E(e)-.198 E(\(load)72 290.006 Q F3(\214le en)4.583 E(vir)-.44 E -(onment)-.495 E F2 281.799(\)p)C -.198(ro)462.244 290.006 S(cedur).198 E(e) --.198 E F0 .197(Loads a source \214le or one or more object \214les.)72 308.606 -R .197(If the \214le contains source code, the e)5.697 F .198(xpressions in) --.165 F 1.379(the \214le are read and e)72 323.606 R -.275(va)-.275 G 4.129 -(luated. If).275 F 4.129<618c>4.129 G 1.379 -(le contains object code, the contents of the \214le is link)246.208 323.606 R -(ed)-.11 E .021(together with the running interpreter and with additional libr\ -aries that are speci\214ed by the v)72 338.606 R(ariable)-.275 E F3(load-libr) -72 353.606 Q(aries)-.165 E F0(\(see belo)2.75 E 2.75(w\). Names)-.275 F -(of object \214les must ha)2.75 E .33 -.165(ve t)-.22 H(he suf).165 E(\214x `) --.275 E(`.o')-.814 E('.)-.814 E F3(load)5.5 E F0(returns)2.75 E F3(void)2.75 E -F0(.)A F3(\214le)72 372.206 Q F0 .158 -(must be either a string or a symbol or a list of strings or symbols.)2.908 F -.157(If it is a list, all elements of)5.658 F .208 -(the list must be the names of object \214les.)72 387.206 R .208 -(In this case, all object \214les are link)5.708 F .209(ed by a single run of) --.11 F(the link)72 402.206 Q(er)-.11 E(.)-.605 E 1.228(If an optional)72 -417.206 R F3(en)3.978 E(vir)-.44 E(onment)-.495 E F0 1.227 -(is speci\214ed, the contents of the \214le is e)3.978 F -.275(va)-.275 G 1.227 -(luated in this en).275 F(vironment)-.44 E(instead of the current en)72 432.206 -Q(vironment.)-.44 E 1.373 -(Loading of object \214les is not supported on some platforms.)72 450.806 R -1.374(On the platforms where it is sup-)6.874 F 2.675(ported, the feature)72 -465.806 R F3(elk:load-object)5.425 E F0 2.675(is pro)5.425 F 2.674 -(vided by the interpreter on startup \(see `)-.165 F(`Features')-.814 E(')-.814 -E(belo)72 480.806 Q(w\).)-.275 E(Example:)72 495.806 Q F1 -(\(fluid-let \(\(load-noisily? #t\)\))100.346 518.309 Q(\(load 'test.scm\)\)) -112.346 532.309 Q F2 345.628(load-path v)72 569.309 R(ariable)-.11 E F0 .004 -(This v)72 587.909 R .004(ariable is de\214ned in the global en)-.275 F 2.754 -(vironment. It)-.44 F .004(is bound to a list of directories in which \214les) -2.754 F .569(to be loaded are searched for)72 602.909 R 6.069(.E)-.605 G .569 -(ach element of the list \(a string or a symbol\) is used in turn as a)216.533 -602.909 R .228(pre\214x for the \214le name passed to)72 617.909 R F3(load) -2.979 E F0 .229(until opening succeeds.)2.979 F .229(Elements of)5.729 F F3 -(load-path)2.979 E F0 .229(that are not)2.979 F -(of type string or symbol are ignored.)72 632.909 Q .483(If the v)72 651.509 R -.483(alue of)-.275 F F3(load-path)3.233 E F0 .483 -(is not a list of at least one v)3.233 F .483 -(alid component, or if the name of the \214le to)-.275 F -(be loaded starts with `)72 666.509 Q(`/')-.814 E 2.75('o)-.814 G 2.75(rw) -189.821 666.509 S(ith `)204.176 666.509 Q(`~')-.814 E(', it is opened directly) --.814 E(.)-.715 E 2.231(The initial v)72 685.109 R 2.231(alue of)-.275 F F3 -(load-path)4.981 E F0 2.231(is a list of the three elements `)4.981 F(`.)-.814 -E 3.859 -.814('' \()-.77 H -.917(i. e.).814 F 2.231(the current directory\),) -4.981 F -.814(``)72 700.109 S($scheme_dir').814 E .351(', and `)-.814 F -(`$lib_dir')-.814 E .351 -('; $scheme_dir and $lib_dir are the directories into which the run-)-.814 F -5.783(time Scheme \214les and object \214les are installed \(typically `)72 -715.109 R(`/usr/elk/runtime/scm')-.814 E 8.534('a)-.814 G(nd)493 715.109 Q --.814(``)72 730.109 S(/usr/elk/runtime/obj').814 E -('; de\214ned in the installation')-.814 E 2.75(ss)-.605 G(ite \214le\).) -304.122 730.109 Q EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 330.954(load-noisily? v)72 87 R(ariable)-.11 -E F0 .796(This v)72 105.6 R .795(ariable is de\214ned in the global en)-.275 F -3.545(vironment. When)-.44 F 3.545<618c>3.545 G .795(le is loaded and the v) -349.319 105.6 R .795(alue of)-.275 F/F2 11/Times-Italic@0 SF(load-)3.545 E -(noisily?)72 120.6 Q F0 1.532(is true, the result of the e)4.282 F -.275(va) --.275 G 1.532(luation of each e).275 F 1.532(xpression is printed.)-.165 F -1.533(The initial v)7.033 F 1.533(alue of)-.275 F F2(load-noisily?)72 135.6 Q -F0(is #f.)2.75 E F1 327.302(load-libraries v)72 165.6 R(ariable)-.11 E F0 .319 -(This v)72 184.2 R .318(ariable is de\214ned in the global en)-.275 F 3.068 -(vironment. If)-.44 F F2(load-libr)3.068 E(aries)-.165 E F0 .318 -(is bound to a string, its v)3.068 F(alue)-.275 E .884 -(speci\214es additional load libraries to be link)72 199.2 R .884 -(ed together with an object \214le that is loaded into the)-.11 F -(interpreter \(see)72 214.2 Q F2(load)2.75 E F0(abo)2.75 E -.165(ve)-.165 G -2.75(\). Its).165 F(initial v)2.75 E(alue is `)-.275 E(`\255lc')-.814 E('.) --.814 E F1(\(autoload)72 244.2 Q F2(symbol \214le)4.583 E F1 283.911(\)p)C --.198(ro)462.244 244.2 S(cedur).198 E(e)-.198 E F0(Binds)72 262.8 Q F2(symbol) -4.436 E F0 1.686(in the current en)4.436 F 1.686(vironment \(as with)-.44 F F2 -(de\214ne)4.436 E F0 4.436(\). When)B F2(symbol)4.436 E F0 1.686(is e)4.436 F --.275(va)-.275 G 1.686(luated the \214rst).275 F(time,)72 277.8 Q F2(\214le) -3.159 E F0 .409(is loaded.)3.159 F .41 -(The de\214nitions loaded from the \214le must pro)5.909 F .41 -(vide a de\214nition for)-.165 F F2(symbol)3.16 E F0(dif-)3.16 E(ferent from)72 -292.8 Q F2(autoload)2.75 E F0 2.75(,o)C(therwise an error is signaled.)174.652 -292.8 Q F2(\214le)72 311.4 Q F0 .564(must be either a string or a symbol or a \ -list of strings or symbols, in which case all elements)3.315 F -(of the list must be the names of object \214les \(see)72 326.4 Q F2(load)2.75 -E F0(abo)2.75 E -.165(ve)-.165 G(\).).165 E F1 313.244(autoload-notify? v)72 -356.4 R(ariable)-.11 E F0 .195(This v)72 375 R .195 -(ariable is de\214ned in the global en)-.275 F 2.945(vironment. If)-.44 F .195 -(the v)2.945 F .195(alue of)-.275 F F2(autoload-notify?)2.945 E F0 .195 -(is true, a mes-)2.945 F .114(sage is printed whene)72 390 R -.165(ve)-.275 G -2.864(re).165 G -.275(va)188.429 390 S .114 -(luation of a symbol triggers autoloading of a \214le.).275 F F2 -(autoload-notify?)5.613 E F0(is)2.863 E(bound to #t initially)72 405 Q(.)-.715 -E F1 2.75(28. Macr)72 435 R(os)-.198 E(\(macr)72 465 Q(o)-.198 E F2 -(formals body)4.583 E F1 302.05(\)s)C(yntax)477.721 465 Q F0 .867 -(This special form creates a macro.)72 483.6 R .867 -(The syntax is identical to the syntax of)6.367 F F2(lambda)3.618 E F0 -.165 -(ex)3.618 G(pressions.).165 E 1.223(When a macro is called, the actual ar)72 -498.6 R 1.223(guments are bound to the formal ar)-.198 F 1.223(guments of the) --.198 F F2(macr)3.972 E(o)-.495 E F0 -.165(ex)72 513.6 S(pression).165 E F2 -1.095(in the curr)3.845 F 1.095(ent en)-.407 F(vir)-.44 E(onment)-.495 E F0 -(\(the)3.845 E 3.845(ya)-.165 G(re)277.307 513.6 Q F2(not)3.845 E F0 -.275(eva) -3.845 G 1.095(luated\), then the).275 F F2(body)3.845 E F0 1.095(is e)3.845 F --.275(va)-.275 G 3.846(luated. The).275 F .382(result of this e)72 528.6 R --.275(va)-.275 G .382(luation is considered the).275 F F2(macr)3.132 E 3.132 -(oe)-.495 G(xpansion)292.538 528.6 Q F0 .382(and is e)3.132 F -.275(va)-.275 G -.382(luated in place of the macro).275 F(call.)72 543.6 Q F1(\(de\214ne-macr)72 -573.6 Q(o)-.198 E F2(\(variable formals\) body)4.583 E F1 223.532(\)s)C(yntax) -477.721 573.6 Q(\(de\214ne-macr)72 588.6 Q(o)-.198 E F2 -(\(variable . formal\) body)4.583 E F1 222.311(\)s)C(yntax)477.721 588.6 Q F0 -(Lik)72 607.2 Q(e)-.11 E F2(de\214ne)2.75 E F0 2.75(,e)C(xcept that)131.29 -607.2 Q F2(macr)2.75 E(o)-.495 E F0(is used instead of)2.75 E F2(lambda)2.75 E -F0(.)A(Examples:)72 622.2 Q/F3 10/Courier@0 SF -(\(define-macro \(++ x\) `\(set! ,x \(1+ ,x\)\)\))100.346 644.703 Q -(\(define foo 5\))100.346 658.703 Q 60(foo ==>)100.346 672.703 R(5)214.346 -672.703 Q(\(++ foo\))100.346 686.703 Q 60(foo ==>)100.346 700.703 R(6)214.346 -700.703 Q EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(define-macro \(while test . body\))100.346 -94.503 Q(`\(let loop \(\))112.346 108.503 Q -(\(cond \(,test ,@body \(loop\)\)\)\)\))130.346 122.503 Q/F2 11/Times-Bold@0 SF -(\(macr)72 159.503 Q(o?)-.198 E/F3 11/Times-Italic@0 SF(obj)4.583 E F2 322.928 -(\)p)C -.198(ro)462.244 159.503 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 -178.103 Q F3(obj)2.75 E F0(is a macro, #f otherwise.)2.75 E F2(\(macr)72 -208.103 Q(o-body)-.198 E F3(macr)4.583 E(o)-.495 E F2 287.981(\)p)C -.198(ro) -462.244 208.103 S(cedur).198 E(e)-.198 E F0 1.607(Returns a cop)72 226.703 R -4.357(yo)-.11 G 4.357(ft)150.95 226.703 S(he)162.028 226.703 Q F3(macr)4.357 E -(o)-.495 E F0 -.165(ex)4.357 G 1.607(pression which has been e).165 F -.275(va) --.275 G 1.608(luated to created the gi).275 F -.165(ve)-.275 G 4.358(nm).165 G -(acro)485.069 226.703 Q(\(similar to)72 241.703 Q F3(pr)2.75 E(ocedur)-.495 E -(e-lambda)-.407 E F0(\).)A(Examples:)72 256.703 Q F1 -(\(define-macro \(++ x\) `\(set! ,x \(1+ ,x\)\)\))100.346 279.206 Q -(\(macro-body ++\))100.346 307.206 Q 6(==> \(macro)112.346 321.206 R -(\(x\) \(quasiquote \(set! \(unquote x\) \(1+ \(unquote x\)\)\)\)\))6 E F2 -(\(macr)72 358.206 Q(o-expand)-.198 E F3(list)4.583 E F2 291.138(\)p)C -.198 -(ro)462.244 358.206 S(cedur).198 E(e)-.198 E F0(If the e)72 376.806 Q -(xpression)-.165 E F3(list)2.75 E F0(is a macro call, the macro call is e)2.75 -E(xpanded.)-.165 E(Examples:)72 391.806 Q F1 -(\(define-macro \(++ x\) `\(set! ,x \(1+ ,x\)\)\))100.346 414.309 Q -(\(macro-expand '\(++ foo\)\))100.346 442.309 Q 6(==> \(set!)298.346 442.309 R -(foo \(1+ foo\)\))6 E F0 .119(The follo)72 479.309 R .119 -(wing function can be used to e)-.275 F(xpand)-.165 E F3(all)2.869 E F0 .119 -(macro calls in an e)2.869 F .118(xpression, i.)-.165 F .118 -(e. not only at the)1.833 F(outermost le)72 494.309 Q -.165(ve)-.275 G(l:).165 -E F1(\(define \(expand form\))100.346 516.812 Q -(\(if \(or \(not \(pair? form\)\) \(null? form\)\))112.346 530.812 Q(form) -136.346 544.812 Q(\(let \(\(head \(expand \(car form\)\)\))136.346 558.812 Q -(\(args \(expand \(cdr form\)\)\))172.346 572.812 Q(\(result\)\))172.346 -586.812 Q(\(if \(and \(symbol? head\) \(bound? head\)\))148.346 600.812 Q -(\(begin)172.346 614.812 Q(\(set! result \(macro-expand \(cons head args\)\)\)) -184.346 628.812 Q(\(if \(not \(equal? result form\)\))184.346 642.812 Q -(\(expand result\))208.346 656.812 Q(result\)\))208.346 670.812 Q -(\(cons head args\)\)\)\)\))184.346 684.812 Q EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(29. Err)72 87 R -(or and Exception Handling)-.198 E(err)72 117 Q(or)-.198 E 326.092(-handler v) --.407 F(ariable)-.11 E F0 .6(This v)72 135.6 R .6 -(ariable is de\214ned in the global en)-.275 F 3.35(vironment. When)-.44 F .601 -(an error occurs or when the procedure)3.35 F/F2 11/Times-Italic@0 SF(err)72 -150.6 Q(or)-.495 E F0 .164(is in)2.914 F -.22(vo)-.44 G -.11(ke).22 G 2.914(da) -.11 G .164(nd the v)150.361 150.6 R(ariable)-.275 E F2(err)2.913 E(or)-.495 E -(-handler)-.22 E F0 .163(is bound to a compound procedure \(the)2.913 F F2(err) -2.913 E .163(or han-)-.495 F(dler)72 165.6 Q F0 .299(\), the interpreter in)B --.22(vo)-.44 G -.11(ke).22 G 3.049(st).11 G .299(his procedure.)204.096 165.6 R -.299(The error handler is called with an object \(either the)5.799 F .748 -(\214rst ar)72 180.6 R .747(gument that has been passed to)-.198 F F2(err)3.497 -E(or)-.495 E F0 .747(or a symbol identifying the primiti)3.497 F 1.077 -.165 -(ve p)-.275 H .747(rocedure that).165 F .256(has caused the error\), and an er\ -ror message consisting of a format string and a list of objects suit-)72 195.6 -R(able to be passed to)72 210.6 Q F2(format)2.75 E F0(.)A -.88(Ty)72 229.2 S -(pically).88 E 3.2(,au)-.715 G(ser)132.102 229.2 Q .449(-de\214ned error handl\ -er prints the error message and then calls a control point that)-.22 F 1.09 -(has been created outside the error handler)72 244.2 R 6.59(.I)-.605 G 3.84(ft) -274.209 244.2 S 1.09(he error handler terminates normally or if)284.77 244.2 R -F2(err)3.841 E(or)-.495 E(-)-.22 E(handler)72 259.2 Q F0 .056 -(is not bound to a procedure, the error message is printed in a def)2.806 F -.056(ault w)-.11 F(ay)-.11 E 2.806(,a)-.715 G .056(nd then a)439.779 259.2 R F2 --.407(re)2.806 G(set).407 E F0(is performed.)72 274.2 Q F1 307.139 -(interrupt-handler v)72 304.2 R(ariable)-.11 E F0 .15(This v)72 322.8 R .15 -(ariable is de\214ned in the global en)-.275 F 2.9(vironment. When)-.44 F .15 -(an interrupt occurs \(typically as a result)2.9 F .038 -(of typing the interrupt character on the k)72 337.8 R -.165(ey)-.11 G .038 -(board\), and the v).165 F(ariable)-.275 E F2(interrupt-handler)2.788 E F0 .038 -(is bound to a)2.788 F 2.741(procedure \(the)72 352.8 R F2 2.741 -(interrupt handler)5.491 F F0 2.742(\), this procedure is called with no ar)B -5.492(guments. If)-.198 F F2(interrupt-)5.492 E(handler)72 367.8 Q F0 .199 -(is not bound to a procedure or if the procedure terminates normally)2.949 F -2.948(,am)-.715 G .198(essage is printed,)428.144 367.8 R(and a)72 382.8 Q F2 --.407(re)2.75 G(set).407 E F0(is performed.)2.75 E(Examples:)72 397.8 Q/F3 10 -/Courier@0 SF(\(set! interrupt-handler)100.346 420.303 Q(\(lambda \(\))112.346 -434.303 Q(\(newline\))124.346 448.303 Q(\(backtrace\))124.346 462.303 Q -(\(reset\)\)\))124.346 476.303 Q F1 -.917(\(disable-interrupts \))72 513.303 R -(pr)456.128 513.303 Q(ocedur)-.198 E(e)-.198 E -.917(\(enable-interrupts \))72 -528.303 R(pr)456.128 528.303 Q(ocedur)-.198 E(e)-.198 E F2(disable-interrupts) -72 546.903 Q F0 .521(causes signals to be block)3.271 F .522(ed from deli)-.11 -F -.165(ve)-.275 G .522(ry to the interpreter;).165 F F2(enable-interrupts) -3.272 E F0 .303(enables deli)72 561.903 R -.165(ve)-.275 G .303(ry of signals.) -.165 F .303(These functions control deli)5.803 F -.165(ve)-.275 G .303(ry of k) -.165 F -.165(ey)-.11 G .302(board-generated interrupt sig-).165 F 1.126 -(nals \(see)72 576.903 R F2(interrupt-handler)3.876 E F0(abo)3.876 E -.165(ve) --.165 G 3.876(\)a).165 G 3.876(sw)234.42 576.903 S 1.127 -(ell as additional signals used by e)250.517 576.903 R 1.127 -(xtensions \(such as the)-.165 F .597(alarm signal\).)72 591.903 R .597 -(The interpreter automatically blocks deli)6.097 F -.165(ve)-.275 G .596 -(ry of signals during critical operations,).165 F(such as g)72 606.903 Q -(arbage collection.)-.055 E -(Signals are enabled on startup after initialization has completed.)5.5 E 3.99 -(Ac)72 625.503 S 1.24(all to)88.816 625.503 R F2(enable-interrupts)3.99 E F0 -1.24(immediately deli)3.99 F -.165(ve)-.275 G 1.24(rs signals that ha).165 F -1.57 -.165(ve b)-.22 H 1.24(een generated while signals).165 F 1.577 -(were disabled, b)72 640.503 R 1.577(ut block)-.22 F 1.577 -(ed signals are not queued.)-.11 F 1.577 -(On platforms that support neither POSIX-)7.077 F .94 -(style nor BSD-style reliable signals,)72 655.503 R F2(disable-interrupts)3.69 -E F0 .94(causes signals to be ignored \(as opposed)3.69 F -(to blocking them until the ne)72 670.503 Q(xt call to)-.165 E F2 -(enable-interrupts)2.75 E F0(\).)A .966(Calls to)72 689.103 R F2 -(disable-interrupts)3.716 E F0(and)3.716 E F2(enable-interrupts)3.716 E F0 .966 -(can be nested.)3.716 F .966(The functions maintain a count)6.466 F 1.045 -(indicating the number of calls to)72 704.103 R F2(enable-interrupts)3.795 E F0 -1.046(that it tak)3.795 F 1.046(es to return from a nested)-.11 F F2(disable-) -3.796 E(interrupts)72 719.103 Q F0(in)3.125 E -.22(vo)-.44 G .374 -(cation to the topmost le).22 F -.165(ve)-.275 G 3.124(l\().165 G -.917(i. e.) -261.982 719.103 R .374(to actually enable deli)3.124 F -.165(ve)-.275 G .374 -(ry of signals ag).165 F 3.124(ain\). Both)-.055 F -(functions return this nesting le)72 734.103 Q -.165(ve)-.275 G 2.75(la).165 G -2.75(sa)226.462 734.103 S 2.75(ni)238.375 734.103 S(nte)249.683 734.103 Q(ger) --.165 E(.)-.605 E EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL .613(Example: the follo)72 87 R .613(wing loop ensures that deli) --.275 F -.165(ve)-.275 G .614(ry of signals is enabled, re).165 F -.055(ga) --.165 G .614(rdless of the current).055 F(nesting depth of)72 102 Q/F1 11 -/Times-Italic@0 SF(disable-interrupts)2.75 E F0(calls:)2.75 E/F2 10/Courier@0 -SF(\(let loop \(\(intr-level \(enable-interrupts\)\)\))100.346 124.503 Q -(\(if \(positive? intr-level\))130.346 138.503 Q -(\(loop \(enable-interrupts\)\)\)\))154.346 152.503 Q F1(dynamic-wind)72 -192.103 Q F0 .001(can be used to write a macro)2.751 F F1 -(with-interrupts-disabled)2.751 E F0(to protect a critical section of)2.75 E -(code from being interrupted by a signal:)72 207.103 Q F2 -(\(define-macro \(with-interrupts-disabled . body\))100.346 229.606 Q -(`\(dynamic-wind)112.346 243.606 Q(\(lambda \(\) \(disable-interrupts\)\)) -130.346 257.606 Q(\(lambda \(\) ,@body\))130.346 271.606 Q -(\(lambda \(\) \(enable-interrupts\)\)\)\))130.346 285.606 Q/F3 11/Times-Bold@0 -SF(\(err)72 322.606 Q(or)-.198 E F1(obj string obj ...)4.583 E F3 277.091(\)p)C --.198(ro)462.244 322.606 S(cedur).198 E(e)-.198 E F0(Signals an error)72 -341.206 Q 5.5(.T)-.605 G(he ar)156.018 341.206 Q(guments of)-.198 E F1(err)2.75 -E(or)-.495 E F0(are passed to the)2.75 E F1(err)2.75 E(or)-.495 E(-handler)-.22 -E F0(.)A(Examples:)72 356.206 Q F2(\(define \(foo sym\))100.346 378.709 Q -(\(if \(not \(symbol? sym\)\))112.346 392.709 Q -(\(error 'foo "argument not a symbol: ~s" sym\)\))136.346 406.709 Q(...)112.346 -420.709 Q F3(top-le)72 457.709 Q -.11(ve)-.165 G(l-contr).11 E 285.623 -(ol-point v)-.198 F(ariable)-.11 E(\(r)72 472.709 Q -.917(eset \))-.198 F(pr) -456.128 472.709 Q(ocedur)-.198 E(e)-.198 E F1 -.407(re)72 491.309 S(set).407 E -F0 .576(performs a reset by calling the control point to which the v)3.326 F -(ariable)-.275 E F1(top-le)3.327 E(vel-contr)-.165 E(ol-point)-.495 E F0(is) -3.327 E .725(bound in the global en)72 506.309 R 3.475(vironment. The)-.44 F -.725(control point is called with the ar)3.475 F .725(gument #t.)-.198 F(If) -6.225 E F1(top-le)3.475 E(vel-)-.165 E(contr)72 521.309 Q(ol-point)-.495 E F0 -.714(is not bound to a control point, or does not e)3.464 F .715 -(xist at all, an error message is printed)-.165 F -(and the interpreter is terminated.)72 536.309 Q(Examples:)72 551.309 Q F2 -(\(if \(call-with-current-continuation)100.346 573.812 Q(\(lambda \(x\))136.346 -587.812 Q(\(fluid-let \(\(top-level-control-point x\)\))148.346 601.812 Q/F4 10 -/Times-Italic@0 SF 2.5(do something)160.346 615.812 R F2(#f\)\)\))160.346 -629.812 Q(\(print "Got a reset!"\)\))124.346 643.812 Q F3 -.917(\(exit \))72 -680.812 R(pr)456.128 680.812 Q(ocedur)-.198 E(e)-.198 E(\(exit)72 695.812 Q F1 -(n)4.583 E F3 349.614(\)p)C -.198(ro)462.244 695.812 S(cedur).198 E(e)-.198 E -F0 -.77(Te)72 714.412 S(rminates the interpreter).77 E 5.5(.T)-.605 G -(he optional ar)199.842 714.412 Q(gument)-.198 E F1(n)2.75 E F0 -(indicates the e)2.75 E(xit code; it def)-.165 E(aults to zero.)-.11 E EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(7-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(30. Garbage)72 87 R(Collection)2.75 E F0 -.143(The interpreter supports tw)72 105.6 R 2.893(og)-.11 G .143 -(arbage collectors: the stop-and-cop)205.606 105.6 R 2.893(yg)-.11 G .142 -(arbage collector that w)374.027 105.6 R .142(as part)-.11 F(of older v)72 -120.6 Q(ersions of Elk, and a generational, incremental g)-.165 E -(arbage collector)-.055 E(.)-.605 E .834(If generational g)72 139.2 R .835 -(arbage collection has been selected, Scheme objects survi)-.055 F .835 -(ving tw)-.275 F 3.585(og)-.11 G .835(arbage col-)453.995 139.2 R .156 -(lections will not be touched ag)72 154.2 R .156 -(ain until there is only a certain amount of memory left on the heap,)-.055 F -1.359(triggering a full g)72 169.2 R 1.359(arbage collection.)-.055 F -.165(Pa) -6.859 G 1.359(rticularly in applications with lar).165 F 1.36 -(ge amounts of Scheme)-.198 F .041(code or constant data, partial g)72 184.2 R -.041(arbage collections run much f)-.055 F .04(aster than full g)-.11 F .04 -(arbage collections.)-.055 F(In)5.54 E .846(contrast to the stop-and-cop)72 -199.2 R 3.597(yg)-.11 G .847(arbage collector)211.477 199.2 R 3.597(,t)-.44 G -.847(he generational g)291.843 199.2 R .847(arbage collector is not limited) --.055 F .621(to a pre-allocated amount of heap; it will e)72 214.2 R .621 -(xpand the heap in steps of 1 MB if the free space left)-.165 F(after a full g) -72 229.2 Q(arbage collection f)-.055 E(alls belo)-.11 E 2.75(wac)-.275 G -(ertain amount.)267.668 229.2 Q 1.244(Another feature of the generational g)72 -247.8 R 1.244(arbage collector \(a)-.055 F -.275(va)-.22 G 1.245 -(ilable on some platforms only\) is the).275 F .738 -(ability to do incremental g)72 262.8 R .738(arbage collection.)-.055 F .738 -(Starting a g)6.238 F .737(arbage collection does not interrupt the)-.055 F .55 -(application until the g)72 277.8 R .55(arbage collector is done.)-.055 F .551 -(Instead, the collector returns control to the appli-)6.051 F .088 -(cation almost immediately)72 292.8 R 5.588(.T)-.715 G 2.838(os)202.361 292.8 S -.088(ynchronize between the g)214.978 292.8 R .087 -(arbage collection and the running appli-)-.055 F(cation, the code mak)72 307.8 -Q(es use of the)-.11 E/F2 11/Times-Italic@0 SF(mpr)2.75 E(otect)-.495 E F0 -(system call.)2.75 E F1(\(garbage-collect-status)72 337.8 Q F2(str)4.583 E(ate) --.165 E(gy mode)-.44 E F1 208.165(\)p)C -.198(ro)462.244 337.8 S(cedur).198 E -(e)-.198 E F2(garba)72 356.4 Q -.11(ge)-.11 G(-collect-status).11 E F0 .122 -(is used to select a g)2.872 F .123(arbage collector and an optional, g)-.055 F -.123(arbage collector spe-)-.055 F -(ci\214c mode of operation, and to query the currently enabled g)72 371.4 Q -(arbage collector and mode.)-.055 E F2(str)72 390 Q(ate)-.165 E(gy)-.44 E F0 -.246(is a symbol identifying a g)2.996 F .246(arbage collector)-.055 F 5.746 -(.P)-.605 G .246(ermitted v)312.844 390 R .246(alues are)-.275 F F2 -(stop-and-copy)2.996 E F0(and)2.996 E F2 -.11(ge)2.996 G(n-).11 E(er)72 405 Q -(ational)-.165 E F0 1.051(\(future v)3.801 F 1.051 -(ersion of Elk may support additional g)-.165 F 1.051(arbage collectors\).) --.055 F 1.052(The optional)6.551 F F2(mode)3.802 E F0(ar)72 420 Q .644 -(gument may be speci\214ed if the)-.198 F F2(str)3.393 E(ate)-.165 E(gy)-.44 E -F0(ar)3.393 E .643(gument is equal to)-.198 F F2 -.11(ge)3.393 G(ner).11 E -(ational)-.165 E F0 6.143(.C)C(urrently)427.353 420 Q 3.393(,o)-.715 G .643 -(nly the)473.107 420 R(symbol)72 435 Q F2(incr)2.803 E(emental)-.407 E F0 .053 -(may be used for the)2.803 F F2(mode)2.803 E F0(ar)2.803 E .053 -(gument to enable incremental g)-.198 F .054(arbage collection.)-.055 F .603 -(The current v)72 453.6 R .602(ersion of the interpreter does not support dyna\ -mic switching between the stop-and-)-.165 F(cop)72 468.6 Q 3.231(ya)-.11 G .482 -(nd the generational, incremental g)101.389 468.6 R .482 -(arbage collector at runtime.)-.055 F .482(Instead, a g)5.982 F .482 -(arbage collector)-.055 F .056 -(has to be selected at compile time \(by setting the)72 483.6 R F2 -.11(ge) -2.805 G(ner).11 E(ational_gc)-.165 E F0 -.275(va)2.805 G .055 -(riable in the installation').275 F 2.805(ss)-.605 G(ite)493 483.6 Q 1.604 -(\214le to either)72 498.6 R F2(yes)4.354 E F0(or)4.354 E F2(no)4.354 E F0 -4.354(\). Thus,)B F2(garba)4.354 E -.11(ge)-.11 G(-collect-status).11 E F0 -1.605(can currently only be used to query the)4.354 F -.055(ga)72 513.6 S 1.874 -(rbage collector and, if the generational, incremental g).055 F 1.873 -(arbage collector has been selected, to)-.055 F .509 -(enable and disable incremental g)72 528.6 R .509 -(arbage collection \(this restriction may be remo)-.055 F -.165(ve)-.165 G -3.259(di).165 G 3.26(nf)448.387 528.6 S .51(uture v)460.81 528.6 R(er)-.165 E -(-)-.22 E(sions\).)72 543.6 Q F2(garba)72 562.2 Q -.11(ge)-.11 G -(-collect-status).11 E F0 .332 -(returns a list of symbols indicating the currently enabled g)3.082 F .331 -(arbage collector)-.055 F 1.111(and mode.)72 577.2 R 1.112 -(This list resembles the ar)6.612 F 1.112(guments to)-.198 F F2(garba)3.862 E --.11(ge)-.11 G(-collect-status).11 E F0 3.862(,i)C 1.833(.e)401.788 577.2 S -3.862(.t)-1.833 G 1.112(he \214rst element of)420.925 577.2 R 2.205 -(the list one of the symbols)72 592.2 R F2(stop-and-copy)4.955 E F0(and)4.955 E -F2 -.11(ge)4.955 G(ner).11 E(ational)-.165 E F0 4.955(,a)C 2.205 -(nd an optional, second symbol)361.048 592.2 R(\()72 607.2 Q F2(incr)A(emental) --.407 E F0 2.75(\)m)C(ay be present if the \214rst symbol is equal to)142.774 -607.2 Q F2 -.11(ge)2.75 G(ner).11 E(ational)-.165 E F0(.)A(If)72 625.8 Q F2 -(garba)4.727 E -.11(ge)-.11 G(-collect-status).11 E F0 1.977(is in)4.727 F -.22 -(vo)-.44 G -.11(ke).22 G 4.727(dw).11 G 1.977(ith no ar)246.954 625.8 R 1.977 -(guments, or if the desired g)-.198 F 1.978(arbage collector or)-.055 F .318 -(mode of operation cannot be enabled \(either because selection of a strate)72 -640.8 R .318(gy at runtime is not sup-)-.165 F .473 -(ported, of because the mode of operation cannot be supported\), the primiti)72 -655.8 R .804 -.165(ve j)-.275 H .474(ust returns the cur).165 F(-)-.22 E -(rently acti)72 670.8 Q .33 -.165(ve s)-.275 H(trate).165 E(gy and mode.)-.165 -E EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(8-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF -.917(\(collect \))72 87 R(pr)456.128 87 Q -(ocedur)-.198 E(e)-.198 E F0 1.53(Causes a g)72 105.6 R 1.53 -(arbage collection.)-.055 F(Ev)7.03 E 1.53(en if incremental g)-.165 F 1.529 -(arbage collection has been enabled,)-.055 F/F2 11/Times-Italic@0 SF(collect) -4.279 E F0(al)72 120.6 Q -.11(wa)-.11 G(ys performs a full g).11 E -(arbage collection run.)-.055 E F1(\(collect-incr)72 150.6 Q -.917(emental \)) --.198 F(pr)456.128 150.6 Q(ocedur)-.198 E(e)-.198 E F0 .422(This primiti)72 -169.2 R .752 -.165(ve i)-.275 H 3.172(so).165 G .422 -(nly present if the generational g)153.808 169.2 R .422 -(arbage collector has been selected.)-.055 F .423(An error is)5.923 F 3.253 -(signaled if)72 184.2 R F2(collect-incr)6.003 E(emental)-.407 E F0 3.253(is in) -6.003 F -.22(vo)-.44 G -.11(ke).22 G 6.003(da).11 G 3.253(nd incremental g) -277.421 184.2 R 3.252(arbage collection has not been)-.055 F(enabled, i.)72 -199.2 Q(e. if a call to)1.833 E F2(garba)2.75 E -.11(ge)-.11 G(-collect-status) -.11 E F0 -.11(wo)2.75 G(uld return the list).11 E F2(\(g)2.75 E(ener)-.11 E -(ational\))-.165 E F0(.)A F2(collect-incr)72 217.8 Q(emental)-.407 E F0 .915 -(starts an incremental g)3.665 F .916 -(arbage collection and then returns immediately)-.055 F 6.416(.I)-.715 G 3.666 -(fa)486.287 217.8 S(n)498.5 217.8 Q .693(incremental g)72 232.8 R .693 -(arbage collection is already in progress,)-.055 F F2(collect-incr)3.443 E -(emental)-.407 E F0 .692(triggers one incremen-)3.442 F .201(tal g)72 247.8 R -.201(arbage collection step, i.)-.055 F .201(e. scans a fe)1.833 F 2.951(wm) --.275 G .201(ore pages of memory)273.98 247.8 R 2.951(,a)-.715 G .201 -(nd then returns immediately)377.623 247.8 R(.)-.715 E .167(The primiti)72 -262.8 R .497 -.165(ve r)-.275 H .167(eturns true if the incremental g).165 F -.166(arbage collection has been \214nished, f)-.055 F .166(alse otherwise.)-.11 -F 1.301(If incremental g)72 281.4 R 1.302 -(arbage collection is disabled by a call to)-.055 F F2(\(garba)4.052 E -.11(ge) --.11 G 1.302(-collect-status 'g).11 F(ener)-.11 E(ational\))-.165 E F0 .069 -(while an incremental g)72 296.4 R .068 -(arbage collection run is in progress, the ne)-.055 F .068(xt call to)-.165 F -F2(collect-incr)2.818 E(emental)-.407 E F0(\214n-)2.818 E 1.416 -(ishes the incremental g)72 311.4 R 1.416 -(arbage collection run and returns #t; further calls to)-.055 F F2 -(collect-incr)4.166 E(emental)-.407 E F0(will signal an error)72 326.4 Q(.) --.605 E F1 282.719(garbage-collect-notify? v)72 356.4 R(ariable)-.11 E F0 .327 -(This v)72 375 R .327(ariable is de\214ned in the global en)-.275 F 3.077 -(vironment. If)-.44 F .326(the v)3.077 F .326(alue of)-.275 F F2(garba)3.076 E --.11(ge)-.11 G(-collect-notify?).11 E F0 .326(is true,)3.076 F 3.974(am)72 390 -S 1.225(essage indicating the amount of free memory on the heap and the size o\ -f the heap are dis-)89.416 390 R .284(played whene)72 405 R -.165(ve)-.275 G -3.034(ras).165 G(top-and-cop)161.908 405 Q 3.034(yg)-.11 G .284 -(arbage collection is performed.)228.929 405 R .283 -(If the generational, incremen-)5.784 F 1.469(tal g)72 420 R 1.469(arbage coll\ -ector has been enabled, the amount of reclaimed memory is displayed on each) --.055 F -.055(ga)72 435 S .154 -(rbage collection run, and a message is displayed each time the heap is e).055 -F .153(xpanded by the g)-.165 F(arbage)-.055 E(collector)72 450 Q(.)-.605 E F2 -(garba)5.5 E -.11(ge)-.11 G(-collect-notify?).11 E F0(is bound to #t initially) -2.75 E(.)-.715 E F1 2.75(31. F)72 480 R(eatur)-.275 E(es)-.198 E(\(featur)72 -510 Q(e?)-.198 E F2(symbol)4.583 E F1 302.16(\)p)C -.198(ro)462.244 510 S -(cedur).198 E(e)-.198 E F0 .221(Returns #t if)72 528.6 R F2(symbol)2.972 E F0 -.222(is a feature, i.)2.972 F(e.)1.833 E F2(pr)2.972 E -.11(ov)-.495 G(ide).11 -E F0 .222(has been called to indicate that the feature)2.972 F F2(symbol)2.972 -E F0(is)2.972 E(present; #f otherwise.)72 543.6 Q F1(\(pr)72 573.6 Q -.11(ov) --.198 G(ide).11 E F2(symbol)4.583 E F1 305.306(\)p)C -.198(ro)462.244 573.6 S -(cedur).198 E(e)-.198 E F0(Indicates that the feature)72 592.2 Q F2(symbol)2.75 -E F0(is present.)2.75 E(Returns)5.5 E F2(void)2.75 E F0(.)A F1(\(r)72 622.2 Q -(equir)-.198 E(e)-.198 E F2(symbol)4.583 E F1 306.626(\)p)C -.198(ro)462.244 -622.2 S(cedur).198 E(e)-.198 E(\(r)72 637.2 Q(equir)-.198 E(e)-.198 E F2 -(symbol \214le)4.583 E F1 290.434(\)p)C -.198(ro)462.244 637.2 S(cedur).198 E -(e)-.198 E(\(r)72 652.2 Q(equir)-.198 E(e)-.198 E F2(symbol \214le en)4.583 E -(vir)-.44 E(onment)-.495 E F1 233.63(\)p)C -.198(ro)462.244 652.2 S(cedur).198 -E(e)-.198 E F0 .27(If the feature)72 670.8 R F2(symbol)3.02 E F0 .269 -(is not present \(i.)3.02 F 3.019(e. \(feature?)1.833 F F2(symbol)3.019 E F0 -3.019(\)e)C -.275(va)338.03 670.8 S .269(luates to #f\),).275 F F2(\214le)3.019 -E F0 .269(is loaded.)3.019 F 3.019(Am)5.769 G(es-)491.174 670.8 Q 1.179 -(sage is displayed prior to loading the \214le if the v)72 685.8 R 1.179 -(alue of the global v)-.275 F(ariable)-.275 E F2(autoload-notify?)3.929 E F0 -(is)3.929 E 2.75(true. If)72 700.8 R(the feature is still not present after th\ -e \214le has been loaded, an error is signaled.)2.75 E EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(9-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL .609(If the)72 87 R/F1 11/Times-Italic@0 SF(\214le)3.359 E F0(ar) -3.359 E .609(gument is omitted, it def)-.198 F .609(aults to)-.11 F F1(symbol) -3.359 E F0 3.359(;i)C(f)311.521 87 Q F1(symbol)3.358 E F0 .608 -(does not end in a suf)3.358 F .608(\214x \(i.)-.275 F .608(e. does)1.833 F -(not contain a dot character\), the suf)72 102 Q<8c78>-.275 E F1(.scm)2.75 E F0 -(is appended to obtain a \214le name.)2.75 E .481(If an)72 120.6 R F1(en)3.231 -E(vir)-.44 E(onment)-.495 E F0(ar)3.231 E .482 -(gument is supplied, the \214le is loaded into gi)-.198 F -.165(ve)-.275 G -3.232(ne).165 G -.44(nv)381.422 120.6 S 3.232(ironment. If).44 F(the)3.232 E F1 -(en)3.232 E(vir)-.44 E(on-)-.495 E(ment)72 135.6 Q F0(ar)2.75 E -(gument is omitted, it def)-.198 E(aults to the current en)-.11 E(vironment.) --.44 E F1(\214le)72 154.2 Q F0 .564(must be either a string or a symbol or a l\ -ist of strings or symbols, in which case all elements)3.315 F -(of the list must be the names of object \214les \(see)72 169.2 Q F1(load)2.75 -E F0(abo)2.75 E -.165(ve)-.165 G(\).).165 E/F2 11/Times-Bold@0 SF(\(featur)72 -199.2 Q -.917(es \))-.198 F(pr)456.128 199.2 Q(ocedur)-.198 E(e)-.198 E F0 -(Returns the currently pro)72 217.8 Q(vided features a list of symbols.)-.165 E -F2 2.75(32. Miscellaneous)72 247.8 R(\(dump)72 277.8 Q F1(\214le)4.583 E F2 -331.266(\)p)C -.198(ro)462.244 277.8 S(cedur).198 E(e)-.198 E F0 .75 -(Writes a snapshot of the running interpreter to)72 296.4 R F1(\214le)3.501 E -F0 .751(and returns #f.)3.501 F(When)6.251 E F1(\214le)3.501 E F0 .751(is e) -3.501 F -.165(xe)-.165 G .751(cuted, e).165 F -.165(xe)-.165 G(cu-).165 E 1.166 -(tion of the interpreter resumes such that the call to)72 311.4 R F1(dump)3.916 -E F0 1.166(returns #t \(i.e.,)3.916 F F1(dump)3.915 E F0 1.165 -(actually returns)3.915 F(twice\).)72 326.4 Q F1(dump)5.5 E F0 -(closes all ports e)2.75 E(xcept the current input and current output port.) --.165 E 1.335(This primiti)72 345 R 1.665 -.165(ve i)-.275 H 4.085(sn).165 G -1.335(ot supported on platforms that are not capable of creating an e)156.547 -345 R -.165(xe)-.165 G 1.336(cutable \214le).165 F .167 -(from the memory image of the running process.)72 360 R(If)5.667 E F1(dump) -2.917 E F0 .167(is a)2.917 F -.275(va)-.22 G .167(ilable, the feature).275 F F1 -(elk:dump)2.917 E F0 .166(is pro-)2.916 F -(vided by the interpreter on startup \(see `)72 375 Q(`Features')-.814 E 2.75 -('a)-.814 G(bo)302.527 375 Q -.165(ve)-.165 G(\).).165 E F2(\(e)72 405 Q -.11 -(va)-.165 G(l).11 E F1(list)4.583 E F2 340.099(\)p)C -.198(ro)462.244 405 S -(cedur).198 E(e)-.198 E(\(e)72 420 Q -.11(va)-.165 G(l).11 E F1(list en)4.583 E -(vir)-.44 E(onment)-.495 E F2 283.295(\)p)C -.198(ro)462.244 420 S(cedur).198 E -(e)-.198 E F0(Ev)72 438.6 Q .575(aluates the e)-.275 F(xpression)-.165 E F1 -(list)3.325 E F0 .575(in the speci\214ed en)3.325 F 3.325(vironment. If)-.44 F -F1(en)3.325 E(vir)-.44 E(onment)-.495 E F0 .576(is omitted, the e)3.325 F -(xpres-)-.165 E(sion is e)72 453.6 Q -.275(va)-.275 G(luated in the current en) -.275 E(vironment.)-.44 E(Examples:)72 468.6 Q/F3 10/Courier@0 SF -(\(let \(\(car 1\)\))100.346 491.103 Q(\(eval 'car \(global-environment\)\)\)) -112.346 505.103 Q(==>)340.346 505.103 Q/F4 10/Times-Italic@0 SF(primitive) -370.346 505.103 Q/F5 10/Times-Roman@0 SF(car)6 E F3(\(define x 1\))100.346 -534.606 Q(\(define env)100.346 548.606 Q -(\(let \(\(x 2\)\) \(the-environment\)\)\))112.346 562.606 Q(\(eval 'x\)) -100.346 576.606 Q 6(==> 1)196.346 576.606 R(\(eval 'x env\))100.346 590.606 Q 6 -(==> 2)196.346 590.606 R F2(\(bound?)72 627.606 Q F1(symbol)4.583 E F2 305.592 -(\)p)C -.198(ro)462.244 627.606 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 -646.206 Q F1(symbol)2.75 E F0(is bound in the current en)2.75 E -(vironment, #f otherwise.)-.44 E F2(\(type)72 676.206 Q F1(obj)4.583 E F2 -337.998(\)p)C -.198(ro)462.244 676.206 S(cedur).198 E(e)-.198 E F0 -(Returns a symbol indicating the type of)72 694.806 Q F1(obj)2.75 E F0(.)A -(Examples:)72 709.806 Q EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(type 13782343423544\))100.346 94.503 Q 6 -(==> integer)310.346 94.503 R(\(type 1.5e8\))100.346 108.503 Q 6(==> real) -310.346 108.503 R(\(type \(lambda \(x y\) \(cons x y\)\)\))100.346 122.503 Q 6 -(==> compound)310.346 122.503 R(\(type #\\a\))100.346 136.503 Q 6 -(==> character)310.346 136.503 R(\(type '\(a b c\)\))100.346 150.503 Q 6 -(==> pair)310.346 150.503 R(\(type '\(\)\))100.346 164.503 Q 6(==> null)310.346 -164.503 R(\(type \(read)100.346 178.503 Q(\(open-input-string ""\)\)\))112.346 -192.503 Q 6(==> end-of-file)310.346 192.503 R/F2 11/Times-Bold@0 SF(\(v)72 -229.503 Q(oid?)-.11 E/F3 11/Times-Italic@0 SF(obj)4.583 E F2 332.597(\)p)C --.198(ro)462.244 229.503 S(cedur).198 E(e)-.198 E F0(Returns true if)72 248.103 -Q F3(obj)2.75 E F0(is the non-printing object, f)2.75 E(alse otherwise.)-.11 E -F2(\(command-line-ar)72 278.103 Q -.917(gs \))-.11 F(pr)456.128 278.103 Q -(ocedur)-.198 E(e)-.198 E F0(Returns the command line ar)72 296.703 Q -(guments of the interpreter')-.198 E 2.75(si)-.605 G -2.09 -.44(nv o)325.99 -296.703 T(cation, a list of strings.).44 E F2 2.75(33. R)72 326.703 R/F4 9 -/Times-Bold@0 SF(4)99.192 321.203 Q F2(RS Language F)103.692 326.703 Q(eatur) --.275 E(es not Implemented by Elk)-.198 E F0 21.15<8352>72 345.303 S -(ational and comple)104.337 345.303 Q 2.75(xn)-.165 G -(umbers are not supported.)201.632 345.303 Q 21.15<8352>72 363.903 S -(adix pre\214x)104.337 363.903 Q -(es \(#b, #o, #d, and #x\) for real numbers are currently not implemented.) --.165 E 21.15<8354>72 382.503 S .488(he e)103.721 382.503 R .488(xponent mark) --.165 F(ers)-.11 E F3(s)3.238 E F0(,)A F3(f)3.238 E F0(,)A F3(d)3.237 E F0 -3.237(,a)C(nd)234.984 382.503 Q F3(l)3.237 E F0 .487 -(are not implemented; the character)3.237 F F3(#)3.237 E F0 .487 -(is not permitted in)3.237 F(place of digits in numerical constants.)97 397.503 -Q<83>72 416.103 Q F3 -.165(ch)97 416.103 S(ar).165 E(-r)-.22 E(eady)-.407 E F0 -(is not implemented correctly \(see abo)2.75 E -.165(ve)-.165 G(\).).165 E<83> -72 434.703 Q F3(tr)97 434.703 Q(anscript-on)-.165 E F0(and)2.75 E F3(tr)2.75 E -(anscript-of)-.165 E(f)-.198 E F0(are not implemented.)2.75 E EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(*)72 174 Q F0(*,)72 204 Q -/F2 12/Times-Bold@0 SF(9)2.75 E F1(+)72 234 Q F0(+,)72 264 Q F2(9)2.75 E F1(-) -72 294 Q F0(-,)72 324 Q F2(9)2.75 E F0(-1+,)72 339 Q F2(9)2.75 E F1(/)72 369 Q -F0(/,)72 399 Q F2(9)2.75 E F1(1)72 429 Q F0(1+,)72 459 Q F2(9)2.75 E F0(1-,)72 -474 Q F2(9)2.75 E F1(<)72 504 Q F0(<,)72 534 Q F2(8)2.75 E F0(<=,)72 549 Q F2 -(8)2.75 E F1(=)72 579 Q F0(=,)72 609 Q F2(8)2.75 E F1(>)72 639 Q F0(>,)72 669 Q -F2(8)2.75 E F0(>=,)302.4 174 Q F2(8)2.75 E F1(A)302.4 204 Q F0(abs,)302.4 234 Q -F2(9)2.75 E F0(acos,)302.4 249 Q F2(10)2.75 E F0(and,)302.4 264 Q F2(4)2.75 E -F0(append!,)302.4 279 Q F2(7)2.75 E F0(append,)302.4 294 Q F2(7)2.75 E F0 -(apply)302.4 309 Q(,)-.715 E F2(3)2.75 E F0(asin,)302.4 324 Q F2(10)2.75 E F0 -(assoc,)302.4 339 Q F2(8)2.75 E F0(assq,)302.4 354 Q F2(8)2.75 E F0(assv)302.4 -369 Q(,)-.715 E F2(8)2.75 E F0(atan,)302.4 384 Q F2(10)2.75 E F0(autoload,) -302.4 399 Q F2(23)2.75 E F0(autoload-notify?,)302.4 414 Q F2(23)2.75 E F1(B) -302.4 444 Q F0(be)302.4 474 Q(gin,)-.165 E F2(4)2.75 E F0(be)302.4 489 Q(gin1,) --.165 E F2(4)2.75 E F0(boolean?,)302.4 504 Q F2(5)2.75 E F0(bound?,)302.4 519 Q -F2(29)2.75 E F1(C)302.4 549 Q F0(caar)302.4 579 Q(,)-.44 E F2(6)2.75 E F0 -(call-with-current-continuation,)302.4 594 Q F2(5)2.75 E F0 -(call-with-input-\214le,)302.4 609 Q F2(17)2.75 E F0(call-with-output-\214le,) -302.4 624 Q F2(17)2.75 E F0(car)302.4 639 Q(,)-.44 E F2(6)2.75 E F0(case,)302.4 -654 Q F2(4)2.75 E F0(cddddr)302.4 669 Q(,)-.44 E F2(7)2.75 E F0(cdr)302.4 684 Q -(,)-.44 E F2(6)2.75 E F0(ceiling,)302.4 699 Q F2(9)2.75 E F0(char)302.4 714 Q -(-alphabetic?,)-.22 E F2(11)2.75 E F0(char)302.4 729 Q(-ci<=?,)-.22 E F2(11) -2.75 E EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(char)72 87 Q(-ci=?,)-.22 E F1(11)2.75 -E F0(char)72 132 Q(-ci>?,)-.22 E F1(11)2.75 E F0(char)72 147 Q(-do)-.22 E -(wncase,)-.275 E F1(11)2.75 E F0(char)72 162 Q(-lo)-.22 E(wer)-.275 E(-case?,) --.22 E F1(11)2.75 E F0(char)72 177 Q(-numeric?,)-.22 E F1(11)2.75 E F0(char)72 -192 Q(-ready)-.22 E 2.75(,3)-.715 G(0)129.09 192 Q(char)72 207 Q(-ready?,)-.22 -E F1(19)2.75 E F0(char)72 222 Q(-upcase,)-.22 E F1(11)2.75 E F0(char)72 237 Q -(-upper)-.22 E(-case?,)-.22 E F1(11)2.75 E F0(char)72 252 Q(-whitespace?,)-.22 -E F1(11)2.75 E F0(char<=?,)72 267 Q F1(11)2.75 E F0(char=?,)72 312 Q F1(11)2.75 E F0 -(char>?,)72 327 Q F1(11)2.75 E F0(char?,)72 342 Q F1(12)2.75 E F0(char)72 357 Q -/F2 11/Symbol SF(-)A F0(>inte)A(ger)-.165 E(,)-.44 E F1(11)2.75 E F0(clear)72 -372 Q(-input-port,)-.22 E F1(18)2.75 E F0(clear)72 387 Q(-output-port,)-.22 E -F1(18)2.75 E F0(close-input-port,)72 402 Q F1(17)2.75 E F0(close-output-port,) -72 417 Q F1(17)2.75 E F0(collect,)72 432 Q F1(28)2.75 E F0 -(collect-incremental,)72 447 Q F1(28)2.75 E F0(command-line-ar)72 462 Q(gs,) --.198 E F1(30)2.75 E F0(comple)72 477 Q(x?,)-.165 E F1(10)2.75 E F0(compound?,) -72 492 Q F1(2)2.75 E F0(cond,)72 507 Q F1(4)2.75 E F0(cons,)72 522 Q F1(6)2.75 -E F0(constant,)72 537 Q F1(3)2.75 E F0(control-point-en)72 552 Q(vironment,) --.44 E F1(16)2.75 E F0(control-point?,)72 567 Q F1(5)2.75 E F0(cos,)72 582 Q F1 -(10)2.75 E F0(critical section, 26)72 597 Q(current-input-port,)72 612 Q F1(17) -2.75 E F0(current-output-port,)72 627 Q F1(17)2.75 E F0(cxr)72 642 Q(,)-.44 E -F1(6)2.75 E/F3 13/Times-Bold@0 SF(D)72 672 Q F0(de\214ne,)72 702 Q F1(3)2.75 E -F0(de\214ne-macro,)72 717 Q F1(23)2.75 E F0(delay)72 732 Q(,)-.715 E F1(6)2.75 -E F0(disable-interrupts,)302.4 87 Q F1(25)2.75 E F0(display)302.4 102 Q(,)-.715 -E F1(20)2.75 E F0(do,)302.4 117 Q F1(5)2.75 E F0(dump,)302.4 132 Q F1(29)2.75 E -F0(dynamic-wind,)302.4 147 Q F1(5)2.75 E F0 2.75(,2)C(6)388.447 147 Q F3(E) -302.4 177 Q F0(elk:dump, 29)302.4 207 Q(elk:load-object, 22)302.4 222 Q -(enable-interrupts,)302.4 237 Q F1(25)2.75 E F0(en)302.4 252 Q(vironment?,)-.44 -E F1(16)2.75 E F0(en)302.4 267 Q(vironment)-.44 E F2(-)A F0(>list,)A F1(16)2.75 -E F0(eof-object?,)302.4 282 Q F1(19)2.75 E F0(eq?,)302.4 297 Q F1(6)2.75 E F0 -(equal?,)302.4 312 Q F1(6)2.75 E F0(eqv?,)302.4 327 Q F1(6)2.75 E F0(error) -302.4 342 Q(,)-.44 E F1(26)2.75 E F0(error)302.4 357 Q(-handler)-.22 E(,)-.44 E -F1(25)2.75 E F0 2.75(,2)C(6)388.265 357 Q -.275(eva)302.4 372 S(l,).275 E F1 -(29)2.75 E F0 -2.365 -.275(ev e)302.4 387 T(n?,).275 E F1(9)2.75 E F0 -.165(ex) -302.4 402 S(act?,).165 E F1(9)2.75 E F0 -.165(ex)302.4 417 S(act).165 E F2(-)A -F0(>ine)A(xact,)-.165 E F1(10)2.75 E F0 -.165(ex)302.4 432 S(it code, 26).165 E --.165(ex)302.4 447 S(it,).165 E F1(26)2.75 E F0 -.165(ex)302.4 462 S(p,).165 E -F1(10)2.75 E F0 -.165(ex)302.4 477 S(pt,).165 E F1(10)2.75 E F3(F)302.4 507 Q -F0(feature, 22, 29)302.4 537 Q(feature?,)302.4 552 Q F1(28)2.75 E F0(features,) -302.4 567 Q F1(29)2.75 E F0(\214le name, 17)302.4 582 Q(\214le-e)302.4 597 Q -(xists?,)-.165 E F1(18)2.75 E F0(\215oor)302.4 612 Q(,)-.44 E F1(9)2.75 E F0 -(\215uid-let,)302.4 627 Q F1(2)2.75 E F0(\215ush-output-port,)302.4 642 Q F1 -(18)2.75 E F0(for)302.4 657 Q(-each,)-.22 E F1(5)2.75 E F0(force,)302.4 672 Q -F1(6)2.75 E EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(format,)72 87 Q/F1 12/Times-Bold@0 SF(20)2.75 E F0 2.75(,2)C(5) -129.826 87 Q/F2 13/Times-Bold@0 SF(G)72 117 Q F0 -.055(ga)72 147 S -(rbage collector).055 E 2.75(,2)-.44 G(7)158.559 147 Q -.055(ga)72 162 S -(rbage collector).055 E 2.75(,g)-.44 G(enerational, 27)158.559 162 Q -.055(ga) -72 177 S(rbage collector).055 E 2.75(,i)-.44 G(ncremental, 27)156.117 177 Q --.055(ga)72 192 S(rbage collector).055 E 2.75(,s)-.44 G(top-and-cop)157.338 192 -Q 1.43 -.715(y, 2)-.11 H(7).715 E -.055(ga)72 207 S(rbage-collect-notify?,).055 -E F1(28)2.75 E F0 -.055(ga)72 222 S(rbage-collect-status,).055 E F1(27)2.75 E -F0(gcd,)72 237 Q F1(9)2.75 E F0(get,)72 252 Q F1(15)2.75 E F0 -(get-output-string,)72 267 Q F1(21)2.75 E F0(global-en)72 282 Q(vironment,)-.44 -E F1(16)2.75 E F2(I)72 312 Q F0(if,)72 342 Q F1(4)2.75 E F0(ine)72 357 Q -(xact?,)-.165 E F1(9)2.75 E F0(ine)72 372 Q(xact)-.165 E/F3 11/Symbol SF(-)A F0 -(>e)A(xact,)-.165 E F1(10)2.75 E F0(input-port?,)72 387 Q F1(17)2.75 E F0(inte) -72 402 Q(ger?,)-.165 E F1(10)2.75 E F0(inte)72 417 Q(ger)-.165 E F3(-)A F0 -(>char)A(,)-.44 E F1(11)2.75 E F0(interrupt-handler)72 432 Q(,)-.44 E F1(25) -2.75 E F2(L)72 462 Q F0(lambda,)72 492 Q F1(1)2.75 E F0(last-pair)72 507 Q(,) --.44 E F1(7)2.75 E F0(lcm,)72 522 Q F1(9)2.75 E F0(length,)72 537 Q F1(7)2.75 E -F0(let,)72 552 Q F1(2)2.75 E F0(,)A F1(5)2.75 E F0(let*,)72 567 Q F1(2)2.75 E -F0(letrec,)72 582 Q F1(2)2.75 E F0(link)72 597 Q(er)-.11 E 2.75(,2)-.44 G(2) -108.113 597 Q(list,)72 612 Q F1(7)2.75 E F0(list-ref,)72 627 Q F1(7)2.75 E F0 -(list-tail,)72 642 Q F1(7)2.75 E F0(list?,)72 657 Q F1(8)2.75 E F0(list)72 672 -Q F3(-)A F0(>string,)A F1(12)2.75 E F0(list)72 687 Q F3(-)A F0(>v)A(ector)-.165 -E(,)-.44 E F1(14)2.75 E F0(load,)72 702 Q F1(22)2.75 E F0(load-libraries, 22,) -72 717 Q F1(23)2.75 E F0(load-noisily?,)72 732 Q F1(23)2.75 E F0(load-path,) -302.4 87 Q F1(22)2.75 E F0(log,)302.4 102 Q F1(10)2.75 E F2(M)302.4 132 Q F0 -(macro,)302.4 162 Q F1(23)2.75 E F0(macro-body)302.4 177 Q(,)-.715 E F1(24)2.75 -E F0(macro-e)302.4 192 Q(xpand,)-.165 E F1(24)2.75 E F0(macro?,)302.4 207 Q F1 -(24)2.75 E F0(mak)302.4 222 Q(e-list,)-.11 E F1(7)2.75 E F0(mak)302.4 237 Q -(e-string,)-.11 E F1(12)2.75 E F0(mak)302.4 252 Q(e-v)-.11 E(ector)-.165 E(,) --.44 E F1(14)2.75 E F0(map,)302.4 267 Q F1(5)2.75 E F0(max,)302.4 282 Q F1(10) -2.75 E F0(member)302.4 297 Q(,)-.44 E F1(8)2.75 E F0(memq,)302.4 312 Q F1(8) -2.75 E F0(memv)302.4 327 Q(,)-.715 E F1(8)2.75 E F0(min,)302.4 342 Q F1(10)2.75 -E F0(modulo,)302.4 357 Q F1(9)2.75 E F2(N)302.4 387 Q F0(ne)302.4 417 Q -.055 -(ga)-.165 G(ti).055 E -.165(ve)-.275 G(?,).165 E F1(9)2.75 E F0(ne)302.4 432 Q -(wline,)-.275 E F1(20)2.75 E F0(not,)302.4 447 Q F1(5)2.75 E F0(null?,)302.4 -462 Q F1(8)2.75 E F0(number?,)302.4 477 Q F1(10)2.75 E F0(number)302.4 492 Q F3 -(-)A F0(>string,)A F1(11)2.75 E F2(O)302.4 522 Q F0(object code, 22)302.4 552 Q -(object \214le, 23)302.4 567 Q(object \214les, 22)302.4 582 Q(oblist,)302.4 597 -Q F1(15)2.75 E F0(odd?,)302.4 612 Q F1(9)2.75 E F0(open-input-\214le,)302.4 627 -Q F1(17)2.75 E F0(open-input-output-\214le,)302.4 642 Q F1(17)2.75 E F0 -(open-input-string,)302.4 657 Q F1(21)2.75 E F0(open-output-\214le,)302.4 672 Q -F1(17)2.75 E F0(open-output-string,)302.4 687 Q F1(21)2.75 E F0(operator)302.4 -702 Q(,)-.44 E F1(3)2.75 E F0(or)302.4 717 Q(,)-.44 E F1(4)2.75 E EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(output-port?,)72 87 Q/F1 12/Times-Bold@0 SF(17)2.75 E/F2 13 -/Times-Bold@0 SF(P)72 117 Q F0(pair?,)72 147 Q F1(8)2.75 E F0(peek-char)72 162 -Q(,)-.44 E F1(19)2.75 E F0(port-\214le-name,)72 177 Q F1(18)2.75 E F0 -(port-line-number)72 192 Q(,)-.44 E F1(18)2.75 E F0(positi)72 207 Q -.165(ve) --.275 G(?,).165 E F1(9)2.75 E F0(primiti)72 222 Q -.165(ve)-.275 G(?,).165 E F1 -(1)2.75 E F0(print,)72 237 Q F1(20)2.75 E F0(print-depth,)72 252 Q F1(20)2.75 E -F0(print-length,)72 267 Q F1(20)2.75 E F0(procedure-en)72 282 Q(vironment,)-.44 -E F1(16)2.75 E F0(procedure-lambda,)72 297 Q F1(1)2.75 E F0 2.75(,2)C(4)174.525 -297 Q(procedure?,)72 312 Q F1(1)2.75 E F0(promise-en)72 327 Q(vironment,)-.44 E -F1(16)2.75 E F0(promise?,)72 342 Q F1(6)2.75 E F0(property list, 14, 15)72 357 -Q(pro)72 372 Q(vide,)-.165 E F1(28)2.75 E F0(put,)72 387 Q F1(14)2.75 E F2(Q)72 -417 Q F0(quasiquote,)72 447 Q F1(4)2.75 E F0(quote,)72 462 Q F1(3)2.75 E F0 -(quotient,)72 477 Q F1(9)2.75 E F2(R)72 507 Q F0(random,)72 537 Q F1(10)2.75 E -F0(rational?,)72 552 Q F1(10)2.75 E F0(read,)72 567 Q F1(19)2.75 E F0 -(read-char)72 582 Q(,)-.44 E F1(19)2.75 E F0(read-string,)72 597 Q F1(19)2.75 E -F0(real?,)72 612 Q F1(10)2.75 E F0(remainder)72 627 Q(,)-.44 E F1(9)2.75 E F0 -(require,)72 642 Q F1(28)2.75 E F0(reset, 25,)72 657 Q F1(26)2.75 E F0(re)72 -672 Q -.165(ve)-.275 G(rse!,).165 E F1(8)2.75 E F0(re)72 687 Q -.165(ve)-.275 G -(rse,).165 E F1(8)2.75 E F0(round,)302.4 87 Q F1(9)2.75 E F2(S)302.4 117 Q F0 -(set!,)302.4 147 Q F1(3)2.75 E F0(set-car!,)302.4 162 Q F1(7)2.75 E F0 -(set-cdr!,)302.4 177 Q F1(7)2.75 E F0(signals, 25)302.4 192 Q(sin,)302.4 207 Q -F1(10)2.75 E F0(site \214le, 22, 27)302.4 222 Q(sqrt,)302.4 237 Q F1(10)2.75 E -F0(srandom,)302.4 252 Q F1(10)2.75 E F0(string ports, 21)302.4 267 Q(string,) -302.4 282 Q F1(12)2.75 E F0(string-append,)302.4 297 Q F1(12)2.75 E F0 -(string-ci<=?,)302.4 312 Q F1(13)2.75 E F0(string-ci=?,)302.4 357 Q F1(13) -2.75 E F0(string-ci>?,)302.4 372 Q F1(13)2.75 E F0(string-cop)302.4 387 Q -.715 -(y,)-.11 G F1(12)3.465 E F0(string-\214ll!,)302.4 402 Q F1(13)2.75 E F0 -(string-length,)302.4 417 Q F1(12)2.75 E F0(string-ref,)302.4 432 Q F1(12)2.75 -E F0(string-set!,)302.4 447 Q F1(12)2.75 E F0(string<=?,)302.4 462 Q F1(13)2.75 -E F0(string=?,)302.4 507 Q F1(13)2.75 E F0(string>?,)302.4 522 Q F1(13)2.75 E F0 -(string?,)302.4 537 Q F1(12)2.75 E F0(string)302.4 552 Q/F3 11/Symbol SF(-)A F0 -(>list,)A F1(12)2.75 E F0(string)302.4 567 Q F3(-)A F0(>number)A(,)-.44 E F1 -(11)2.75 E F0(string)302.4 582 Q F3(-)A F0(>symbol,)A F1(14)2.75 E F0 -(substring,)302.4 597 Q F1(12)2.75 E F0(substring-ci?,)302.4 612 Q F1(13)2.75 E -F0(substring-\214ll!,)302.4 627 Q F1(13)2.75 E F0(substring?,)302.4 642 Q F1 -(13)2.75 E F0(suf)302.4 657 Q(\214x, 22, 29)-.275 E(symbol-plist,)302.4 672 Q -F1(15)2.75 E F0(symbol?,)302.4 687 Q F1(15)2.75 E EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(symbol)72 87 Q/F1 11/Symbol SF(-)A F0(>string,)A/F2 12/Times-Bold@0 -SF(14)2.75 E F0 2.75(,1)C(7)170.196 87 Q/F3 13/Times-Bold@0 SF(T)72 117 Q F0 -(tan,)72 147 Q F2(10)2.75 E F0(the-en)72 162 Q(vironment,)-.44 E F2(16)2.75 E -F0(tilde, 17)72 177 Q(tilde-e)72 192 Q(xpand,)-.165 E F2(18)2.75 E F0(top-le)72 -207 Q -.165(ve)-.275 G(l-control-point,).165 E F2(26)2.75 E F0(truncate,)72 222 -Q F2(9)2.75 E F0(type,)72 237 Q F2(29)2.75 E F3(U)72 267 Q F0(unquote,)72 297 Q -F2(4)2.75 E F0(unquote-splicing,)72 312 Q F2(4)2.75 E F0(unread-char)72 327 Q -(,)-.44 E F2(19)2.75 E F0(unwind-protect, 5)72 342 Q F3(V)72 372 Q F0 -.165(ve) -72 402 S(ctor).165 E(,)-.44 E F2(14)2.75 E F0 -.165(ve)72 417 S(ctor).165 E -(-cop)-.22 E -.715(y,)-.11 G F2(14)3.465 E F0 -.165(ve)72 432 S(ctor).165 E -(-\214ll!,)-.22 E F2(14)2.75 E F0 -.165(ve)72 447 S(ctor).165 E(-length,)-.22 E -F2(14)2.75 E F0 -.165(ve)72 462 S(ctor).165 E(-ref,)-.22 E F2(14)2.75 E F0 --.165(ve)72 477 S(ctor).165 E(-set!,)-.22 E F2(14)2.75 E F0 -.165(ve)72 492 S -(ctor?,).165 E F2(13)2.75 E F0 -.165(ve)72 507 S(ctor).165 E F1(-)A F0(>list,)A -F2(14)2.75 E F0 -.22(vo)72 522 S(id?,).22 E F2(30)2.75 E F3(W)72 552 Q F0 -(with-input-from-\214le,)72 582 Q F2(17)2.75 E F0(with-interrupts-disabled, 26) -72 597 Q(with-output-to-\214le,)72 612 Q F2(17)2.75 E F0(write,)72 627 Q F2(20) -2.75 E F0(write-char)72 642 Q(,)-.44 E F2(20)2.75 E F3(Z)72 672 Q F0(zero?,)72 -702 Q F2(9)2.75 E EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Lambda Expressions, Procedures)72 196.2 Q -19.25(........................................................................\ -.................... 1)5.167 F(Local Bindings)72 214.8 Q 19.25(...............\ -..............................................................................\ -............................ 2)4.221 F(Fluid Binding)72 233.4 Q 19.25(........\ -..............................................................................\ -..................................... 2)4.815 F .855(De\214nitions ...........\ -..............................................................................\ -.......................................)72 252 R(3)498.5 252 Q 2.692(Assignmen\ -t ............................................................................\ -..................................................)72 270.6 R(3)498.5 270.6 Q -(Procedure Application)72 289.2 Q 19.25(......................................\ -....................................................................... 3)5.464 -F(Quotation, Quasiquotation)72 307.8 Q 19.25(.................................\ -...................................................................... 3)4.529 -F 1.174(Sequencing ...........................................................\ -....................................................................)72 326.4 R -(4)498.5 326.4 Q 1.768(Conditionals ..........................................\ -..............................................................................\ -.....)72 345 R(4)498.5 345 Q .558(Booleans ...................................\ -..............................................................................\ -..................)72 363.6 R(4)498.5 363.6 Q 1.482(Iteration ................\ -..............................................................................\ -......................................)72 382.2 R(5)498.5 382.2 Q 1.768(Contin\ -uations ......................................................................\ -.....................................................)72 400.8 R(5)498.5 400.8 -Q(Delayed Ev)72 419.4 Q 1.46(aluation ........................................\ -..........................................................................) --.275 F(6)498.5 419.4 Q(Equi)72 438 Q -.275(va)-.275 G(lence Predicates).275 E -19.25(........................................................................\ -..................................... 6)2.967 F -.165(Pa)72 456.6 S -(irs and Lists).165 E 19.25(..................................................\ -........................................................................ 6) -4.386 F 1.174(Numbers ........................................................\ -...........................................................................)72 -475.2 R(8)498.5 475.2 Q 2.714(Characters .....................................\ -..............................................................................\ -.............)72 493.8 R(11)493 493.8 Q 2.076(Strings ........................\ -..............................................................................\ -................................)72 512.4 R(12)493 512.4 Q -1.221(Ve)72 531 S -.261(ctors ...................................................................\ -...................................................................)1.221 F(13) -493 531 Q .239(Symbols .......................................................\ -.............................................................................) -72 549.6 R(14)493 549.6 Q(En)72 568.2 Q 2.219(vironments .....................\ -..............................................................................\ -........................)-.44 F(16)493 568.2 Q(Ports and Files)72 586.8 Q 13.75 -(.............................................................................\ -............................................. 17)3.605 F 1.779(Input .........\ -..............................................................................\ -..................................................)72 605.4 R(19)493 605.4 Q -2.692(Output .................................................................\ -.....................................................................)72 624 R -(19)493 624 Q(String Ports)72 642.6 Q 13.75(..................................\ -..............................................................................\ -............... 21)2.989 F 2.087(Loading .....................................\ -..............................................................................\ -.................)72 661.2 R(22)493 661.2 Q .261(Macros ......................\ -..............................................................................\ -..................................)72 679.8 R(23)493 679.8 Q -(Error and Exception Handling)72 698.4 Q 13.75(...............................\ -.................................................................. 25)4.859 F -(Garbage Collection)72 717 Q 13.75(...........................................\ -....................................................................... 27) -5.156 F EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 1.482(Features .......................................\ -..............................................................................\ -...............)72 87 R(28)493 87 Q 2.703(Miscellaneous ......................\ -..............................................................................\ -......................)72 105.6 R(29)493 105.6 Q(R)72 124.2 Q/F1 9 -/Times-Roman@0 SF(4)79.337 118.7 Q F0 -(RS Language Features not Implemented by Elk)83.837 124.2 Q 13.75 -(................................................................. 30)4.935 F -(Inde)72 142.8 Q 2.868(x.)-.165 G 13.75(......................................\ -..............................................................................\ -.................... 31)102.5 142.8 R EP -%%Trailer -end -%%EOF diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 8723000..6fd1aa7 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -1,2 +1,21 @@ -EXTRA_DIST = $(man_MANS) elk.ps +EXTRA_DIST = $(man_MANS) + man_MANS = elk.1 + +if HAVE_GROFF +doc_DATA = elk.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +TROFF= groff -man -t +UNROFF= unroff -man + +elk.ps: elk.1 + $(TROFF) $? > $@ + +elk.1.html: elk.1 + $(UNROFF) $? + +clean: + rm -f elk.ps elk.1.html + diff --git a/doc/man/elk.ps b/doc/man/elk.ps deleted file mode 100644 index ebc3f9e..0000000 --- a/doc/man/elk.ps +++ /dev/null @@ -1,277 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 1 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE -/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 403.3(ELK\(1\) ELK\(1\))72 48 R/F1 9/Times-Bold@0 SF --.18(NA)72 84 S(ME).18 E F0(elk, scheme \255 e)108 96 Q -(xtensible Scheme interpreter)-.15 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 -SF(scheme)108 124.8 Q F0([)2.5 E F22.5 E/F3 10/Times-Italic@0 SF(\214le) -2.5 E F0 2.5(][)2.5 G F2A F3(KBytes)2.5 E F0 2.5(][)2.5 G F2A F3 -(load-path)2.5 E F0 2.5(][)2.5 G F2A F0 2.5(][)2.5 G F2A F0 2.5(][) -2.5 G F2A F3(type)2.5 E F0 2.5(][)2.5 G([)396.87 124.8 Q F2 .8332.5 -G F0(])1.667 E F3(ar)2.5 E(gs)-.37 E F0(])A F2(elk)108 141.6 Q F0 1.666(...)C -F1(DESCRIPTION)72 158.4 Q F3(Elk)108 170.4 Q F0 1.111 -(\(Extension Language Kit\) is a Scheme implementation designed as a general e) -3.612 F 1.111(xtension language for)-.15 F .68 -(applications written in C or C++.)108 182.4 R(Normally)5.68 E(,)-.65 E F3(Elk) -3.18 E F0 .681(is link)3.181 F .681(ed with the application it serv)-.1 F .681 -(es, b)-.15 F .681(ut a stand-alone)-.2 F -.15(ve)108 194.4 S 1.027 -(rsion of the Scheme interpreter is installed as well \(usually under the name) -.15 F F2(scheme)3.527 E F0 3.527(\). This)B(interpreter)3.527 E(,)-.4 E .412 -(together with the standard Scheme tople)108 206.4 R -.15(ve)-.25 G(l,).15 E F3 -(Elk)2.912 E F0 .412(can be used as an ordinary)2.912 F 2.912(,s)-.65 G .412 -(tand-alone implementation of)420.856 206.4 R(the Scheme language.)108 218.4 Q -.604(When called without the)108 235.2 R F23.104 E F0(option,)3.104 E F3 -(Elk)3.104 E F0 .604(loads the standard \231tople)3.104 F -.15(ve)-.25 G .604 -(l\232 to start an interacti).15 F .903 -.15(ve s)-.25 H 3.103(ession. When).15 -F .644(called with)108 247.2 R F23.144 E F3(\214le)3.144 E F0 3.144(,t)C -.644(he contents of the speci\214ed \214le is loaded instead.)188.216 247.2 R -.644(If a `\255' is gi)5.644 F -.15(ve)-.25 G 3.145(na).15 G 3.145(sa\214) -466.875 247.2 S .645(lename ar)487.055 247.2 R(gu-)-.18 E(ment,)108 259.2 Q F3 -(Elk)2.5 E F0(loads from standard input.)2.5 E .047(The option)108 276 R F2 -2.547 E F3(load-path)2.547 E F0 .046(can be used to o)2.547 F -.15(ve) --.15 G .046(rride the standard).15 F F3(load-path)2.546 E F0 5.046(.T)C .046 -(he ar)408.366 276 R .046(gument is a colon-separated)-.18 F .56 -(list of directories.)108 288 R .561(If this option is not present and the en) -5.56 F .561(vironment v)-.4 F .561(ariable ELK_LO)-.25 F(ADP)-.35 E -1.11(AT) --.92 G 3.061(Hi)1.11 G 3.061(sd)501.109 288 S(e\214ned,)513.06 288 Q .583 -(the v)108 300 R .583(alue of this v)-.25 F .583 -(ariable is used to initialize the)-.25 F F3(load-path)3.083 E F0 5.583(.T)C -.583(he v)360.283 300 R .583(alue of ELK_LO)-.25 F(ADP)-.35 E -1.11(AT)-.92 G -3.083(Hh)1.11 G .583(as the same)492.735 300 R(format as the ar)108 312 Q -(gument to the)-.18 E F2(-p)2.5 E F0(option.)2.5 E(The)108 328.8 Q F22.5 -E F3(KBytes)2.5 E F0(option is used to specify a non-standard heap size.)2.5 E -(The def)5 E(ault heap size is 512 KBytes.)-.1 E(If the option)108 345.6 Q F2 -2.5 E F0(is speci\214ed, symbols are mapped to lo)2.5 E(wer case.)-.25 E -(Normally)5 E(,)-.65 E F3(Elk)2.5 E F0(is case-sensiti)2.5 E -.15(ve)-.25 G(.) -.15 E(The)108 362.4 Q F23.875 E F0 1.375 -(option causes the interpreter to run the g)3.875 F 1.376 -(arbage collector each time memory is allocated on the)-.05 F 2.637(heap. This) -108 374.4 R .136(is useful for writers of e)2.637 F .136(xtensions who w)-.15 F -.136(ant to test the g)-.1 F .136(arbage collect beha)-.05 F .136(vior of an e) --.2 F(xtension.)-.15 E(Running)108 386.4 Q F3(Elk)2.806 E F0 .306(with the) -2.806 F F22.806 E F0 .306(option is lik)2.806 F .307(ely to re)-.1 F -.15 -(ve)-.25 G .307(al GC-related b).15 F .307(ugs in e)-.2 F .307 -(xtensions \(such as not properly pro-)-.15 F .089 -(tected local objects\), as it triggers a g)108 398.4 R .088 -(arbage collection each time an object is allocated on the Scheme heap.)-.05 F -2.625(Ad)108 410.4 S .125(ot is written to standard output each time a g) -122.845 410.4 R .126(arbage collection is performed when)-.05 F F22.626 E -F0 .126(has been speci\214ed.)2.626 F .592(When called with one or more)108 -427.2 R F23.092 E F3(type)3.092 E F0(\(`)3.092 E(`v)-.74 E(erbose')-.15 E -.592('\) options, the interpreter prints additional informational)-.74 F .452 -(messages to standard output, depending on the v)108 439.2 R .453(alue of the) --.25 F F3(type)2.953 E F0(ar)2.953 E 2.953(gument. If)-.18 F F3(type)2.953 E F0 -(is)2.953 E F3(load)2.953 E F0 2.953(,t)C .453(he link)480.874 439.2 R .453 -(er com-)-.1 F .013 -(mand and options are printed each time an object \214le is loaded; if)108 -451.2 R F3(type)2.512 E F0(is)2.512 E F3(init)2.512 E F0 2.512(,t)C .012 -(he names of e)421.782 451.2 R .012(xtension initial-)-.15 F -(ization and \214nalization functions are printed as the)108 463.2 Q 2.5(ya) --.15 G(re called.)322.26 463.2 Q .521(The remaining)108 480 R F3(ar)3.021 E(gs) --.37 E F0 .522(are put into a list of strings, and the Scheme v)3.021 F -(ariable)-.25 E F2(command-line-ar)3.022 E(gs)-.1 E F0 .522(is bound to)3.022 F -.666(this list in the global en)108 492 R 3.166(vironment. If)-.4 F(ar)3.166 E -.666(guments could be interpreted as options, `\255)-.18 F .666 -(-\264 can be used to indi-).833 F(cate the end of the options.)108 504 Q F1 -(FILES)72 520.8 Q F0 25($TMPDIR/ldXXXXXX T)108 532.8 R(emporary \214les)-.7 E -F1 -.45(AU)72 549.6 S(THOR).45 E F0(Oli)108 561.6 Q -.15(ve)-.25 G 2.5(rL).15 G -(aumann)141.76 561.6 Q(15 January 1991)272.95 768 Q(1)535 768 Q EP -%%Trailer -end -%%EOF diff --git a/doc/oops/Makefile.am b/doc/oops/Makefile.am index be0afe8..9238e6b 100644 --- a/doc/oops/Makefile.am +++ b/doc/oops/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = oops.ms oops.ps +EXTRA_DIST = oops.ms + +if HAVE_GROFF +doc_DATA = oops.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= oops +TROFF= groff -ms -t +UNROFF= unroff -ms + +oops.ps: oops.ms index.ms + (cat oops.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > oops.ps + +oops.html: oops.ms + (cat $?; echo ".Tc") | $(UNROFF) document=oops + +index.ms: oops.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: oops.ms + $(TROFF) oops.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] oops.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms oops.ps oops.html diff --git a/doc/oops/oops.ps b/doc/oops/oops.ps deleted file mode 100644 index 1917e01..0000000 --- a/doc/oops/oops.ps +++ /dev/null @@ -1,624 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 7 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(The)198.071 120 Q/F1 11/Times-Bold@0 SF(OOPS)3 E F0 -.12 -(Pa)3 G(ckage f).12 E(or Elk Scheme)-.3 E/F2 10/Times-Italic@0 SF -(Oliver Laumann)255.085 144 Q F1 2.75(1. Intr)72 216 R(oduction)-.198 E/F3 11 -/Times-Roman@0 SF(The)97 234.6 Q/F4 10/Times-Roman@0 SF(OOPS)3.866 E F3 1.116 -(package pro)3.866 F 1.115 -(vides a minimal set of tools that enables a Scheme programmer to)-.165 F .357 -(program in an object oriented style.)72 249.6 R .357(The functionality of) -5.857 F F4(OOPS)3.107 E F3 .357(is similar to that of packages lik)3.107 F(e) --.11 E F4(CLOS)72 264.6 Q F3(and)3.342 E F4(SCOOPS)3.342 E F3 3.342(,a)C .592 -(lthough the current v)168.894 264.6 R .592 -(ersion does not support multiple inheritance.)-.165 F .592(The rest)6.092 F -.261(of this memo serv)72 279.6 R .261(es as a reference guide to the)-.165 F -F4(OOPS)3.012 E F3 .262(package; the reader is assumed to be f)3.012 F(amil-) --.11 E(iar with the terminology of object oriented programming.)72 294.6 Q F1 -2.75(2. Using)72 324.6 R/F5 10/Times-Bold@0 SF(OOPS)2.75 E F3 -(Programs that mak)72 343.2 Q 2.75(eu)-.11 G(se of the)168.129 343.2 Q F4(OOPS) -2.75 E F3(package should include the line)2.75 E/F6 10/Courier@0 SF -(\(require 'oops\))100.346 365.703 Q F3 1.178(Since this in)72 387.703 R -.22 -(vo)-.44 G(lv).22 E 1.177(es autoloading of an object \214le, it may be desira\ -ble to dump Scheme after the)-.165 F F4(OOPS)72 402.703 Q F3 -(package has been loaded.)2.75 E F1 2.75(3. De\214ning)72 432.703 R(Classes) -2.75 E F3(Ne)97 451.303 Q 3.323(wc)-.275 G .573 -(lasses are de\214ned by means of the)125.7 451.303 R F6(define-class)3.324 E -F3 3.324(macro. The)6.574 F .574(syntax of)3.324 F F6(define-)3.324 E(class)72 -466.303 Q F3(is)6 E F6(\(define-class)100.346 488.806 Q F2(class-name)6 E F6(.) -6 E F2(options)6 E F6(\))A F3(where)72 510.806 Q/F7 11/Times-Italic@0 SF -(class-name)2.75 E F3(is a symbol.)2.75 E F7(options)5.5 E F3 -(can be of the form)2.75 E F6(\(super-class)100.346 533.309 Q F2(class-name)6 E -F6(\))A F3(where)72 555.309 Q F7(class-name)2.75 E F3(is the name of the super) -2.75 E(-class \(a symbol\), or)-.22 E F6(\(class-vars .)100.346 577.812 Q F2 -(var)6 E(-specs)-.2 E F6(\))A F3(or)72 599.812 Q F6(\(instance-vars .)100.346 -622.315 Q F2(var)6 E(-specs)-.2 E F6(\))A F3 .623(to specify the class v)72 -644.315 R .623(ariables and instance v)-.275 F .622(ariables of the ne)-.275 F -.622(wly de\214ned class.)-.275 F(Each)6.122 E F7(var)3.372 E(-spec)-.22 E F3 -(is)3.372 E(either a symbol \(the name of the v)72 659.315 Q -(ariable\) or of the form)-.275 E F6(\()100.346 681.818 Q F2 3.5 -(symbol initializer)B F6(\).)A F3 -1.221(Va)72 703.818 S .143(riables for whic\ -h no initializer has been speci\214ed are initialized to the empty list.)1.221 -F .143(The initializ-)5.643 F .805(ers for class v)72 718.818 R .805 -(ariables are e)-.275 F -.275(va)-.275 G .804 -(luated immediately; initializers for instance v).275 F .804(ariables are e) --.275 F -.275(va)-.275 G(luated).275 E .059(each time an instance of the ne)72 -733.818 R .059(wly de\214ned class is created.)-.275 F(Ev)5.559 E .06 -(aluation of initializers is performed)-.275 F EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL 1.161(in a w)72 87 R 1.161(ay that the initializer of a v)-.11 F -1.161(ariable can reference all v)-.275 F 1.161 -(ariables appearing at the left of the)-.275 F -.275(va)72 102 S -(riable being initialized; for instance).275 E/F1 10/Courier@0 SF -(\(define-class foo \(class-vars \(a 10\) \(b \(* a 2\)\)\)\))100.346 124.503 Q -F0 -.11(wo)72 146.503 S(uld initialize the class v).11 E(ariable)-.275 E F1(b) -2.75 E F0(to 20.)6 E 2.979(Ac)97 165.103 S .229(lass inherits all class v) -112.805 165.103 R .229(ariables, instance v)-.275 F .23 -(ariables, and methods of its super)-.275 F 2.98(-class. When)-.22 F 3.342(ac) -72 180.103 S .592(lass and its super)85.11 180.103 R .592(-class each ha)-.22 F -.922 -.165(ve a)-.22 H 3.342(ni).165 G .592(nstance v)253.913 180.103 R .591 -(ariable with the same name, the corresponding)-.275 F/F2 11/Times-Italic@0 SF -(var)72 195.103 Q(-specs)-.22 E F0 1.525(must either both ha)4.275 F 1.855 --.165(ve n)-.22 H 4.276(oi).165 G 1.526 -(nitializer or initializers with the same v)240.024 195.103 R 1.526 -(alue, otherwise an)-.275 F -.814(``)72 210.103 S(initializer mismatch').814 E -2.75('e)-.814 G(rror is signaled by)180.35 210.103 Q F1(define-class)2.75 E F0 -(.)A 1.038(Each instance of a class has an instance v)97 228.703 R 1.038 -(ariable named)-.275 F F1(self)3.788 E F0 6.538(.T)C 1.038(he v)393.933 228.703 -R 1.038(alue of)-.275 F F1(self)3.788 E F0 1.038(is the)7.038 F 1.072 -(instance with respect to which)72 243.703 R F1(self)3.822 E F0 1.072(is e) -7.072 F -.275(va)-.275 G(luated.).275 E F1(self)6.572 E F0 1.072 -(can be used by methods as the ar)7.072 F(gu-)-.198 E(ment to)72 258.703 Q F1 -(send)2.75 E F0(\(see belo)6 E(w\) to in)-.275 E -.22(vo)-.44 G .22 -.11(ke a) -.22 H(nother method within the current instance.).11 E F1(define-class)97 -277.303 Q F0 .263(does not ha)6.263 F .593 -.165(ve a m)-.22 H .263 -(eaningful return v).165 F .262(alue, instead it has a side-ef)-.275 F .262 -(fect on the)-.275 F(en)72 292.303 Q(vironment in which it is in)-.44 E -.22 -(vo)-.44 G -.11(ke).22 G(d.).11 E/F3 11/Times-Bold@0 SF 2.75(4. Cr)72 322.303 R -(eating Instances of a Class)-.198 E F0 .434(The macro)97 340.903 R F1 -(make-instance)3.184 E F0 .435 -(is used to create an instance of a class; it returns the instance)6.434 F -(as its v)72 355.903 Q 2.75(alue. The)-.275 F(syntax is)2.75 E F1 -(\(make-instance)100.346 378.406 Q/F4 10/Times-Italic@0 SF(class)6 E F1(.)6 E -F4(ar)6 E(gs)-.37 E F1(\))A F0(where)72 400.406 Q F2(class)2.75 E F0 -(is the class of which an instance is to be created.)2.75 E(Each)5.5 E F2(ar) -2.75 E(g)-.407 E F0(of the form)2.75 E F1(\()100.346 422.909 Q F4 3.5 -(symbol initializer)B F1(\))A F0(where)72 444.909 Q F2(symbol)3.81 E F0 1.06 -(is the name of an instance v)3.81 F 1.059 -(ariable of the class, is used to initialize the speci\214ed)-.275 F .532 -(instance v)72 459.909 R .532(ariable in the ne)-.275 F .532 -(wly created instance.)-.275 F .533(In this case the)6.032 F F2(initializer) -3.283 E F0 .533(supersedes an)3.283 F 3.283(yi)-.165 G(nitial-)477.721 459.909 -Q .506(izer speci\214ed in the call to)72 474.909 R F1(define-class)3.256 E F0 -6.006(.T)C .505(hus it is possible to ha)281.049 474.909 R .835 -.165(ve i)-.22 -H .505(nstance v).165 F .505(ariables with a)-.275 F F2 .253 -(default initializer)72 489.909 R F0 .253(that can be o)3.003 F -.165(ve)-.165 -G .254(rridden for indi).165 F .254(vidual instances.)-.275 F .254 -(The initializers are e)5.754 F -.275(va)-.275 G .254(luated in).275 F -(the current en)72 504.909 Q(vironment.)-.44 E F1(make-instance)97 523.509 Q F0 -2.386(initializes the ne)8.386 F 2.385(wly created instance by in)-.275 F -.22 -(vo)-.44 G 2.385(king the).22 F F1(initialize-)5.135 E(instance)72 538.509 Q F0 -.889(method for the class and all super)6.889 F .889(-classes in super)-.22 F -.889(-class to sub-class order)-.22 F 6.39(.T)-.605 G .89(hat is,)476.831 -538.509 R(the)72 553.509 Q F1(initialize-instance)4.183 E F0 1.432 -(method of the class speci\214ed in the call to)7.432 F F1(make-instance)4.182 -E F0(is)7.432 E 2.148(called after all other)72 568.509 R F1 -(initialize-instance)4.899 E F0 4.899(methods. The)8.149 F(ar)4.899 E 2.149 -(guments passed to the)-.198 F F1(ini-)4.899 E(tialize-instance)72 583.509 Q F0 -.115(method of a class are those ar)6.115 F .115(guments of the call to)-.198 F -F1(make-instance)2.864 E F0(that)6.114 E .381 -(do not represent an initialization form for an instance v)72 598.509 R 3.132 -(ariable. These)-.275 F(ar)3.132 E .382(guments are e)-.198 F -.275(va)-.275 G -.382(luated in).275 F 2.601(the current en)72 613.509 R 5.351(vironment. It) --.44 F 2.6(is not required for a class to ha)5.351 F 2.93 -.165(ve a)-.22 H(n) -.165 E F1(initialize-instance)5.35 E F0(method.)72 628.509 Q -(Consider the follo)97 647.109 Q(wing e)-.275 E(xample:)-.165 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(require 'oops\))100.346 94.503 Q -(\(define-class c \(instance-vars a\)\))100.346 115.503 Q -(\(define-class d \(instance-vars \(b 10\)\) \(super-class c\)\))100.346 -129.503 Q(\(define-method c \(initialize-instance . args\))100.346 150.503 Q -(\(print \(cons 'c args\)\)\))112.346 164.503 Q -(\(define-method d \(initialize-instance . args\))100.346 185.503 Q -(\(print \(cons 'd args\)\)\))112.346 199.503 Q F0(In this e)72 228.503 Q -(xample e)-.165 E -.275(va)-.275 G(luation of).275 E F1(\(define x 99\))100.346 -251.006 Q(\(define i \(make-instance d \(a 20\) 'foo \(b x\) x\)\))100.346 -265.006 Q F0 -.11(wo)72 287.006 S(uld print).11 E F1(\(c foo 99\))100.346 -309.509 Q(\(d foo 99\))100.346 323.509 Q F0 1.104(Note that \214rst the)97 -349.109 R F1(initialize-instance)3.854 E F0 1.104(method of)7.104 F F1(c)3.854 -E F0 1.104(is in)7.104 F -.22(vo)-.44 G -.11(ke).22 G 3.854(da).11 G 1.104 -(nd then that of the)419.537 349.109 R(class)72 364.109 Q F1(d)2.75 E F0 5.5 -(.T)C(he instance v)117.105 364.109 Q(ariables)-.275 E F1(a)2.75 E F0(and)6 E -F1(b)2.75 E F0 -.11(wo)6 G(uld be initialized to 20 and 99, respecti).11 E --.165(ve)-.275 G(ly).165 E(.)-.715 E/F2 11/Times-Bold@0 SF 2.75(5. De\214ning) -72 394.109 R(Methods)2.75 E F0 2.75(An)97 412.709 S .55 -.275(ew m)113.192 -412.709 T(ethod can be de\214ned by means of the).275 E F1(define-method)2.75 E -F0 2.75(macro. The)6 F(syntax is)2.75 E F1(\(define-method)100.346 435.212 Q/F3 -10/Times-Italic@0 SF 3.5(class lambda-list)6 F F1(.)6 E F3(body)6 E F1(\))A F0 -(where)72 457.212 Q/F4 11/Times-Italic@0 SF(class)3.819 E F0 1.068 -(is the class to which the method is to be added,)3.818 F F4(lambda-list)3.818 -E F0 1.068(is a list specifying the)3.818 F(method')72 472.212 Q 2.75(sn)-.605 -G(ame and formal ar)120.587 472.212 Q(guments \(ha)-.198 E -(ving the same syntax as the ar)-.22 E(gument of)-.198 E F1(define)2.75 E F0 -(\).)A F1(define-method)97 490.812 Q F0 1.381(simply creates a class-v)7.381 F -1.381(ariable with the name of the method, creates a)-.275 F .163 -(lambda closure using the)72 505.812 R F4(lambda-list)2.913 E F0 .163(and the) -2.913 F F4(body)2.913 E F0 .162 -(forms, and binds the resulting procedure to the)2.913 F(ne)72 520.812 Q .953 -(wly-created v)-.275 F 3.703(ariable. When)-.275 F 3.703(am)3.703 G .953 -(essage with the name of the method is sent to an instance of)229.207 520.812 R -.504(the class, the method is in)72 535.812 R -.22(vo)-.44 G -.11(ke).22 G .504 -(d, and the).11 F F4(body)3.254 E F0 .504(is e)3.254 F -.275(va)-.275 G .503 -(luated in the scope of the instance \(so that it).275 F -(can access all instance and class v)72 550.812 Q(ariables\).)-.275 E F2 2.75 -(6. Sending)72 580.812 R(Messages)2.75 E F0 3.327(Am)97 599.412 S .577 -(essage can be sent to an instance by means of the function)116.827 599.412 R -F1(send)3.328 E F0 6.078(.T)C .578(he syntax of)421.748 599.412 R F1(send)3.328 -E F0(is)72 614.412 Q F1(\(send)100.346 636.915 Q F3 3.5(instance messa)6 F -.1 -(ge)-.1 G F1(.)6.1 E F3(ar)6 E(gs)-.37 E F1(\))A F0(where)72 658.915 Q F4 -(instance)4.138 E F0 1.388(is the instance to which the message is to be sent,) -4.138 F F4(messa)4.137 E -.11(ge)-.11 G F0 1.387(is the name of the)4.247 F -.332(method to be in)72 673.915 R -.22(vo)-.44 G -.11(ke).22 G 3.082(d\().11 G -3.082(as)174.605 673.915 S .332(ymbol\), and)186.85 673.915 R F4(ar)3.082 E(gs) --.407 E F0 .332(are the ar)3.082 F .333(guments to be passed to the method.) --.198 F(Exam-)5.833 E(ple:)72 688.915 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF -(\(define-class c \(instance-vars a\) \(class-vars \(b 10\)\)\))100.346 94.503 -Q(\(define-method c \(foo x\))100.346 115.503 Q(\(cons \(set! a x\) b\)\)) -112.346 129.503 Q 6(;s)262.346 129.503 S(et! returns previous value)280.346 -129.503 Q(\(define i \(make-instance c \(a 99\)\)\))100.346 150.503 Q -(\(send i 'foo 1\))100.346 178.503 Q/F2 10/Times-Roman@0 SF 2.5(returns \(99) -250.346 178.503 R 2.5(.1)2.5 G(0\))308.946 178.503 Q F1(\(send i 'foo 2\)) -100.346 192.503 Q F2 2.5(returns \(1)250.346 192.503 R 2.5(.1)2.5 G(0\))303.946 -192.503 Q F0 .725(When a message is sent to an instance for which no method ha\ -s been de\214ned, a `)97 218.103 R(`message)-.814 E(not understood')72 233.103 -Q 2.75('e)-.814 G(rror is signaled.)151.838 233.103 Q 1.132(The function)97 -251.703 R F1(send-if-handles)3.883 E F0 1.133(is identical to)7.133 F F1(send) -3.883 E F0 3.883(,e)C 1.133(xcept that it returns a list of one)356.446 251.703 -R 2.197(element, the return v)72 266.703 R 2.196(alue of the method, or)-.275 F -F1(#f)4.946 E F0 2.196(when the message is not understood by the)8.196 F -(instance.)72 281.703 Q/F3 11/Times-Bold@0 SF 2.75(7. Ev)72 311.703 R -(aluating Expr)-.11 E(essions within an Instance)-.198 E F0 1.355(The macro)97 -330.303 R F1(with-instance)4.105 E F0 1.355(can be used to e)7.355 F -.275(va) --.275 G 1.355(luate e).275 F 1.356(xpressions within the scope of an)-.165 F -2.75(instance. The)72 345.303 R(syntax is)2.75 E F1(\(with-instance)100.346 -367.806 Q/F4 10/Times-Italic@0 SF(instance)6 E F1(.)6 E F4(body)6 E F1(\).)A F0 -(The)72 389.806 Q/F5 11/Times-Italic@0 SF(body)3.508 E F0 .758(forms are e) -3.508 F -.275(va)-.275 G .758(luated in the same en).275 F .757 -(vironment in which a method of)-.44 F F5(instance)3.507 E F0 -.11(wo)3.507 G -.757(uld be).11 F -.275(eva)72 404.806 S 2.035(luated, i.).275 F 2.035(e. the) -1.833 F 4.786(yc)-.165 G 2.036(an access all and class and instance v)169.644 -404.806 R 2.036(ariables \(including)-.275 F F1(self)4.786 E F0(\).)A F1(with-) -7.536 E(instance)72 419.806 Q F0(returns the v)6 E(alue of the last)-.275 E F5 -(body)2.75 E F0 2.75(form. Example:)2.75 F F1 -(\(define-class c \(class-vars \(x 5\)\) \(instance-vars y\)\))100.346 442.309 -Q(\(define i \(make-instance c \(y 1\)\)\))100.346 463.309 Q(\(define x 10\)) -100.346 484.309 Q(\(with-instance i \(cons x y\)\))100.346 498.309 Q F2 2.5 -(returns \(5)328.346 498.309 R 2.5(.1)2.5 G(\))381.946 498.309 Q F3 2.75 -(8. Setting)72 535.309 R(Instance and Class V)2.75 E(ariables)-1.012 E F0 1.187 -(Generally class and instance v)97 553.909 R 1.187 -(ariables are manipulated by methods or)-.275 F 3.937(,i)-.44 G 3.937(fa) -423.119 553.909 S 1.187(pplicable, from)435.603 553.909 R .761(within a)72 -568.909 R F1(with-instance)3.511 E F0 3.511(form. In)6.761 F .762(addition, v) -3.511 F .762(alues can be assigned to class and instance v)-.275 F(ari-)-.275 E -.649(ables without in)72 583.909 R -.22(vo)-.44 G .648 -(lving a message send by means of the).22 F F1(instance-set!)3.398 E F0 3.398 -(macro. The)418.389 583.909 R(syntax)3.398 E(of)72 598.909 Q F1(instance-set!) -2.75 E F0(is)173.913 598.909 Q F1(\(instance-set!)100.346 621.412 Q F4 3.5 -(instance variable value)6 F F1(\))A F0(where)72 643.412 Q F5(variable)5.844 E -F0 3.094(is a symbol, the name of the class or instance v)5.844 F(ariable.) --.275 E F1(instance-set!)8.595 E F0(returns the pre)72 658.412 Q(vious v)-.275 -E(alue of the v)-.275 E(ariable \(lik)-.275 E(e)-.11 E F1(set!)2.75 E F0(\).)A -.697(Class v)97 677.012 R .697(ariables can be modi\214ed without in)-.275 F --.22(vo)-.44 G .696(lving an instance of the class by means of the).22 F(macro) -72 692.012 Q F1(class-set!)2.75 E F0(:)A EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(class-set!)100.346 94.503 Q/F2 10 -/Times-Italic@0 SF 3.5(class variable value)6 F F1(\).)A/F3 11/Times-Italic@0 -SF(variable)72 116.503 Q F0(must be the name of a class v)2.75 E(ariable of) --.275 E F3(class)2.75 E F0 5.5(.N)C(ote that one dif)323.152 116.503 Q -(ference between)-.275 E F1(\(instance-set! i 'var x\))100.346 139.006 Q F0 -(and)72 161.006 Q F1(\(with-instance i \(set! var x\)\))100.346 183.509 Q F0 -.735(is that in the former case)72 205.509 R F1(x)3.486 E F0 .736(is e)6.736 F --.275(va)-.275 G .736(luated in the current en).275 F .736 -(vironment while in the latter case)-.44 F F1(x)3.486 E F0(is)6.736 E -.275 -(eva)72 220.509 S(luated within the scope of the instance \(here).275 E F1(x) -2.75 E F0(might be a class or instance v)6 E(ariable\).)-.275 E/F4 11 -/Times-Bold@0 SF 2.75(9. Obtaining)72 250.509 R(Inf)2.75 E -(ormation about Classes and Instances)-.275 E F0 .951(The function)97 269.109 R -F1(class-name)3.701 E F0 .95(returns the name of a class \(a symbol\) or)6.951 -F 3.7(,w)-.44 G .95(hen applied to an)425.69 269.109 R -(instance, the name of the class of which it is an instance.)72 284.109 Q .615 -(The predicate)97 302.709 R F1(method-known?)3.365 E F0 .615 -(can be used to check whether a method of a gi)251.765 302.709 R -.165(ve)-.275 -G 3.366(nn).165 G(ame)485.674 302.709 Q(is kno)72 317.709 Q(wn to a class.) --.275 E(The syntax is)5.5 E F1(\(method-known?)100.346 340.212 Q F2 3.5 -(method class)6 F F1(\))A F0(where)72 362.212 Q F3(method)2.75 E F0 -(is a symbol.)2.75 E .244(The type predicates)97 380.812 R F1(class?)2.994 E F0 -(and)234.867 380.812 Q F1(instance?)2.994 E F0 .244 -(can be used to check whether an object is)319.989 380.812 R 2.75(ac)72 395.812 -S(lass or an instance, respecti)84.518 395.812 Q -.165(ve)-.275 G(ly).165 E(.) --.715 E(The functions)97 414.412 Q F1(\(check-class)100.346 436.915 Q F2 3.5 -(symbol object)6 F F1(\))A F0(and)72 458.915 Q F1(\(check-instance)100.346 -481.418 Q F2 3.5(symbol object)6 F F1(\))A F0 .831(check whether)72 503.418 R -F3(object)3.581 E F0 .831(is a class \(i.)3.581 F .832 -(e. satis\214es the predicate)1.833 F F1(class?)3.582 E F0 3.582(\)o)C 3.582 -(ra)385.663 503.418 S 3.582(ni)397.792 503.418 S .832(nstance, respecti)409.932 -503.418 R -.165(ve)-.275 G(ly).165 E(,)-.715 E -(and, if not, signal an error; in this case)72 518.418 Q F3(symbol)2.75 E F0 -(is used as the \214rst ar)2.75 E(gument to)-.198 E F1(error)2.75 E F0(.)A .119 -(The functions)97 537.018 R F1(describe-class)2.869 E F0(and)6.118 E F1 -(describe-instance)2.868 E F0 .118(print the components \(name,)6.118 F 1.376 -(class/instance v)72 552.018 R 1.376 -(ariables, etc.\) of a class or instance, respecti)-.275 F -.165(ve)-.275 G(ly) -.165 E 6.877(.T)-.715 G 1.377(he function)378.659 552.018 R F1(describe)4.127 E -F0(has)7.377 E 4.931(been e)72 567.018 R 4.931(xtended in w)-.165 F 4.93 -(ay that when)-.11 F F1 4.93(\(feature? 'oops\))7.68 F F0 4.93(is true,)357.355 -567.018 R F1(describe-class)7.68 E F0(or)494.837 567.018 Q F1 -(describe-instance)72 582.018 Q F0 .507(are called when)6.507 F F1(describe) -3.257 E F0 .508(is applied to an object that satis\214es)6.507 F F1(class?) -3.258 E F0(or)72 597.018 Q F1(instance?)2.75 E F0 2.75(,r)C(especti)147.076 -597.018 Q -.165(ve)-.275 G(ly).165 E(.)-.715 E EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(C)72 174 Q F0 -(check-class,)72 204 Q/F2 12/Times-Bold@0 SF(5)2.75 E F0(check-instance,)72 219 -Q F2(5)2.75 E F0(class v)72 234 Q(ariables, 1)-.275 E(class-name,)72 249 Q F2 -(5)2.75 E F0(class-set!,)72 264 Q F2(4)2.75 E F0(class-v)72 279 Q(ars,)-.275 E -F2(1)2.75 E F0(class?,)72 294 Q F2(5)2.75 E F1(D)72 324 Q F0(de\214ne-class,)72 -354 Q F2(1)2.75 E F0(de\214ne-method,)72 369 Q F2(3)2.75 E F0(describe,)72 384 -Q F2(5)2.75 E F0(describe-class,)72 399 Q F2(5)2.75 E F0(describe-instance,)72 -414 Q F2(5)2.75 E F1(I)72 444 Q F0(initialize-instance,)72 474 Q F2(2)2.75 E F0 -(initializers, 1)72 489 Q(instance v)72 504 Q(ariables, 1)-.275 E -(instance-set!,)72 519 Q F2(4)2.75 E F0(instance-v)72 534 Q(ars,)-.275 E F2(1) -2.75 E F0(instance?,)72 549 Q F2(5)2.75 E F1(M)72 579 Q F0(mak)72 609 Q -(e-instance,)-.11 E F2(2)2.75 E F0(method-kno)72 624 Q(wn?,)-.275 E F2(5)2.75 E -F1(O)72 654 Q F0(oops, 1)302.4 174 Q F1(S)302.4 204 Q F0(self,)302.4 234 Q F2 -(2)2.75 E F0(send, 2,)302.4 249 Q F2(3)2.75 E F0(send-if-handles,)302.4 264 Q -F2(4)2.75 E F0(super)302.4 279 Q(-class,)-.22 E F2(1)2.75 E F1(W)302.4 309 Q F0 -(with-instance,)302.4 339 Q F2(4)2.75 E EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Using)72 196.2 Q/F2 10/Times-Roman@0 SF(OOPS) -2.75 E F1 19.25(..............................................................\ -................................................................ 1)3.411 F -(De\214ning Classes)72 214.8 Q 19.25(.........................................\ -..............................................................................\ - 1)3 F(Creating Instances of a Class)72 233.4 Q 19.25(........................\ -........................................................................... 2) -4.551 F(De\214ning Methods)72 252 Q 19.25(....................................\ -..............................................................................\ -... 3)3 F(Sending Messages)72 270.6 Q 19.25(..................................\ -..............................................................................\ -.... 3)3.924 F(Ev)72 289.2 Q(aluating Expressions within an Instance)-.275 E -19.25(........................................................................\ -...... 4)3.297 F(Setting Instance and Class V)72 307.8 Q .272(ariables .......\ -..............................................................................\ -...)-1.221 F(4)498.5 307.8 Q(Obtaining Information about Classes and Instances) -72 326.4 Q 19.25 -(................................................................ 5)3.946 F -(Inde)72 345 Q 2.868(x.)-.165 G 19.25(........................................\ -..............................................................................\ -.................. 6)102.5 345 R EP -%%Trailer -end -%%EOF diff --git a/doc/record/Makefile.am b/doc/record/Makefile.am index 3c86860..d96ec9d 100644 --- a/doc/record/Makefile.am +++ b/doc/record/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = record.ms record.ps +EXTRA_DIST = record.ms + +if HAVE_GROFF +doc_DATA = record.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= record +TROFF= groff -ms -t +UNROFF= unroff -ms + +record.ps: record.ms index.ms + (cat record.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > record.ps + +record.html: record.ms + (cat $?; echo ".Tc") | $(UNROFF) document=record + +index.ms: record.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: record.ms + $(TROFF) record.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] record.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms record.ps record.html diff --git a/doc/record/record.ps b/doc/record/record.ps deleted file mode 100644 index 64661c0..0000000 --- a/doc/record/record.ps +++ /dev/null @@ -1,640 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 7 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E -(Elk Record Extension)231.996 138 Q/F1 10/Times-Italic@0 SF(Oliver Laumann) -255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R(oduction)-.198 E/F3 -11/Times-Roman@0 SF .345(The record e)97 252.6 R .345(xtension to Elk allo) --.165 F .344(ws Scheme applications to de\214ne record data types \(similar) --.275 F(to, although less po)72 267.6 Q(werful than, Common Lisp)-.275 E/F4 11 -/Times-Italic@0 SF(structur)2.75 E(es)-.407 E F3(\).)A 4.329(Ar)97 286.2 S -1.579(ecord type can be instantiated to obtain a ne)112.934 286.2 R 4.329(wr) --.275 G 1.579(ecord \(a member of the gi)334.297 286.2 R -.165(ve)-.275 G 4.33 -(nr).165 G(ecord)479.569 286.2 Q 5.568(type\). Each)72 301.2 R 2.817(record is\ - a collection of named \214elds that can hold arbitrary Scheme objects.)5.568 F -.819(Records are \214rst-class Scheme objects; the)72 316.2 R 3.57(ya)-.165 G -.82(re members of the)277.764 316.2 R F4 -.407(re)3.57 G(cor).407 E(d)-.407 E -F3 .82(data type that is disjoint)3.57 F 1.072(from all other Scheme types.)72 -331.2 R 1.071 -(Record types are \214rst-class objects as well; each record type is a)6.572 F -(member of the)72 346.2 Q F4 -.407(re)2.75 G(cor).407 E(d-type)-.407 E F3 -(Scheme data type.)2.75 E .075(The record e)97 364.8 R .075(xtension pro)-.165 -F .075(vides f)-.165 F .075(acilities to de\214ne ne)-.11 F 2.825(wr)-.275 G -.076(ecord types, create instances of e)339.446 364.8 R(xist-)-.165 E .002(ing\ - record types, de\214ne accessor and modi\214er functions to read and write th\ -e \214elds of records of a)72 379.8 R(gi)72 394.8 Q -.165(ve)-.275 G 2.75(nt) -.165 G(ype, and type predicates for the)101.81 394.8 Q F4 -.407(re)2.75 G(cor) -.407 E(d)-.407 E F3(and)2.75 E F4 -.407(re)2.75 G(cor).407 E(d-type)-.407 E F3 -(data types.)2.75 E .322(In addition, the e)97 413.4 R .322(xtension pro)-.165 -F .323(vides macros that simplify the de\214nition of constructor)-.165 F 3.073 -(,a)-.44 G(cces-)481.406 413.4 Q(sor and modi\214er functions for a ne)72 428.4 -Q(wly de\214ned record type.)-.275 E F2 2.75(2. Using)72 458.4 R -(the Record Extension)2.75 E F3(The record e)97 477 Q(xtension is loaded by e) --.165 E -.275(va)-.275 G(luating).275 E/F5 10/Courier@0 SF(\(require 'record\)) -100.346 499.503 Q F3(in the interacti)72 521.503 Q .33 -.165(ve t)-.275 H(ople) -.165 E -.165(ve)-.275 G 2.75(lo).165 G 2.75(ri)191.493 521.503 S 2.75(naS) -200.964 521.503 S(cheme program.)222.964 521.503 Q .551 -(This causes the \214les)97 540.103 R F4 -.407(re)3.301 G(cor).407 E(d.scm) --.407 E F3(and)3.301 E F4 -.407(re)3.301 G(cor).407 E(d.o)-.407 E F3 .551 -(to be loaded into the interpreter \()3.301 F F4 -.407(re)C(cor).407 E(d.o) --.407 E F3(has)3.3 E .215(to be link)72 555.103 R .216(ed with the interpreter\ - on platforms that do not support dynamic loading of object \214les\).)-.11 F -(Loading the record e)97 573.703 Q(xtension causes the features)-.165 E F4 --.407(re)2.75 G(cor).407 E(d)-.407 E F3(and)2.75 E F4 -.407(re)2.75 G(cor).407 -E(d.o)-.407 E F3(to be pro)2.75 E(vided.)-.165 E F2 2.75(3. Record)72 603.703 R --.814(Ty)2.75 G(pes).814 E(\(mak)72 633.703 Q(e-r)-.11 E(ecord-type)-.198 E F4 -(type-name \214elds)4.583 E F2 216.437(\)p)C -.198(ro)462.244 633.703 S(cedur) -.198 E(e)-.198 E F4(mak)72 652.303 Q(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F3 -.5(creates a ne)3.25 F 3.25(wr)-.275 G .5(ecord type.)219.398 652.303 R F4 -(type-name)6 E F3 .499(\(a string or a symbol\) is the name of the)3.25 F .379 -(record type; it is used in the printed representation of the record type and \ -of records belonging to)72 667.303 R .731(the ne)72 682.303 R 3.481(wt)-.275 G -3.481(ype. If)113.513 682.303 R F4(type-name)3.481 E F3 .73 -(is a symbol, it is con)3.481 F -.165(ve)-.44 G .73 -(rted into a string \214rst.).165 F F4(\214elds)6.23 E F3 .73 -(is a list of sym-)3.48 F .32(bols naming the \214elds of a record of the ne)72 -697.303 R 3.07(wt)-.275 G 3.07(ype. An)277.171 697.303 R .32 -(error is signaled of the list contains dupli-)3.07 F(cate names.)72 712.303 Q -EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Italic@0 SF(mak)72 87 Q(e-r)-.11 E(ecor)-.407 E(d-type) --.407 E F0(returns the ne)2.75 E 2.75(wr)-.275 G -(ecord type \(an object of the Scheme type)225.967 87 Q F1 -.407(re)2.75 G(cor) -.407 E(d-type)-.407 E F0(\).)A(Example:)72 105.6 Q/F2 10/Courier@0 SF -(\(define time-record)100.346 128.103 Q -(\(make-record-type 'time '\(hours minutes seconds\)\)\))112.346 142.103 Q/F3 -11/Times-Bold@0 SF(\(r)72 179.103 Q(ecord-type?)-.198 E F1(obj)4.583 E F3 -297.881(\)p)C -.198(ro)462.244 179.103 S(cedur).198 E(e)-.198 E F0 .211 -(This type predicate returns #t if)72 197.703 R F1(obj)2.96 E F0 .21(is a)2.96 -F F1 -.407(re)2.96 G(cor).407 E(d-type)-.407 E F0 .21(object \(i.)2.96 F .21 -(e. the return v)1.833 F .21(alue of a call to)-.275 F F1(mak)2.96 E(e-)-.11 E --.407(re)72 212.703 S(cor).407 E(d-type)-.407 E F0(\), #f otherwise.)A F3(\(r) -72 242.703 Q(ecord-type-name)-.198 E F1(rt)4.583 E F3 280.776(\)p)C -.198(ro) -462.244 242.703 S(cedur).198 E(e)-.198 E F0 .302 -(This procedure returns the type name \(a string\) of the record type)72 -261.303 R F1(rt)3.052 E F0 3.052(,i)C 1.833(.e)382.021 261.303 S 3.052(.t) --1.833 G(he)400.348 261.303 Q F1(type-name)3.052 E F0(ar)3.052 E(gument)-.198 E -(that w)72 276.303 Q(as supplied to the call to)-.11 E F1(mak)2.75 E(e-r)-.11 E -(ecor)-.407 E(d-type)-.407 E F0(that created the record type)2.75 E F1(rt)2.75 -E F0(.)A F3(\(r)72 306.303 Q(ecord-type-\214eld-names)-.198 E F1(rt)4.583 E F3 -252.66(\)p)C -.198(ro)462.244 306.303 S(cedur).198 E(e)-.198 E F1 -.407(re)72 -324.903 S(cor).407 E(d-type-\214eld-names)-.407 E F0 .524 -(returns the list of \214eld names associated with the record type)3.275 F F1 -(rt)3.274 E F0 .524(\(a list of)3.274 F(symbols\), i.)72 339.903 Q(e. the)1.833 -E F1(\214elds)2.75 E F0(ar)2.75 E(gument that w)-.198 E(as gi)-.11 E -.165(ve) --.275 G 2.75(ni).165 G 2.75(nt)290.929 339.903 S(he call to)302.237 339.903 Q -F1(mak)2.75 E(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F0(that created)2.75 E F1 -(rt)2.75 E F0(.)A F3(\(r)72 369.903 Q(ecord-constructor)-.198 E F1(rt \214elds) -4.583 E F3 249.921(\)p)C -.198(ro)462.244 369.903 S(cedur).198 E(e)-.198 E(\(r) -72 384.903 Q(ecord-constructor)-.198 E F1(rt)4.583 E F3 275.892(\)p)C -.198(ro) -462.244 384.903 S(cedur).198 E(e)-.198 E F1 -.407(re)72 403.503 S(cor).407 E -(d-constructor)-.407 E F0 -(returns a procedure for creating instances of the record type)2.75 E F1(rt) -2.75 E F0(.)A 1.065(The returned procedure accepts as man)72 422.103 R 3.815 -(ya)-.165 G -.198(rg)263.322 422.103 S 1.065 -(uments as there are symbols in the list).198 F F1(\214elds)3.816 E F0 3.816 -(;t)C(hese)484.453 422.103 Q(ar)72 437.103 Q .584 -(guments are used as the initial v)-.198 F .583 -(alues of those \214elds in the ne)-.275 F .583(wly created record instance.) --.275 F(The)6.083 E -.275(va)72 452.103 S .736(lues of an).275 F 3.486<798c> --.165 G .736(elds for which no initial v)141.286 452.103 R .736 -(alue is speci\214ed \(i.)-.275 F 3.487(e. that)1.833 F .737 -(are not present in)3.487 F F1(\214elds)3.487 E F0 3.487(\)a)C(re)495.453 -452.103 Q 2.836(unde\214ned. If)72 467.103 R(the)2.836 E F1(\214elds)2.836 E F0 -(ar)2.836 E .085(gument is omitted, the \214eld names that were gi)-.198 F --.165(ve)-.275 G 2.835(na).165 G 2.835(sa)414.648 467.103 S 2.835(na)426.646 -467.103 S -.198(rg)439.865 467.103 S .085(ument in the).198 F(call to)72 -482.103 Q F1(mak)2.75 E(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F0 -(that created the record type)2.75 E F1(rt)2.75 E F0(are used instead.)2.75 E -(Example:)72 500.703 Q F2(\(define make-time)100.346 523.206 Q -(\(record-constructor time-record\)\))118.346 537.206 Q -(\(define noon \(make-time 12 0 0\)\))100.346 551.206 Q -(\(define make-uninitialized-time)100.346 572.206 Q -(\(record-constructor time-record '\(\)\)\))118.346 586.206 Q F3(\(r)72 623.206 -Q(ecord-pr)-.198 E(edicate)-.198 E F1(rt)4.583 E F3 286.474(\)p)C -.198(ro) -462.244 623.206 S(cedur).198 E(e)-.198 E F1 -.407(re)72 641.806 S(cor).407 E -(d-pr)-.407 E(edicate)-.407 E F0 .873 -(returns a procedure for testing membership in the record type)3.623 F F1(rt) -3.623 E F0 6.373(.T)C .873(he returned)453.341 641.806 R .584 -(procedure accepts one ar)72 656.806 R .584(gument and returns #t if the ar) --.198 F .583(gument is a member of the record type)-.198 F F1(rt)3.333 E F0 --.917(\(i. e.)72 671.806 R .038(if it has been created by in)2.788 F -.22(vo) --.44 G .038(king a constructor returned by calling).22 F F1 -.407(re)2.789 G -(cor).407 E(d-constructor)-.407 E F0(with)2.789 E F1(rt)2.789 E F0(as an ar)72 -686.806 Q(gument\), #f otherwise.)-.198 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(ecord-accessor)-.198 E/F2 11 -/Times-Italic@0 SF(rt \214eld)4.583 E F1 269.479(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F2 -.407(re)72 105.6 S(cor).407 E(d-accessor)-.407 E F0 -.225(returns a procedure for reading the v)2.975 F .225 -(alue of the \214eld named by)-.275 F F2(\214eld)2.974 E F0 .224(of a member) -2.974 F .914(of the record type)72 120.6 R F2(rt)3.664 E F0 6.414(.T)C .914 -(he returned procedure accepts one ar)179.519 120.6 R .914 -(gument, which must be a record of)-.198 F .45(the record type)72 135.6 R F2 -(rt)3.2 E F0 3.2(;i)C 3.2(tr)158.731 135.6 S .45(eturns the current v)168.652 -135.6 R .45(alue of the speci\214ed \214eld in that record.)-.275 F F2(\214eld) -5.949 E F0 .449(must be a)3.199 F .205 -(member of the list of \214eld names that w)72 150.6 R .206 -(as supplied to the call to)-.11 F F2(mak)2.956 E(e-r)-.11 E(ecor)-.407 E -(d-type)-.407 E F0 .206(that created)2.956 F F2(rt)2.956 E F0(.)A(Example:)72 -169.2 Q/F3 10/Courier@0 SF(\(define time-hours)100.346 191.703 Q -(\(record-accessor time-record 'hours\)\))112.346 205.703 Q -(\(define noon \(\(record-constructor time-record\) 12 0 0\)\))100.346 226.703 -Q(\(time-hours noon\))100.346 240.703 Q/F4 10/Symbol SF214.346 240.703 Q/F5 -10/Times-Italic@0 SF(12)2.5 E F1(\(r)72 277.703 Q(ecord-modi\214er)-.198 E F2 -(rt \214eld)4.583 E F1 268.852(\)p)C -.198(ro)462.244 277.703 S(cedur).198 E(e) --.198 E F2 -.407(re)72 296.303 S(cor).407 E(d-modi\214er)-.407 E F0 .415 -(returns a procedure for writing the v)3.165 F .414 -(alue of the \214eld named by)-.275 F F2(\214eld)3.164 E F0 .414(of a member) -3.164 F .482(of the record type)72 311.303 R F2(rt)3.232 E F0 5.982(.T)C .482 -(he returned procedure accepts tw)177.359 311.303 R 3.233(oa)-.11 G -.198(rg) -338.181 311.303 S .483(uments: a record of the record type).198 F F2(rt)72 -326.303 Q F0 1.734(and an arbitrary object; it stores the gi)4.484 F -.165(ve) --.275 G 4.483(no).165 G 1.733 -(bject into the speci\214ed \214eld in that record and)288.495 326.303 R .468 -(returns the pre)72 341.303 R .468(vious v)-.275 F .469(alue of the \214eld.) --.275 F F2(\214eld)5.969 E F0 .469 -(must be a member of the list of \214eld names that w)3.219 F(as)-.11 E -(supplied to the call to)72 356.303 Q F2(mak)2.75 E(e-r)-.11 E(ecor)-.407 E -(d-type)-.407 E F0(that created)2.75 E F2(rt)2.75 E F0(.)A(Example)72 374.903 Q -F3(\(define set-time-hours!)100.346 397.406 Q -(\(record-modifier time-record 'hours\)\))112.346 411.406 Q F1(\(describe-r)72 -448.406 Q(ecord-type)-.198 E F2(rt)4.583 E F1 267.334(\)p)C -.198(ro)462.244 -448.406 S(cedur).198 E(e)-.198 E F0 .153(This procedure prints the names of th\ -e \214elds associated with the record type)72 467.006 R F2(rt)2.902 E F0 2.902 -(;i)C 2.902(ti)427.917 467.006 S 2.902(sa)436.935 467.006 S(utomatically)449 -467.006 Q(in)72 482.006 Q -.22(vo)-.44 G -.11(ke).22 G 2.75(db).11 G 2.75(yt) -114.922 482.006 S(he standard)126.23 482.006 Q F2(describe)2.75 E F0 -(procedure of Elk if)2.75 E F2(describe)2.75 E F0(is in)2.75 E -.22(vo)-.44 G --.11(ke).22 G 2.75(dw).11 G(ith a record type.)401.01 482.006 Q F1 2.75 -(4. Records)72 512.006 R(\(r)72 542.006 Q(ecord?)-.198 E F2(obj)4.583 E F1 -321.707(\)p)C -.198(ro)462.244 542.006 S(cedur).198 E(e)-.198 E F0 .417 -(This type predicate returns #t if)72 560.606 R F2(obj)3.167 E F0 .417 -(is an object of type)3.167 F F2 -.407(re)3.167 G(cor).407 E(d)-.407 E F0 -.917 -(\(i. e.)3.167 F .417(the return v)3.167 F .417(alue of a call to a)-.275 F -(record constructor of an)72 575.606 Q 2.75(yr)-.165 G -(ecord type\), #f otherwise.)189.128 575.606 Q F1(\(r)72 605.606 Q -(ecord-type-descriptor)-.198 E F2 -.407(re)4.583 G(cor).407 E(d)-.407 E F1 -236.996(\)p)C -.198(ro)462.244 605.606 S(cedur).198 E(e)-.198 E F0 1.302 -(This procedure returns the record type representing the type of the gi)72 -624.206 R -.165(ve)-.275 G 4.051(nr).165 G 4.051(ecord. The)412.21 624.206 R -(returned)4.051 E .817(record type object is equal \(in the sense of)72 639.206 -R F2(eq?)3.567 E F0 6.317(\)t)C 3.567(ot)296.758 639.206 S .817 -(he record type ar)308.883 639.206 R .817(gument that w)-.198 F .817 -(as passed to)-.11 F F2 -.407(re)72 654.206 S(cor).407 E(d-constructor)-.407 E -F0(in the call that created the constructor procedure that created)2.75 E F2 --.407(re)2.75 G(cor).407 E(d)-.407 E F0(.)A(Example: e)72 672.806 Q -.275(va) --.275 G(luating the e).275 E(xpression)-.165 E F3 -(\(\(record-predicate \(record-type-descriptor r\)\) r\))100.346 695.309 Q F0 -(al)72 717.309 Q -.11(wa)-.11 G(ys yields #t for an).11 E 2.75(yg)-.165 G --2.365 -.275(iv e)184.959 717.309 T 2.75(nr).275 G(ecord)209.874 717.309 Q F2 -(r)2.75 E F0(.)A EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(ecord-v)-.198 E(alues)-.11 E/F2 -11/Times-Italic@0 SF -.407(re)4.583 G(cor).407 E(d)-.407 E F1 279.863(\)p)C --.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F2 -.407(re)72 105.6 S(cor).407 E -(d-values)-.407 E F0 .649(returns the current contents of the \214elds of)3.399 -F F2 -.407(re)3.399 G(cor).407 E(d)-.407 E F0 .649(as a v)3.399 F(ector)-.165 E -6.149(.T)-.605 G(he)425.375 105.6 Q F2(n)3.398 E F0 .648(th element of)B .604 -(the v)72 120.6 R .605(ector corresponds to the \214eld with the name gi)-.165 -F -.165(ve)-.275 G 3.355(na).165 G 3.355(st)326.735 120.6 S(he)337.427 120.6 Q -F2(n)3.355 E F0 .605(th element of the)B F2(\214elds)3.355 E F0(ar)3.355 E -(gument)-.198 E(in the call to)72 135.6 Q F2(mak)2.75 E(e-r)-.11 E(ecor)-.407 E -(d-type)-.407 E F0(that created the type to which)2.75 E F2 -.407(re)2.75 G -(cor).407 E(d)-.407 E F0(belongs.)2.75 E 1.159(The returned v)72 154.2 R 1.159 -(ector is not a cop)-.165 F 3.909(yo)-.11 G 3.909(ft)233.497 154.2 S 1.159 -(he actual \214elds; i.)244.127 154.2 R 1.159 -(e. modifying the contents of the v)1.833 F(ector)-.165 E -(directly writes the corresponding \214elds of the record.)72 169.2 Q F1 -(\(describe-r)72 199.2 Q(ecord)-.198 E F2 -.407(re)4.583 G(cor).407 E(d)-.407 E -F1 269.985(\)p)C -.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 E F0 .025 -(This procedure prints the names and current v)72 217.8 R .025 -(alues of the \214elds of the gi)-.275 F -.165(ve)-.275 G 2.775(nr).165 G .025 -(ecord; it is automati-)412.569 217.8 R(cally in)72 232.8 Q -.22(vo)-.44 G -.11 -(ke).22 G 2.75(db).11 G 2.75(yt)139.056 232.8 S(he standard)150.364 232.8 Q F2 -(describe)2.75 E F0(procedure of Elk if)2.75 E F2(describe)2.75 E F0(is in)2.75 -E -.22(vo)-.44 G -.11(ke).22 G 2.75(dw).11 G(ith a record.)425.144 232.8 Q F1 -2.75(5. Con)72 262.8 R -.11(ve)-.44 G(nience Macr).11 E(os)-.198 E F0 -(The macros described in this section are loaded by e)97 281.4 Q -.275(va)-.275 -G(luating).275 E/F3 10/Courier@0 SF(\(require 'recordutil\))100.346 303.903 Q -F0 1.594(after ha)72 325.903 R 1.594(ving loaded the record e)-.22 F 4.343 -(xtension. This)-.165 F 1.593(causes the \214le)4.343 F F2 -.407(re)4.343 G -(cor).407 E(dutil.scm)-.407 E F0 1.593(to be loaded and)4.343 F -(de\214nes the feature)72 340.903 Q F2 -.407(re)2.75 G(cor).407 E(dutil)-.407 E -F0(.)A F1(\(de\214ne-r)72 370.903 Q(ecord-type)-.198 E F2(name \214elds)4.583 E -F1 253.177(\)s)C(yntax)477.721 370.903 Q F0 .796(This macro de\214nes a v)72 -389.503 R(ariable)-.275 E F2(-r)3.547 E(ecor)-.407 E(d)-.407 E F0 3.547 -(,i)C -2.09 -.44(nv o)288.188 389.503 T -.11(ke).44 G 3.547(st).11 G .797 -(he procedure)325.186 389.503 R F2(mak)3.547 E(e-r)-.11 E(ecor)-.407 E(d-type) --.407 E F0 .797(with the)3.547 F(gi)72 404.503 Q -.165(ve)-.275 G(n).165 E F2 -(name)4.866 E F0(and)4.866 E F2(\214elds)4.866 E F0 4.866(,a)C 2.116 -(nd assigns the result to this v)186.031 404.503 R 4.866(ariable. In)-.275 F -(addition,)4.866 E F2(de\214ne-r)4.866 E(ecor)-.407 E(d-type)-.407 E F0 .76 -(de\214nes a type predicate for the ne)72 419.503 R 3.51(wr)-.275 G .76 -(ecord type as)239.856 419.503 R F2(\255r)3.511 E(ecor)-.407 E(d?)-.407 E -F0 .761(and a constructor function)3.511 F(as)72 434.503 Q F2(mak)3.35 E -(e\255\255r)-.11 E(ecor)-.407 E(d)-.407 E F0 6.1(.T)C .6 -(he constructor function accepts no ar)205.222 434.503 R .599 -(guments and returns an unini-)-.198 F(tialized record of the ne)72 449.503 Q -(wly de\214ned record type.)-.275 E(Example:)72 468.103 Q F3 -(\(require 'record\))100.346 490.606 Q(\(require 'recordutil\))100.346 504.606 -Q(\(define-record-type)100.346 525.606 Q(time \(hours minutes seconds\)\)) -112.346 539.606 Q(\(record-type? time-record\))100.346 557.806 Q/F4 10/Symbol -SF268.346 557.806 Q/F5 10/Times-Italic@0 SF(#t)2.5 E F3 -(\(define t \(make-time-record\)\))100.346 576.006 Q(\(time-record? t\))100.346 -594.206 Q F4208.346 594.206 Q F5(#t)2.5 E F1(\(de\214ne-r)72 631.206 Q -(ecord-accessors)-.198 E F2(rt)4.583 E F1 272.427(\)s)C(yntax)477.721 631.206 Q -(\(de\214ne-r)72 646.206 Q(ecord-modi\214ers)-.198 E F2(rt)4.583 E F1 271.8 -(\)s)C(yntax)477.721 646.206 Q F0 2.413(The macro)72 664.806 R F2(de\214ne-r) -5.163 E(ecor)-.407 E(d-accessor)-.407 E(s)-.11 E F0(\()5.163 E F2(de\214ne-r)A -(ecor)-.407 E(d-modi\214er)-.407 E(s)-.11 E F0 5.163(\)d)C 2.414 -(e\214nes accessor \(modi\214er\) func-)357.774 664.806 R 2.066 -(tions for the \214elds of the record type)72 679.806 R F2(rt)4.815 E F0 7.565 -(.F)C 2.065(or each \214eld named)275.27 679.806 R F2(\214eld)4.815 E F0(,)A F2 -(de\214ne-r)4.815 E(ecor)-.407 E(d-accessor)-.407 E(s)-.11 E F0(\()72 694.806 Q -F2(de\214ne-r)A(ecor)-.407 E(d-modi\214er)-.407 E(s)-.11 E F0 4.83(\)d)C 2.08 -(e\214nes a function)192.594 694.806 R F2(\255<\214eld>)4.83 E F0(\() -4.831 E F2(set\255\255<\214eld>!)A F0 2.081(\), where)B F2(name)72 -709.806 Q F0 1.062(is the type name of the gi)3.812 F -.165(ve)-.275 G 3.812 -(nr).165 G 1.062(ecord type.)240.139 709.806 R 1.062 -(Each of the functions is the result of a call to)6.562 F F2 -.407(re)72 -724.806 S(cor).407 E(d-accessor)-.407 E F0(\()3.342 E F2 -.407(re)C(cor).407 E -(d-modi\214er)-.407 E F0 3.342(\)a)C 3.342(sd)230.396 724.806 S .592 -(escribed abo)243.517 724.806 R -.165(ve)-.165 G 3.342(,w).165 G .592 -(ith the ar)323.483 724.806 R(guments)-.198 E F2(rt)3.342 E F0 .592 -(and the name of the)3.342 F EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(\214eld.)72 87 Q(Example:)72 105.6 Q/F1 10/Courier@0 SF -(\(define-record-type time \(hours minutes seconds\)\))100.346 128.103 Q -(\(define-record-modifiers time-record\))100.346 142.103 Q -(\(define noon \(make-time-record\)\))100.346 160.303 Q -(\(set-time-hours! noon 12\))100.346 174.303 Q(\(set-time-minutes! noon 0\)) -100.346 188.303 Q(\(set-time-seconds! noon 0\))100.346 202.303 Q -(\(define-record-accessors time-record\))100.346 223.303 Q(\(time-hours noon\)) -100.346 241.503 Q/F2 10/Symbol SF214.346 241.503 Q/F3 10/Times-Italic@0 SF -(12)2.5 E EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(A)72 174 Q F0(accessor)72 -204 Q 2.75(,1)-.44 G 2.75(,4)119.817 204 S F1(C)72 234 Q F0(constructor)72 264 -Q 2.75(,1)-.44 G 2.75(,3)132.049 264 S 2.75(,4)143.049 264 S F1(D)72 294 Q F0 -(de\214ne-record-accessors,)72 324 Q/F2 12/Times-Bold@0 SF(4)2.75 E F0 -(de\214ne-record-modi\214ers,)72 339 Q F2(4)2.75 E F0(de\214ne-record-type,)72 -354 Q F2(4)2.75 E F0(describe, 3, 4)72 369 Q(describe-record,)72 384 Q F2(4) -2.75 E F0(describe-record-type,)72 399 Q F2(3)2.75 E F1(F)72 429 Q F0 -(feature, 1, 4)72 459 Q(\214eld names, 2)72 474 Q(\214eld, 3)72 489 Q -(\214elds, 1, 2, 3, 4)72 504 Q F1(I)72 534 Q F0(initial v)72 564 Q(alue, 2) --.275 E(instances, 1, 2)72 579 Q F1(M)72 609 Q F0(macros, 1, 4)72 639 Q(mak)72 -654 Q(e-record-type,)-.11 E F2(1)2.75 E F0 2.75(,2)C 2.75(,3)172.578 654 S 2.75 -(,4)183.578 654 S(modi\214er)302.4 174 Q 2.75(,1)-.44 G 2.75(,4)350.239 174 S -F1(R)302.4 204 Q F0(record data type, 1)302.4 234 Q(record type, 1, 3)302.4 249 -Q(record, 1)302.4 264 Q(constructor)310.65 279 Q 2.75(,2)-.44 G -(record-accessor)302.4 294 Q(,)-.44 E F2(3)2.75 E F0 2.75(,4)C -(record-constructor)302.4 309 Q(,)-.44 E F2(2)2.75 E F0 2.75(,3)C -(record-modi\214er)302.4 324 Q(,)-.44 E F2(3)2.75 E F0 2.75(,4)C -(record-predicate,)302.4 339 Q F2(2)2.75 E F0(record-type-descriptor)302.4 354 -Q(,)-.44 E F2(3)2.75 E F0(record-type-\214eld-names,)302.4 369 Q F2(2)2.75 E F0 -(record-type-name,)302.4 384 Q F2(2)2.75 E F0(record-type?,)302.4 399 Q F2(2) -2.75 E F0(record-v)302.4 414 Q(alues,)-.275 E F2(4)2.75 E F0(record.o, 1)302.4 -429 Q(record.scm, 1)302.4 444 Q(record?,)302.4 459 Q F2(3)2.75 E F0 -(recordutil, 4)302.4 474 Q(recordutil.scm, 4)302.4 489 Q F1(S)302.4 519 Q F0 -(structures, 1)302.4 549 Q F1(T)302.4 579 Q F0(type name, 2)302.4 609 Q -(type predicate, 1, 2, 3, 4)302.4 624 Q F1(V)302.4 654 Q F0 -.165(ve)302.4 684 -S(ctor).165 E 2.75(,4)-.44 G EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Using the Record Extension)72 196.2 Q 19.25(\ -..............................................................................\ -....................... 1)3.011 F(Record T)72 214.8 Q .228(ypes ..............\ -..............................................................................\ -................................)-.88 F(1)498.5 214.8 Q 2.703(Records ........\ -..............................................................................\ -..............................................)72 233.4 R(3)498.5 233.4 Q(Con) -72 252 Q -.165(ve)-.44 G(nience Macros).165 E 19.25(..........................\ -..............................................................................\ -........ 4)3.935 F(Inde)72 270.6 Q 2.868(x.)-.165 G 19.25(....................\ -..............................................................................\ -...................................... 6)102.5 270.6 R EP -%%Trailer -end -%%EOF diff --git a/doc/regexp/Makefile.am b/doc/regexp/Makefile.am index 43078ba..e901949 100644 --- a/doc/regexp/Makefile.am +++ b/doc/regexp/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = regexp.ms regexp.ps +EXTRA_DIST = regexp.ms + +if HAVE_GROFF +doc_DATA = regexp.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= regexp +TROFF= groff -ms -t +UNROFF= unroff -ms + +regexp.ps: regexp.ms index.ms + (cat regexp.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > regexp.ps + +regexp.html: regexp.ms + (cat $?; echo ".Tc") | $(UNROFF) document=regexp + +index.ms: regexp.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: regexp.ms + $(TROFF) regexp.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] regexp.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms regexp.ps regexp.html diff --git a/doc/regexp/regexp.ps b/doc/regexp/regexp.ps deleted file mode 100644 index bfd9911..0000000 --- a/doc/regexp/regexp.ps +++ /dev/null @@ -1,460 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 5 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E -(Elk Regular Expr)200.262 138 Q(ession Extension)-.216 E/F1 10/Times-Italic@0 -SF(Oliver Laumann)255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R -(oduction)-.198 E/F3 11/Times-Roman@0 SF .65(The re)97 252.6 R .65(gular e) --.165 F .65(xpression e)-.165 F .65 -(xtension de\214nes Scheme language bindings for the POSIX re)-.165 F(gular) --.165 E -.165(ex)72 267.6 S .086(pression functions that are pro).165 F .087 -(vided by most modern UNIX v)-.165 F .087(ersions \()-.165 F/F4 11 -/Times-Italic@0 SF -.407(re)C(gcomp\(\))-.033 E F3(and)2.837 E F4 -.407(re) -2.837 G -.11(ge)-.033 G(xec\(\))-.11 E F3(\).)A -1.21(Yo)72 282.6 S 3.014(um) -1.21 G .263(ay w)101.304 282.6 R .263(ant to refer to your UNIX system')-.11 F -(s)-.605 E F4 -.407(re)3.013 G(gcomp\(3\))-.033 E F3 .263(manual for details.) -3.013 F .263(The Scheme inter)5.763 F(-)-.22 E -.11(fa)72 297.6 S 1.35 -(ce to the re).11 F 1.35(gular e)-.165 F 1.35(xpression functions mak)-.165 F -1.351(es the entire functionality of the usual C language)-.11 F(interf)72 -312.6 Q .24(ace a)-.11 F -.275(va)-.22 G .24(ilable to the Scheme programmer) -.275 F 5.74(.T)-.605 G 2.99(ol)289.458 312.6 S .24(oad the re)301.006 312.6 R -.24(gular e)-.165 F .24(xpression e)-.165 F .239(xtension, e)-.165 F -.275(va) --.275 G(luate).275 E(the e)72 327.6 Q(xpression)-.165 E/F5 10/Courier@0 SF -(\(require 'regexp\))100.346 350.103 Q F3 2.251(This causes the \214les)97 -375.703 R F4 -.407(re)5.001 G -.11(ge)-.033 G(xp.scm)-.11 E F3(and)5.001 E F4 --.407(re)5.002 G -.11(ge)-.033 G(xp.o)-.11 E F3 2.252(to be loaded \()5.002 F -F4 -.407(re)C -.11(ge)-.033 G(xp.o)-.11 E F3 2.252(must be statically)5.002 F -(link)72 390.703 Q(ed with the interpreter on platforms that do not support dy\ -namic loading of object \214les\).)-.11 E 1.246(Loading the e)97 409.303 R -1.246(xtension pro)-.165 F 1.246(vides the features)-.165 F F4 -.407(re)3.996 G --.11(ge)-.033 G(xp)-.11 E F3(and)3.996 E F4 -.407(re)3.995 G -.11(ge)-.033 G -(xp.o)-.11 E F3 6.745(.O)C 3.995(ns)406.125 409.303 S 1.245(ystems that do not) -419.899 409.303 R 1.384(support the re)72 424.303 R 1.385(gular e)-.165 F 1.385 -(xpression library functions, loading the e)-.165 F 1.385(xtension succeeds, b) --.165 F 1.385(ut no further)-.22 F(primiti)72 439.303 Q -.165(ve)-.275 G 3.725 -(so).165 G 3.725(rf)125.401 439.303 S .975(eatures are de\214ned.)136.452 -439.303 R .975(Otherwise, the additional feature)6.475 F F4(:r)3.724 E -.44(eg) --.407 G(ular).44 E(-e)-.22 E(xpr)-.22 E(essions)-.407 E F3 .974(is pro-)3.724 F -(vided, so that the e)72 454.303 Q(xpression)-.165 E F5 -(\(feature? ':regular-expressions\))100.346 476.806 Q F3 .649 -(can be used in Scheme programs to check whether re)72 498.806 R .65(gular e) --.165 F .65(xpressions are a)-.165 F -.275(va)-.22 G .65(ilable on the local) -.275 F(platform.)72 513.806 Q F2 2.75(2. Cr)72 543.806 R(eating Regular Expr) --.198 E(essions)-.198 E(\(mak)72 573.806 Q(e-r)-.11 E(egexp)-.198 E F4(pattern) -4.583 E F2 279.654(\)p)C -.198(ro)462.244 573.806 S(cedur).198 E(e)-.198 E -(\(mak)72 588.806 Q(e-r)-.11 E(egexp)-.198 E F4(pattern \215a)4.583 E(gs)-.11 E -F2 256.235(\)p)C -.198(ro)462.244 588.806 S(cedur).198 E(e)-.198 E F4(mak)72 -607.406 Q(e-r)-.11 E -1.98 -.44(eg e)-.407 H(xp).22 E F3 .312 -(returns an object of the ne)3.062 F 3.062(wS)-.275 G .312(cheme type)263.538 -607.406 R F4 -.407(re)3.062 G -.11(ge)-.033 G(xp)-.11 E F3 .312 -(representing the re)3.062 F .312(gular e)-.165 F(xpression)-.165 E 1.806 -(speci\214ed by the string ar)72 622.406 R(gument)-.198 E F4(pattern)4.556 E F3 -7.306(.A)C 4.556(ne)274.511 622.406 S 1.807 -(rror is signaled if the underlying call to the C)289.451 622.406 R 1.494 -(library function)72 637.406 R F4 -.407(re)4.243 G(gcomp\(3\))-.033 E F3 -.11 -(fa)4.243 G 4.243(ils. The).11 F(optional)4.243 E F4<8d61>4.243 E(gs)-.11 E F3 -(ar)4.243 E 1.493(gument is a list of zero or more of the)-.198 F(symbols)72 -652.406 Q F4 -.22(ex)4.907 G 2.157(tended, ignor).22 F(e-case)-.407 E 4.907(,n) --.11 G(o-sube)224.683 652.406 Q(xpr)-.22 E(,)-1.221 E F3(and)4.908 E F4(ne) -4.908 E(wline)-.165 E F3 4.908(;t)C 2.158(hese correspond to the C constants) -340.761 652.406 R F1(REG_EXTENDED, REG_ICASE, REG_NOSUB,)72 667.406 Q F3(and) -2.75 E F1(REG_NEWLINE)2.75 E F3(.)A -1.1 -.88(Tw o)97 686.006 T 1.085 -(objects of the type)4.716 F F4 -.407(re)3.835 G -.11(ge)-.033 G(xp)-.11 E F3 -1.085(are equal in the sense of)3.835 F F4(equal?)3.835 E F3 1.085 -(if their \215ags are identical)3.835 F .811 -(and if their patterns are equal in the sense of)72 701.006 R F4(string=?)3.561 -E F3 6.311(.T)C 1.031 -.11(wo r)330.951 701.006 T -.165(eg).11 G .811(ular e) -.165 F .812(xpressions are)-.165 F F4(eq?)3.562 E F3 .812(if their)3.562 F -(\215ags are identical and if the)72 716.006 Q 2.75(ys)-.165 G -(hare the same pattern string.)206.255 716.006 Q EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(egexp?)-.198 E/F2 11 -/Times-Italic@0 SF(obj)4.583 E F1 321.091(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E F0(This type predicate returns #t if)72 105.6 Q F2(obj)2.75 E -F0(is a re)2.75 E(gular e)-.165 E(xpression, #f otherwise.)-.165 E F1(\(r)72 -135.6 Q(egexp-patter)-.198 E(n)-.165 E F2 -.407(re)4.583 G -.11(ge)-.033 G(xp) --.11 E F1 273.571(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E(\(r)72 -150.6 Q(egexp-\215ags)-.198 E F2 -.407(re)4.583 G -.11(ge)-.033 G(xp)-.11 E F1 -286.837(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0 .179 -(These primiti)72 169.2 R -.165(ve)-.275 G 2.929(sr).165 G .179 -(eturn the pattern \(or \215ags, respecti)151.965 169.2 R -.165(ve)-.275 G .179 -(ly\) speci\214ed in the call to).165 F F2(mak)2.929 E(e-r)-.11 E -1.98 -.44 -(eg e)-.407 H(xp).22 E F0(that)2.928 E(has created the re)72 184.2 Q(gular e) --.165 E(xpression object.)-.165 E F1 2.75(3. Matching)72 214.2 R(Regular Expr) -2.75 E(essions)-.198 E(\(r)72 244.2 Q(egexp-exec)-.198 E F2 -.407(re)4.583 G --.11(ge)-.033 G(xp string of)-.11 E(fset)-.198 E F1 233.267(\)p)C -.198(ro) -462.244 244.2 S(cedur).198 E(e)-.198 E(\(r)72 259.2 Q(egexp-exec)-.198 E F2 --.407(re)4.583 G -.11(ge)-.033 G(xp string of)-.11 E(fset \215a)-.198 E(gs)-.11 -E F1 209.848(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E(e)-.198 E F0 .27 -(This primiti)72 277.8 R .6 -.165(ve a)-.275 H .27(pplies the speci\214ed re) -.165 F .27(gular e)-.165 F .27(xpression to the gi)-.165 F -.165(ve)-.275 G -3.021(ns).165 G .271(tring starting at the gi)373.516 277.8 R -.165(ve)-.275 G -3.021(no).165 G -.275(ff)493.286 277.8 S(-).275 E(set.)72 292.8 Q F2(of)6.064 E -(fset)-.198 E F0 .563(is an inte)3.313 F .563(ger lar)-.165 F .563 -(ger than or equal to zero and less than or equal to the length of)-.198 F F2 -(string)3.313 E F0(.)A .149(If the match succeeds,)72 307.8 R F2 -.407(re)2.9 G --.11(ge)-.033 G(xp-e)-.11 E(xec)-.22 E F0 .15(returns an object of the ne)2.9 F -2.9(wS)-.275 G .15(cheme type)359.714 307.8 R F2 -.407(re)2.9 G -.11(ge)-.033 G -(xp-matc)-.11 E(h)-.165 E F0 2.9(,o)C(ther)483.452 307.8 Q(-)-.22 E .492 -(wise #f.)72 322.8 R .492(The optional)5.992 F F2<8d61>3.242 E(gs)-.11 E F0(ar) -3.242 E .492(gument is a list of zero or more of the symbols)-.198 F F2 -(not-bol)3.241 E F0(and)3.241 E F2(not-eol)3.241 E F0 -(which correspond to the constants)72 337.8 Q/F3 10/Times-Italic@0 SF(REG_NO) -2.75 E(TBOL)-.4 E F0(and)2.75 E F3(NO)2.75 E(T_EOL)-.4 E F0 -(in the C language interf)2.75 E(ace.)-.11 E F1(\(r)72 367.8 Q(egexp-match?) --.198 E F2(obj)4.583 E F1 288.102(\)p)C -.198(ro)462.244 367.8 S(cedur).198 E -(e)-.198 E F0 1.07(This type predicate returns #t if)72 386.4 R F2(obj)3.82 E -F0 1.07(is a re)3.82 F 1.071(gular e)-.165 F 1.071 -(xpression match \(that is, the return v)-.165 F 1.071(alue of a)-.275 F -(successful call to)72 401.4 Q F2 -.407(re)2.75 G -.11(ge)-.033 G(xp-matc)-.11 -E(h)-.165 E F0(\), #f otherwise.)A F1(\(r)72 431.4 Q(egexp-match-number)-.198 E -F2(matc)4.583 E(h)-.165 E F1 239.999(\)p)C -.198(ro)462.244 431.4 S(cedur).198 -E(e)-.198 E F0 1.425(This primiti)72 450 R 1.755 -.165(ve r)-.275 H 1.424 -(eturns the number of substrings that matched parenthetic sube).165 F 1.424 -(xpressions in the)-.165 F .159(original pattern when the gi)72 465 R -.165(ve) --.275 G 2.909(nm).165 G .16(atch w)221.141 465 R .16 -(as created, plus one \(the \214rst substring corresponds to the)-.11 F .407 -(entire re)72 480 R .407(gular e)-.165 F .407(xpression rather than a sube) --.165 F .407(xpression; see)-.165 F F2 -.407(re)3.157 G -.11(ge)-.033 G -(xec\(3\))-.11 E F0 .407(for details\).)3.157 F 3.156(Av)5.907 G .406 -(alue of zero)451.268 480 R 1.2 -(is returned if the match has been created by applying a re)72 495 R 1.201 -(gular e)-.165 F 1.201(xpression with the)-.165 F F2(no-sube)3.951 E(xpr)-.22 E -F0(\215ag set.)72 510 Q F1(\(r)72 540 Q(egexp-match-start)-.198 E F2(matc)4.583 -E 2.75(hn)-.165 G(umber)205.426 540 Q F1 218.934(\)p)C -.198(ro)462.244 540 S -(cedur).198 E(e)-.198 E(\(r)72 555 Q(egexp-match-end)-.198 E F2(matc)4.583 E -2.75(hn)-.165 G(umber)200.553 555 Q F1 223.807(\)p)C -.198(ro)462.244 555 S -(cedur).198 E(e)-.198 E F0 .138(These primiti)72 573.6 R -.165(ve)-.275 G 2.888 -(sr).165 G .138(eturn the start of)151.883 573.6 R .138(fset \(or end of)-.275 -F .138(fset, respecti)-.275 F -.165(ve)-.275 G .137 -(ly\) of the substring denoted by the).165 F(inte)72 588.6 Q(ger)-.165 E F2 -(number)3.869 E F0 6.619(.A)C F2(number)161.036 588.6 Q F0(ar)3.869 E 1.12 -(gument of zero refers to the substring corresponding to the entire)-.198 F -5.654(pattern. The)72 603.6 R(of)5.654 E 2.904(fsets returned by these primiti) --.275 F -.165(ve)-.275 G 5.654(sc).165 G 2.904(an be directly used as ar) -313.098 603.6 R 2.903(guments to the)-.198 F F2(substring)72 618.6 Q F0 -(primiti)2.75 E .33 -.165(ve o)-.275 H 2.75(fE).165 G(lk.)176.984 618.6 Q EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(4. Example)72 102 R F0 .398(The follo)97 -120.6 R .399(wing program demonstrates a simple Scheme procedure)-.275 F/F2 11 -/Times-Italic@0 SF(matc)3.149 E(hes)-.165 E F0 .399(that returns a list)3.149 F -.045(of substrings of a gi)72 135.6 R -.165(ve)-.275 G 2.795(ns).165 G .045 -(tring that match a gi)182.082 135.6 R -.165(ve)-.275 G 2.794(np).165 G 2.794 -(attern. An)294.604 135.6 R .044(error message is displayed if re)2.794 F -(gular)-.165 E -.165(ex)72 149.6 S -(pressions are not supported by the local platform.).165 E/F3 10/Courier@0 SF -(\(require 'regexp\))72 172.103 Q(\(define \(matches str pat\))72 191.703 Q(\(\ -let loop \(\(r \(make-regexp pat '\(extended\)\)\) \(result '\(\)\) \(from 0\)\ -\))84 205.703 Q(\(let \(\(m \(regexp-exec r str from\)\)\))114 219.703 Q -(\(if \(regexp-match? m\))126 233.703 Q -(\(loop r \(cons \(substring str \(+ from \(regexp-match-start m 0\)\))150 -247.703 Q(\(+ from \(regexp-match-end m 0\)\)\))324 261.703 Q(result\))234 -275.703 Q(\(+ from \(regexp-match-end m 0\)\)\))186 289.703 Q -(\(reverse result\)\)\)\)\))150 303.703 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(:)72 174 Q F0(:re)72 204 -Q(gular)-.165 E(-e)-.22 E(xpressions, 1)-.165 E F1(E)72 234 Q F0(equality)72 -264 Q 2.75(,1)-.715 G F1(F)72 294 Q F0(feature, 1)72 324 Q(\215ags, 1, 2)72 339 -Q F1(M)72 369 Q F0(mak)72 399 Q(e-re)-.11 E(ge)-.165 E(xp,)-.165 E/F2 12 -/Times-Bold@0 SF(1)2.75 E F0 2.75(,2)C F1(N)72 429 Q F0(no-sube)72 459 Q(xpr) --.165 E 2.75(,2)-.44 G F1(P)72 489 Q F0(POSIX, 1)72 519 Q F1(R)72 549 Q F0(re) -72 579 Q(gcomp, 1)-.165 E(re)72 594 Q(ge)-.165 E -.165(xe)-.165 G(c, 2).165 E -(re)72 609 Q(ge)-.165 E(xp-e)-.165 E -.165(xe)-.165 G(c,).165 E F2(2)2.75 E F0 -(re)72 624 Q(ge)-.165 E(xp-\215ags,)-.165 E F2(2)2.75 E F0(re)72 639 Q(ge)-.165 -E(xp-match, 2)-.165 E(re)72 654 Q(ge)-.165 E(xp-match-end,)-.165 E F2(2)2.75 E -F0(re)72 669 Q(ge)-.165 E(xp-match-number)-.165 E(,)-.44 E F2(2)2.75 E F0(re)72 -684 Q(ge)-.165 E(xp-match-start,)-.165 E F2(2)2.75 E F0(re)72 699 Q(ge)-.165 E -(xp-match?,)-.165 E F2(2)2.75 E F0(re)72 714 Q(ge)-.165 E(xp-pattern,)-.165 E -F2(2)2.75 E F0(re)72 729 Q(ge)-.165 E(xp.o, 1)-.165 E(re)302.4 174 Q(ge)-.165 E -(xp.scm, 1)-.165 E(re)302.4 189 Q(ge)-.165 E(xp?,)-.165 E F2(2)2.75 E F1(S) -302.4 219 Q F0(sube)302.4 249 Q(xpression, 2)-.165 E(substring primiti)302.4 -264 Q -.165(ve)-.275 G 2.75(,2).165 G F1(T)302.4 294 Q F0(type predicate, 2) -302.4 324 Q F1(U)302.4 354 Q F0(UNIX, 1)302.4 384 Q EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Creating Re)72 196.2 Q(gular Expressions) --.165 E 19.25(................................................................\ -.................................. 1)3.792 F(Matching Re)72 214.8 Q -(gular Expressions)-.165 E 19.25(.............................................\ -................................................... 2)5.013 F 2.395(Example ..\ -..............................................................................\ -...................................................)72 233.4 R(2)498.5 233.4 Q -(Inde)72 252 Q 2.868(x.)-.165 G 19.25(........................................\ -..............................................................................\ -.................. 4)102.5 252 R EP -%%Trailer -end -%%EOF diff --git a/doc/unix/Makefile.am b/doc/unix/Makefile.am index 9b659d6..4201d35 100644 --- a/doc/unix/Makefile.am +++ b/doc/unix/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = unix.ms unix.ps +EXTRA_DIST = unix.ms + +if HAVE_GROFF +doc_DATA = unix.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= unix +TROFF= groff -ms -t +UNROFF= unroff -ms + +unix.ps: unix.ms index.ms + (cat unix.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > unix.ps + +unix.html: unix.ms + (cat $?; echo ".Tc") | $(UNROFF) document=unix + +index.ms: unix.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: unix.ms + $(TROFF) unix.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] unix.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms unix.ps unix.html diff --git a/doc/unix/unix.ps b/doc/unix/unix.ps deleted file mode 100644 index b37705b..0000000 --- a/doc/unix/unix.ps +++ /dev/null @@ -1,2235 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 27 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E -(Elk UNIX Extension)235.326 138 Q/F1 10/Times-Italic@0 SF(Oliver Laumann) -255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R(oduction)-.198 E/F3 -11/Times-Roman@0 SF 1.217(This reference manual describes the primiti)97 252.6 -R 1.546 -.165(ve p)-.275 H 1.216(rocedures and record types de\214ned by the) -.165 F(UNIX e)72 267.6 Q(xtension to Elk.)-.165 E .468(The UNIX e)97 286.2 R -.468(xtension pro)-.165 F .469(vides easy access to most widely a)-.165 F -.275 -(va)-.22 G .469(ilable UNIX system calls and).275 F 2.799(Cl)72 301.2 S .049 -(ibrary functions from within Scheme programs.)85.194 301.2 R .048(The e)5.549 -F .048(xtension supports a wide range of dif)-.165 F(fer)-.275 E(-)-.22 E .089 -(ent UNIX platforms without restricting its functionality to the lo)72 316.2 R -.09(west common denominator or the)-.275 F .509(POSIX 1003.1 functions.)72 -331.2 R 2.269 -.88(To s)6.009 H .509 -(implify writing portable Scheme programs, the e).88 F .508(xtension attempts) --.165 F .553(to hide dif)72 346.2 R .553 -(ferences between the types of supported UNIX \215a)-.275 F -.22(vo)-.22 G -3.303(rs. F).22 F .553(or e)-.165 F .554(xample, programmers do)-.165 F .431 -(not ha)72 361.2 R .761 -.165(ve t)-.22 H 3.181(od).165 G .431 -(eal with the idiosyncrasies of the)130.042 361.2 R/F4 11/Times-Italic@0 SF -(wait\(\))3.181 E F3(,)A F4(waitpid\(\))3.181 E F3(,)A F4(wait3\(\))3.181 E F3 -3.181(,a)C(nd)400.957 361.2 Q F4(wait4\(\))3.181 E F3 .431(system calls)3.181 F -(or the)72 376.2 Q F4(mktemp\(\))2.75 E F3(,)A F4(tmpnam\(\))2.75 E F3 2.75(,a) -C(nd)200.293 376.2 Q F4(tempnam\(\))2.75 E F3(functions.)2.75 E .456 -(The UNIX e)97 394.8 R .456(xtension de\214nes procedures for lo)-.165 F(w-le) --.275 E -.165(ve)-.275 G .457(l, \214le-descriptor).165 F .457 -(-based I/O; creation of)-.22 F .071(pipes; \214le/record locking; \214le and \ -directory system calls; process creation and control; signal han-)72 409.8 R -.228(dling; error handling; and obtaining information about date, time, users,\ - limits, process resources,)72 424.8 R 2.75(etc. T)72 439.8 R -(erminal control is not yet supported by the current v)-.77 E(ersion.)-.165 E -.931(The reference manual assumes that you are f)97 458.4 R .931 -(amiliar with the most common UNIX system)-.11 F .113(calls and C library func\ -tions; this document does not attempt to duplicate the contents of the stan-)72 -473.4 R .753(dard UNIX documentation.)72 488.4 R .752 -(Detailed descriptions are pro)6.253 F .752(vided for functions that dif)-.165 -F .752(fer from the)-.275 F(standard UNIX semantics.)72 503.4 Q F2 2.75 -(2. Using)72 533.4 R(the UNIX Extension)2.75 E F3(The UNIX e)97 552 Q -(xtension is loaded by e)-.165 E -.275(va)-.275 G(luating).275 E/F5 10 -/Courier@0 SF(\(require 'unix\))100.346 574.503 Q F3(in the interacti)72 -596.503 Q .33 -.165(ve t)-.275 H(ople).165 E -.165(ve)-.275 G 2.75(lo).165 G -2.75(ri)191.493 596.503 S 2.75(naS)200.964 596.503 S(cheme program.)222.964 -596.503 Q .748(This causes the \214les)97 615.103 R F4(unix.scm)3.498 E F3(and) -3.498 E F4(unix.o)3.499 E F3 .749(to be loaded into the interpreter \()3.499 F -F4(unix.o)A F3 .749(has to be)3.499 F(link)72 630.103 Q .882(ed with the inter\ -preter on platforms that do not support dynamic loading of object \214les\).) --.11 F(In)6.382 E .931(addition, the)72 645.103 R F4 -.407(re)3.681 G(cor).407 -E(d)-.407 E F3 -.165(ex)3.682 G .932 -(tension is automatically loaded if it is not yet present.).165 F .932 -(The record e)6.432 F(xten-)-.165 E -(sion is documented in a separate reference manual.)72 660.103 Q .016 -(Loading the UNIX e)97 678.703 R .015(xtension causes the features)-.165 F F4 -(unix)2.765 E F3(and)2.765 E F4(unix.o)2.765 E F3 .015(to be pro)2.765 F 2.765 -(vided. Optionally)-.165 F(,)-.715 E .018(one or more of the follo)72 693.703 R -.018(wing features \(described belo)-.275 F .018(w\) may be pro)-.275 F .019 -(vided by the e)-.165 F .019(xtension to indi-)-.165 F -(cate that certain UNIX features are a)72 708.703 Q -.275(va)-.22 G(ilable:) -.275 E EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(unix:wait-options)100.346 94.503 Q -(unix:wait-process)100.346 108.503 Q(unix:record-locks)100.346 122.503 Q -(unix:file-locking)100.346 136.503 Q(unix:symlinks)100.346 150.503 Q -(unix:reliable-signals)100.346 164.503 Q/F2 11/Times-Bold@0 SF 2.75(3. Record) -72 201.503 R -.814(Ty)2.75 G(pes).814 E F0(Se)97 220.103 Q -.165(ve)-.275 G -.864(ral procedures return their results as Scheme records.).165 F .864 -(All record types de\214ned by the)6.364 F .122(UNIX e)72 235.103 R .122 -(xtension are stored in v)-.165 F .122(ariables with names of the form)-.275 F -/F3 11/Times-Italic@0 SF(-r)2.873 E(ecor)-.407 E(d)-.407 E F0 .123 -(\(such as)2.873 F F3(sys-)2.873 E(tem-r)72 250.103 Q(ecor)-.407 E(d)-.407 E F0 -(or)4.023 E F3(passwd-r)4.022 E(ecor)-.407 E(d)-.407 E F0 4.022(\). In)B 1.272 -(addition, a type predicate, a record constructor)4.022 F 4.022(,a)-.44 G 1.272 -(nd accessor)451.721 250.103 R .235 -(functions for all record \214elds are de\214ned for each record type.)72 -265.103 R -.165(Fo)5.735 G 2.985(re).165 G .235(xample, a)375.68 265.103 R F3 -(system)2.985 E F0 .235(record type)2.985 F 1.797(with the \214elds)72 280.103 -R F3(hostname)4.547 E F0(,)A F3(sysname)4.547 E F0 4.547(,a)C(nd)241.387 -280.103 Q F3(osname)4.546 E F0 1.796(is de\214ned, resulting in v)4.546 F -(ariable)-.275 E F3(system-r)4.546 E(ecor)-.407 E(d)-.407 E F0 -(holding the record type descriptor)72 295.103 Q 2.75(,a)-.44 G -(nd the functions)231.027 295.103 Q F1(\(system-record? obj\))100.346 317.606 Q -(\(make-system-record\))100.346 331.606 Q(\(system-hostname system-record\)) -100.346 352.606 Q(\(system-sysname system-record\))100.346 366.606 Q -(\(system-osname system-record\))100.346 380.606 Q F0(Use)72 402.606 Q F3 -(de\214ne-r)3.131 E(ecor)-.407 E(d-modi\214er)-.407 E(s)-.11 E F0 .381 -(if you need the modi\214er functions for an)3.131 F 3.131(yo)-.165 G 3.131(ft) -393.05 402.606 S .381(he records as well \(see)402.902 402.606 R(the record e) -72 417.606 Q(xtension reference manual for details\).)-.165 E(The follo)72 -436.206 Q(wing record types are de\214ned by the UNIX e)-.275 E(xtension:)-.165 -E 515.3 455.956 72 455.956 DL(Record T)79.078 468.206 Q 180.081(ype Fields)-.88 -F 515.3 472.956 72 472.956 DL 515.3 474.956 72 474.956 DL/F4 11/Courier@0 SF -42.9(stat type)77.5 487.206 R -(mode ino dev nlink uid gid size atime mtime ctime)6.6 E 515.3 491.956 72 -491.956 DL(time)77.5 504.206 Q -(seconds minutes hours day-of-month month year weekday)153.4 504.206 Q -(day-of-year dst)153.4 519.206 Q 515.3 523.956 72 523.956 DL 16.5 -(nanotime nanoseconds)77.5 536.206 R(minuteswest dst)6.6 E 515.3 540.956 72 -540.956 DL 29.7(system hostname)77.5 553.206 R(sysname osname)6.6 E 515.3 -557.956 72 557.956 DL 29.7(passwd name)77.5 570.206 R -(password uid gid gecos homedir shell)6.6 E 515.3 574.956 72 574.956 DL 36.3 -(group name)77.5 587.206 R(password gid members)6.6 E 515.3 591.956 72 591.956 -DL 9.9(resources user-time)77.5 604.206 R(system-time \(...\))6.6 E 515.3 -608.956 72 608.956 DL 42.9(lock exclusive?)77.5 621.206 R(whence start length) -6.6 E 515.3 625.956 72 625.956 DL 42.9(wait pid)77.5 638.206 R -(status code core-dump? resources)6.6 E 515.3 642.956 72 642.956 DL 515.3 -455.956 515.3 642.956 DL 72 455.956 72 642.956 DL 145.15 455.956 145.15 642.956 -DL EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(4. Err)72 87 R(or Handling)-.198 E F0 -.597(The def)97 105.6 R .597(ault error beha)-.11 F .597(vior of the primiti) --.22 F .926 -.165(ve p)-.275 H .596(rocedures de\214ned by the UNIX e).165 F -.596(xtension is to)-.165 F(in)72 120.6 Q -.22(vo)-.44 G .926 -.11(ke t).22 H -.707 -(he standard Scheme error handler if a UNIX system call or library function f) -.11 F 3.457(ails. As)-.11 F(an)3.457 E(alternati)72 135.6 Q -.165(ve)-.275 G -3.525(,i).165 G 3.525(fas)127.324 135.6 S .774 -(peci\214c error action is to be performed by the application, a primiti)147.2 -135.6 R 1.104 -.165(ve p)-.275 H(rocedure).165 E 2.123(can be in)72 150.6 R --.22(vo)-.44 G -.11(ke).22 G 4.873(du).11 G 2.123(nder control of the)152.443 -150.6 R/F2 11/Times-Italic@0 SF(unix-errval)4.873 E F0 4.874(form. In)4.873 F -2.124(this case, a unique)4.874 F F2(err)4.874 E 2.124(or object)-.495 F F0(is) -4.874 E .717(returned if a UNIX function signals an error)72 165.6 R 6.216(.T) --.605 G .716(he standard UNIX system error message and the)286.072 165.6 R .923 -(UNIX error number are made a)72 180.6 R -.275(va)-.22 G .924 -(ilable to the application in an).275 F 3.674(yc)-.165 G 3.674(ase. Details) -371.395 180.6 R .924(of the error han-)3.674 F(dling f)72 195.6 Q -(acilities are described in the section `)-.11 E(`Error Functions')-.814 E 2.75 -('b)-.814 G(elo)351.015 195.6 Q -.715(w.)-.275 G F1 2.75(5. Con)72 225.6 R -.11 -(ve)-.44 G(ntions).11 E F0 .575(In the follo)97 244.2 R .575 -(wing sections, the names of procedure ar)-.275 F .574 -(guments can dictate that the ar)-.198 F(guments)-.198 E .482 -(are of speci\214c types.)72 259.2 R .482(If an ar)5.982 F .483 -(gument name is also the name of a Scheme data type, the ar)-.198 F(gument) --.198 E .247(must be an object of that type.)72 274.2 R -.165(Fo)5.747 G 2.997 -(re).165 G .247(xample, a procedure with an ar)234.961 274.2 R .247 -(gument named)-.198 F F2(string)2.997 E F0 .247(must be)2.997 F(in)72 289.2 Q --.22(vo)-.44 G -.11(ke).22 G 4.57(dw).11 G 1.82(ith a string.)119.184 289.2 R -1.82(File descriptor ar)7.32 F 1.821(guments \(named)-.198 F F2(fdescr)4.571 E -F0 4.571(,o)C(r)377.662 289.2 Q F2(fdescr)4.571 E/F3 10/Times-Italic@0 SF(1)3.3 -I F0(,)-3.3 I F2(fdescr)4.571 E F3(2)3.3 I F0 4.571(,e)-3.3 K 1.821(tc.\) and) -469.19 289.2 R(ar)72 304.2 Q 2.227(guments named)-.198 F F2(length)4.976 E F0 -2.226(are al)4.976 F -.11(wa)-.11 G 2.226(ys non-ne).11 F -.055(ga)-.165 G(ti) -.055 E 2.556 -.165(ve i)-.275 H(nte).165 E 2.226(gers; \214lename ar)-.165 F -2.226(guments \()-.198 F F2(\214lename)A F0 4.976(\)a)C(re)495.453 304.2 Q -(strings or symbols; and ar)72 319.2 Q(guments with the suf)-.198 E(\214x `) --.275 E(`?')-.814 E 2.75('a)-.814 G(re booleans.)317.069 319.2 Q F1 2.75(6. Lo) -72 349.2 R(w-Le)-.11 E -.11(ve)-.165 G 2.75(lI).11 G(/O, File Descriptors) -142.499 349.2 Q(\(unix-close)72 379.2 Q F2(fdescr)4.583 E F1 298.277(\)p)C --.198(ro)462.244 379.2 S(cedur).198 E(e)-.198 E F0(The UNIX)72 397.8 Q F2 -(close\(\))2.75 E F0(system call.)2.75 E F2(unix-close)5.5 E F0 -(returns the non-printing object.)2.75 E F1(\(unix-dup)72 427.8 Q F2(fdescr) -4.583 E F1 302.534(\)p)C -.198(ro)462.244 427.8 S(cedur).198 E(e)-.198 E -(\(unix-dup)72 442.8 Q F2(fdescr)4.583 E F3(1)3.3 I F2(fdescr)2.75 -3.3 M F3(2) -3.3 I F1 262.9(\)p)-3.3 K -.198(ro)462.244 442.8 S(cedur).198 E(e)-.198 E F2 -(unix-dup)72 461.4 Q F0(in)3.427 E -.22(vo)-.44 G -.11(ke).22 G 3.427(st).11 G -(he)154.468 461.4 Q F2(dup\(\))3.427 E F0 .677(\(\214rst form\) or)3.427 F F2 -(dup2\(\))3.428 E F0 .678(\(second form\) system call.)3.428 F .678 -(The result is a ne)6.178 F(w)-.275 E(\214le descriptor \(an inte)72 476.4 Q -(ger\).)-.165 E F1(\(unix-open)72 506.4 Q F2(\214lename \215a)4.583 E(gs)-.11 E -F1 264.463(\)p)C -.198(ro)462.244 506.4 S(cedur).198 E(e)-.198 E(\(unix-open)72 -521.4 Q F2(\214lename \215a)4.583 E(gs mode)-.11 E F1 237.887(\)p)C -.198(ro) -462.244 521.4 S(cedur).198 E(e)-.198 E F0 .18(The UNIX)72 540 R F2(open\(\)) -2.93 E F0 .18(system call.)2.93 F F2<8d61>5.68 E(gs)-.11 E F0 .18 -(is a list of one or more symbols specifying the bitmask ar)2.93 F(gu-)-.198 E -(ment of the)72 555 Q F2(open\(\))2.75 E F0(system call.)2.75 E .358 -(At least the \215ag symbols)72 573.6 R F2 -.407(re)3.108 G(ad).407 E F0(,)A F2 -(write)3.108 E F0(,)A F2(append)3.108 E F0(,)A F2(cr)3.108 E(eate)-.407 E F0(,) -A F2(truncate)3.108 E F0 3.108(,a)C(nd)357.994 573.6 Q F2 -.22(ex)3.108 G -(clusive).22 E F0 .358(are supported; addi-)3.108 F .589 -(tional symbols \(such as)72 588.6 R F2(ndelay)3.339 E F0 3.339(\)m)C .589 -(ay be permitted on certain platforms.)224.963 588.6 R .588(The procedure)6.088 -F F2(unix-list-)3.338 E(open-modes)72 603.6 Q F0 .563(can be used to obtain th\ -e list of \215ag symbols that are supported \(see belo)3.312 F 3.313(w\). If) --.275 F F2(cr)3.313 E(e-)-.407 E(ate)72 618.6 Q F0 1.016(is present in the) -3.766 F F2<8d61>3.766 E(gs)-.11 E F0(ar)3.766 E 1.016(gument, the)-.198 F F2 -(mode)3.766 E F0(ar)3.766 E 1.016(gument \(an inte)-.198 F 1.016 -(ger\) must be supplied.)-.165 F 1.015(At least)6.516 F(one of the symbols)72 -633.6 Q F2 -.407(re)2.75 G(ad).407 E F0(or)2.75 E F2(write)2.75 E F0 -(must be present in)2.75 E F2<8d61>2.75 E(gs)-.11 E F0(.)A F2(unix-open)72 -652.2 Q F0(returns a ne)2.75 E 2.75<778c>-.275 G(le descriptor \(an inte) -186.587 652.2 Q(ger\).)-.165 E(Example:)72 670.8 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF -(\(let \(\(f1 \(unix-open "/etc/passwd" '\(read\)\))100.346 94.503 Q -(\(f2 \(unix-open "temp" '\(read write create truncate\) #o666\)\)\)\))136.346 -108.503 Q(...\))112.346 122.503 Q/F2 11/Times-Bold@0 SF -.917 -(\(unix-list-open-modes \))72 159.503 R(pr)456.128 159.503 Q(ocedur)-.198 E(e) --.198 E F0 .599(This procedure returns the list of)72 178.103 R/F3 11 -/Times-Italic@0 SF<8d61>3.35 E(g)-.11 E F0 .6(symbols for the)3.35 F F3 -(unix-open)3.35 E F0 .6(procedure that are supported on)3.35 F -(the local platform.)72 193.103 Q F2(\(unix-lseek)72 223.103 Q F3(fdescr of) -4.583 E(fset whence)-.198 E F2 235.533(\)p)C -.198(ro)462.244 223.103 S(cedur) -.198 E(e)-.198 E F0 .208(The UNIX)72 241.703 R F3(lseek\(\))2.958 E F0 .208 -(system call.)2.958 F F3(of)5.708 E(fset)-.198 E F0 .208(is an inte)2.958 F -(ger;)-.165 E F3(whence)2.958 E F0 .207(is one of the symbols)2.957 F F3(set) -2.957 E F0(,)A F3(curr)2.957 E(ent)-.407 E F0 2.957(,a)C(nd)493 241.703 Q F3 -(end)72 256.703 Q F0(.)A F3(unix-lseek)5.5 E F0(returns the ne)2.75 E 2.75 -<778c>-.275 G(le position as an inte)219.884 256.703 Q(ger)-.165 E(.)-.605 E F2 --.917(\(unix-pipe \))72 286.703 R(pr)456.128 286.703 Q(ocedur)-.198 E(e)-.198 E -F0(The)72 305.303 Q F3(pipe\(\))2.75 E F0(system call.)2.75 E F3(unix-pipe)5.5 -E F0(returns tw)2.75 E 2.75<6f8c>-.11 G(le descriptors as a pair of inte) -281.165 305.303 Q(gers.)-.165 E F2(\(unix-r)72 335.303 Q(ead-string-\214ll!) --.198 E F3(fdescr string)4.583 E F2 220.551(\)p)C -.198(ro)462.244 335.303 S -(cedur).198 E(e)-.198 E(\(unix-r)72 350.303 Q(ead-string-\214ll!)-.198 E F3 -(fdescr string length)4.583 E F2 190.301(\)p)C -.198(ro)462.244 350.303 S -(cedur).198 E(e)-.198 E F0(The)72 368.903 Q F3 -.407(re)2.87 G(ad\(\)).407 E F0 -.12(system call.)2.87 F F3(unix-r)5.621 E(ead-string-\214ll)-.407 E F0(in)2.871 -E -.22(vo)-.44 G -.11(ke).22 G(s).11 E F3 -.407(re)2.871 G(ad\(\)).407 E F0 -.121(with the Scheme string as input b)2.871 F(uf)-.22 E(fer)-.275 E .509 -(and the length of the string ar)72 383.903 R .509 -(gument \(\214rst form\) or the length supplied as a third ar)-.198 F .509 -(gument \(sec-)-.198 F(ond form\).)72 398.903 Q(If)5.5 E F3(length)2.75 E F0 -(is speci\214ed, it must be an inte)2.75 E(ger between 0 and the length of) --.165 E F3(string)2.75 E F0(.)A F3(unix-r)72 417.503 Q(ead-string-\214ll!)-.407 -E F0(destructi)3.902 E -.165(ve)-.275 G 1.152(ly o).165 F -.165(ve)-.165 G -1.153(rwrites the contents of the).165 F F3(string)3.903 E F0(ar)3.903 E 3.903 -(gument. It)-.198 F 1.153(returns the)3.903 F -(number of characters actually read \(0 on EOF\).)72 432.503 Q F2(\(unix-write) -72 462.503 Q F3(fdescr string)4.583 E F2 268.027(\)p)C -.198(ro)462.244 462.503 -S(cedur).198 E(e)-.198 E(\(unix-write)72 477.503 Q F3(fdescr string length) -4.583 E F2 237.777(\)p)C -.198(ro)462.244 477.503 S(cedur).198 E(e)-.198 E F0 -(The)72 496.103 Q F3(write\(\))2.859 E F0 .109(system call.)2.859 F -.165(Fo) -5.609 G 2.859(rad).165 G .109(escription of the ar)213.641 496.103 R .109 -(guments see)-.198 F F3(unix-r)2.859 E(ead-string-\214ll!)-.407 E F0(abo)2.859 -E -.165(ve)-.165 G(.).165 E F3(unix-)5.608 E(write)72 511.103 Q F0 -(returns the number of characters actually written.)2.75 E F2 -(\(unix-close-on-exec)72 541.103 Q F3(fdescr)4.583 E F2 259.183(\)p)C -.198(ro) -462.244 541.103 S(cedur).198 E(e)-.198 E(\(unix-close-on-exec)72 556.103 Q F3 -(fdescr on?)4.583 E F2 239.933(\)p)C -.198(ro)462.244 556.103 S(cedur).198 E(e) --.198 E F3(unix-close-on-e)72 574.703 Q(xec)-.22 E F0 1.528(returns the v)4.278 -F 1.528(alue of the)-.275 F F3(close-on-e)4.278 E(xec)-.22 E F0 1.528 -(\215ag for the gi)4.278 F -.165(ve)-.275 G 4.278<6e8c>.165 G 1.528 -(le descriptor as a)425.188 574.703 R 2.752(boolean. If)72 589.703 R(in)2.752 E --.22(vo)-.44 G -.11(ke).22 G 2.752(dw).11 G .001(ith a second ar)170.522 -589.703 R .001(gument, the procedure sets the)-.198 F F3(close-on-e)2.751 E -(xec)-.22 E F0 .001(\215ag to the spec-)2.751 F(i\214ed v)72 604.703 Q -(alue and returns the pre)-.275 E(vious v)-.275 E(alue.)-.275 E F2 -(\(unix-\214ledescriptor)72 634.703 Q(-\215ags)-.407 E F3(fdescr)4.583 E F2 -233.905(\)p)C -.198(ro)462.244 634.703 S(cedur).198 E(e)-.198 E -(\(unix-\214ledescriptor)72 649.703 Q(-\215ags)-.407 E F3(fdescr \215a)4.583 E -(gs)-.11 E F2 210.486(\)p)C -.198(ro)462.244 649.703 S(cedur).198 E(e)-.198 E -F3(unix-\214le-descriptor)72 668.303 Q(-\215a)-.22 E(gs)-.11 E F0 .611 -(obtains the \215ags currently acti)3.361 F .941 -.165(ve f)-.275 H .611 -(or the gi).165 F -.165(ve)-.275 G 3.361<6e8c>.165 G .612 -(le descriptor \(by means)399.216 668.303 R .869(of the)72 683.303 R F3 -(fcntl\(\))3.619 E F0 .869 -(system call\) and returns them as a list of symbols.)3.619 F .869(If in)6.369 -F -.22(vo)-.44 G -.11(ke).22 G 3.619(dw).11 G .868(ith a second ar)423.087 -683.303 R(gu-)-.198 E .965 -(ments \(a list of symbols\), the procedure sets the \215ags to that ar)72 -698.303 R .965(gument and returns the pre)-.198 F(vious)-.275 E -.275(va)72 -713.303 S(lue.).275 E EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL .228(At least the \215ag symbol)72 87 R/F1 11/Times-Italic@0 SF -(append)2.978 E F0 .228(is supported; additional symbols \(such as)2.978 F F1 -(ndelay)2.978 E F0(or)2.978 E F1(sync)2.978 E F0 2.978(\)m)C .228(ay be)480.254 -87 R .503(permitted on certain platforms.)72 102 R .504(The procedure)6.004 F -F1(unix-list-\214ledescriptor)3.254 E(-\215a)-.22 E(gs)-.11 E F0 .504 -(can be used to obtain)3.254 F -(the list of \214le descriptor \215ags that are supported \(see belo)72 117 Q -(w\).)-.275 E(Example:)72 135.6 Q/F2 10/Courier@0 SF -(;;; Enable non-blocking I/O for file descriptor \(assumes POSIX\))100.346 -158.103 Q(\(define \(set-non-blocking fd\))100.346 177.703 Q -(\(let \(\(flags \(unix-filedescriptor-flags fd\)\)\))112.346 191.703 Q -(\(unix-filedescriptor-flags fd \(cons 'nonblock flags\)\)\)\))124.346 205.703 -Q/F3 11/Times-Bold@0 SF(\(unix-list-\214ledescriptor)72 242.703 Q -.917 -(-\215ags \))-.407 F(pr)456.128 242.703 Q(ocedur)-.198 E(e)-.198 E F0 .205 -(This procedure returns the list of \214le descriptor)72 261.303 R F1<8d61> -2.955 E(g)-.11 E F0 .205(symbols that can be returned and set by)2.955 F F1 -(unix-)2.954 E(\214ledescriptor)72 276.303 Q(-\215a)-.22 E(gs)-.11 E F0 -(on the local platform.)2.75 E F3 -.917(\(unix-num-\214ledescriptors \))72 -306.303 R(pr)456.128 306.303 Q(ocedur)-.198 E(e)-.198 E F1 -(unix-num-\214ledescriptor)72 324.903 Q(s)-.11 E F0 .57 -(returns the maximum number of \214le descriptors per process in the local) -3.319 F 4.554(system. Depending)72 339.903 R 1.804(on the UNIX \215a)4.554 F --.22(vo)-.22 G 2.684 -.44(r, t).22 H 1.804(he procedure in).44 F -.22(vo)-.44 G --.11(ke).22 G(s).11 E F1 -.11(ge)4.554 G(tdtablesize\(\)).11 E F0(or)4.553 E F1 -(sysconf\(\))4.553 E F0(or)4.553 E(uses a static \(compile-time\) limit.)72 -354.903 Q F3(\(unix-isatty?)72 384.903 Q F1(fdescr)4.583 E F3 289.719(\)p)C --.198(ro)462.244 384.903 S(cedur).198 E(e)-.198 E F0 1.73 -(Returns #t if the speci\214ed \214le descriptor points to a terminal de)72 -403.503 R 1.73(vice, #f otherwise \(the UNIX)-.275 F F1(isatty\(\))72 418.503 Q -F0(library function\).)2.75 E F3(\(unix-ttyname)72 448.503 Q F1(fdescr)4.583 E -F3 282.393(\)p)C -.198(ro)462.244 448.503 S(cedur).198 E(e)-.198 E F0 .476 -(The UNIX)72 467.103 R F1(ttyname\(\))3.226 E F0 3.226(function. Returns)3.226 -F .475(the name of a terminal de)3.226 F .475 -(vice as a string, or #f if the \214le)-.275 F -(descriptor is not associated with a terminal.)72 482.103 Q F3 -(\(unix-port-\214ledescriptor)72 512.103 Q F1(port)4.583 E F3 243.277(\)p)C --.198(ro)462.244 512.103 S(cedur).198 E(e)-.198 E F0 .143(This procedure retur\ -ns the \214le descriptor associated with the \214le pointer con)72 530.703 R --.165(vey)-.44 G .144(ed in the speci\214ed).165 F .062(Scheme port.)72 545.703 -R .062(An error is signaled if the port has already been closed or if it is a \ -string port.)5.562 F F1(unix-)5.562 E(port-\214ledescriptor)72 560.703 Q F0(in) -2.75 E -.22(vo)-.44 G -.11(ke).22 G 2.75(st).11 G(he UNIX)194.672 560.703 Q F1 -(\214leno\(\))2.75 E F0(library function.)2.75 E .691 -(Manipulating a \214le descriptor obtained by)72 579.303 R F1 -(unix-port-\214ledescriptor)3.442 E F0 .692(can cause une)3.442 F .692 -(xpected interac-)-.165 F .122 -(tions with the standard Scheme I/O functions and with the stdio b)72 594.303 R -(uf)-.22 E .122(fering mechanism.)-.275 F .122(In particu-)5.622 F(lar)72 -609.303 Q 3.566(,i)-.44 G 3.566(ti)92.539 609.303 S 3.566(sn)102.221 609.303 S -.816(ot a good idea to close the \214le descriptor associated with the Scheme \ -system')115.566 609.303 R 3.567(sc)-.605 G(urrent)477.732 609.303 Q -(input port or current output port.)72 624.303 Q(Example:)72 642.903 Q EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(let \(\(stdout-fileno)100.346 94.503 Q -(\(unix-port-filedescriptor \(current-output-port\)\)\)\))148.346 108.503 Q -(\(if \(unix-isatty? stdout-fileno\))112.346 122.503 Q(\(begin)136.346 136.503 -Q(\(display \(unix-ttyname stdout-fileno\)\))148.346 150.503 Q -(\(newline\)\)\)\))148.346 164.503 Q/F2 11/Times-Bold@0 SF -(\(unix-\214ledescriptor)72 201.503 Q/F3 11/Symbol SF(-)A F2(>port)A/F4 11 -/Times-Italic@0 SF(fdescr type)4.583 E F2 205.008(\)p)C -.198(ro)462.244 -201.503 S(cedur).198 E(e)-.198 E F0 3.972(Creates a Scheme port with a \214le \ -pointer containing the speci\214ed \214le descriptor)72 220.103 R(.)-.605 E F4 -(unix-)9.471 E(\214ledescriptor)72 235.103 Q F3(-)A F4(>port)A F0 1.143 -(is based on the)3.893 F F4(fdopen\(\))3.893 E F0 1.143(stdio function.)3.893 F -F4(type)6.643 E F0 1.143(is a string and is used as the)3.893 F(second ar)72 -250.103 Q(gument for)-.198 E F4(fdopen\(\))2.75 E F0(.)A 1.112 -(The type of the ne)72 268.703 R 1.112 -(wly created Scheme port is determined by the)-.275 F F4(type)3.861 E F0(ar) -3.861 E 3.861(gument. If)-.198 F F4(type)3.861 E F0(be)3.861 E(gins)-.165 E .45 -(with the character #\\r)72 283.703 R 3.2(,a)-.44 G 3.2(ni)177.519 283.703 S -.45(nput port is created; #\\w and #\\a indicate an output port.)189.277 -283.703 R .451(If the second)5.951 F(character of)72 298.703 Q F4(type)2.75 E -F0(is #\\+ \()2.75 E F4(update)A F0 -(\), an input-output \(bidirectional\) port is created.)A 2.114 -(No \214lename is associated with a Scheme port created by a call to)72 317.303 -R F4(unix-\214ledescriptor)4.864 E F3(-)A F4(>port)A F0(.)A 1.104 -(Instead, the string)72 332.303 R F4(unix-\214ledescriptor[%d])3.855 E F0 -(\(where)3.855 E F4(%d)3.855 E F0 1.105(is replaced by the numerical v)3.855 F -1.105(alue of the)-.275 F(\214le descriptor\) will be returned by calls to)72 -347.303 Q F4(port-\214le-name)2.75 E F0(and displayed when printing the port.) -2.75 E 1.33(Note that the \214le descriptor is closed by the g)72 365.903 R -1.329(arbage collector when the Scheme port becomes)-.055 F(inaccessible.)72 -380.903 Q F2 2.75(7. Files)72 410.903 R(and Dir)2.75 E(ectories)-.198 E -(\(unix-stat)72 440.903 Q F4(\214le)4.583 E F2 317.219(\)p)C -.198(ro)462.244 -440.903 S(cedur).198 E(e)-.198 E F0(The UNIX)72 459.503 Q F4(stat\(\))2.75 E F0 -(/)A F4(fstat\(\))A F0(system call.)2.75 E F4(\214le)5.5 E F0 -(is either a \214lename or a \214le descriptor)2.75 E(.)-.605 E F4(unix-stat)72 -478.103 Q F0(returns a)2.75 E F4(stat-r)2.75 E(ecor)-.407 E(d)-.407 E F0 -(with the follo)2.75 E(wing \214elds:)-.275 E 280.076 497.853 72 497.853 DL -24.277(Field T)82.692 510.103 R 48.867(ype Contents)-.88 F 280.076 514.853 72 -514.853 DL 280.076 516.853 72 516.853 DL/F5 11/Courier@0 SF(type)77.5 529.103 Q -F0 13.75(symbol \214le)127 529.103 R(type)2.75 E 280.076 533.853 72 533.853 DL -F5(mode)77.5 546.103 Q F0(inte)127 546.103 Q 15.763(ger \214le)-.165 F -(access mode)2.75 E 280.076 550.853 72 550.853 DL F5(ino)77.5 563.103 Q F0 -(inte)127 563.103 Q 15.763(ger inode)-.165 F(number)2.75 E 280.076 567.853 72 -567.853 DL F5(dev)77.5 580.103 Q F0(inte)127 580.103 Q 15.763(ger de)-.165 F -(vice number)-.275 E 280.076 584.853 72 584.853 DL F5(nlink)77.5 597.103 Q F0 -(inte)127 597.103 Q 15.763(ger number)-.165 F(of links to \214le)2.75 E 280.076 -601.853 72 601.853 DL F5(uid)77.5 614.103 Q F0(inte)127 614.103 Q 15.763 -(ger \214le)-.165 F -.275(ow)2.75 G(ner').275 E 2.75(su)-.605 G(ser)235.504 -614.103 Q(-ID)-.22 E 280.076 618.853 72 618.853 DL F5(gid)77.5 631.103 Q F0 -(inte)127 631.103 Q 15.763(ger \214le)-.165 F -.275(ow)2.75 G(ner').275 E 2.75 -(sg)-.605 G(roup-ID)235.504 631.103 Q 280.076 635.853 72 635.853 DL F5(size) -77.5 648.103 Q F0(inte)127 648.103 Q 15.763(ger \214le)-.165 F(size)2.75 E -280.076 652.853 72 652.853 DL F5(atime)77.5 665.103 Q F0(inte)127 665.103 Q -15.763(ger last)-.165 F(access time)2.75 E 280.076 669.853 72 669.853 DL F5 -(mtime)77.5 682.103 Q F0(inte)127 682.103 Q 15.763(ger last)-.165 F -(modi\214ed time)2.75 E 280.076 686.853 72 686.853 DL F5(ctime)77.5 699.103 Q -F0(inte)127 699.103 Q 15.763(ger last)-.165 F(inode change time)2.75 E 280.076 -703.853 72 703.853 DL 280.076 497.853 280.076 703.853 DL 72 497.853 72 703.853 -DL 167.645 497.853 167.645 703.853 DL 118.75 497.853 118.75 703.853 DL EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-7-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL .957(The \214le type is one of the symbols)72 87 R/F1 11 -/Times-Italic@0 SF(dir)3.708 E(ectory)-.407 E F0(,)A F1 -.165(ch)3.708 G(ar) -.165 E(acter)-.165 E(-special)-.22 E F0(,)A F1(bloc)3.708 E(k-special)-.22 E F0 -(,)A F1 -.407(re)3.708 G(gular)-.033 E F0(,)A F1(symlink)3.708 E F0(,)A F1(soc) -72 102 Q -.11(ke)-.22 G(t).11 E F0(,)A F1(\214fo)2.75 E F0 2.75(,o)C(r)129.717 -102 Q F1(unknown)2.75 E F0(.)A/F2 11/Times-Bold@0 SF(\(unix-access?)72 132 Q F1 -(\214lename mode)4.583 E F2 249.712(\)p)C -.198(ro)462.244 132 S(cedur).198 E -(e)-.198 E F1(unix-access?)72 150.6 Q F0 .68(is based on the)3.43 F F1 -(access\(\))3.43 E F0 .68(system call.)3.43 F F1(mode)6.18 E F0 .68 -(is a list of zero or more of the symbols)3.43 F F1 -.407(re)72 165.6 S(ad).407 -E F0(,)A F1(write)3.406 E F0 3.406(,a)C(nd)131.568 165.6 Q F1 -.22(ex)3.406 G -(ecute).22 E F0 6.156(.T)C .657(he empty list can be used to test for e)194.359 -165.6 R .657(xistence of the \214le.)-.165 F .657(The proce-)6.157 F -(dure returns #t if the speci\214ed access is granted, #f otherwise.)72 180.6 Q -F2(\(unix-chdir)72 210.6 Q F1(\214lename)4.583 E F2 285.44(\)p)C -.198(ro) -462.244 210.6 S(cedur).198 E(e)-.198 E F0(The UNIX)72 229.2 Q F1 -.165(ch)2.75 -G(dir\(\)).165 E F0(system call.)2.75 E F1(unix-c)5.5 E(hdir)-.165 E F0 -(returns the non-printing object.)2.75 E F2(\(unix-chmod)72 259.2 Q F1 -(\214lename mode)4.583 E F2 252.143(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E -(e)-.198 E F0(The UNIX)72 277.8 Q F1 -.165(ch)2.75 G(mod\(\)).165 E F0 -(system call.)2.75 E F1(mode)5.5 E F0(is an inte)2.75 E(ger)-.165 E(.)-.605 E -F1(unix-c)5.5 E(hmod)-.165 E F0(returns the non-printing object.)2.75 E F2 -(\(unix-cho)72 307.8 Q(wn)-.11 E F1(\214lename uid gid)4.583 E F2 246.434(\)p)C --.198(ro)462.244 307.8 S(cedur).198 E(e)-.198 E F0 1.238(The UNIX)72 326.4 R F1 --.165(ch)3.988 G(own\(\)).165 E F0 1.238(system call.)3.988 F F1(uid)6.738 E F0 -(and)3.988 E F1(gid)3.988 E F0 1.238(are inte)3.988 F(gers.)-.165 E F1(unix-c) -6.737 E(hown)-.165 E F0 1.237(returns the non-printing)3.987 F(object.)72 341.4 -Q F2(\(unix-unlink)72 371.4 Q F1(\214lename)4.583 E F2 279.918(\)p)C -.198(ro) -462.244 371.4 S(cedur).198 E(e)-.198 E F0(The UNIX)72 390 Q F1(unlink\(\))2.75 -E F0(system call.)2.75 E F1(unix-unlink)5.5 E F0 -(returns the non-printing object.)2.75 E F2(\(unix-link)72 420 Q F1(\214lename) -4.583 E/F3 10/Times-Italic@0 SF(1)3.3 I F1(\214lename)2.75 -3.3 M F3(2)3.3 I F2 -242.132(\)p)-3.3 K -.198(ro)462.244 420 S(cedur).198 E(e)-.198 E F0(The UNIX)72 -438.6 Q F1(link\(\))2.75 E F0(system call.)2.75 E F1(unix-link)5.5 E F0 -(returns the non-printing object.)2.75 E F2(\(unix-r)72 468.6 Q(ename)-.198 E -F1(\214lename)4.583 E F3(1)3.3 I F1(\214lename)2.75 -3.3 M F3(2)3.3 I F2 -225.247(\)p)-3.3 K -.198(ro)462.244 468.6 S(cedur).198 E(e)-.198 E F0(The UNIX) -72 487.2 Q F1 -.407(re)2.75 G(name\(\)).407 E F0(system call.)2.75 E F1(unix-r) -5.5 E(ename)-.407 E F0(returns the non-printing object.)2.75 E 1.79 -(On platforms where the)72 505.8 R F1 -.407(re)4.54 G(name\(\)).407 E F0 1.79 -(function is not a)4.54 F -.275(va)-.22 G 1.791 -(ilable, the operation is performed by the).275 F(equi)72 520.8 Q -.275(va) --.275 G .354(lent sequence of).275 F F1(link\(\))3.104 E F0(and)3.104 E F1 -(unlink\(\))3.104 E F0 .353 -(calls with interrupts disabled \(certain restrictions apply)3.104 F -(in this case, e.)72 535.8 Q(g. directories cannot be renamed\).)1.833 E F2 -(\(unix-mkdir)72 565.8 Q F1(\214lename mode)4.583 E F2 254.585(\)p)C -.198(ro) -462.244 565.8 S(cedur).198 E(e)-.198 E F0(The UNIX)72 584.4 Q F1(mkdir\(\))2.75 -E F0(system call.)2.75 E F1(mode)5.5 E F0(is an inte)2.75 E(ger)-.165 E(.)-.605 -E F1(unix-mkdir)5.5 E F0(returns the non-printing object.)2.75 E F2 -(\(unix-rmdir)72 614.4 Q F1(\214lename)4.583 E F2 282.393(\)p)C -.198(ro) -462.244 614.4 S(cedur).198 E(e)-.198 E F0(The UNIX)72 633 Q F1(rmdir\(\))2.75 E -F0(system call.)2.75 E F1(unix-rmdir)5.5 E F0(returns the non-printing object.) -2.75 E F2(\(unix-utime)72 663 Q F1(\214lename)4.583 E F2 283.614(\)p)C -.198 -(ro)462.244 663 S(cedur).198 E(e)-.198 E(\(unix-utime)72 678 Q F1 -(\214lename atime mtime)4.583 E F2 226.788(\)p)C -.198(ro)462.244 678 S(cedur) -.198 E(e)-.198 E F0 1.833(The UNIX)72 696.6 R F1(utime\(\))4.583 E F0 -(function.)4.583 E F1(unix-utime)7.333 E F0 1.834 -(sets the last access and last modi\214cation time of the)4.583 F(gi)72 711.6 Q --.165(ve)-.275 G 2.902<6e8c>.165 G .152(le to the current time \(\214rst form\ -\) or to the speci\214ed times \(second form\).)105.02 711.6 R F1(atime)5.652 E -F0(and)2.901 E F1(mtime)2.901 E F0(are inte)72 726.6 Q(gers.)-.165 E F1 -(unix-utime)5.5 E F0(returns the non-printing object.)2.75 E EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-8-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(unix-r)72 87 Q(ead-dir)-.198 E(ectory)-.198 -E/F2 11/Times-Italic@0 SF(\214lename)4.583 E F1 242.474(\)p)C -.198(ro)462.244 -87 S(cedur).198 E(e)-.198 E F0 .47(This procedure returns the contents of the \ -speci\214ed directory as a list of \214lenames \(strings\).)72 105.6 R F2 -(\214le-)5.97 E(name)72 120.6 Q F0 .882(must be the name of a directory)3.633 F -(.)-.715 E F2(unix-r)6.382 E(ead-dir)-.407 E(ectory)-.407 E F0 .882 -(is based on the)3.632 F F2(opendir\(\))3.632 E F0(,)A F2 -.407(re)3.632 G -(addir\(\)).407 E F0(,)A(and)72 135.6 Q F2(closedir\(\))2.75 E F0(functions.) -2.75 E(Example:)72 154.2 Q/F3 10/Courier@0 SF -(;;; Return directory contents as list of \(filename . filetype\) pairs)100.346 -176.703 Q(\(define \(get-files-and-types directory\))100.346 196.303 Q(\(map) -112.346 210.303 Q(\(lambda \(file\))124.346 224.303 Q -(\(cons file \(stat-type \(unix-stat file\)\)\)\))136.346 238.303 Q -(\(unix-read-directory directory\)\)\))124.346 252.303 Q -(\(pp \(get-files-and-types "."\)\))100.346 274.703 Q F1 -.917 -(\(unix-tempname \))72 311.703 R(pr)456.128 311.703 Q(ocedur)-.198 E(e)-.198 E -(\(unix-tempname)72 326.703 Q F2(dir)4.583 E(ectory)-.407 E F1 258.358(\)p)C --.198(ro)462.244 326.703 S(cedur).198 E(e)-.198 E(\(unix-tempname)72 341.703 Q -F2(dir)4.583 E(ectory pr)-.407 E(e\214x)-.407 E F1 230.968(\)p)C -.198(ro) -462.244 341.703 S(cedur).198 E(e)-.198 E F2(unix-tempname)72 360.303 Q F0 .575 -(returns a pathname that can be used as the name of a temporary \214le \(typic\ -ally in)3.325 F(/tmp or /usr/tmp\).)72 375.303 Q(The ne)5.5 E -(wly created pathname is not the name of an e)-.275 E(xisting \214le.)-.165 E -F2(dir)72 393.903 Q(ectory)-.407 E F0 1.026(\(a string or symbol\) can be used\ - to specify the directory component of the pathname;)3.777 F F2(pr)72 408.903 Q -(e\214x)-.407 E F0 1.049(\(string or symbol\), if present, may be used as a pr\ -e\214x for the \214lename component of the)3.799 F 2.75(pathname. Ho)72 423.903 -R(we)-.275 E -.165(ve)-.275 G .88 -.44(r, b).165 H(oth ar).44 E -(guments may be ignored by)-.198 E F2(unix-tempname)2.75 E F0(.)A F2 -(unix-tempname)72 442.503 Q F0 .967(is based on one of the UNIX functions)3.717 -F F2(tempnam\(\))3.717 E F0(,)A F2(mktemp\(\))3.717 E F0 3.717(,a)C(nd)430.578 -442.503 Q F2(tmpnam\(\))3.717 E F0(\(in)3.716 E .973 -(that order\); if none of these functions is a)72 457.503 R -.275(va)-.22 G -.974(ilable, an algorithm similar to the one emplo).275 F .974(yed by)-.11 F -(UNIX)72 472.503 Q F2(mktemp\(\))2.75 E F0(is used.)2.75 E F1 2.75(8. Symbolic) -72 502.503 R(Links)2.75 E F0 .236(The follo)97 521.103 R .235 -(wing procedures are only de\214ned on platforms that support symbolic links.) --.275 F .235(In this)5.735 F(case, the feature)72 536.103 Q F2(unix:symlinks) -2.75 E F0(is pro)2.75 E(vided when the UNIX e)-.165 E(xtension is loaded.)-.165 -E F1(\(unix-lstat)72 566.103 Q F2(\214lename)4.583 E F1 290.335(\)p)C -.198(ro) -462.244 566.103 S(cedur).198 E(e)-.198 E F0(The UNIX)72 584.703 Q F2(lstat\(\)) -2.75 E F0(system call.)2.75 E F2(unix-lstat)5.5 E F0(returns a)2.75 E F2 -(stat-r)2.75 E(ecor)-.407 E(d)-.407 E F0(\(see)2.75 E F2(unix-stat)2.75 E F0 -(abo)2.75 E -.165(ve)-.165 G(\).).165 E F1(\(unix-r)72 614.703 Q(eadlink)-.198 -E F2(\214lename)4.583 E F1 270.964(\)p)C -.198(ro)462.244 614.703 S(cedur).198 -E(e)-.198 E F0 .133(The UNIX)72 633.303 R F2 -.407(re)2.883 G(adlink\(\)).407 E -F0 .133(system call.)2.883 F F2(unix-r)5.633 E(eadlink)-.407 E F0 .134 -(returns the contents of speci\214ed symbolic link as)2.883 F 2.75(as)72 -648.303 S(tring.)83.913 648.303 Q F1(\(unix-symlink)72 678.303 Q F2(\214lename) -4.583 E/F4 10/Times-Italic@0 SF(1)3.3 I F2(\214lename)2.75 -3.3 M F4(2)3.3 I F1 -223.19(\)p)-3.3 K -.198(ro)462.244 678.303 S(cedur).198 E(e)-.198 E F0 -(The UNIX)72 696.903 Q F2(symlink\(\))2.75 E F0(system call.)2.75 E F2 -(unix-symlink)5.5 E F0(returns the non-printing object.)2.75 E EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-9-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(9. File)72 87 R(and Record Locking)2.75 -E F0 .267(The procedures described in this section are only de\214ned if some \ -form of \214le-based locking)97 105.6 R .335(is a)72 120.6 R -.275(va)-.22 G -.336(ilable on the local system \(either locking of entire \214les, or record \ -locking\).).275 F .336(In this case, the)5.836 F(feature)72 135.6 Q/F2 11 -/Times-Italic@0 SF(unix:\214le-loc)2.972 E(king)-.22 E F0 .222(is pro)2.972 F -.221(vided at the time the UNIX e)-.165 F .221(xtension is loaded.)-.165 F .221 -(If the local system)5.721 F .055(supports locking of indi)72 150.6 R .055 -(vidual \214le se)-.275 F .056(gments, the feature)-.165 F F2(unix:r)2.806 E -(ecor)-.407 E(d-loc)-.407 E(ks)-.22 E F0 .056(is pro)2.806 F .056 -(vided as well, and)-.165 F 1.491(the locking primiti)72 165.6 R -.165(ve)-.275 -G 4.241(sa).165 G 1.491(re based on the)180.225 165.6 R F2(fcntl\(\))4.241 E F0 -1.491(system call \(otherwise the)4.241 F F2(\215oc)4.24 E(k\(\))-.22 E F0 1.49 -(system call is)4.24 F(used\).)72 180.6 Q F1(\(unix-set-lock)72 210.6 Q F2 -(fdescr loc)4.583 E 2.75(kw)-.22 G(ait?)198.573 210.6 Q F1 236.776(\)p)C -.198 -(ro)462.244 210.6 S(cedur).198 E(e)-.198 E F0(The)72 229.2 Q F2(loc)2.75 E(k) --.22 E F0(ar)2.75 E(gument is a)-.198 E F2(loc)2.75 E(k-r)-.22 E(ecor)-.407 E -(d)-.407 E F0(with these \214elds:)2.75 E 390.659 248.95 72 248.95 DL F1 41.657 -(Field T)98.581 261.2 R 85.487(ype Contents)-.814 F 390.659 265.95 72 265.95 DL -390.659 267.95 72 267.95 DL/F3 11/Courier@0 SF(exclusive?)77.5 280.2 Q F1 -(boolean)160 280.2 Q(exclusi)213.174 280.2 Q .22 -.11(ve l)-.11 H -(ock \(write lock\) if #t,).11 E(shar)213.174 295.2 Q(ed lock \(r)-.198 E -(ead lock\) otherwise)-.198 E 390.659 299.95 72 299.95 DL F3(whence)77.5 312.2 -Q F1(symbol)160 312.2 Q F2(set)213.174 312.2 Q F1(,)A F2(curr)2.75 E(ent)-.407 -E F1 2.75(,o)C(r)273.872 312.2 Q F2(end)2.75 E F1(:)A(inter)213.174 327.2 Q(pr) --.11 E(etation of)-.198 E F2(start)2.75 E F1(\(see)2.75 E F2(unix-lseek)2.75 E -F1(\))A 390.659 331.95 72 331.95 DL F3(start)77.5 344.2 Q F1 17.435(integer r) -160 344.2 R(elati)-.198 E .22 -.11(ve o)-.11 H(ffset in bytes).11 E 390.659 -348.95 72 348.95 DL F3(length)77.5 361.2 Q F1(integer)160 361.2 Q -(length in bytes)213.174 361.2 Q(\(0 means lock to EOF\))213.174 376.2 Q -390.659 380.95 72 380.95 DL 390.659 248.95 390.659 380.95 DL 72 248.95 72 -380.95 DL 204.924 248.95 204.924 380.95 DL 151.75 248.95 151.75 380.95 DL F0 -1.328(If record locks are supported, the \214elds)72 400.8 R F2(whence)4.079 E -F0(,)A F2(start)4.079 E F0 4.079(,a)C(nd)327.739 400.8 Q F2(length)4.079 E F0 -1.329(specify a se)4.079 F 1.329(gment in the \214le)-.165 F .567 -(referred to by)72 415.8 R F2(fdescr)3.316 E F0 .566(that is to be lock)3.316 F -.566(ed or unlock)-.11 F 3.316(ed. If)-.11 F .566 -(only entire \214les can be lock)3.316 F .566(ed, the con-)-.11 F -(tents of these \214elds are ignored by the lock procedures.)72 430.8 Q .743 -(An arbitrary number of shared locks for a \214le or \214le se)72 449.4 R .743 -(gment may be acti)-.165 F 1.073 -.165(ve a)-.275 H 3.494(tag).165 G -2.365 --.275(iv e)442.364 449.4 T 3.494(nt).275 G .744(ime, b)467.418 449.4 R(ut)-.22 -E .396(more than one e)72 464.4 R(xclusi)-.165 E .726 -.165(ve l)-.275 H .396 -(ock, or both shared and e).165 F(xclusi)-.165 E .726 -.165(ve l)-.275 H .396 -(ocks, cannot be set at the same time.).165 F F2(fdescr)72 479.4 Q F0 .949(mus\ -t be opened for reading to be able to set a shared lock; it must be opened wit\ -h write)3.699 F .067(access for an e)72 494.4 R(xclusi)-.165 E .397 -.165(ve l) --.275 H 2.817(ock. A).165 F .066(shared lock may be upgraded to an e)2.817 F -(xclusi)-.165 E .396 -.165(ve l)-.275 H .066(ock, and vice v).165 F(ersa.)-.165 -E(Mandatory locking may or may not be supported by the local system.)72 509.4 Q -.274(If the)72 528 R F2(wait?)3.024 E F0(ar)3.024 E .274 -(gument is #t and the speci\214ed lock cannot be applied,)-.198 F F2 -(unix-set-loc)3.024 E(k)-.22 E F0 .275(blocks until the)3.024 F(lock becomes a) -72 543 Q -.275(va)-.22 G(ilable.).275 E F2(unix-set-loc)72 561.6 Q(k)-.22 E F0 -(returns #t if the speci\214ed lock could be applied, #f otherwise.)2.75 E F1 -(\(unix-r)72 591.6 Q(emo)-.198 E -.11(ve)-.11 G(-lock).11 E F2(fdescr loc)4.583 -E(k)-.22 E F1 242.408(\)p)C -.198(ro)462.244 591.6 S(cedur).198 E(e)-.198 E F0 -.919(This procedure remo)72 610.2 R -.165(ve)-.165 G 3.669(st).165 G .919 -(he speci\214ed \214le lock or record lock from the \214le pointed to by) -186.539 610.2 R F2(fdescr)3.669 E F0(.)A F2(loc)72 625.2 Q(k)-.22 E F0 .271 -(is a)3.021 F F2(loc)3.021 E(k-r)-.22 E(ecor)-.407 E(d)-.407 E F0 3.021(;s)C -(ee)172.029 625.2 Q F2(unix-set-loc)3.021 E(k)-.22 E F0(abo)3.021 E .601 -.165 -(ve f)-.165 H .271(or a description.).165 F F2(unix-r)5.772 E(emo)-.407 E -(ve-loc)-.11 E(k)-.22 E F0 .272(returns the non-)3.022 F(printing object.)72 -640.2 Q F1(\(unix-query-lock)72 670.2 Q F2(fdescr loc)4.583 E(k)-.22 E F1 -249.305(\)p)C -.198(ro)462.244 670.2 S(cedur).198 E(e)-.198 E F0 .325 -(If record locks are not supported, this procedure al)72 688.8 R -.11(wa)-.11 G -.325(ys returns #f.).11 F .324(If record locks are supported,)5.824 F F2 -(unix-query-loc)72 703.8 Q(k)-.22 E F0 1.243 -(returns information about the \214rst lock that w)3.992 F 1.243 -(ould cause a call to)-.11 F F2(unix-set-loc)3.993 E(k)-.22 E F0(with)72 718.8 -Q F2(loc)3.779 E(k)-.22 E F0 1.029(to f)3.779 F 1.028 -(ail or block, or #f if no such lock e)-.11 F 1.028(xists \(i.)-.165 F 1.028 -(e. if claiming the speci\214ed lock w)1.833 F(ould)-.11 E 2.997 -(succeed\). Information)72 733.8 R .247 -(about the lock is returned as a pair; the car is an inte)2.997 F .247 -(ger \(the process-ID of)-.165 F EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL .333(the the process that o)72 87 R .333 -(wns the lock\), the cdr is a)-.275 F/F1 11/Times-Italic@0 SF(loc)3.082 E(k-r) --.22 E(ecor)-.407 E(d)-.407 E F0 5.832(.T)C .332 -(he process-ID may be meaningless)349.321 87 R(in a netw)72 102 Q(ork en)-.11 E -(vironment.)-.44 E/F2 11/Times-Bold@0 SF 2.75(10. Obtaining)72 132 R -.11(Pa) -2.75 G(ssw).11 E(ord and Gr)-.11 E(oup File Entries)-.198 E F0 .789(The proced\ -ures de\214ned in this section are used to obtain entries from the system')97 -150.6 R(s)-.605 E F1(passwd)3.539 E F0(and)72 165.6 Q F1(gr)2.75 E(oup)-.495 E -F0(databases.)2.75 E F2 -.917(\(unix-get-passwd \))72 195.6 R(pr)456.128 195.6 -Q(ocedur)-.198 E(e)-.198 E(\(unix-get-passwd)72 210.6 Q F1(user)4.583 E F2 -276.882(\)p)C -.198(ro)462.244 210.6 S(cedur).198 E(e)-.198 E F0 .737(If in)72 -229.2 R -.22(vo)-.44 G -.11(ke).22 G 3.487(dw).11 G .737(ithout an ar)128.914 -229.2 R .737(gument, this procedure returns the ne)-.198 F .737 -(xt entry from the)-.165 F F1(passwd)3.486 E F0(database.)3.486 E(Successi)72 -244.2 Q 1.018 -.165(ve c)-.275 H .688(alls to).165 F F1(unix-g)3.438 E -(et-passwd)-.11 E F0 .688(return entries in a random order)3.438 F 6.188(.T) --.605 G(he)392.391 244.2 Q F1(user)3.438 E F0(ar)3.438 E .688(gument, if pre-) --.198 F .505(sent, is either the login name of a user \(a string or symbol\) o\ -r a numeric user)72 259.2 R .504(-ID \(an inte)-.22 F 3.254(ger\). In)-.165 F -(this case, the)72 274.2 Q F1(passwd)2.75 E F0 -(entry for this user is returned.)2.75 E F1(unix-g)72 292.8 Q(et-passwd)-.11 E -F0(returns a)2.75 E F1(passwd-r)2.75 E(ecor)-.407 E(d)-.407 E F0 -(with the follo)2.75 E(wing \214elds:)-.275 E 329.301 312.55 72 312.55 DL F2 -33.215(Field T)91.981 324.8 R 61.407(ype Contents)-.814 F 329.301 329.55 72 -329.55 DL 329.301 331.55 72 331.55 DL/F3 11/Courier@0 SF(name)77.5 343.8 Q F2 -19.239(string login)146.8 343.8 R(name)2.75 E 329.301 348.55 72 348.55 DL F3 -(password)77.5 360.8 Q F2 19.239(string login)146.8 360.8 R(passw)2.75 E(ord) --.11 E 329.301 365.55 72 365.55 DL F3(uid)77.5 377.8 Q F2 13.75 -(integer numeric)146.8 377.8 R(user)2.75 E(-ID)-.407 E 329.301 382.55 72 382.55 -DL F3(gid)77.5 394.8 Q F2 13.75(integer numeric)146.8 394.8 R(primary gr)2.75 E -(oup-ID)-.198 E 329.301 399.55 72 399.55 DL F3(gecos)77.5 411.8 Q F2 19.239 -(string contents)146.8 411.8 R(of GECOS \214eld)2.75 E 329.301 416.55 72 416.55 -DL F3(homedir)77.5 428.8 Q F2 19.239(string home)146.8 428.8 R(dir)2.75 E -(ectory of user)-.198 E 329.301 433.55 72 433.55 DL F3(shell)77.5 445.8 Q F2 -19.239(string login)146.8 445.8 R(shell of user)2.75 E 329.301 450.55 72 450.55 -DL 329.301 312.55 329.301 450.55 DL 72 312.55 72 450.55 DL 188.039 312.55 -188.039 450.55 DL 138.55 312.55 138.55 450.55 DL F1(unix-g)72 470.4 Q -(et-passwd)-.11 E F0(is based on the UNIX)2.75 E F1 -.11(ge)2.75 G(tpwent\(\)) -.11 E F0(,)A F1 -.11(ge)2.75 G(tpwuid\(\)).11 E F0 2.75(,a)C(nd)355.184 470.4 Q -F1 -.11(ge)2.75 G(tpwnam\(\)).11 E F0(functions.)2.75 E F2(\(unix-get-gr)72 -500.4 Q -.917(oup \))-.198 F(pr)456.128 500.4 Q(ocedur)-.198 E(e)-.198 E -(\(unix-get-gr)72 515.4 Q(oup)-.198 E F1(gr)4.583 E(oup)-.495 E F2 276.354(\)p) -C -.198(ro)462.244 515.4 S(cedur).198 E(e)-.198 E F1(unix-g)72 534 Q(et-gr)-.11 -E(oup)-.495 E F0 3.487(is identical to)6.237 F F1(unix-g)6.238 E(et-passwd)-.11 -E F0 3.488(\(see abo)6.238 F -.165(ve)-.165 G 3.488(\), e).165 F 3.488 -(xcept that the system')-.165 F(s)-.605 E F1(gr)6.238 E(oup)-.495 E F0 -(database is used instead of the)72 549 Q F1(passwd)2.75 E F0(database.)2.75 E -(The result v)72 567.6 Q(alue is a)-.275 E F1(gr)2.75 E(oup-r)-.495 E(ecor) --.407 E(d)-.407 E F0(with these \214elds:)2.75 E 321.073 587.35 72 587.35 DL F2 -50.028(Field T)91.981 599.6 R 57.294(ype Contents)-.814 F 321.073 604.35 72 -604.35 DL F3(name)77.5 616.6 Q F2 52.866(string gr)146.8 616.6 R(oup')-.198 E -2.75(sn)-.407 G(ame)274.235 616.6 Q 321.073 621.35 72 621.35 DL F3(password) -77.5 633.6 Q F2 52.866(string gr)146.8 633.6 R(oup')-.198 E 2.75(sp)-.407 G -(assw)274.235 633.6 Q(ord)-.11 E 321.073 638.35 72 638.35 DL F3(gid)77.5 650.6 -Q F2 47.377(integer numeric)146.8 650.6 R(gr)2.75 E(oup-ID)-.198 E 321.073 -655.35 72 655.35 DL F3(members)77.5 667.6 Q F2(list of symbols)146.8 667.6 Q -(gr)229.916 667.6 Q(oup members)-.198 E 321.073 672.35 72 672.35 DL 321.073 -587.35 321.073 672.35 DL 72 587.35 72 672.35 DL 221.666 587.35 221.666 672.35 -DL 138.55 587.35 138.55 672.35 DL F1(unix-g)72 692.2 Q(et-gr)-.11 E(oup)-.495 E -F0(is based on the UNIX)2.75 E F1 -.11(ge)2.75 G(tgr).11 E(ent\(\))-.407 E F0 -(,)A F1 -.11(ge)2.75 G(tgr).11 E(gid\(\))-.407 E F0 2.75(,a)C(nd)341.643 692.2 -Q F1 -.11(ge)2.75 G(tgrnam\(\)).11 E F0(functions.)2.75 E EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(unix-r)72 87 Q -.917(ewind-passwd \))-.198 -F(pr)456.128 87 Q(ocedur)-.198 E(e)-.198 E(\(unix-r)72 102 Q(ewind-gr)-.198 E --.917(oup \))-.198 F(pr)456.128 102 Q(ocedur)-.198 E(e)-.198 E F0 2.089 -(These procedures re)72 120.6 R 2.089(wind the)-.275 F/F2 11/Times-Italic@0 SF -(passwd)4.839 E F0(and)4.839 E F2(gr)4.839 E(oup)-.495 E F0 2.089 -(\214les by calling the)4.839 F F2(setpwent\(\))4.839 E F0(and)4.839 E F2 -(setgr)4.838 E(ent\(\))-.407 E F0(UNIX functions.)72 135.6 Q F1 -.917 -(\(unix-end-passwd \))72 165.6 R(pr)456.128 165.6 Q(ocedur)-.198 E(e)-.198 E -(\(unix-end-gr)72 180.6 Q -.917(oup \))-.198 F(pr)456.128 180.6 Q(ocedur)-.198 -E(e)-.198 E F2(unix-end-passwd)72 199.2 Q F0(and)3.084 E F2(unix-end-gr)3.084 E -(oup)-.495 E F0 .335(close the)3.085 F F2(passwd)3.085 E F0(and)3.085 E F2(gr) -3.085 E(oup)-.495 E F0 .335(\214les by calling the UNIX func-)3.085 F(tions)72 -214.2 Q F2(endpwent\(\))2.75 E F0(and)2.75 E F2(endgr)2.75 E(ent\(\))-.407 E F0 -(.)A F1 2.75(11. Pr)72 244.2 R(ocess Cr)-.198 E(eation and Contr)-.198 E(ol) --.198 E(\(unix-system)72 274.2 Q F2(string)4.583 E F1 290.324(\)p)C -.198(ro) -462.244 274.2 S(cedur).198 E(e)-.198 E F2(unix-system)72 292.8 Q F0 .222 -(starts `)2.972 F(`/bin/sh')-.814 E 2.972('a)-.814 G 2.972(sac)203.929 292.8 S -.222(hild process with)223.92 292.8 R F2(string)2.972 E F0 .222(as input and w) -2.972 F .222(aits until the shell termi-)-.11 F 4.009(nates. All)72 307.8 R -1.259(\214le descriptors e)4.009 F 1.26 -(xcept standard input, standard output, and standard error output are)-.165 F -.775(closed in the child process.)72 322.8 R F2(unix-system)6.274 E F0 .774 -(returns the e)3.524 F .774(xit code of the shell as an inte)-.165 F .774 -(ger or)-.165 F 3.524(,i)-.44 G 3.524(ft)483.371 322.8 S(he)493.616 322.8 Q -1.238(shell w)72 337.8 R 1.238 -(as interrupted by a signal, the termination status as a list of one inte)-.11 -F 1.239(ger element.)-.165 F 1.239(If the)6.739 F(shell could not be e)72 352.8 -Q -.165(xe)-.165 G(cuted, e).165 E(xit code 127 is returned.)-.165 E F1 -(\(unix-open-input-pipe)72 382.8 Q F2(string)4.583 E F1 246.907(\)p)C -.198(ro) -462.244 382.8 S(cedur).198 E(e)-.198 E(\(unix-open-output-pipe)72 397.8 Q F2 -(string)4.583 E F1 240.802(\)p)C -.198(ro)462.244 397.8 S(cedur).198 E(e)-.198 -E F0 .129(The UNIX)72 416.4 R F2(popen\(\))2.879 E F0 2.879(function. Both) -2.879 F .129(procedures create a pipe between the caller and a shell e)2.879 F --.165(xe)-.165 G(cut-).165 E .356(ing the command)72 431.4 R F2(string)3.106 E -F0 3.106(;t)C(he)187.098 431.4 Q 3.106(yr)-.165 G .356 -(eturn a Scheme port containing the \214le pointer associated with the)209.586 -431.4 R 5.309(pipe. Closing)72 446.4 R 2.559(the Scheme port, or running the g) -5.309 F 2.559(arbage collector after the port has become)-.055 F -(unused, causes the pipe to be closed by a call to the)72 461.4 Q F2 -(pclose\(\))2.75 E F0(function.)2.75 E F2(unix-open-input-pipe)72 480 Q F0 .078 -(returns an input port that can be used to read from the standard output of th\ -e)2.827 F .681(speci\214ed command;)72 495 R F2(unix-open-output-pipe)3.431 E -F0 .681(returns an output port that accepts input to be sent to)3.431 F -(the standard input of the command.)72 510 Q F1(\(unix-f)72 540 Q -.917(ork \)) --.275 F(pr)456.128 540 Q(ocedur)-.198 E(e)-.198 E F0 .205(The UNIX)72 558.6 R -F2(fork\(\))2.955 E F0 .206(system call.)2.956 F F2(unix-fork)5.706 E F0 .206 -(returns the process-ID of the ne)2.956 F .206(wly created process as an)-.275 -F(inte)72 573.6 Q(ger in the parent process, and the inte)-.165 E -(ger 0 in the child process.)-.165 E .128 -(The child process, as its \214rst action, in)72 592.2 R -.22(vo)-.44 G -.11 -(ke).22 G 2.878(st).11 G(he)272.685 592.2 Q F2 .128(onfork handler)2.878 F(s) --.11 E F0 .127(that may ha)2.878 F .457 -.165(ve b)-.22 H .127(een re).165 F -.127(gistered by)-.165 F 1.595(other Elk e)72 607.2 R 1.595 -(xtensions that are currently acti)-.165 F 1.925 -.165(ve \()-.275 H 1.596 -(one purpose of).165 F F2(onfork)4.346 E F0 1.596(handlers is to mak)4.346 F -4.346(en)-.11 G -.275(ew)491.449 607.2 S(links to temporary \214les in the ne) -72 622.2 Q(wly created child process\).)-.275 E F1(\(unix-exec)72 652.2 Q F2 -(\214lename ar)4.583 E(guments)-.407 E F1 241.561(\)p)C -.198(ro)462.244 652.2 -S(cedur).198 E(e)-.198 E(\(unix-exec)72 667.2 Q F2(\214lename ar)4.583 E -(guments en)-.407 E(vir)-.44 E(onment)-.495 E F1 184.757(\)p)C -.198(ro)462.244 -667.2 S(cedur).198 E(e)-.198 E(\(unix-exec-path)72 689.7 Q F2(\214lename ar) -4.583 E(guments)-.407 E F1 216.503(\)p)C -.198(ro)462.244 689.7 S(cedur).198 E -(e)-.198 E(\(unix-exec-path)72 704.7 Q F2(\214lename ar)4.583 E(guments en) --.407 E(vir)-.44 E(onment)-.495 E F1 159.699(\)p)C -.198(ro)462.244 704.7 S -(cedur).198 E(e)-.198 E EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL 1.403(These procedures are based on the UNIX)72 87 R/F1 11 -/Times-Italic@0 SF -.22(ex)4.153 G(ecv\(\)).22 E F0 -.11(fa)4.153 G 1.403 -(mily of system calls and library functions.).11 F 1.608(The \214rst ar)72 102 -R 1.608(gument is the name of the \214le to be e)-.198 F -.165(xe)-.165 G -(cuted.).165 E F1(ar)7.108 E(guments)-.407 E F0 1.608 -(is a list of strings to be)4.358 F .914(passed to the program as ar)72 117 R -3.664(guments. The)-.198 F F1(en)3.664 E(vir)-.44 E(onment)-.495 E F0(ar)3.664 -E .913(gument, if present, is a list of en)-.198 F(viron-)-.44 E .615(ment v)72 -132 R .616(ariable de\214nitions to be used as the ne)-.275 F 3.366(wp)-.275 G -(rogram')291.161 132 Q 3.366(se)-.605 G -.44(nv)338.516 132 S 3.366 -(ironment. Each).44 F .616(element of the list)3.366 F .189 -(is pair of strings; the car of an element is the name of an en)72 147 R .188 -(vironment v)-.44 F .188(ariable, the cdr is the v)-.275 F(ari-)-.275 E(able') -72 162 Q 3.196(sv)-.605 G .446(alue \(the)106.084 162 R F1(unix-en)3.196 E(vir) --.44 E(on)-.495 E F0(primiti)3.196 E .776 -.165(ve c)-.275 H .446 -(an be used to obtain the current en).165 F .447(vironment of the run-)-.44 F -(ning program\).)72 177 Q F1(unix-e)72 195.6 Q(xec-path)-.22 E F0 1.406(search\ -es the speci\214ed \214lename in a list of directories obtained from the calli\ -ng)4.157 F(program')72 210.6 Q 4.346(sP)-.605 G -1.221(AT)126.055 210.6 S 4.346 -(He)1.221 G -.44(nv)156.669 210.6 S 1.596(ironment v).44 F 4.347(ariable. The) --.275 F -.275(va)4.347 G 1.597(riant of).275 F F1(unix-e)4.347 E(xec-path)-.22 -E F0 1.597(that accepts an)4.347 F F1(en)4.347 E(vir)-.44 E(on-)-.495 E(ment)72 -225.6 Q F0(ar)3.062 E .312(gument is not a)-.198 F -.275(va)-.22 G .311 -(ilable on the currently supported platforms \(the reason is that there is no) -.275 F F1 -.22(ex)72 240.6 S(ecvpe\(\)).22 E F0 -.275(va)5.19 G 2.44 -(riant of the).275 F F1 -.22(ex)5.191 G(ecvp\(\)).22 E F0 2.441 -(function, although)5.191 F F1 -.22(ex)5.191 G(ecve\(\)).22 E F0(/)A F1 -.22 -(ex)C(ecle\(\)).22 E F0 -.275(va)5.191 G 2.441(riants of).275 F F1 -.22(ex) -5.191 G(ecv\(\)).22 E F0(and)5.191 E F1 -.22(ex)72 255.6 S(ecl\(\)).22 E F0 -(usually e)2.75 E(xist in UNIX\).)-.165 E F1(unix-e)72 274.2 Q(xec)-.22 E F0 -(and)3.212 E F1(unix-e)3.212 E(xec-path)-.22 E F0(remo)3.212 E .792 -.165(ve t) --.165 H .462(he temporary \214les used by the dynamic loading module of).165 F -2.297(the interpreter k)72 289.2 R 2.298(ernel and in)-.11 F -.22(vo)-.44 G -2.518 -.11(ke t).22 H 2.298(he \214nalization functions that may ha).11 F 2.628 --.165(ve b)-.22 H 2.298(een re).165 F 2.298(gistered by)-.165 F -.165(ex)72 -304.2 S 2.772(tensions. As).165 F 2.771(ar)2.772 G .021 -(esult, attempting to load an object \214le after a call to)152.86 304.2 R F1 -(unix-e)2.771 E(xec)-.22 E F0(or)2.771 E F1(unix-e)2.771 E(xec-path)-.22 E F0 -1.755(has returned \(i.)72 319.2 R 1.755(e. f)1.833 F 1.755(ailed\) may not w) --.11 F 1.755(ork correctly)-.11 F 7.255(.T)-.715 G 1.755 -(he \214nalization functions are only in)312.988 319.2 R -.22(vo)-.44 G -.11 -(ke).22 G(d).11 E(once.)72 334.2 Q/F2 11/Times-Bold@0 SF -.917(\(unix-wait \)) -72 364.2 R(pr)456.128 364.2 Q(ocedur)-.198 E(e)-.198 E(\(unix-wait)72 379.2 Q -F1(options)4.583 E F2 295.208(\)p)C -.198(ro)462.244 379.2 S(cedur).198 E(e) --.198 E(\(unix-wait-pr)72 401.7 Q(ocess)-.198 E F1(pid)4.583 E F2 275.254(\)p)C --.198(ro)462.244 401.7 S(cedur).198 E(e)-.198 E(\(unix-wait-pr)72 416.7 Q -(ocess)-.198 E F1(pid options)4.583 E F2 240.109(\)p)C -.198(ro)462.244 416.7 S -(cedur).198 E(e)-.198 E F1(unix-wait)72 435.3 Q F0(and)3.274 E F1(unix-wait-pr) -3.274 E(ocess)-.495 E F0 .524(are based on the UNIX)3.274 F F1(wait\(\))3.274 E -F0 -.11(fa)3.274 G .524(mily of system calls and library).11 F 2.75 -(functions. Both)72 450.3 R(procedures return a)2.75 E F1(wait-r)2.75 E(ecor) --.407 E(d)-.407 E F0(with the follo)2.75 E(wing \214elds:)-.275 E 458.694 -470.05 72 470.05 DL F2 62.728(Field T)98.581 482.3 R 119.504(ype Contents)-.814 -F 458.694 487.05 72 487.05 DL/F3 11/Courier@0 SF(pid)77.5 499.3 Q F2 59.576 -(integer pr)160 499.3 R(ocess-ID of the terminated child pr)-.198 E(ocess)-.198 -E 458.694 504.05 72 504.05 DL F3(status)77.5 516.3 Q F2 58.949(symbol r)160 -516.3 R(eason f)-.198 E(or pr)-.275 E(ocess termination)-.198 E 458.694 521.05 -72 521.05 DL F3(code)77.5 533.3 Q F2 59.576(integer exit)160 533.3 R -(code or termination status \(signal\))2.75 E 458.694 538.05 72 538.05 DL F3 -(core-dump?)77.5 550.3 Q F2 55.891(boolean #t)160 550.3 R(if a cor)2.75 E -(e-dump was pr)-.198 E(oduced)-.198 E 458.694 555.05 72 555.05 DL F3(resources) -77.5 567.3 Q F2 -.198(re)160 567.3 S(sour).198 E(ces-r)-.198 E 13.75(ecord r) --.198 F(esour)-.198 E(ces of terminated pr)-.198 E(ocess)-.198 E 458.694 572.05 -72 572.05 DL 458.694 470.05 458.694 572.05 DL 72 470.05 72 572.05 DL 247.065 -470.05 247.065 572.05 DL 151.75 470.05 151.75 572.05 DL F0(See)72 591.9 Q F1 -(unix-pr)2.75 E(ocess-r)-.495 E(esour)-.407 E(ces)-.407 E F0(belo)2.75 E 2.75 -(wf)-.275 G(or a description of the)227.738 591.9 Q F1 -.407(re)2.75 G(sour) -.407 E(ces-r)-.407 E(ecor)-.407 E(d)-.407 E F0(type.)2.75 E(The)72 610.5 Q F1 -(wait-r)3.9 E(ecor)-.407 E(d)-.407 E F0 1.15(result holds the process-ID and t\ -ermination status of one of the terminated \(or)3.9 F .25 -(stopped\) children of the calling process.)72 625.5 R .25(The v)5.75 F .25 -(alue of the)-.275 F F1(status)3 E F0 .249(is one of the symbols)2.999 F F1 -(stopped)2.999 E F0(\(if)2.999 E 1.65(the child process has been stopped\),)72 -640.5 R F1(signaled)4.4 E F0 1.651 -(\(child process is terminated due to a signal\), or)4.4 F F1 -.22(ex)72 655.5 -S(ited).22 E F0 .455(\(child process has in)3.205 F -.22(vo)-.44 G -.11(ke).22 -G(d).11 E F1 -.22(ex)3.205 G(it\(\)).22 E F0(\).)A F1(code)5.955 E F0 .455 -(holds the e)3.205 F .455(xit code \(if)-.165 F F1(status)3.205 E F0(is)3.204 E -F1 -.22(ex)3.204 G(ited).22 E F0 .454(\), or a signal)B 1.214(number \(if)72 -670.5 R F1(status)3.964 E F0 1.214(is either)3.964 F F1(stopped)3.964 E F0(or) -3.964 E F1(signaled)3.964 E F0 3.964(\). The)B F1 -.407(re)3.964 G(sour).407 E -(ces)-.407 E F0 1.215(\214eld holds the user and system)3.964 F .306(time cons\ -umed by the child process and its children in nanoseconds \(additional resourc\ -es may be)72 685.5 R 1.207(supplied in future v)72 700.5 R 3.957 -(ersions\). The)-.165 F 1.208(\214elds of the)3.958 F F1 -.407(re)3.958 G(sour) -.407 E(ces)-.407 E F0 1.208(record are #f on platforms that do not)3.958 F -(support the)72 715.5 Q F1(wait3\(\))2.75 E F0(or)2.75 E F1(wait4\(\))2.75 E F0 -(system call.)2.75 E EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Italic@0 SF(unix-wait-pr)72 87 Q(ocess)-.495 E F0(allo) -3.741 E .991(ws to collect the termination status of an indi)-.275 F .99 -(vidual process or a group of)-.275 F 1.791(processes speci\214ed by the inte) -72 102 R(ger)-.165 E F1(pid)4.541 E F0(ar)4.541 E 4.541(gument. This)-.198 F -1.791(procedure is only de\214ned on platforms)4.541 F .312(where the)72 117 R -F1(waitpid\(\))3.062 E F0(or)3.062 E F1(wait4\(\))3.062 E F0 .312 -(system call is a)3.062 F -.275(va)-.22 G 3.062(ilable. In).275 F .311 -(this case, the feature)3.062 F F1(unix:wait-pr)3.061 E(ocess)-.495 E F0 -(is pro)72 132 Q(vided when the UNIX e)-.165 E(xtension is loaded.)-.165 E .103 -(If no child process is a)72 150.6 R -.275(va)-.22 G .103(ilable \(or).275 F -2.853(,i)-.44 G 2.853(nc)230.032 150.6 S .103(ase of)243.269 150.6 R F1 -(unix-wait-pr)2.853 E(ocess)-.495 E F0 2.853(,n)C 2.854(op)361.619 150.6 S .104 -(rocess as speci\214ed by the)375.473 150.6 R F1(pid)2.854 E F0(ar)72 165.6 Q -(gument\), the)-.198 E F1(pid)2.75 E F0 -(\214eld in the result is set to -1, and the)2.75 E F1(status)2.75 E F0 -(\214eld is set to the symbol)2.75 E F1(none)2.75 E F0(.)A(The)72 184.2 Q F1 -(options)3.813 E F0(ar)3.813 E 1.063 -(gument, if present, is a list of one or more of the symbols)-.198 F F1(nohang) -3.813 E F0(and)3.813 E F1(untr)3.812 E(aced)-.165 E F0(.)A -(Options are only supported if the feature)72 199.2 Q F1(unix:wait-options)2.75 -E F0(is pro)2.75 E(vided.)-.165 E/F2 11/Times-Bold@0 SF(\(unix-pr)72 229.2 Q -(ocess-r)-.198 E(esour)-.198 E -.917(ces \))-.198 F(pr)456.128 229.2 Q(ocedur) --.198 E(e)-.198 E F0 .316(This procedure is based on the UNIX)72 247.8 R F1 -(times\(\))3.066 E F0 .316(library function.)3.066 F F1(unix-pr)5.816 E -(ocess-r)-.495 E(esour)-.407 E(ces)-.407 E F0 .316(returns the)3.066 F 1.058(r\ -esource usage of the calling process and its terminated children as a pair of) -72 262.8 R F1 -.407(re)3.808 G(sour).407 E(ces-r)-.407 E(ecor)-.407 E(ds)-.407 -E F0(.)A(Each)72 277.8 Q F1 -.407(re)2.75 G(sour).407 E(ces-r)-.407 E(ecor) --.407 E(d)-.407 E F0(has the follo)2.75 E(wing \214elds:)-.275 E 350.839 297.55 -72 297.55 DL F2 43.115(Field T)101.881 309.8 R 62.276(ype Contents)-.814 F -350.839 314.55 72 314.55 DL/F3 11/Courier@0 SF(user-time)77.5 326.8 Q F2 13.75 -(integer user)166.6 326.8 R(time in nanoseconds)2.75 E 350.839 331.55 72 331.55 -DL F3(system-time)77.5 343.8 Q F2 13.75(integer system)166.6 343.8 R -(time in nanoseconds)2.75 E 350.839 348.55 72 348.55 DL 350.839 297.55 350.839 -348.55 DL 72 297.55 72 348.55 DL 207.839 297.55 207.839 348.55 DL 158.35 297.55 -158.35 348.55 DL F0(Addition \214elds may be supplied in future v)72 368.4 Q -(ersions.)-.165 E F2(\(unix-en)72 398.4 Q(vir)-.44 E -.917(on \))-.198 F(pr) -456.128 398.4 Q(ocedur)-.198 E(e)-.198 E F1(unix-en)72 417 Q(vir)-.44 E(on) --.495 E F0 .622(returns the program')3.372 F 3.372(se)-.605 G -.44(nv)234.241 -417 S .623(ironment as a list of pairs.).44 F .623 -(The car of each element is the)6.123 F(name of an en)72 432 Q(vironment v)-.44 -E(ariable \(a string\), the cdr is the v)-.275 E(alue of that v)-.275 E -(ariable \(a string\).)-.275 E F2(\(unix-geten)72 462 Q(v)-.44 E F1(string) -4.583 E F2 291.985(\)p)C -.198(ro)462.244 462 S(cedur).198 E(e)-.198 E F0 .655 -(This procedure returns the v)72 480.6 R .655(alue of the en)-.275 F .655 -(vironment v)-.44 F .655(ariable with the name)-.275 F F1(string)3.405 E F0 -.655(as a string, or)3.405 F(#f if the speci\214ed v)72 495.6 Q -(ariable is not de\214ned.)-.275 E F2(\(unix-w)72 525.6 Q(orking-dir)-.11 E --.917(ectory \))-.198 F(pr)456.128 525.6 Q(ocedur)-.198 E(e)-.198 E F1 -(unix-working-dir)72 544.2 Q(ectory)-.407 E F0 1.076 -(returns the calling program')3.826 F 3.827(sc)-.605 G 1.077(urrent w)316.797 -544.2 R 1.077(orking directory as a string.)-.11 F(The)6.577 E .189 -(procedure is based on the)72 559.2 R F1 -.11(ge)2.939 G(tcwd\(\)).11 E F0(or) -2.939 E F1 -.11(ge)2.939 G(twd\(\)).11 E F0 .189(function if an)2.939 F 2.939 -(yo)-.165 G 2.939(ft)350.773 559.2 S .189(hese is a)360.433 559.2 R -.275(va) --.22 G .188(ilable and in).275 F -.22(vo)-.44 G -.11(ke).22 G 2.938(st).11 G -(he)493.616 559.2 Q -.814(``)72 574.2 S(pwd').814 E 2.75('c)-.814 G -(ommand otherwise.)111.6 574.2 Q F2 -.917(\(unix-getlogin \))72 604.2 R(pr) -456.128 604.2 Q(ocedur)-.198 E(e)-.198 E F1(unix-g)72 622.8 Q(etlo)-.11 E(gin) --.11 E F0 1.167(returns the login name as a string \(obtained by the UNIX)3.917 -F F1 -.11(ge)3.918 G(tlo).11 E(gin\(\))-.11 E F0 1.168(library func-)3.918 F -(tion\).)72 637.8 Q F2 -.917(\(unix-getuids \))72 667.8 R(pr)456.128 667.8 Q -(ocedur)-.198 E(e)-.198 E -.917(\(unix-getgids \))72 682.8 R(pr)456.128 682.8 Q -(ocedur)-.198 E(e)-.198 E F1(unix-g)72 701.4 Q(etuids)-.11 E F0(\()3.727 E F1 -(unix-g)A(etgids)-.11 E F0 3.727(\)r)C .977(eturns the calling program')198.991 -701.4 R 3.726(sr)-.605 G .976(eal and ef)332.434 701.4 R(fecti)-.275 E 1.306 --.165(ve u)-.275 H(ser).165 E .976(-IDs \(group-IDs\))-.22 F(as a pair of inte) -72 716.4 Q(gers.)-.165 E EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF -.917(\(unix-getpids \))72 87 R(pr)456.128 87 -Q(ocedur)-.198 E(e)-.198 E/F2 11/Times-Italic@0 SF(unix-g)72 105.6 Q(etpids) --.11 E F0 .887(returns the process-ID of the calling process and the parent pr\ -ocess-ID as a pair of)3.637 F(inte)72 120.6 Q(gers.)-.165 E F1(\(unix-getgr)72 -150.6 Q -.917(oups \))-.198 F(pr)456.128 150.6 Q(ocedur)-.198 E(e)-.198 E F2 -(unix-g)72 169.2 Q(etgr)-.11 E(oups)-.495 E F0 -(returns the current supplementary group-IDs of the process as a list of inte) -2.75 E(gers.)-.165 E(Example:)72 187.8 Q/F3 10/Courier@0 SF -(;;; Get list of names of supplementary group-IDs)100.346 210.303 Q -(\(define \(get-group-names\))100.346 229.903 Q(\(map)112.346 243.903 Q -(\(lambda \(gid\))124.346 257.903 Q(\(group-name \(unix-get-group gid\)\)\)) -136.346 271.903 Q(\(unix-getgroups\)\)\))124.346 285.903 Q F1(\(unix-umask)72 -322.903 Q F2(mask)4.583 E F1 293.987(\)p)C -.198(ro)462.244 322.903 S(cedur) -.198 E(e)-.198 E F0 .519(The UNIX)72 341.503 R F2(umask\(\))3.269 E F0 .519 -(system call.)3.269 F F2(mask)6.019 E F0 .519(is an inte)3.269 F(ger)-.165 E -6.019(.T)-.605 G .519(he procedure returns the pre)315.712 341.503 R .519 -(vious v)-.275 F .519(alue of)-.275 F(the umask.)72 356.503 Q F1(\(unix-nice)72 -386.503 Q F2(incr)4.583 E F1 311.103(\)p)C -.198(ro)462.244 386.503 S(cedur) -.198 E(e)-.198 E F0 1.079(The UNIX)72 405.103 R F2(nice\(\))3.829 E F0 -(function.)3.829 E F2(incr)6.579 E F0 1.079(is an inte)3.829 F(ger)-.165 E(.) --.605 E F2(unix-nice)6.579 E F0 1.079(returns the ne)3.829 F 3.829(wn)-.275 G -1.079(ice v)409.547 405.103 R 1.08(alue \(or zero on)-.275 F(some platforms\).) -72 420.103 Q F1(\(unix-sleep)72 450.103 Q F2(seconds)4.583 E F1 289.719(\)p)C --.198(ro)462.244 450.103 S(cedur).198 E(e)-.198 E F0 .213(The UNIX)72 468.703 R -F2(sleep\(\))2.963 E F0(function.)2.963 E F2(seconds)5.713 E F0 .213 -(is a positi)2.963 F .543 -.165(ve i)-.275 H(nte).165 E(ger)-.165 E 5.713(.T) --.605 G .213(he procedure returns the non-printing)338.797 468.703 R(object.)72 -483.703 Q F1 2.75(12. Obtaining)72 513.703 R(System Inf)2.75 E(ormation)-.275 E -(\(unix-system-inf)72 543.703 Q 290.607 1.833(o\) p)-.275 H -.198(ro)-1.833 G -(cedur).198 E(e)-.198 E F0(This procedure returns a)72 562.303 Q F2(system-r) -2.75 E(ecor)-.407 E(d)-.407 E F0(with these \214elds:)2.75 E 356.295 582.053 72 -582.053 DL F1 30.47(Field T)91.981 594.303 R 74.905(ype Contents)-.814 F -356.295 599.053 72 599.053 DL/F4 11/Courier@0 SF(hostname)77.5 611.303 Q F1 -13.75(string the)146.8 611.303 R(system')2.75 E 2.75(sh)-.407 G(ostname)256.382 -611.303 Q 356.295 616.053 72 616.053 DL F4(sysname)77.5 628.303 Q F1 13.75 -(string type)146.8 628.303 R(of hard)2.75 E(war)-.165 E 2.75(ep)-.198 G(latf) -279.955 628.303 Q(orm)-.275 E 356.295 633.053 72 633.053 DL F4(osname)77.5 -645.303 Q F1 13.75(string operating)146.8 645.303 R(system type and v)2.75 E -(ersion)-.11 E 356.295 650.053 72 650.053 DL 356.295 582.053 356.295 650.053 DL -72 582.053 72 650.053 DL 182.55 582.053 182.55 650.053 DL 138.55 582.053 138.55 -650.053 DL F0 .069(The hostname is determined by a call to the UNIX)72 669.903 -R F2 -.11(ge)2.82 G(thostname\(\)).11 E F0(or)2.82 E F2(uname\(\))2.82 E F0 .07 -(function; the system)2.82 F .841(name and OS name are obtained from the con\ -\214guration \214le that has been used to con\214gure and)72 684.903 R -(install Elk.)72 699.903 Q EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(unix-\214le-limit)72 87 Q/F2 11 -/Times-Italic@0 SF(limit \214le)4.583 E F1 271.679(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F2(unix-\214le-limit)72 105.6 Q F0 .671 -(can be used to query v)3.421 F .672 -(arious system limits and options associated with \214les.)-.275 F F2(limit) -6.172 E F0(is a symbol identifying the type of limit;)72 120.6 Q F2(\214le)2.75 -E F0(is a \214lename or \214le descriptor)2.75 E(.)-.605 E(At least the follo) -72 139.2 Q(wing limits and options can be queried:)-.275 E 392.925 158.95 72 -158.95 DL F1 108.509(Limit/Option Meaning)77.5 171.2 R 392.925 175.95 72 175.95 -DL 392.925 177.95 72 177.95 DL/F3 11/Courier@0 SF(max-links)77.5 190.2 Q F1 -(maximum number of links to a \214le or dir)156.348 190.2 Q(ectory)-.198 E -392.925 194.95 72 194.95 DL F3(max-name)77.5 207.2 Q F1 -(maximum length of a \214lename)156.348 207.2 Q 392.925 211.95 72 211.95 DL F3 -(max-path)77.5 224.2 Q F1(maximum length of a pathname)156.348 224.2 Q 392.925 -228.95 72 228.95 DL F3(pipe-buf)77.5 241.2 Q F1(pipe b)156.348 241.2 Q -(uffer size)-.22 E 392.925 245.95 72 245.95 DL F3(no-trunc)77.5 258.2 Q F1 -(\214lename exceeding maximum length causes err)156.348 258.2 Q(or)-.198 E -(instead of being silently truncated)156.348 273.2 Q 392.925 277.95 72 277.95 -DL 392.925 158.95 392.925 277.95 DL 72 158.95 72 277.95 DL 148.098 158.95 -148.098 277.95 DL F0 .384(Additional limits may be present on some platforms.) -72 297.8 R .383(The list of limits actually supported by this)5.883 F -(procedure can be obtained by a call to)72 312.8 Q F2(unix-list-\214le-limits) -2.75 E F0(\(see belo)2.75 E(w\).)-.275 E 1.506(If present, the POSIX)72 331.4 R -F2(pathconf\(\))4.256 E F0(/)A F2(fpathconf\(\))A F0 1.506 -(function is used to query a limit; in this case the)4.256 F 1.324 -(speci\214ed \214lename or \214le descriptor is supplied as an ar)72 346.4 R -1.324(gument to)-.198 F F2(pathconf\(\))4.073 E F0(or)4.073 E F2(fpathconf\(\)) -4.073 E F0 6.823(.I)C(f)500.337 346.4 Q F2(pathconf\(\))72 361.4 Q F0 .061 -(is not a)2.81 F -.275(va)-.22 G .061(ilable, or if calling it is not appropri\ -ate for the type of limit, a static \(compile-).275 F(time\) v)72 376.4 Q -(alue is returned.)-.275 E .234(The result type of)72 395 R F2 -(unix-\214le-limit)2.984 E F0 .234 -(depends on the type of the speci\214ed limit \(boolean in case of)2.984 F F2 -(no-)2.984 E(trunc)72 410 Q F0 2.75(,i)C(nte)103.779 410 Q(ger otherwise\).) --.165 E F1 -.917(\(unix-list-\214le-limits \))72 440 R(pr)456.128 440 Q(ocedur) --.198 E(e)-.198 E F0 .032 -(This procedure returns the list of limit symbols that can be supplied as ar)72 -458.6 R .032(guments to)-.198 F F2(unix-\214le-limit)2.783 E F0(\(see abo)72 -473.6 Q -.165(ve)-.165 G(\).).165 E F1(\(unix-job-contr)72 503.6 Q -.917 -(ol? \))-.198 F(pr)456.128 503.6 Q(ocedur)-.198 E(e)-.198 E F0 .569 -(This predicate returns #t if UNIX job control is a)72 522.2 R -.275(va)-.22 G -.569(ilable on the local system, #f otherwise.).275 F .569(In a)6.069 F -(POSIX en)72 537.2 Q(vironment, this procedure may call)-.44 E F2(sysconf\(\)) -2.75 E F0(.)A F1 2.75(13. Date)72 567.2 R(and T)2.75 E(ime)-.198 E -.917 -(\(unix-time \))72 597.2 R(pr)456.128 597.2 Q(ocedur)-.198 E(e)-.198 E F0 6.363 -(The UNIX)72 615.8 R F2(time\(\))9.113 E F0(function.)9.113 E F2(unix-time) -221.478 615.8 Q F0 6.364(returns the number of seconds elapsed since)9.114 F -(midnight UTC, January 1, 1970 \()72 630.8 Q F2(The Epoc)A(h)-.165 E F0 2.75 -(\)a)C 2.75(sa)276.842 630.8 S 2.75(ni)288.755 630.8 S(nte)300.063 630.8 Q(ger) --.165 E(.)-.605 E F1 -.917(\(unix-nanotime \))72 660.8 R(pr)456.128 660.8 Q -(ocedur)-.198 E(e)-.198 E F0 .626(This procedure returns the number of nanosec\ -onds elapsed since The Epoch as an inte)72 679.4 R(ger)-.165 E(.)-.605 E F2 -(unix-)6.126 E(nanotime)72 694.4 Q F0(in)2.759 E -.22(vo)-.44 G -.11(ke).22 G -2.76(so).11 G .01(ne of the UNIX functions)157.412 694.4 R F2 -.11(ge)2.76 G -(ttimeofday\(\)).11 E F0(,)A F2(ftime\(\))2.76 E F0(,)A F2(time\(\))2.76 E F0 -.01(\(in that order)2.76 F 2.76(,d)-.44 G(epend-)474.069 694.4 Q -(ing on which of these function is a)72 709.4 Q -.275(va)-.22 G -(ilable\), thus pro).275 E(viding up to microsecond resolution.)-.165 E EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(unix-decode-localtime)72 87 Q/F2 11 -/Times-Italic@0 SF(time)4.583 E F1 250.009(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E(\(unix-decode-utc)72 102 Q F2(time)4.583 E F1 278.114(\)p)C --.198(ro)462.244 102 S(cedur).198 E(e)-.198 E F0 .43(Both procedures con)72 -120.6 R -.165(ve)-.44 G .43 -(rt the speci\214ed time \(a number of seconds as returned by).165 F F2 -(unix-time)3.179 E F0 3.179(\)i)C .429(nto a)481.879 120.6 R F2(time-r)72 135.6 -Q(ecor)-.407 E(d)-.407 E F0(;)A F2(unix-decode-localtime)3.91 E F0 1.161 -(corrects for the local time zone and DST adjustment \(based)3.91 F -(on the UNIX)72 150.6 Q F2(localtime\(\))2.75 E F0(and)2.75 E F2(gmtime\(\)) -2.75 E F0(functions\).)2.75 E(A)72 169.2 Q F2(time-r)2.75 E(ecor)-.407 E(d) --.407 E F0(has the follo)2.75 E(wing \214elds:)-.275 E 307.62 188.95 72 188.95 -DL F1 46.415(Field T)105.181 201.2 R 43.477(ype Range)-.814 F 307.62 205.95 72 -205.95 DL 307.62 207.95 72 207.95 DL/F3 11/Courier@0 SF(seconds)77.5 220.2 Q F1 -13.75(integer 0..61)173.2 220.2 R 307.62 224.95 72 224.95 DL F3(minutes)77.5 -237.2 Q F1 13.75(integer 0..59)173.2 237.2 R 307.62 241.95 72 241.95 DL F3 -(hours)77.5 254.2 Q F1 13.75(integer 0..23)173.2 254.2 R 307.62 258.95 72 -258.95 DL F3(day-of-month)77.5 271.2 Q F1 13.75(integer 1..31)173.2 271.2 R -307.62 275.95 72 275.95 DL F3(month)77.5 288.2 Q F1 13.75(integer 0..11)173.2 -288.2 R 307.62 292.95 72 292.95 DL F3(year)77.5 305.2 Q F1 13.75(integer \(y) -173.2 305.2 R(ear - 1900\))-.11 E 307.62 309.95 72 309.95 DL F3(weekday)77.5 -322.2 Q F1 13.75(integer 0..6)173.2 322.2 R 307.62 326.95 72 326.95 DL F3 -(day-of-year)77.5 339.2 Q F1 13.75(integer 0..365)173.2 339.2 R 307.62 343.95 -72 343.95 DL F3(dst)77.5 356.2 Q F1 13.75(integer 1)173.2 356.2 R -(if DST in effect)2.75 E 307.62 360.95 72 360.95 DL 307.62 188.95 307.62 360.95 -DL 72 188.95 72 360.95 DL 214.439 188.95 214.439 360.95 DL 164.95 188.95 164.95 -360.95 DL F0(Example:)72 380.8 Q/F4 10/Courier@0 SF -(;;; Return date as a string of the form "Nov 3, 1993")100.346 403.303 Q -(\(define \(date-string\))100.346 422.903 Q -(\(let* \(\(months "JanFebMarAprMayJunJulAugSepOctNovDec"\))112.346 436.903 Q -(\(time \(unix-decode-localtime \(unix-time\)\)\))154.346 450.903 Q -(\(month-inx \(* 3 \(time-month time\)\)\)\))154.346 464.903 Q -(\(format #f "~a ~a, ~a")124.346 484.503 Q -(\(substring months month-inx \(+ 3 month-inx\)\))172.346 498.503 Q -(\(time-day-of-month time\) \(+ 1900 \(time-year time\)\)\)\)\))172.346 512.503 -Q F1(\(unix-time->string)72 549.503 Q F2(time)4.583 E F1 270.623(\)p)C -.198 -(ro)462.244 549.503 S(cedur).198 E(e)-.198 E F0 .917(This procedure con)72 -568.103 R -.165(ve)-.44 G .917 -(rts the speci\214ed time into a string; it is based on the).165 F F2 -(ctime\(\))3.667 E F0(and)3.667 E F2(asctime\(\))3.666 E F0(UNIX functions.)72 -583.103 Q F2(time)5.5 E F0(is either an inte)2.75 E -(ger \(number of seconds\) or a)-.165 E F2(time-r)2.75 E(ecor)-.407 E(d)-.407 E -F0(.)A F1 2.75(14. Signals)72 613.103 R F0 .329 -(The procedures described in this section \(e)97 631.703 R(xcept)-.165 E F2 -(unix-kill)3.079 E F0(,)A F2(unix-list-signals)3.079 E F0 3.079(,a)C(nd)437.99 -631.703 Q F2(unix-pause)3.079 E F0(\))A .195(are only de\214ned if the local s\ -ystem supports reliable signals \(either BSD-style or POSIX signals\).)72 -646.703 R(In this case, the feature)72 661.703 Q F2(unix:r)2.75 E -(eliable-signals)-.407 E F0(is pro)2.75 E(vided when the UNIX e)-.165 E -(xtension is loaded.)-.165 E EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(7-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(unix-kill)72 87 Q/F2 11/Times-Italic@0 SF -(pid signal)4.583 E F1 288.773(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 -E F0 .13(The UNIX)72 105.6 R F2(kill\(\))2.88 E F0 .13(system call.)2.88 F F2 -(pid)5.63 E F0 .131(is an inte)2.88 F(ger;)-.165 E F2(sig)2.881 E F0 .131 -(is either an inte)2.881 F .131(ger \(a signal number\) or a sym-)-.165 F -(bol \(a signal name\).)72 120.6 Q(At least the follo)5.5 E -(wing signal names are supported:)-.275 E 254.6 140.35 72 140.35 DL F1 -(Signal names)132.28 152.6 Q 254.6 157.35 72 157.35 DL/F3 11/Courier@0 SF 9.9 -(sigalrm sigbus)77.5 169.6 R(sigfpe)202.9 169.6 Q 16.5(sighup sigill sigint) -77.5 184.6 R 9.9(sigkill sigpipe sigquit)77.5 199.6 R 9.9(sigsegv sigterm)77.5 -214.6 R 254.6 219.35 72 219.35 DL 254.6 140.35 254.6 219.35 DL 72 140.35 72 -219.35 DL F0 .764(The list of signal names actually supported by the local sys\ -tem can be obtained by calling)72 239.2 R F2(unix-)3.513 E(list-signals)72 -254.2 Q F0(\(see belo)2.75 E(w\).)-.275 E F2(unix-kill)72 272.8 Q F0 -(returns the non-printing object.)2.75 E F1 -.917(\(unix-list-signals \))72 -302.8 R(pr)456.128 302.8 Q(ocedur)-.198 E(e)-.198 E F0(This procedure returns \ -a list of signal names \(symbols\) that are supported by the system.)72 321.4 Q -F1(\(alarm)72 351.4 Q F2(seconds)4.583 E F1 309.288(\)p)C -.198(ro)462.244 -351.4 S(cedur).198 E(e)-.198 E F0 .219(The UNIX)72 370 R F2(alarm\(\))2.969 E -F0(function.)2.969 E F2(seconds)5.719 E F0 .219(is a positi)2.969 F .549 -.165 -(ve i)-.275 H(nte).165 E(ger)-.165 E(.)-.605 E F2(unix-alarm)5.719 E F0 .219 -(returns the number of sec-)2.969 F(onds remaining from the pre)72 385 Q -(viously set alarm.)-.275 E F1 -.917(\(unix-pause \))72 415 R(pr)456.128 415 Q -(ocedur)-.198 E(e)-.198 E F0(The UNIX)72 433.6 Q F2(pause\(\))2.75 E F0 2.75 -(function. This)2.75 F(procedure does not return.)2.75 E F1(\(unix-signal)72 -463.6 Q F2(sig action)4.583 E F1 277.168(\)p)C -.198(ro)462.244 463.6 S(cedur) -.198 E(e)-.198 E(\(unix-signal)72 478.6 Q F2(sig)4.583 E F1 307.418(\)p)C -.198 -(ro)462.244 478.6 S(cedur).198 E(e)-.198 E F2(unix-signal)72 497.2 Q F0 1.136 -(de\214nes or queries the action to be performed when a signal is deli)3.887 F --.165(ve)-.275 G 1.136(red to the pro-).165 F 2.995(gram. If)72 512.2 R(an) -2.995 E F2(action)2.995 E F0(ar)2.995 E .245 -(gument is speci\214ed, this action is associated with the signal)-.198 F F2 -(sig)2.995 E F0 2.995(,a)C .245(nd the pre-)455.857 512.2 R 2.106 -(vious action for this signal is returned.)72 527.2 R 2.106(If no action is gi) -7.606 F -.165(ve)-.275 G 4.856(n\().165 G 2.106(second form\),)365.694 527.2 R -F2(unix-signal)4.856 E F0(just)4.855 E -(returns the action currently associated with)72 542.2 Q F2(sig)2.75 E F0(.)A -F2(sig)72 560.8 Q F0 1.293(is the name of a signal \(see)4.043 F F2(unix-kill) -4.044 E F0 1.294(for a description\).)4.044 F 1.294(The action associated with) -6.794 F F2(sigb)4.044 E(us)-.22 E F0(,)A F2(sigfpe)72 575.8 Q F0(,)A F2(sigill) -3.817 E F0(,)A F2(sigint)3.817 E F0(,)A F2(sigkill)3.817 E F0(,)A F2(sigse) -3.817 E(gv)-.44 E F0 3.817(,a)C(nd)241.301 575.8 Q F2(sigabrt)3.817 E F0 1.067 -(\(if supported\) cannot be altered; either because)3.817 F 1.367 -(UNIX does not permit this \()72 590.8 R F2(sigkill)A F0 1.368 -(\), or because the signal can be generated as the result of an)B .433 -(internal f)72 605.8 R .433(atal error \()-.11 F F2(sigb)A(us)-.22 E F0 .432 -(etc.\), or because it is used by the interpreter internally \()3.183 F F2 -(sigse)A(gv)-.44 E F0 .432(is used)3.182 F .137(by the incremental g)72 620.8 R -.137(arbage collector\).)-.055 F .137(The action associated with the)5.637 F F2 -(interrupt)2.887 E F0 .138(signal can be con-)2.888 F .097 -(trolled by rede\214ning the standard Elk)72 635.8 R F2(interrupt-handler)2.846 -E F0 .096(\(see the Elk reference manual for details\).)2.846 F F2(action)72 -654.4 Q F0(can be one of the follo)2.75 E(wing:)-.275 E(the symbol)97 673 Q F2 -(ignor)2.75 E(e)-.407 E F0(the speci\214ed signal is ignored)122 688 Q -(the symbol)97 706.6 Q F2(default)2.75 E F0(the def)122 721.6 Q -(ault action for this signal is established)-.11 E EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(8-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(the symbol)97 87 Q/F1 11/Times-Italic@0 SF -.22(ex)2.75 G(it).22 E -F0 3.243(cleanup and e)122 102 R 3.243(xit: if the signal is deli)-.165 F -.165 -(ve)-.275 G 3.244(red, the interpreter').165 F 5.994(st)-.605 G 3.244 -(emporary \214les are)418.092 102 R(remo)122 117 Q -.165(ve)-.165 G .972(d, th\ -e \214nalization functions and static C++ destructors of dynamically loaded) -.165 F -.165(ex)122 132 S(tensions are in).165 E -.22(vo)-.44 G -.11(ke).22 G -(d, and).11 E F1 -.22(ex)2.75 G(it\(\)).22 E F0(is called with an e)2.75 E -(xit code of 1)-.165 E 2.75(ac)97 150.6 S(ompound procedure)109.518 150.6 Q -(the procedure \(signal handler\) is in)122 165.6 Q -.22(vo)-.44 G -.11(ke).22 -G 2.75(do).11 G 2.75(nd)310.023 165.6 S(eli)323.773 165.6 Q -.165(ve)-.275 G -(ry of the speci\214ed signal.).165 E .199 -(The procedure speci\214ed as a signal handler must accept one or more ar)72 -187.8 R 2.95(guments. When)-.198 F .2(the signal)2.95 F 1.235(is deli)72 202.8 -R -.165(ve)-.275 G 1.235(red, the procedure is in).165 F -.22(vo)-.44 G -.11 -(ke).22 G 3.985(dw).11 G 1.235(ith the signal name \(a symbol\) as an ar) -253.859 202.8 R 3.984(gument. Signal)-.198 F 1.434 -(handlers must not return \(i.)72 217.8 R 1.434(e. the)1.833 F 4.184(ym)-.165 G -1.434(ust either e)242.366 217.8 R 1.434(xit or call a continuation\).)-.165 F -1.435(If a signal handler)6.934 F(returns, a message is displayed and the)72 -232.8 Q F1 -.407(re)2.75 G(set).407 E F0(primiti)2.75 E .33 -.165(ve i)-.275 H -2.75(sc).165 G(alled.)326.87 232.8 Q 1.156(The signal speci\214ed as an ar)72 -251.4 R 1.156(gument to)-.198 F F1(unix-signal)3.906 E F0 1.155 -(is added to \(remo)3.906 F -.165(ve)-.165 G 3.905(df).165 G 1.155 -(rom\) the signal mask)407.959 251.4 R 1.006(maintained by the interpreter)72 -266.4 R 3.756(,i)-.44 G 1.833(.e)211.533 266.4 S 3.756(.c)-1.833 G 1.006 -(alls to the)232.39 266.4 R F1(disable-interrupts)3.756 E F0(primiti)3.756 E -1.336 -.165(ve b)-.275 H 1.007(lock the signal from).165 F(deli)72 281.4 Q --.165(ve)-.275 G(ry).165 E(.)-.715 E F1(unix-signal)72 300 Q F0 1.184 -(returns the pre)3.934 F 1.183 -(vious \(current\) action for the speci\214ed signal \(a procedure or)-.275 F -F1(ignor)3.933 E(e)-.407 E F0(,)A F1(default)72 315 Q F0 2.882(,o)C(r)113.69 -315 Q F1 -.22(ex)2.882 G(it).22 E F0 2.882(\)o)C 2.882(rt)147.944 315 S .132 -(he symbol)157.547 315 R F1(handler)2.882 E F0 .133 -(to indicate that the signal is handled internally by the inter)2.882 F(-)-.22 -E(preter)72 330 Q(.)-.605 E/F2 11/Times-Bold@0 SF 2.75(15. Miscellaneous)72 360 -R(Functions)2.75 E(\(unix-getpass)72 390 Q F1(string)4.583 E F2 287.871(\)p)C --.198(ro)462.244 390 S(cedur).198 E(e)-.198 E F1(unix-g)72 408.6 Q(etpass)-.11 -E F0(displays)3.429 E F1(string)3.429 E F0 .679 -(on standard output, reads a passw)3.429 F .678(ord, and returns the passw)-.11 -F .678(ord as a)-.11 F 2.75(string. The)72 423.6 R(procedure in)2.75 E -.22(vo) --.44 G -.11(ke).22 G 2.75(st).11 G(he UNIX)211.15 423.6 Q F1 -.11(ge)2.75 G -(tpass\(\)).11 E F0(function.)2.75 E F2 2.75(16. Err)72 453.6 R(or Functions) --.198 E(\(unix-err)72 483.6 Q -.11(va)-.11 G(l).11 E F1 -.22(ex)4.583 G(pr).22 -E(ession)-.407 E F2 290.17(\)s)C(yntax)477.721 483.6 Q F0(Normally)72 502.2 Q -3.899(,aS)-.715 G 1.15(cheme error is signaled by the UNIX e)134.996 502.2 R -1.15(xtension whene)-.165 F -.165(ve)-.275 G 3.9(raU).165 G 1.15 -(NIX system call or)417.148 502.2 R 1.154(library function in)72 517.2 R -.22 -(vo)-.44 G -.11(ke).22 G 3.904(db).11 G 3.904(ya)189.873 517.2 S 1.484 -.165 -(ny o)204.161 517.2 T 3.904(ft).165 G 1.154(he abo)235.025 517.2 R 1.484 -.165 -(ve p)-.165 H(rimiti).165 E -.165(ve)-.275 G 3.904(sf).165 G 3.904(ails. The) -330.788 517.2 R(macro)3.904 E F1(unix-errval)3.904 E F0(allo)3.904 E 1.154 -(ws an)-.275 F .008(application to handle an error condition in a speci\214c w) -72 532.2 R .008(ay without the need to rede\214ne the standard)-.11 F -(error handler of Elk.)72 547.2 Q F1(unix-errval)72 565.8 Q F0 -.275(eva)3.555 -G .805(luates the speci\214ed e).275 F .804 -(xpression and returns the result of the e)-.165 F -.275(va)-.275 G 3.554 -(luation. If,).275 F(during)3.554 E -.275(eva)72 580.8 S 1.315 -(luation of the e).275 F 1.315(xpression, an error is signaled due to f)-.165 F -1.315(ailure of a UNIX function, the corre-)-.11 F 1.455(sponding primiti)72 -595.8 R 1.785 -.165(ve p)-.275 H 1.455(rocedure returns a unique).165 F F1(err) -4.205 E 1.454(or object)-.495 F F0 1.454(instead of performing normal error) -4.204 F(handling.)72 610.8 Q -.165(Fo)72 629.4 S 2.75(re).165 G(xample, e) -94.583 629.4 Q -.275(va)-.275 G(luating the e).275 E(xpression)-.165 E/F3 10 -/Courier@0 SF(\(unix-close 1000\))100.346 651.903 Q 6(;c)226.346 651.903 S -(lose a bad file descriptor)244.346 651.903 Q F0 -.11(wo)72 673.903 S(uld in) -.11 E -.22(vo)-.44 G .22 -.11(ke t).22 H -(he standard Scheme error handler in the normal w).11 E(ay)-.11 E 2.75(,w)-.715 -G(hereas e)380.066 673.903 Q -.275(va)-.275 G(luating).275 E F3 -(\(unix-errval \(unix-close 1000\)\))100.346 696.406 Q F0 -.11(wo)72 718.406 S -.219(uld return an error object to allo).11 F 2.97(wt)-.275 G .22 -(he application to handle the error locally)240.869 718.406 R 5.72(.N)-.715 G -.22(ote that e)436.295 718.406 R -.275(va)-.275 G(lua-).275 E -(tion of the enclosing e)72 733.406 Q -(xpression is not interrupted when an error is signaled, i.)-.165 E(e. the e) -1.833 E(xpression)-.165 E EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(9-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(unix-errval \(begin \(unix-close 1000\) 5\)\)) -100.346 94.503 Q F0 -.11(wo)72 116.503 S(uld return the inte).11 E(ger 5.)-.165 -E/F2 11/Times-Bold@0 SF(\(unix-err)72 146.503 Q(or?)-.198 E/F3 11 -/Times-Italic@0 SF(obj)4.583 E F2 303.37(\)p)C -.198(ro)462.244 146.503 S -(cedur).198 E(e)-.198 E F0 .539(This procedure returns #t if)72 165.103 R F3 -(obj)3.289 E F0 .539(is the)3.289 F F3(err)3.289 E .539(or object)-.495 F F0 -3.289(,#)C 3.289(fo)306.949 165.103 S(therwise.)319.401 165.103 Q F3(unix-err) -6.039 E(or?)-.495 E F0 .538(is typically used to)3.289 F -(check whether a primiti)72 180.103 Q .33 -.165(ve i)-.275 H -2.09 -.44(nv o) -.165 H -.11(ke).44 G 2.75(du).11 G(nder control of)231.786 180.103 Q F3 -(unix-errval)2.75 E F0(has signaled an error)2.75 E(.)-.605 E F2(\(unix-err)72 -210.103 Q -.917(no \))-.165 F(pr)456.128 210.103 Q(ocedur)-.198 E(e)-.198 E F0 -.242(Returns the UNIX)72 228.703 R F3(errno)2.992 E F0 .242 -(set by the last system call that has f)2.992 F 2.993(ailed. Error)-.11 F .243 -(codes are represented as)2.993 F .824(symbols corresponding to the names of t\ -he standard UNIX error numbers with letters con)72 243.703 R -.165(ve)-.44 G -(rted).165 E .571(to lo)72 258.703 R .571(wer case, i.)-.275 F(e.)1.833 E F3 -(enomem)6.071 E F0(,)A F3(ebadf)3.321 E F0 3.321(,e)C 3.321(tc. The)236.44 -258.703 R -.165(ex)3.321 G .572 -(act set of error codes that can be returned is plat-).165 F(form-dependent.)72 -273.703 Q 1.429(The v)72 292.303 R 1.429(alue returned by)-.275 F F3 -(unix-errno)4.178 E F0 1.428(is not reset when a UNIX system call e)4.178 F --.165(xe)-.165 G 1.428(cutes successfully).165 F(.)-.715 E(Ho)72 307.303 Q(we) --.275 E -.165(ve)-.275 G 2.307 -.44(r, v).165 H 1.427(alue of).165 F F3 -(unix-errno)4.177 E F0 1.427(is also af)4.177 F 1.428 -(fected by functions from the Elk k)-.275 F 1.428(ernel \(such as)-.11 F F3 -(open-)4.178 E(input-\214le)72 322.303 Q F0 2.75(\)a)C(nd possibly other e) -123.018 322.303 Q(xtensions that mak)-.165 E 2.75(eu)-.11 G -(se of system calls.)301.79 322.303 Q F2(\(unix-perr)72 352.303 Q(or)-.198 E F3 -(string)4.583 E F2 291.138(\)p)C -.198(ro)462.244 352.303 S(cedur).198 E(e) --.198 E F3(unix-perr)72 370.903 Q(or)-.495 E F0(writes)3.068 E F3(string)3.068 -E F0(follo)3.068 E .317 -(wed by a colon and a short message describing the last UNIX error)-.275 F .253 -(encountered to the current output port.)72 385.903 R F3(unix-perr)5.753 E(or) --.495 E F0(mak)3.003 E .254(es use of the `)-.11 F(`~E')-.814 E 3.004('f)-.814 -G .254(ormat speci\214er of the)409.452 385.903 R(format primiti)72 400.903 Q --.165(ve)-.275 G(.).165 E EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(17. Examples)72 87 R F0 1.397 -(This program implements a simple program interf)72 105.6 R 1.397 -(ace to the UNIX)-.11 F/F2 11/Times-Italic@0 SF(dc)4.147 E F0 1.396 -(desktop calculator com-)4.146 F 4.428(mand. The)72 120.6 R(procedure)4.428 E -F2(calc-open)4.428 E F0 1.678(starts the)4.428 F F2(dc)4.428 E F0 1.679 -(command and establishes tw)4.429 F 4.429(op)-.11 G 1.679(ipes to/from the) -430.979 120.6 R .76(child process; the procedure)72 135.6 R F2(calc)3.51 E F0 -.76(sends its ar)3.51 F .76(gument \(a)-.198 F F2(dc)3.509 E F0 -.165(ex)3.509 -G .759(pression as a string\) as input to).165 F F2(dc)3.509 E F0(;)A F2 -(calc-close)72 150.6 Q F0(closes the pipes and w)2.75 E -(aits for the subprocess to terminate.)-.11 E/F3 10/Courier@0 SF -(\(require 'unix\))100.346 173.103 Q(\(define calc-from-dc\))100.346 192.703 Q -6(;i)244.346 192.703 S(nput port: standard output of dc command)262.346 192.703 -Q(\(define calc-to-dc\))100.346 206.703 Q 6(;o)244.346 206.703 S -(utput port: standard input of dc command)262.346 206.703 Q -(\(define calc-dc-pid\))100.346 220.703 Q 6(;p)244.346 220.703 S -(rocess-ID of child process running dc)262.346 220.703 Q -(\(define calc-dc-command "/bin/dc"\))100.346 240.303 Q(\(define \(calc-open\)) -100.346 259.903 Q(\(let* \(\(from \(unix-pipe\)\))112.346 273.903 Q -(\(to \(unix-pipe\)\))154.346 287.903 Q(\(redirect-fd \(lambda \(a b\))154.346 -301.903 Q(\(unix-dup a b\) \(unix-close a\)\)\)\))244.346 315.903 Q -(\(set! calc-dc-pid \(unix-fork\)\))124.346 329.903 Q -(\(if \(zero? calc-dc-pid\))124.346 343.903 Q(\(begin)148.346 357.903 Q -(\(unix-close \(car from\)\))160.346 371.903 Q(\(unix-close \(cdr to\)\)) -160.346 385.903 Q(\(redirect-fd \(car to\) 0\))160.346 399.903 Q -(\(redirect-fd \(cdr from\) 1\))160.346 413.903 Q -(\(unix-exec calc-dc-command '\("dc"\)\)\))160.346 427.903 Q(\(begin)148.346 -441.903 Q(\(unix-close \(cdr from\)\))160.346 455.903 Q -(\(unix-close \(car to\)\))160.346 469.903 Q(\(set! calc-to-dc)160.346 483.903 -Q(\(unix-filedescriptor->port \(cdr to\))274.346 483.903 Q("w"\)\))502.346 -483.903 Q -(\(set! calc-from-dc \(unix-filedescriptor->port \(car from\) "r"\)\)\)\)\)\)) -160.346 497.903 Q(\(define \(calc expr\))100.346 517.503 Q -(\(format calc-to-dc "~a~%" expr\))112.346 531.503 Q -(\(flush-output-port calc-to-dc\))112.346 545.503 Q -(\(read-string calc-from-dc\)\))112.346 559.503 Q(\(define \(calc-close\)) -100.346 579.103 Q(\(close-output-port calc-to-dc\))112.346 593.103 Q -(\(close-input-port calc-from-dc\))112.346 607.103 Q -(\(unix-wait-process calc-dc-pid\)\))112.346 621.103 Q -(;;; Test -- print sqrt\(2\):)100.346 649.103 Q(\(calc-open\))100.346 668.703 Q -(\(display \(calc "10k 2v p"\)\) \(newline\))100.346 682.703 Q(\(calc-close\)) -100.346 696.703 Q EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL 1.126(The follo)72 87 R 1.127 -(wing procedure copies a \214le; the ar)-.275 F 1.127 -(guments are the source and tar)-.198 F 1.127(get \214le names.)-.198 F(The) -6.627 E .542(second ar)72 102 R .542(gument may name a directory)-.198 F 3.292 -(,i)-.715 G 3.292(nt)256.103 102 S .541 -(his case the \214le is copied into the directory)267.953 102 R 6.041(.T)-.715 -G .541(he tar)475.277 102 R(-)-.22 E(get \214le must not yet e)72 117 Q(xist.) --.165 E/F1 11/Times-Italic@0 SF(copy-\214le)5.5 E F0(preserv)2.75 E -(es the access mode of the source \214le.)-.165 E/F2 10/Courier@0 SF -(\(require 'unix\))100.346 139.503 Q(\(define copy-buffer-size 8192\))100.346 -159.103 Q(\(define \(copy-file from to\))100.346 178.703 Q -(\(let \(\(from-stat \(unix-stat from\)\))112.346 192.703 Q -(\(to-stat \(unix-errval \(unix-stat to\)\)\)\))148.346 206.703 Q -(\(if \(eq? \(stat-type from-stat\) 'directory\))124.346 224.903 Q 6(;c)418.346 -224.903 S(omplain if "from")436.346 224.903 Q -(\(error 'copy-file "~s is a directory" from\)\) ;)148.346 238.903 Q -(is a directory)442.346 238.903 Q(\(if \(and \(not \(unix-error? to-stat\)\)) -124.346 257.103 Q 6(;d)418.346 257.103 S(estination exists)436.346 257.103 Q -(\(eq? \(stat-type to-stat\) 'directory\)\))178.346 271.103 Q 18(;a)418.346 -271.103 S(nd is a directory?)448.346 271.103 Q -(\(set! to \(format #f "~a/~a" to from\)\)\))148.346 285.103 Q -(\(let* \(\(to-fd \(unix-open to '\(write create exclusive\))124.346 303.303 Q -(\(stat-mode from-stat\)\)\))274.346 317.303 Q -(\(from-fd \(unix-open from '\(read\)\)\))166.346 331.303 Q -(\(buf \(make-string copy-buffer-size\)\)\))166.346 345.303 Q -(\(let loop \(\(num-chars \(unix-read-string-fill! from-fd buf\)\)\))136.346 -373.303 Q(\(if \(positive? num-chars\))166.346 387.303 Q(\(begin)190.346 -401.303 Q(\(unix-write to-fd buf num-chars\))202.346 415.303 Q -(\(loop \(unix-read-string-fill! from-fd buf\)\)\)\)\))202.346 429.303 Q -(\(unix-close from-fd\))136.346 447.503 Q(\(unix-close to-fd\)\)\)\))136.346 -461.503 Q EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Italic@0 SF(loc)72 87 Q(k-vi)-.22 E F0 .126(starts the) -2.876 F F1(vi)2.876 E F0 .126(editor with the speci\214ed \214le name.)2.876 F -.126(It pro)5.626 F .126(vides e)-.165 F(xclusi)-.165 E .456 -.165(ve a)-.275 H -.126(ccess to the \214le dur).165 F(-)-.22 E 1.026 -(ing the editing session by applying a write lock to the \214le and remo)72 102 -R 1.026(ving it when the editor \214n-)-.165 F 2.75(ishes. A)72 117 R -(message is displayed periodically if the lock is held by somebody else.)2.75 E -/F2 10/Courier@0 SF(\(require 'unix\))100.346 139.503 Q -(\(define \(lock-vi file\))100.346 159.103 Q -(\(let* \(\(fd \(unix-open file '\(read write\)\)\))112.346 173.103 Q -(\(lock \(\(record-constructor lock-record\) #t 'set 0 0\)\)\))154.346 187.103 -Q(\(let loop \(\))124.346 206.703 Q(\(if \(not \(unix-set-lock fd lock #f\)\)) -154.346 220.703 Q(\(begin)178.346 234.703 Q -(\(format #t "Someone else is editing ~s...~%" file\))190.346 248.703 Q -(\(unix-sleep 10\))190.346 262.703 Q(\(loop\)\)\)\))190.346 276.703 Q -(\(unix-system \(format #f "vi ~a" file\)\))124.346 296.303 Q -(\(unix-remove-lock fd lock\)\)\))124.346 310.303 Q F1(pipe-size)72 350.903 Q -F0 .901(attempts to determine the capacity of a pipe.)3.651 F .901 -(It creates a pipe, places the write end of)6.401 F .574(the pipe into non-blo\ -cking I/O mode and writes into the pipe until it is full, counting the charac-) -72 365.903 R(ters successfully written.)72 380.903 Q F2(\(require 'unix\)) -100.346 403.406 Q(\(define \(pipe-size\))100.346 423.006 Q -(\(let* \(\(pipe \(unix-pipe\)\))112.346 437.006 Q -(\(flags \(unix-filedescriptor-flags \(cdr pipe\)\)\))154.346 451.006 Q -(\(len 32\))154.346 465.006 Q 6(;a)322.346 465.006 S -(ssumes capacity is multiple of len)340.346 465.006 Q -(\(noise \(make-string len\)\)\))154.346 479.006 Q -(;; enable non-blocking I/O for write side of pipe:)124.346 498.606 Q -(\(unix-filedescriptor-flags \(cdr pipe\) \(cons 'ndelay flags\)\))124.346 -512.606 Q(\(unwind-protect)124.346 532.206 Q(\(let loop \(\(size 0\)\))136.346 -546.206 Q -(\(if \(unix-error? \(unix-errval \(unix-write \(cdr pipe\) noise\)\)\))166.346 -560.206 Q(\(if \(memq \(unix-errno\) '\(eagain ewouldblock\)\))190.346 574.206 -Q(size)214.346 588.206 Q(\(error 'pipe-size "~E"\)\))214.346 602.206 Q -(\(loop \(+ size 32\)\)\)\))190.346 616.206 Q(\(unix-close \(car pipe\)\)) -136.346 630.206 Q(\(unix-close \(cdr pipe\)\)\)\)\))136.346 644.206 Q EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(/)72 174 Q F0 -(/bin/sh, 11)72 204 Q(/tmp, 8)72 219 Q(/usr/tmp, 8)72 234 Q F1(A)72 264 Q F0 -(access, 7)72 294 Q(accessor functions, 2)72 309 Q(alarm,)72 324 Q/F2 12 -/Times-Bold@0 SF(17)2.75 E F0(asctime, 16)72 339 Q F1(B)72 369 Q F0(BSD, 16)72 -399 Q F1(C)72 429 Q F0(calc, 20)72 459 Q(calc-close, 20)72 474 Q(calc-open, 20) -72 489 Q(chdir)72 504 Q 2.75(,7)-.44 G(chmod, 7)72 519 Q(cho)72 534 Q(wn, 7) --.275 E(close, 3)72 549 Q(close-on-e)72 564 Q -.165(xe)-.165 G(c, 4).165 E -(closedir)72 579 Q 2.75(,8)-.44 G(cop)72 594 Q(y-\214le, 21)-.11 E(ctime, 16)72 -609 Q F1(D)72 639 Q F0(dc, 20)72 669 Q(disable-interrupts, 18)72 684 Q(dup, 3) -72 699 Q(dup2, 3)302.4 174 Q F1(E)302.4 204 Q F0(editor)302.4 234 Q 2.75(,2) --.44 G(2)338.623 234 Q(ef)302.4 249 Q(fecti)-.275 E .33 -.165(ve g)-.275 H -(roup-ID, 13).165 E(ef)302.4 264 Q(fecti)-.275 E .33 -.165(ve u)-.275 H(ser) -.165 E(-ID, 13)-.22 E(endgrent, 11)302.4 279 Q(endpwent, 11)302.4 294 Q(en) -302.4 309 Q(vironment, 12, 13)-.44 E(errno, 19)302.4 324 Q(error codes, 19) -302.4 339 Q(error handler)302.4 354 Q 2.75(,3)-.44 G 2.75(,1)370.072 354 S(8) -381.072 354 Q(error object, 3, 18)302.4 369 Q -.165(ex)302.4 384 S(amples, 20) -.165 E -.165(ex)302.4 399 S(clusi).165 E .33 -.165(ve l)-.275 H(ock, 9).165 E --.165(exe)302.4 414 S(cv).165 E 2.75(,1)-.715 G(2)338.007 414 Q -.165(ex)302.4 -429 S(it code, 11).165 E F1(F)302.4 459 Q F0(fcntl, 4, 9)302.4 489 Q(fdopen, 6) -302.4 504 Q(features, 1)302.4 519 Q(\214le pointer)302.4 534 Q 2.75(,5)-.44 G -(\214leno, 5)302.4 549 Q(\214nalization functions, 18)302.4 564 Q(\215ock, 9) -302.4 579 Q(fork, 11)302.4 594 Q(format, 19)302.4 609 Q(fpathconf, 15)302.4 624 -Q(fstat, 6)302.4 639 Q(ftime, 15)302.4 654 Q F1(G)302.4 684 Q F0 -.055(ga)302.4 -714 S(rbage collector).055 E 2.75(,6)-.44 G(getcwd, 13)302.4 729 Q EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(getdtablesize, 5)72 87 Q(getgrent, 10)72 102 Q(getgr)72 117 Q -(gid, 10)-.198 E(getgrnam, 10)72 132 Q(gethostname, 14)72 147 Q(getlogin, 13)72 -162 Q(getpass, 18)72 177 Q(getpwent, 10)72 192 Q(getpwnam, 10)72 207 Q -(getpwuid, 10)72 222 Q(gettimeofday)72 237 Q 2.75(,1)-.715 G(5)140.332 237 Q -(getwd, 13)72 252 Q(gmtime, 16)72 267 Q(group database, 10)72 282 Q -(group-record, 2, 10)72 297 Q/F1 13/Times-Bold@0 SF(I)72 327 Q F0 -(interrupt signal, 17)72 357 Q(interrupt-handler)72 372 Q 2.75(,1)-.44 G(7) -157.096 372 Q(isatty)72 387 Q 2.75(,5)-.715 G F1(K)72 417 Q F0(kill, 17)72 447 -Q F1(L)72 477 Q F0(limits, 15)72 507 Q(link, 7)72 522 Q(localtime, 16)72 537 Q -(lock-record, 2, 9)72 552 Q(locking, 9)72 567 Q(login name, 13)72 582 Q -(lseek, 4)72 597 Q(lstat, 8)72 612 Q F1(M)72 642 Q F0(mkdir)72 672 Q 2.75(,7) --.44 G(mktemp, 8)72 687 Q(modi\214er functions, 2)302.4 87 Q F1(N)302.4 117 Q -F0(nanotime-record, 2)302.4 147 Q(nice, 14)302.4 162 Q(non-blocking I/O, 22) -302.4 177 Q F1(O)302.4 207 Q F0(onfork handlers, 11)302.4 237 Q(open, 3)302.4 -252 Q(opendir)302.4 267 Q 2.75(,8)-.44 G F1(P)302.4 297 Q F0 -(parent process-ID, 14)302.4 327 Q(passwd database, 10)302.4 342 Q -(passwd-record, 2, 10)302.4 357 Q(passw)302.4 372 Q(ord, 18)-.11 E -1.012(PA) -302.4 387 S(TH, 12)-.209 E(pathconf, 15)302.4 402 Q(pause, 17)302.4 417 Q -(pclose, 11)302.4 432 Q(pipe, 4, 11, 20, 22)302.4 447 Q(popen, 11)302.4 462 Q -(POSIX, 1, 15, 16)302.4 477 Q(process-ID, 14)302.4 492 Q(pwd, 13)302.4 507 Q F1 -(R)302.4 537 Q F0(read, 4)302.4 567 Q(readdir)302.4 582 Q 2.75(,8)-.44 G -(readlink, 8)302.4 597 Q(real group-ID, 13)302.4 612 Q(real user)302.4 627 Q -(-ID, 13)-.22 E(record constructor)302.4 642 Q 2.75(,2)-.44 G(record e)302.4 -657 Q(xtension, 1)-.165 E(record locking, 9)302.4 672 Q(record locks, 9)302.4 -687 Q(record types, 2)302.4 702 Q(records, 2)302.4 717 Q(reliable signals, 16) -302.4 732 Q EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(rename, 7)72 87 Q(reset, 18)72 102 Q(resource usage, 13)72 117 Q -(resources-record, 2, 13)72 132 Q(rmdir)72 147 Q 2.75(,7)-.44 G/F1 13 -/Times-Bold@0 SF(S)72 177 Q F0(setgrent, 11)72 207 Q(setpwent, 11)72 222 Q -(shared lock, 9)72 237 Q(shell, 11)72 252 Q(signal handler)72 267 Q 2.75(,1) --.44 G(8)144.578 267 Q(signal mask, 18)72 282 Q(signal name, 17)72 297 Q -(signal, 17)72 312 Q(sleep, 14)72 327 Q(stat, 6)72 342 Q(stat-record, 2, 6, 8) -72 357 Q(supplementary group-IDs, 14)72 372 Q(symbolic links, 8)72 387 Q -(symlink, 8)72 402 Q(sysconf, 5, 15)72 417 Q(system-record, 2, 14)72 432 Q F1 -(T)72 462 Q F0(tempnam, 8)72 492 Q(temporary \214le, 8)72 507 Q -(temporary \214les, 11, 18)72 522 Q(termination status, 11)72 537 Q(time, 15)72 -552 Q(time-record, 2, 16)72 567 Q(times, 13)72 582 Q(tmpnam, 8)72 597 Q -(ttyname, 5)72 612 Q(type predicate, 2)72 627 Q F1(U)72 657 Q F0(umask, 14)72 -687 Q(uname, 14)72 702 Q(unix-access?,)72 717 Q/F2 12/Times-Bold@0 SF(7)2.75 E -F0(unix-chdir)72 732 Q(,)-.44 E F2(7)2.75 E F0(unix-chmod,)302.4 87 Q F2(7)2.75 -E F0(unix-cho)302.4 102 Q(wn,)-.275 E F2(7)2.75 E F0(unix-close,)302.4 117 Q F2 -(3)2.75 E F0(unix-close-on-e)302.4 132 Q -.165(xe)-.165 G(c,).165 E F2(4)2.75 E -F0(unix-decode-localtime,)302.4 147 Q F2(16)2.75 E F0(unix-decode-utc,)302.4 -162 Q F2(16)2.75 E F0(unix-dup,)302.4 177 Q F2(3)2.75 E F0(unix-end-group,) -302.4 192 Q F2(11)2.75 E F0(unix-end-passwd,)302.4 207 Q F2(11)2.75 E F0 -(unix-en)302.4 222 Q(viron, 12,)-.44 E F2(13)2.75 E F0(unix-errno,)302.4 237 Q -F2(19)2.75 E F0(unix-error?,)302.4 252 Q F2(19)2.75 E F0(unix-errv)302.4 267 Q -(al, 3,)-.275 E F2(18)2.75 E F0(unix-e)302.4 282 Q -.165(xe)-.165 G(c,).165 E -F2(11)2.75 E F0(unix-e)302.4 297 Q -.165(xe)-.165 G(c-path,).165 E F2(11)2.75 E -F0(unix-\214le-limit,)302.4 312 Q F2(15)2.75 E F0(unix-\214ledescriptor)302.4 -327 Q(-\215ags,)-.22 E F2(4)2.75 E F0(unix-\214ledescriptor)302.4 342 Q/F3 11 -/Symbol SF(-)A F0(>port,)A F2(6)2.75 E F0(unix-fork,)302.4 357 Q F2(11)2.75 E -F0(unix-get-group,)302.4 372 Q F2(10)2.75 E F0(unix-get-passwd,)302.4 387 Q F2 -(10)2.75 E F0(unix-geten)302.4 402 Q -.715(v,)-.44 G F2(13)3.465 E F0 -(unix-getgids,)302.4 417 Q F2(13)2.75 E F0(unix-getgroups,)302.4 432 Q F2(14) -2.75 E F0(unix-getlogin,)302.4 447 Q F2(13)2.75 E F0(unix-getpass,)302.4 462 Q -F2(18)2.75 E F0(unix-getpids,)302.4 477 Q F2(14)2.75 E F0(unix-getuids,)302.4 -492 Q F2(13)2.75 E F0(unix-isatty?,)302.4 507 Q F2(5)2.75 E F0 -(unix-job-control?,)302.4 522 Q F2(15)2.75 E F0(unix-kill,)302.4 537 Q F2(17) -2.75 E F0(unix-link,)302.4 552 Q F2(7)2.75 E F0(unix-list-\214le-limits,)302.4 -567 Q F2(15)2.75 E F0(unix-list-\214ledescriptor)302.4 582 Q(-\215ags,)-.22 E -F2(5)2.75 E F0(unix-list-open-modes,)302.4 597 Q F2(4)2.75 E F0 -(unix-list-signals,)302.4 612 Q F2(17)2.75 E F0(unix-lseek,)302.4 627 Q F2(4) -2.75 E F0(unix-lstat,)302.4 642 Q F2(8)2.75 E F0(unix-mkdir)302.4 657 Q(,)-.44 -E F2(7)2.75 E F0(unix-nanotime,)302.4 672 Q F2(15)2.75 E F0(unix-nice,)302.4 -687 Q F2(14)2.75 E F0(unix-num-\214ledescriptors,)302.4 702 Q F2(5)2.75 E F0 -(unix-open,)302.4 717 Q F2(3)2.75 E F0(unix-open-input-pipe,)302.4 732 Q F2(11) -2.75 E EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(unix-open-output-pipe,)72 87 Q/F1 12/Times-Bold@0 SF(11)2.75 E F0 -(unix-pause,)72 102 Q F1(17)2.75 E F0(unix-perror)72 117 Q(,)-.44 E F1(19)2.75 -E F0(unix-pipe,)72 132 Q F1(4)2.75 E F0(unix-port-\214ledescriptor)72 147 Q(,) --.44 E F1(5)2.75 E F0(unix-process-resources,)72 162 Q F1(13)2.75 E F0 -(unix-query-lock,)72 177 Q F1(9)2.75 E F0(unix-read-directory)72 192 Q(,)-.715 -E F1(8)2.75 E F0(unix-read-string-\214ll!,)72 207 Q F1(4)2.75 E F0 -(unix-readlink,)72 222 Q F1(8)2.75 E F0(unix-remo)72 237 Q -.165(ve)-.165 G -(-lock,).165 E F1(9)2.75 E F0(unix-rename,)72 252 Q F1(7)2.75 E F0(unix-re)72 -267 Q(wind-group,)-.275 E F1(11)2.75 E F0(unix-re)72 282 Q(wind-passwd,)-.275 E -F1(11)2.75 E F0(unix-rmdir)72 297 Q(,)-.44 E F1(7)2.75 E F0(unix-set-lock,)72 -312 Q F1(9)2.75 E F0(unix-signal,)72 327 Q F1(17)2.75 E F0(unix-sleep,)72 342 Q -F1(14)2.75 E F0(unix-stat,)72 357 Q F1(6)2.75 E F0(unix-symlink,)72 372 Q F1(8) -2.75 E F0(unix-system,)72 387 Q F1(11)2.75 E F0(unix-system-info,)72 402 Q F1 -(14)2.75 E F0(unix-tempname,)72 417 Q F1(8)2.75 E F0(unix-time,)72 432 Q F1(15) -2.75 E F0(unix-time->string,)72 447 Q F1(16)2.75 E F0(unix-ttyname,)72 462 Q F1 -(5)2.75 E F0(unix-umask,)72 477 Q F1(14)2.75 E F0(unix-unlink,)72 492 Q F1(7) -2.75 E F0(unix-utime,)72 507 Q F1(7)2.75 E F0(unix-w)72 522 Q(ait,)-.11 E F1 -(12)2.75 E F0(unix-w)72 537 Q(ait-process,)-.11 E F1(12)2.75 E F0(unix-w)72 552 -Q(orking-directory)-.11 E(,)-.715 E F1(13)2.75 E F0(unix-write,)72 567 Q F1(4) -2.75 E F0(unix:\214le-locking, 2, 9)72 582 Q(unix:record-locks, 2, 9)72 597 Q -(unix:reliable-signals, 2, 16)72 612 Q(unix:symlinks, 2, 8)72 627 Q(unix:w)72 -642 Q(ait-options, 2, 13)-.11 E(unix:w)72 657 Q(ait-process, 2, 13)-.11 E -(unlink, 7)72 672 Q(utime, 7)302.4 87 Q/F2 13/Times-Bold@0 SF(V)302.4 117 Q F0 -(vi, 22)302.4 147 Q F2(W)302.4 177 Q F0 -.11(wa)302.4 207 S(it, 12).11 E -.11 -(wa)302.4 222 S(it-record, 2, 12).11 E -.11(wa)302.4 237 S(it3, 12).11 E -.11 -(wa)302.4 252 S(it4, 12, 13).11 E -.11(wa)302.4 267 S(itpid, 13).11 E -.11(wo) -302.4 282 S(rking directory).11 E 2.75(,1)-.715 G(3)391.698 282 Q(write, 4) -302.4 297 Q EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Using the UNIX Extension)72 196.2 Q 19.25(..\ -..............................................................................\ -...................... 1)4.54 F(Record T)72 214.8 Q .228(ypes ................\ -..............................................................................\ -..............................)-.88 F(2)498.5 214.8 Q(Error Handling)72 233.4 Q -19.25(........................................................................\ -................................................. 3)4.848 F(Con)72 252 Q -.165 -(ve)-.44 G .239(ntions .......................................................\ -.......................................................................).165 F -(3)498.5 252 Q(Lo)72 270.6 Q(w-Le)-.275 E -.165(ve)-.275 G 2.75(lI).165 G -(/O, File Descriptors)126.571 270.6 Q 19.25(..................................\ -............................................................ 3)4.353 F -(Files and Directories)72 289.2 Q 19.25(......................................\ -.......................................................................... 6) -4.848 F(Symbolic Links)72 307.8 Q 19.25(......................................\ -..............................................................................\ -.... 8)4.518 F(File and Record Locking)72 326.4 Q 19.25(......................\ -..............................................................................\ -...... 9)3.319 F(Obtaining P)72 345 Q(assw)-.165 E(ord and Group File Entries) --.11 E 13.75(.................................................................\ -........... 10)3.594 F(Process Creation and Control)72 363.6 Q 13.75(.........\ -..............................................................................\ -............ 11)3.011 F(Obtaining System Information)72 382.2 Q 13.75(........\ -..............................................................................\ -........... 14)3.308 F(Date and T)72 400.8 Q 1.262(ime .......................\ -..............................................................................\ -.....................)-.385 F(15)493 400.8 Q .855(Signals ....................\ -..............................................................................\ -....................................)72 419.4 R(16)493 419.4 Q -(Miscellaneous Functions)72 438 Q 13.75(......................................\ -.................................................................... 18)3.308 F -(Error Functions)72 456.6 Q 13.75(............................................\ -............................................................................ 1\ -8)5.145 F .866(Examples ......................................................\ -............................................................................)72 -475.2 R(20)493 475.2 Q(Inde)72 493.8 Q 2.868(x.)-.165 G 13.75(................\ -..............................................................................\ -.......................................... 23)102.5 493.8 R EP -%%Trailer -end -%%EOF diff --git a/doc/usenix/Makefile.am b/doc/usenix/Makefile.am index 2e37783..5f75350 100644 --- a/doc/usenix/Makefile.am +++ b/doc/usenix/Makefile.am @@ -1 +1,22 @@ -EXTRA_DIST = usenix.ms usenix.ps +EXTRA_DIST = usenix.ms + +if HAVE_GROFF +doc_DATA = usenix.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +TROFF= groff -ms +UNROFF= unroff -ms + +usenix.ps: usenix.ms tmp.ref + sed -f tmp.ref usenix.ms | $(TROFF) 2> /dev/null > usenix.ps + +usenix.html: usenix.ms tmp.ref + sed -f tmp.ref usenix.ms | $(UNROFF) document=usenix + +tmp.ref: usenix.ms + $(TROFF) usenix.ms 2> tmp.ref >/dev/null + +clean: + rm -f tmp.ref usenix.ps + diff --git a/doc/usenix/usenix.ps b/doc/usenix/usenix.ps deleted file mode 100644 index d3039a9..0000000 --- a/doc/usenix/usenix.ps +++ /dev/null @@ -1,2354 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%+ font Courier-Oblique -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 31 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -%%IncludeResource: font Courier-Oblique -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier-Oblique@0 ENC0/Courier-Oblique RE -/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 -ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Elk: The Extension Language Kit)201.984 123 Q/F1 10 -/Times-Italic@0 SF(Oliver Laumann* and Car)204.44 147 Q(sten Bormann)-.1 E<87> --2 I/F2 10/Times-Roman@0 SF 2.5(*T)203.78 165 S(echnische Uni)216.69 165 Q -.15 -(ve)-.25 G(rsit\344t Berlin, German).15 E(y)-.15 E 2.5<8755>224.12 177 S(ni) -238.84 177 Q -.15(ve)-.25 G(rsit\344t Bremen, German).15 E(y)-.15 E F1(ABSTRA) -264.535 213 Q(CT)-.3 E F2 .385 -(In the past, users of an application generally were at the merc)133 245 R -2.885(yo)-.15 G 2.885(fi)395.465 245 S .385(ts authors when)404.46 245 R .628 -(it came to adapting it to their indi)108 265 R .629(vidual needs and tastes.) --.25 F .629(Fitting an application with an)5.629 F F1 -.2(ex)108 285 S 1.249 -(tension langua).2 F -.1(ge)-.1 G F2(\(or)3.849 E F1 1.248(embedded langua) -3.748 F -.1(ge)-.1 G F2 3.748(\)e).1 G 1.248 -(nables users to customize and enhance it)298.322 285 R 2.647(without ha)108 -305 R 2.647(ving to modify its source code.)-.2 F(Recently)7.648 E 5.148(,v) --.65 G 2.648(ariants of Lisp ha)345.008 305 R 2.948 -.15(ve b)-.2 H(ecome).15 E -2.335(increasingly popular for this purpose, to the point where the ab)108 325 -R 2.335(undance of dif)-.2 F(ferent)-.25 E .139(dialects has gro)108 345 R .139 -(wn into a problem.)-.25 F .139(Of the tw)5.139 F 2.639(os)-.1 G .14 -(tandardized dialects of Lisp, only)300.821 345 R F1(Sc)2.64 E(heme)-.15 E F2 -(is suitably modest, yet suf)108 365 Q(\214ciently general, to serv)-.25 E 2.5 -(ea)-.15 G 2.5(sa)319.8 365 S 2.5(ne)330.63 365 S(xtension language.)342.42 365 -Q F1(Elk)133 388.6 Q F2 2.624(,t)C(he)154.234 388.6 Q F1 .123(Extension Langua) -2.623 F .323 -.1(ge K)-.1 H(it).1 E F2 2.623(,i)C 2.623(saS)270.916 388.6 S -.123(cheme implementation that is intended to be)290.052 388.6 R .111 -(used as a general, reusable e)108 408.6 R .112 -(xtension language subsystem for inte)-.15 F .112(gration into e)-.15 F .112 -(xisting and)-.15 F .367(future applications.)108 428.6 R .367 -(Applications can de\214ne their o)5.367 F .366 -(wn Scheme data types and primiti)-.25 F -.15(ve)-.25 G(s,).15 E(pro)108 448.6 -Q .203(viding for a tightly-knit inte)-.15 F .204 -(gration of the C/C++ parts of the application with Scheme)-.15 F 3.87 -(code. Library)108 468.6 R(interf)3.87 E 1.37(aces, for e)-.1 F 1.369 -(xample to the UNIX operating system and to v)-.15 F 1.369(arious X)-.25 F -.4 -(Wi)108 488.6 S(ndo).4 E 3.896(wS)-.25 G 1.396(ystem libraries, sho)151.246 -488.6 R 3.896(wt)-.25 G 1.396(he ef)245.734 488.6 R(fecti)-.25 E -.15(ve)-.25 G -1.396(ness of this approach.).15 F(Se)6.397 E -.15(ve)-.25 G 1.397 -(ral features of).15 F .367(Elk such as dynamic loading of object \214les and \ -freezing of fully customized applications)108 508.6 R 2.587(into e)108 528.6 R --.15(xe)-.15 G 2.587(cutables \(implemented for those UNIX en).15 F 2.587 -(vironments where it w)-.4 F 2.587(as feasible\))-.1 F .254 -(increase its usability as the backbone of a comple)108 548.6 R 2.754(xa)-.15 G -2.754(pplication. Elk)319.816 548.6 R .254(has been used in this)2.754 F -.1 -(wa)108 568.6 S 2.859(yf).1 G .359(or se)130.749 568.6 R -.15(ve)-.25 G 2.859 -(ny).15 G .359(ears within a locally-de)172.167 568.6 R -.15(ve)-.25 G .359 -(loped OD).15 F .359(A-based multimedia document editor;)-.4 F 1.063 -(it has been used in numerous other projects after it could be made freely a) -108 588.6 R -.25(va)-.2 G 1.063(ilable \214v).25 F(e)-.15 E(years ago.)108 -608.6 Q/F3 10/Times-Bold@0 SF 2.5(1. Intr)72 660.6 R(oduction)-.18 E F2 .848 -(The designers and implementors of a lar)97 684.2 R .848(ge or comple)-.18 F -3.348(xa)-.15 G .848(pplication can rarely anticipate all require-)329.53 684.2 -R .087(ments future users will ha)72 704.2 R .387 -.15(ve o)-.2 H 2.587(nt).15 -G .087(he application.)202.712 704.2 R -.8(Ty)5.087 G(pically).8 E 2.587(,u) --.65 G .086(sers wish to be able to customize the user inter)313.733 704.2 R(-) --.2 E -.1(fa)72 724.2 S 2.765(ces of applications according to their personal \ -tastes or requirements, or the).1 F 5.265(yw)-.15 G 2.765(ant to e)429.475 -724.2 R 2.765(xtend the)-.15 F EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2-)279.67 56 S .478 -(functionality of an application \(either by combining e)72 92 R .477 -(xisting functions into ne)-.15 F 2.977(wo)-.25 G .477 -(nes or by adding entirely)402.662 92 R(ne)72 112 Q 2.798(wc)-.25 G 2.798 -(apabilities\). This)95.648 112 R .299 -(is especially true for applications used routinely)2.798 F 2.799(,s)-.65 G -.299(uch as te)370.436 112 R .299(xt editors, and for appli-)-.15 F -(cations with a high de)72 132 Q(gree of user interaction or with comple)-.15 E -2.5(xg)-.15 G(raphical user interf)327.49 132 Q(aces.)-.1 E .95(Certainly an)97 -155.6 R 3.45(ya)-.15 G .95 -(pplication can be customized by modifying its source code and recompiling it.) -159.85 155.6 R(But)5.95 E .402(this approach is often not feasible, as the sou\ -rce code of the application or the tools needed to recompile it)72 175.6 R .619 -(may not be a)72 195.6 R -.25(va)-.2 G 3.119(ilable. Ev).25 F .619 -(en if it were feasible, it w)-.15 F .618 -(ould be a time-consuming process; it w)-.1 F .618(ould be hard to)-.1 F -.1 -(ke)72 215.6 S .454(ep up with ne).1 F 2.954(wr)-.25 G .454 -(eleases of the application; and the coe)150.116 215.6 R .454 -(xistence of multiple, similar v)-.15 F .455(ersions of the same)-.15 F -(application w)72 235.6 Q(ould become a general maintenance headache.)-.1 E -.256(The alternati)97 259.2 R .556 -.15(ve t)-.25 H 2.756(ot).15 G .256 -(his approach is not to `)173.188 259.2 R(`hard-wire')-.74 E 2.756('t)-.74 G -.256(he entire functionality and all e)318.764 259.2 R .256(xternal aspects) --.15 F 1.166(of an application in the source code at all, b)72 279.2 R 1.167 -(ut to pro)-.2 F 1.167(vide means to customize the application')-.15 F 3.667 -(sb)-.55 G(eha)474.21 279.2 Q(vior)-.2 E(later by its users.)72 299.2 Q/F1 10 -/Times-Bold@0 SF 2.5(1.1. Early)72 339.2 R -(Customization and Extension Languages)2.5 E F0(Man)97 362.8 Q 2.967(ya)-.15 G -.466(pplications support at least simple methods for customization, such as co\ -mmand line options)127.587 362.8 R .007(or con\214guration \214les.)72 382.8 R -.007(More po)5.007 F .008(werful tools for customization are)-.25 F/F2 10 -/Times-Italic@0 SF(macr)2.508 E 2.508(ol)-.45 G(angua)365.226 382.8 Q -.1(ge) --.1 G(s).1 E F0(,)A F2 .008(command langua)2.508 F -.1(ge)-.1 G(s).1 E F0 2.508 -(,o)C(r)500.67 382.8 Q F2 1.102(scripting langua)72 402.8 R -.1(ge)-.1 G(s).1 E -F0 1.102(that are typically found in te)3.602 F 1.101(xt editors and w)-.15 F -1.101(ord processors.)-.1 F 1.101(Prominent e)6.101 F 1.101(xamples of)-.15 F -1.299(such customization and e)72 422.8 R 1.299 -(xtension languages are the macro language of the no)-.15 F 3.8(wl)-.25 G -.15 -(eg)410.46 422.8 S 1.3(endary TECO editor).15 F .04 -(and, in UNIX, the macro language of the)72 442.8 R F2(tr)2.54 E(of)-.45 E(f) --.18 E F0(te)2.54 E .04 -(xt formatter [Ossanna 1979] and the con\214guration language)-.15 F(of the)72 -462.8 Q F2(sendmail)2.5 E F0(program.)2.5 E 2.012(Although man)97 486.4 R 4.512 -(yo)-.15 G 4.513(ft)170.874 486.4 S 2.013(hese classic e)181.497 486.4 R 2.013 -(xtension languages are quite po)-.15 F 2.013(werful \(some of them are full-) --.25 F .161(\215edged programming languages\), the)72 506.4 R 2.661(yh)-.15 G --2.25 -.2(av e)234.414 506.4 T 2.661(ar)2.861 G .161(eputation of being `) -261.036 506.4 R(`cryptic')-.74 E 2.661('a)-.74 G .16 -(nd hard to understand and use)383.5 506.4 R 1.037(by untrained users.)72 526.4 -R 1.037(The pre)6.037 F -.25(va)-.25 G 1.037 -(iling opinion seems to be that only e).25 F 1.038 -(xperts can actually bene\214t from these)-.15 F .339(types of e)72 546.4 R -.339(xtension languages \(for e)-.15 F .338(xample, people who ha)-.15 F .638 --.15(ve m)-.2 H .338(astered the).15 F F2(sendmail)2.838 E F0 .338 -(con\214guration language)2.838 F .086 -(in all details are commonly appointed the status of a `)72 566.4 R(`guru')-.74 -E 2.586('\). In)-.74 F -.1(fa)2.586 G .086(ct, it can be observ).1 F .086 -(ed that only v)-.15 F .086(ery fe)-.15 F(w)-.25 E 1.707(users of the)72 586.4 -R F2(tr)4.207 E(of)-.45 E(f)-.18 E F0(te)4.207 E 1.707(xt formatter \(whose ma\ -cro language is reputed to be particularly cryptic\) are using)-.15 F 1.938 -(macro packages written by themselv)72 606.4 R 1.938(es; man)-.15 F 4.438(yu) --.15 G 1.938(sers gi)272.738 606.4 R 2.238 -.15(ve u)-.25 H 4.438(pa).15 G -1.938(fter some time and f)332.862 606.4 R 1.939(all back on v)-.1 F(endor)-.15 -E(-)-.2 E(supplied macro packages or packages written by a `)72 626.4 Q(`trof) --.74 E 2.5(fg)-.25 G(uru.)306.22 626.4 Q -.74('')-.7 G .262 -(Experience also indicates that simpli\214ed or specialized e)97 650 R .261 -(xtension languages often ha)-.15 F .561 -.15(ve m)-.2 H .261(ore features).15 -F 1.186(added and gro)72 670 R 3.686(wu)-.25 G 1.186(ntil the)146.678 670 R -3.686(yr)-.15 G 1.186(esemble a full programming language.)187.79 670 R 1.186 -(Such `)6.186 F(`or)-.74 E -.05(ga)-.18 G 1.187(nically gro).05 F(wn')-.25 E -3.687('e)-.74 G(xtension)470.11 670 Q .49(languages are lik)72 690 R .49 -(ely to be contorted designs as the)-.1 F 2.989(yw)-.15 G .489 -(ill consist of se)291.399 690 R -.15(ve)-.25 G .489(ral le).15 F -.15(ve)-.25 -G .489(ls of e).15 F .489(xtensions glued on to)-.15 F -(their initial, more limited design.)72 710 Q EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-3-)279.67 56 S/F1 10/Times-Bold@0 SF 2.5 -(1.2. High-Le)72 92 R -.1(ve)-.15 G 2.5(lE).1 G(xtension Languages)148.7 92 Q -F0 .475(Recently application designers ha)97 115.6 R .775 -.15(ve b)-.2 H -.15 -(eg).15 G .476(un to abandon specialized and cryptic macro-style e).15 F -(xtension)-.15 E .839(languages in f)72 135.6 R -.2(avo)-.1 G 3.339(ro).2 G -3.339(fe)155.387 135.6 S .838(xtension languages that resemble usual high-le) -166.346 135.6 R -.15(ve)-.25 G 3.338(lp).15 G .838 -(rogramming languages, mainly)377.614 135.6 R .889(languages with Algol/P)72 -155.6 R .889(ascal-style or Lisp-style syntax and semantics.)-.15 F .889 -(Prominent e)5.889 F .89(xamples of such high-)-.15 F(le)72 175.6 Q -.15(ve) --.25 G 3.254(le).15 G .754(xtension languages are TPU de)98.584 175.6 R -.15 -(ve)-.25 G .753(loped by DEC, the).15 F/F2 10/Times-Italic@0 SF(Ness)3.253 E F0 -.753(language of the Andre)3.253 F 3.253(wT)-.25 G .753(oolkit [Hansen)444.087 -175.6 R .228(1990], AutoDesk')72 195.6 R 2.728(sC)-.55 G .228(AD e)157.176 -195.6 R .228(xtension language \(a dialect of Lisp\), and)-.15 F F2(Emacs-Lisp) -2.729 E F0 2.729(,t)C .229(he e)403.763 195.6 R .229(xtension language of)-.15 -F(Richard Stallman')72 215.6 Q 2.5(sp)-.55 G -(opular GNU Emacs editor [Stallman 1981, Le)155.89 215.6 Q(wis et al. 1990].) --.25 E .043(Emacs w)97 239.2 R .042 -(as the \214rst wide-spread application to emplo)-.1 F 2.542(ya)-.1 G 2.542(na) -322.658 239.2 S .042(lready e)334.64 239.2 R .042 -(xisting and widely used high-le)-.15 F -.15(ve)-.25 G(l).15 E .646 -(programming language as its e)72 259.2 R .647 -(xtension and customization language.)-.15 F .647 -(Emacs-Lisp is a dynamically scoped)5.647 F .396 -(dialect of Lisp with additional operations for te)72 279.2 R 2.896 -(xt-editing. The)-.15 F .396(approach tak)2.896 F .396 -(en by Emacs has been tremen-)-.1 F(dously successful; users of Emacs ha)72 -299.2 Q .3 -.15(ve c)-.2 H(ontrib).15 E(uted a wealth of e)-.2 E -(xtensions written in Emacs-Lisp.)-.15 E 1.082(Note that Emacs-Lisp is not a)97 -322.8 R F2 1.082(scripting langua)3.582 F -.1(ge)-.1 G F0 6.082(.I).1 G 3.582 -(ti)312.666 322.8 S 3.582(st)321.808 322.8 S 1.082(ightly interw)332.06 322.8 R --.15(ove)-.1 G 3.582(nw).15 G 1.082(ith the application for)414.374 322.8 R -.437(which it pro)72 342.8 R .437(vides e)-.15 F(xtensibility)-.15 E 5.437(.I) --.65 G 2.937(ta)205.018 342.8 S .437(lso is some)215.175 342.8 R .436 -(what inaccessible to the casual user)-.25 F 2.936(,w)-.4 G .436(ho is unlik) -416.596 342.8 R .436(ely to ha)-.1 F -.15(ve)-.2 G(pre)72 362.8 Q .556(vious e) --.25 F .556(xperience with Lisp-lik)-.15 F 3.056(el)-.1 G 3.056(anguages. This) -218.144 362.8 R .557(can be contrasted with languages such as Tcl [Ouster)3.056 -F(-)-.2 E 1.132(hout 1990] and REXX [Co)72 382.8 R(wlisha)-.25 E 3.632(w1)-.15 -G 1.131(985], whose underlying models are no less comple)225.86 382.8 R 1.131 -(x, b)-.15 F 1.131(ut which are)-.2 F .499(similar enough to well-kno)72 402.8 -R .499(wn languages such as B)-.25 F .5 -(ASIC to present less of an obstacle to casual users.)-.35 F(On)5.5 E .446 -(the other hand, non-tri)72 422.8 R .446(vial e)-.25 F .445(xtensions bene\214\ -t from the structuring functionality inherent in general purpose)-.15 F -(programming languages such as Lisp.)72 442.8 Q F1 2.5(1.3. Elk)72 482.8 R -(as a General, Reusable Extension Language)2.5 E F0 .791 -(Using Lisp or Lisp-style languages as e)97 506.4 R .792 -(xtension languages seems to enjo)-.15 F 3.292(yg)-.1 G(ro)409.036 506.4 Q .792 -(wing popularity; se)-.25 F(v-)-.25 E 1.118(eral applications besides Emacs no) -72 526.4 R 3.617(wu)-.25 G 1.117(se dialects of Lisp as their e)231.477 526.4 R -1.117(xtension language.)-.15 F 1.117(This de)6.117 F -.15(ve)-.25 G(lopment) -.15 E .094(has one disadv)72 546.4 R .094 -(antage: the number of incompatible \(b)-.25 F .095(ut similar\) e)-.2 F .095 -(xtension languages is continually gro)-.15 F(wing.)-.25 E .944(Users ha)72 -566.4 R 1.244 -.15(ve t)-.2 H 3.444(ol).15 G .944(earn a ne)134.192 566.4 R -3.444(wl)-.25 G .944(anguage for each ne)185.364 566.4 R 3.444(wa)-.25 G .944 -(pplication, and application writers k)283.29 566.4 R .944(eep implementing)-.1 -F(ne)72 586.4 Q 2.5(we)-.25 G -(xtension language interpreters instead of reusing e)95.2 586.4 Q -(xisting ones.)-.15 E .012(These problems can be solv)97 610 R .012 -(ed by a general, reusable e)-.15 F .013 -(xtension language implementation that applica-)-.15 F .995 -(tion writers can include into their applications, an)72 630 R F2 -.2(ex)3.494 -G .994(tension langua).2 F 1.194 -.1(ge k)-.1 H(it).1 E F0 5.994(.T)C .994 -(he main objecti)386.95 630 R 1.294 -.15(ve o)-.25 H 3.494(ft).15 G(he)477.736 -630 Q F2(Elk)3.494 E F0 .645(project w)72 650 R .645(as to de)-.1 F -.15(ve) --.25 G .645(lop such an e).15 F .646(xtension language kit and to mak)-.15 F -3.146(ei)-.1 G 3.146(tf)351.174 650 S .646(reely a)360.43 650 R -.25(va)-.2 G -.646(ilable to encourage use by).25 F(application writers.)72 670 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-4-)279.67 56 S/F1 10/Times-Bold@0 SF 2.5(2. Ov)72 -92 R(er)-.1 E(view of the Extension Language Kit)-.1 E 2.5(2.1. The)72 132 R -(Ev)2.5 E(olution of Elk)-.1 E F0 2.48 -.8(We w)97 155.6 T .88 -(ere prompted to de).8 F -.15(ve)-.25 G .88 -(lop Elk when a search for a suitable e).15 F .88 -(xtension language implementation)-.15 F .363(for ISO)72 175.6 R .363 -(TEXT [Bormann et al. 1988, Bormann 1991] w)-.4 F .364(as fruitless.)-.1 F(ISO) -5.364 E(TEXT)-.4 E 2.864(,ad)-.74 G .364(ocument processing sys-)404.952 175.6 -R .812(tem with a graphical user interf)72 195.6 R .812 -(ace, is almost entirely written in C++; its user interf)-.1 F .812 -(ace is based on the X)-.1 F(windo)72 215.6 Q 2.688(ws)-.25 G .188(ystem [Sche\ -i\215er et al. 1986, Schei\215er et al. 1992] and the OSF/Motif widget set.) -110.548 215.6 R(Customizability)5.188 E(and e)72 235.6 Q -(xtensibility through a full e)-.15 E -(xtension language were basic requirements on the design of ISO)-.15 E(TEXT)-.4 -E(.)-.74 E .002(As we consider language design to be the domain of a `)97 259.2 -R .002(`selected fe)-.74 F(w')-.25 E 2.502('a)-.74 G .002(nd did not w)383.826 -259.2 R .002(ant to act as ama-)-.1 F .64 -(teurs in this \214eld, we decided to use an e)72 279.2 R .64 -(xisting programming language as the basis for the e)-.15 F .64(xtension lan-) --.15 F .573(guage of ISO)72 299.2 R(TEXT)-.4 E 5.573(.T)-.74 G .573 -(his decision w)165.059 299.2 R .572(as also in\215uenced by our desire to de) --.1 F -.15(ve)-.25 G .572(lop a general, reusable e).15 F(xten-)-.15 E .239(si\ -on language implementation that is not hard-wired into one speci\214c applicat\ -ion.)72 319.2 R -.15(Fo)5.24 G 2.74(ran).15 G .24(umber of reasons)434.65 319.2 -R .614(an interpreted language seemed preferable: e)72 339.2 R .613 -(xtensions can be added to \(or modi\214ed in\) a running applica-)-.15 F .565 -(tion without re-linking it; b)72 359.2 R .565(ugs in e)-.2 F .566 -(xtensions can be caught in the interpreter and do not crash the applica-)-.15 -F .329(tion; interpreted languages usually of)72 379.2 R .328(fer better deb) --.25 F .328(ugging f)-.2 F .328 -(acilities; and implementing an interpreter gener)-.1 F(-)-.2 E -(ally is easier than implementing a compiler)72 399.2 Q(.)-.55 E .021 -(From the be)97 422.8 R .021(ginning we f)-.15 F -.2(avo)-.1 G .021 -(red Lisp or a dialect of Lisp as the basis for a general e).2 F .022 -(xtension language.)-.15 F .975(Most dialects of the Lisp f)72 442.8 R .974 -(amily are `)-.1 F(`small')-.74 E .974 -(', easy to implement, general-purpose languages with simple)-.74 F 1.905 -(syntax and po)72 462.8 R 1.905 -(werful semantics, and the suitability of Lisp as an e)-.25 F 1.906 -(xtension language had already been)-.15 F .388(demonstrated by se)72 482.8 R --.15(ve)-.25 G .388(ral applications, among them GNU Emacs.).15 F .387 -(Early in the project we considered to use)5.387 F .215(Emacs-Lisp, b)72 502.8 -R .215(ut it appeared infeasible to isolate the Lisp interpreter from the rest\ - of Emacs.)-.2 F .216(In addition, at)5.216 F .287(the time we in)72 522.8 R --.15(ve)-.4 G(stig).15 E .287(ated Emacs-Lisp it w)-.05 F .287(as lacking se) --.1 F -.15(ve)-.25 G .286(ral desirable language features, such as support for) -.15 F 1.31(\215oating point and arbitrary precision numbers \()72 542.8 R/F2 10 -/Times-Italic@0 SF(bignums)A F0 3.81(\). W)B 3.81(ea)-.8 G 1.31 -(lso considered using MIT Scheme [MIT)336.64 542.8 R .382(1984], b)72 562.8 R -.381(ut due to the enormous size of its implementation it w)-.2 F .381(ould ha) --.1 F .681 -.15(ve d)-.2 H .381(ominated the size of the applica-).15 F(tion.) -72 582.8 Q F1 2.5(2.2. Scheme)72 622.8 R(as an Extension Language)2.5 E F0 .205 -(As other implementations of Lisp or Lisp-lik)97 646.4 R 2.706(el)-.1 G .206 -(anguages a)287.498 646.4 R -.25(va)-.2 G .206 -(ilable did not meet our requirements, we).25 F 2.006 -(\214nally decided to write an interpreter for the Lisp dialect)72 666.4 R F2 -(Sc)4.506 E(heme)-.15 E F0 2.005([Clinger et al. 1991, Dyb)4.505 F 2.005 -(vig 1987,)-.15 F .191(Springer et al. 1989, Abelson et al. 1985].)72 686.4 R -.192(This Scheme interpreter is the main component of the Elk pack-)5.192 F -3.766(age. Scheme)72 706.4 R 1.266(is a simpli\214ed, `)3.766 F(`cleaned-up') --.74 E 3.766('d)-.74 G 1.266 -(ialect of Lisp with \214rst-class procedures and static scoping)259.466 706.4 -R 2.751(rules. The)72 726.4 R .252(Scheme language is based on only a fe)2.751 -F 2.752(wl)-.25 G .252(anguage features and semantic concepts; it consists of) -286.446 726.4 R EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-5-)279.67 56 S 2.947(as)72 92 S .447 -(mall core of syntactic forms, a set of e)83.277 92 R .446(xtended forms deri) --.15 F -.15(ve)-.25 G 2.946(df).15 G .446 -(rom them, and a number of standard pro-)336.468 92 R .629(cedures \()72 112 R -/F1 10/Times-Italic@0 SF(primitive)A F0 .629 -(procedures\) that operate on a comprehensi)3.129 F .929 -.15(ve s)-.25 H .63 -(et of types of objects \(among them num-).15 F 3.59(bers, lists, v)72 132 R -3.59(ectors, symbols, characters, and strings\).)-.15 F 3.59 -(In 1990 Scheme became an IEEE standard)8.59 F -.834([IEEE Std 1178-1990])72 -152 R .402(\(the standard document, although only 50 pages long, includes the \ -formal semantics)2.902 F(of the language\).)72 172 Q .61 -(The standardization ef)97 195.6 R .609 -(fort has increased the acceptance of Scheme; for instance, the Extension Lan-) --.25 F .234(guage W)72 215.6 R .234(orking Group of the CAD Frame)-.8 F -.1(wo) --.25 G .234(rk Initiati).1 F .534 -.15(ve h)-.25 H .234 -(as recently selected Scheme as the e).15 F .234(xtension lan-)-.15 F 1.483 -(guage for future CAD applications [CFI 1991a, CFI 1991b].)72 235.6 R 1.482 -(Among the established programming lan-)6.482 F .765 -(guages we consider Scheme the ideal candidate for a general e)72 255.6 R .765 -(xtension language \212 it is standardized; its)-.15 F .743(semantics are well\ --de\214ned; it has a simple syntax and is easy to implement; and it is suf)72 -275.6 R .743(\214ciently small to)-.25 F(not dw)72 295.6 Q -(arf the application it mak)-.1 E(es e)-.1 E(xtensible.)-.15 E/F2 10 -/Times-Bold@0 SF 2.5(2.3. Extending)72 335.6 R(the Extension Language)2.5 E F0 -1.445(The implementation of an e)97 359.2 R 1.446 -(xtension language must itself be e)-.15 F 3.946(xtensible. Extension)-.15 F -1.446(language code)3.946 F .067(that manipulates objects or state of the appl\ -ication requires adding application-speci\214c primiti)72 379.2 R .366 -.15 -(ve p)-.25 H(rocedures).15 E .613(to the base e)72 399.2 R .613 -(xtension language.)-.15 F 2.213 -.8(To a)5.613 H(llo).8 E 3.113(wE)-.25 G .613 -(lk programs to be e)249.231 399.2 R(xpressi)-.15 E .913 -.15(ve i)-.25 H 3.114 -(nt).15 G .614(he conte)382.9 399.2 R .614(xt of a gi)-.15 F -.15(ve)-.25 G -3.114(na).15 G(pplica-)476.23 399.2 Q .342 -(tion, application writers are encouraged \(and e)72 419.2 R .342 -(xpected\) to e)-.15 F .342(xtend standard Scheme by a rich set of applica-) --.15 F .152(tion-speci\214c data types and Scheme primiti)72 439.2 R -.15(ve) --.25 G 2.652(st).15 G 2.652(oo)264.162 439.2 S .153 -(perate on objects of these types.)276.814 439.2 R .153(In f)5.153 F .153 -(act, easy e)-.1 F(xtensibil-)-.15 E .087 -(ity of the language has been the primary design consideration in the de)72 -459.2 R -.15(ve)-.25 G .086(lopment of Elk \(as opposed to per).15 F(-)-.2 E -.183(formance or number of language features\).)72 479.2 R .183(Adding ne)5.183 -F 2.683(wt)-.25 G .183(ypes and primiti)303.704 479.2 R -.15(ve)-.25 G 2.683 -(st).15 G 2.683(oE)387.463 479.2 S .183(lk is an ine)401.256 479.2 R(xpensi) --.15 E .484 -.15(ve o)-.25 H(per).15 E(-)-.2 E(ation; it is not uncommon for a\ -n application to de\214ne hundreds of application-speci\214c Scheme primiti)72 -499.2 Q -.15(ve)-.25 G(s.).15 E .162(All primiti)97 522.8 R .462 -.15(ve p)-.25 -H .161(rocedures of Elk are implemented as C or C++ functions.).15 F .161 -(This is true for both b)5.161 F(uilt-in)-.2 E(primiti)72 542.8 Q -.15(ve)-.25 -G 3.865(s\().15 G 1.365(such as)119.355 542.8 R F1(car)3.865 E F0(and)3.865 E -F1(cdr)3.865 E F0 3.865(\)a)C 1.365(nd primiti)214.21 542.8 R -.15(ve)-.25 G -3.865(sd).15 G 1.365(e\214ned by e)277.1 542.8 R 3.865(xtensions. From)-.15 F -1.365(the Scheme programmers')3.865 F .089(point of vie)72 562.8 R 1.388 -.65 -(w, p)-.25 H(rimiti).65 E -.15(ve)-.25 G 2.588(sa).15 G .088(nd types from the\ - base set of the language are indistinguishable from application-)176.884 562.8 -R .983(speci\214c primiti)72 582.8 R -.15(ve)-.25 G 3.483(sa).15 G .983 -(nd types.)154.116 582.8 R .983(Extensions `)5.983 F(`re)-.74 E(gister')-.15 E -3.483('n)-.74 G 1.483 -.25(ew p)294.728 582.8 T(rimiti).25 E -.15(ve)-.25 G -3.483(sw).15 G .983(ith the interpreter by supplying the)360.484 582.8 R 1.614 -(name of the primiti)72 602.8 R 1.914 -.15(ve a)-.25 H 1.614 -(long with a pointer to the function implementing the primiti).15 F 1.914 -.15 -(ve a)-.25 H 1.614(nd information).15 F .426(about the ar)72 622.8 R .426 -(guments and calling style.)-.18 F(Ne)5.426 E 2.926(wt)-.25 G .427 -(ypes are de\214ned in a similar w)255.362 622.8 R(ay)-.1 E 5.427(.R)-.65 G --.15(eg)403.409 622.8 S .427(istration of ne).15 F 2.927(wp)-.25 G(rimi-)484 -622.8 Q(ti)72 642.8 Q -.15(ve)-.25 G 2.744(sa).15 G .244(nd types usually tak) -97.674 642.8 R .243 -(es place on startup of the interpreter or when a compiled e)-.1 F .243 -(xtension is loaded into)-.15 F(the running interpreter)72 662.8 Q(.)-.55 E -.379(Another w)97 686.4 R .379(ay to use the e)-.1 F .379 -(xtension mechanisms of Elk is to pro)-.15 F .38(vide interf)-.15 F .38 -(aces to libraries, such as the)-.1 F 3.276(Cl)72 706.4 S .776 -(ibrary or the libraries of the X windo)84.726 706.4 R 3.276(ws)-.25 G .775 -(ystem \(e.)251.764 706.4 R(g.)1.666 E F1(Xlib)3.275 E F0 3.275(\). Elk)B .775 -(has no f)3.275 F .775(acility to directly import `)-.1 F(`for)-.74 E(-)-.2 E -(eign')72 726.4 Q 2.548('f)-.74 G .048(unctions \(although one such f)101.018 -726.4 R .048(acility has been contrib)-.1 F .048(uted as an e)-.2 F .048 -(xtension to Elk\).)-.15 F .049(Therefore, a small)5.048 F EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-6-)279.67 56 S .795(amount of code acting as `)72 -92 R(`glue')-.74 E 3.295('b)-.74 G .794 -(etween Elk and the library has to be written to mak)215.81 92 R 3.294(et)-.1 G -.794(he contents of a)438.578 92 R 1.079(library a)72 112 R -.25(va)-.2 G 1.079 -(ilable to Scheme programmers.).25 F 1.079(The main purpose of this interf) -6.079 F 1.08(ace code is to check the ar)-.1 F(gu-)-.18 E .082 -(ments supplied to the library functions, to con)72 132 R -.15(ve)-.4 G .082 -(rt Scheme objects into C types, and to con).15 F -.15(ve)-.4 G .081 -(rt the results of).15 F 2.473(library functions back into Scheme objects.)72 -152 R(Such)7.473 E/F1 10/Times-Italic@0 SF(libr)4.974 E 2.474(ary e)-.15 F -(xtensions)-.2 E F0 2.474(often act as an additional layer)4.974 F .372 -(between the application to be e)72 172 R .372 -(xtended and the libraries used by the application; the)-.15 F 2.872(ya)-.15 G -(llo)424.068 172 Q 2.871(wt)-.25 G .371(he application)447.249 172 R 1.386 -(writers to abstract from the details of the libraries.)72 192 R 1.386 -(Although it is useful to distinguish between)6.386 F F1(libr)3.887 E(ary)-.15 -E F0 -.15(ex)72 212 S .049(tensions and e).15 F .049(xtensions interf)-.15 F -.049(acing to)-.1 F F1(applications)2.549 E F0 2.549(,t)C .049 -(here is no technical dif)291.604 212 R .048(ference \212 in both cases a col-) --.25 F(lection of types and functions is made a)72 232 Q -.25(va)-.2 G -(ilable to the Scheme w).25 E(orld.)-.1 E .987(Since man)97 255.6 R 3.487(yo) --.15 G 3.487(ft)153.264 255.6 S(oday')162.861 255.6 Q 3.487(sa)-.55 G .987 -(pplications need to interact with the X W)196.898 255.6 R(indo)-.4 E 3.487(wS) --.25 G .988(ystem, library e)401.904 255.6 R(xtensions)-.15 E .367 -(are included with Elk that interf)72 275.6 R .367(ace to the X11 `)-.1 F -(`Xlib')-.74 E 2.866('\()-.74 G .366(similar in its functionality to `)299.038 -275.6 R(`CLX')-.74 E 2.866('[)-.74 G .366(CLX 1991],)455.304 275.6 R -.2(bu)72 -295.6 S 3.518(ti).2 G 1.018 -(mplemented on top of Xlib\), to the X11 toolkit intrinsics \(`)90.878 295.6 R -(`Xt')-.74 E 1.019('\), and to the Athena and OSF/Motif)-.74 F(widget sets.)72 -315.6 Q .269(In addition, the Elk UNIX e)97 339.2 R .269(xtension pro)-.15 F -.268(vides Scheme access to most UNIX system calls and operat-)-.15 F 1.331 -(ing system interf)72 359.2 R 1.331(ace C library functions)-.1 F/F2 8 -/Times-Roman@0 SF(1)-3.2 I F0 6.331(.T)3.2 K 1.331(he e)256.086 359.2 R 1.331 -(xtension supports a wide range of dif)-.15 F 1.332(ferent UNIX plat-)-.25 F -.897(forms without restricting its functionality to the lo)72 379.2 R .896 -(west common denominator or the POSIX 1003.1 func-)-.25 F 3.229(tions. T)72 -399.2 R 3.229(of)-.8 G .729(acilitate writing portable Scheme programs, the e) -116.448 399.2 R .729(xtension attempts to hide dif)-.15 F .73(ferences between) --.25 F(the types of supported UNIX \215a)72 419.2 Q -.2(vo)-.2 G(rs.).2 E/F3 10 -/Times-Bold@0 SF 2.5(3. Using)72 459.2 R(Elk in A)2.5 E(pplications)-.25 E F0 -.188(In contrast to other e)97 482.8 R .188 -(xtension language implementations \(e.)-.15 F .187(g. Tcl\), Elk does not pro) -1.666 F .187(vide its function-)-.15 F .501 -(ality in the form of a library that is statically link)72 502.8 R .501 -(ed into an application to be e)-.1 F 3.001(xtended. Instead,)-.15 F .502 -(the object)3.001 F 1.438 -(modules comprising the application and all required library e)72 522.8 R 1.437 -(xtensions are dynamically link)-.15 F 1.437(ed with and)-.1 F 2.512 -(loaded into the running Scheme interpreter)72 542.8 R 7.512(.T)-.55 G 5.012 -(oa)270.692 542.8 S 2.512(ccomplish this, the)285.144 542.8 R F1(load)5.012 E -F0(primiti)5.012 E 2.812 -.15(ve o)-.25 H 5.012(fE).15 G 2.512(lk has been) -453.986 542.8 R -.15(ex)72 562.8 S .071 -(tended to load not only \214les containing Scheme code, b).15 F .071 -(ut also object \214les \212 compiled e)-.2 F .071(xtensions written)-.15 F -.567(in C or C++.)72 582.8 R .568(Dynamic loading enables applications to load\ - less frequently used modules into the running)5.567 F .268(program only on de\ -mand; such an application is initially smaller than the equi)72 602.8 R -.25 -(va)-.25 G .268(lent statically link).25 F .268(ed appli-)-.1 F -(cation \(where all modules must be combined into one lar)72 622.8 Q(ge e)-.18 -E -.15(xe)-.15 G(cutable \214le\).).15 E 2.292 -(Dynamic loading of object \214les is often used together with the)97 646.4 R -F1(dump)4.793 E F0(primiti)4.793 E 2.593 -.15(ve t)-.25 H 2.293(hat creates an) -.15 F -.15(exe)72 666.4 S 1.175(cutable \214le from the running interpreter).15 -F 3.675(,s)-.4 G 1.175(imilar to)259.7 666.4 R F1(une)3.675 E(xec)-.2 E F0 -1.175(of GNU Emacs or)3.675 F F1(dumplisp)3.675 E F0 1.175(in some Lisp)3.675 F -.32 LW 76 676.4 72 676.4 DL 80 676.4 76 676.4 DL 84 676.4 80 676.4 DL 88 676.4 -84 676.4 DL 92 676.4 88 676.4 DL 96 676.4 92 676.4 DL 100 676.4 96 676.4 DL 104 -676.4 100 676.4 DL 108 676.4 104 676.4 DL 112 676.4 108 676.4 DL 116 676.4 112 -676.4 DL 120 676.4 116 676.4 DL 124 676.4 120 676.4 DL 128 676.4 124 676.4 DL -132 676.4 128 676.4 DL 136 676.4 132 676.4 DL 140 676.4 136 676.4 DL 144 676.4 -140 676.4 DL/F4 6/Times-Roman@0 SF(1)82 685.8 Q F2 .161(The UNIX e)4 2.4 N .162 -(xtension de\214nes procedures for lo)-.12 F(w-le)-.2 E -.12(ve)-.2 G .162 -(l, \214le-descriptor).12 F .162 -(-based I/O; creation of pipes; \214le/record locking;)-.16 F 1.025(\214le and\ - directory system calls; process creation and control; signal handling; error \ -handling; and obtaining information)72 698.2 R -(about date, time, users, limits, process resources, etc.)72 708.2 Q EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-7-)279.67 56 S 3.632(systems. The)72 92 R/F1 10 -/Times-Italic@0 SF(dump)3.632 E F0(primiti)3.632 E 1.432 -.15(ve o)-.25 H 3.632 -(fE).15 G 1.132(lk dif)215.31 92 R 1.132(fers from e)-.25 F 1.132 -(xisting, similar mechanisms in that the ne)-.15 F 1.132(wly created)-.25 F --.15(exe)72 112 S .23(cutable, when called, starts at the point where).15 F F1 -(dump)2.73 E F0 -.1(wa)2.73 G 2.73(sc).1 G .23(alled in the original in)319.95 -112 R -.2(vo)-.4 G .23(cation \(as opposed to).2 F .012(the program')72 132 R -(s)-.55 E F1(main)2.512 E F0 .012(entry point\).)2.512 F .013 -(Here the return v)5.013 F .013(alue of)-.25 F F1(dump)2.513 E F0 .013(is `) -2.513 F(`true')-.74 E .013(', while in the original in)-.74 F -.2(vo)-.4 G .013 -(cation it).2 F(returns `)72 152 Q(`f)-.74 E(alse')-.1 E 2.5('\212n)-.74 G -(ot unlik)152.89 152 Q 2.5(et)-.1 G(he UNIX)193.35 152 Q F1(fork)2.5 E F0 -(system call.)2.5 E/F2 10/Times-Bold@0 SF 2.5(3.1. Dynamic)72 192 R -(Loading and Dump in Cooperation)2.5 E F0 1.852 -.8(To g)97 215.6 T .252 -(enerate a ne).8 F 2.752(wi)-.25 G .252(nstance of an application one w)175.818 -215.6 R .252(ould typically in)-.1 F -.2(vo)-.4 G .452 -.1(ke t).2 H .252 -(he Scheme interpreter).1 F 2.752(,l)-.4 G(oad)489.56 215.6 Q 1.725 -(all object modules and all Scheme code required initially)72 235.6 R 4.225(,p) --.65 G 1.726(erform all initializations that can survi)324.625 235.6 R 2.026 --.15(ve a)-.25 H F1(dump)72 255.6 Q F0 4.172(,a)C 1.672(nd \214nally dump an i\ -mage of the running interpreter containing all the loaded code into a ne) -105.332 255.6 R(w)-.25 E -.15(exe)72 275.6 S .708(cutable on disk.).15 F .708 -(The use of)5.708 F F1(dump)3.208 E F0 -.2(avo)3.208 G .708 -(ids time-consuming acti).2 F .708 -(vities such as loading of object \214les and)-.25 F .326 -(other initializations on each startup.)72 295.6 R .325(The dumped e)5.326 F --.15(xe)-.15 G .325(cutable, when started, resumes after the call to).15 F F1 -(dump)2.825 E F0(;)A .206(at this point one w)72 315.6 R .206 -(ould perform the remaining, en)-.1 F .206 -(vironment-dependent initializations and \214nally in)-.4 F -.2(vo)-.4 G .407 --.1(ke t).2 H(he).1 E(application')72 335.6 Q 3.39(s`)-.55 G .89 -(`main program')129.09 335.6 R 3.39('\()-.74 G -.834(e. g.)202.33 335.6 R .89 -(enter the X toolkit')3.39 F 3.39(se)-.55 G -.15(ve)311.796 335.6 S .889 -(nt processing main loop\).).15 F .889(Listing 1 sho)5.889 F .889(ws a)-.25 F -(\(slightly simpli\214ed\) Scheme program that generates and starts a ne)72 -355.6 Q 2.5(wi)-.25 G(nstance of an application.)351.16 355.6 Q .242(On system\ -s that do not support dynamic linking and loading of object \214les \(such as \ -older v)97 379.2 R .242(ersions of)-.15 F 1.294(UNIX System V\) or where)72 -399.2 R F1(dump)3.794 E F0 1.294(cannot be implemented, the interpreter k)3.794 -F 1.294(ernel and the application and)-.1 F(library e)72 419.2 Q -(xtensions are link)-.15 E(ed statically and combined into one e)-.1 E -.15(xe) --.15 G(cutable.).15 E 1.1(In an)97 442.8 R 3.6(ye)-.15 G -.15(ve)131.01 442.8 S -1.099(nt, in an application using Elk, the control initially rests in the Sche\ -me interpreter).15 F 6.099(.T)-.55 G(he)494.56 442.8 Q 1.055 -(interpreter acts as the `)72 462.8 R 1.055(`main program')-.74 F 3.555('o)-.74 -G 3.556(ft)241.8 462.8 S 1.056(he application; it is the interpreter')251.466 -462.8 R(s)-.55 E F1(main\(\))3.556 E F0 1.056(function which is)3.556 F(in)72 -482.8 Q -.2(vo)-.4 G -.1(ke).2 G 3.417(do).1 G 3.417(ns)111.937 482.8 S .917 -(tartup of the program.)124.244 482.8 R .916(Therefore the \214rst code to e) -5.917 F -.15(xe)-.15 G .916(cute in an application is Scheme code;).15 F 1.318 -(this Scheme code pro)72 502.8 R 1.319 -(vides the shell functionality of the application \(hence it is called)-.15 F -F1 1.319(shell code)3.819 F F0 3.819(\). The)B .641 -(shell code may perform a fe)72 522.8 R 3.141(ws)-.25 G .641 -(imple tasks, for instance, load a user)201.116 522.8 R(-pro)-.2 E .64 -(vided initialization \214le containing)-.15 F .456 -(customization code for the application and then enter the application')72 -542.8 R 2.957(sm)-.55 G .457(ain loop, or it may be as comple)367.631 542.8 R -(x)-.15 E(as in ISO)72 562.8 Q(TEXT)-.4 E 2.5(,w)-.74 G -(here the entire X-based user interf)145.85 562.8 Q(ace is written in Scheme.) --.1 E F2 2.5(3.2. Making)72 602.8 R(Oneself Kno)2.5 E -(wn to the Extension Language)-.1 E F0 .527(The application, as it is link)97 -626.4 R .526(ed with the e)-.1 F .526(xtension language interpreter)-.15 F -3.026(,h)-.4 G .526(as full access to all e)391.27 626.4 R(xternal)-.15 E 1.528 -(functions and v)72 646.4 R 1.528(ariables of the interpreter k)-.25 F 4.029 -(ernel. The)-.1 F(interpreter)4.029 E 4.029(,o)-.4 G 4.029(nt)352.157 646.4 S -1.529(he other hand, does not ha)363.966 646.4 R 1.829 -.15(ve a)-.2 H -.15(ny) -.15 G(kno)72 666.4 Q 1.171(wledge of the contents of dynamically link)-.25 F -1.17(ed and loaded object modules; all it sees of an object \214le)-.1 F .903 -(being loaded is the \214le')72 686.4 R 3.403(ss)-.55 G .903(ymbol table.) -180.125 686.4 R 2.503 -.8(To o)5.903 H .903(btain `).8 F(`hooks')-.74 E 3.403 -('i)-.74 G .903(nto a ne)320.96 686.4 R .903(wly loaded e)-.25 F .904 -(xtension, the interpreter)-.15 F .661(searches the symbol table of each objec\ -t \214le being loaded for functions whose names start with the pre\214x)72 -706.4 R -.74(``)72 726.4 S(elk_init_').74 E 5.542('\()-.74 G F1 -.2(ex)128.272 -726.4 S 3.042(tension initialization functions).2 F F0 5.543(\)a)C 3.043(nd in) -278.039 726.4 R -.2(vo)-.4 G -.1(ke).2 G 5.543(st).1 G 3.043 -(hese functions as the)332.315 726.4 R 5.543(ya)-.15 G 3.043(re encountered.) -439.317 726.4 R EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-8-)279.67 56 S(__________________________________\ -____________________________________________________)74 105.6 Q/F1 8/Courier@0 -SF(;;; Load initially required object files and Scheme files of)100.346 127.103 -Q(;;; application and dump image into executable file.)100.346 140.103 Q -(;;; Dumped file enters application's main loop on startup.)100.346 153.103 Q -(\(load 'main.o\))100.346 172.863 Q 4.8(;i)191.546 172.863 S -(nitial object modules)205.946 172.863 Q(\(load 'edit.o\))100.346 185.863 Q -(\(load 'x11.o\))100.346 198.863 Q 4.8(;\()191.546 198.863 S 4.8(al)205.946 -198.863 S(ibrary extension\))220.346 198.863 Q(...)100.346 211.863 Q -(\(load 'ui.scm\))100.346 224.863 Q 4.8(;i)191.546 224.863 S -(nitial Scheme files)205.946 224.863 Q(\(load 'custom.scm\))100.346 237.863 Q -(\(load 'x11.scm\))100.346 250.863 Q(...)100.346 263.863 Q -(\(initialize-application\))100.346 276.863 Q(\(if \(dump 'a.out\))100.346 -296.623 Q 86.4(\(begin ;)119.546 309.623 R(dumped a.out starts execution here) -4.8 E(\(initialize-depending-on-environment\))129.146 322.623 Q -(\(main-loop-of-application\))129.146 335.623 Q(\(exit\)\)\))129.146 348.623 Q -(;; Original invocation gets here when dump is finished.)100.346 368.383 Q -(We're done.)9.6 E/F2 9/Times-Bold@0 SF(Listing 1:)179.518 402.383 Q/F3 9 -/Times-Roman@0 SF(Scheme code to generate and start an application)4.5 E/F4 8 -/Times-Italic@0 SF(Note:)100.346 440.383 Q/F5 8/Times-Roman@0 SF .948 -(Filenames can be gi)2.948 F -.12(ve)-.2 G 2.948(na).12 G 2.948(ss)205.414 -440.383 S .948(ymbols \(besides the usual string literals\).)214.586 440.383 R -2.948(Am)4.948 G .948(ore meaningful name than a.out)370.326 440.383 R -.08(wo) -100.346 458.383 S(uld probably be chosen in practice.).08 E F0(_______________\ -_______________________________________________________________________)74 -475.983 Q(Lik)72 515.983 Q -.25(ew)-.1 G .633(ise, to support e).25 F .633 -(xtensions written in C++, an)-.15 F 3.133(yC)-.15 G .632 -(++ static constructors found in the symbol table are)293.244 515.983 R 2.675 -(called. When)72 535.983 R(link)2.675 E .175(ed statically with its e)-.1 F -.176(xtensions, the interpreter must scan its o)-.15 F .176 -(wn symbol table on startup)-.25 F .039(to \214nd and in)72 555.983 R -.2(vo) --.4 G .239 -.1(ke t).2 H .039(he initialization functions.).1 F .038 -(\(Similar support is a)5.039 F -.25(va)-.2 G .038(ilable for calling e).25 F -.038(xtension \214nalization)-.15 F -(functions and C++ static destructors on termination.\))72 575.983 Q 1.219 -(Besides initializing pri)97 599.583 R -.25(va)-.25 G 1.219 -(te data of the modules being loaded, these initialization functions re).25 F -(gister)-.15 E 1.83(with the interpreter the Scheme primiti)72 619.583 R -.15 -(ve)-.25 G 4.33(sa).15 G 1.83(nd Scheme data types implemented by the e)258.11 -619.583 R 4.33(xtensions. T)-.15 F(o)-.8 E .897(enable e)72 639.583 R .897 -(xtensions to re)-.15 F .897(gister ne)-.15 F 3.397(wp)-.25 G(rimiti)216.185 -639.583 Q 1.197 -.15(ve p)-.25 H .897(rocedures and types, the interpreter k) -.15 F .897(ernel e)-.1 F .898(xports tw)-.15 F 3.398(of)-.1 G(unc-)486.23 -639.583 Q(tions:)72 659.583 Q/F6 10/Times-Italic@0 SF(De\214ne_Primitive\(\)) -3.383 E F0 .883(to re)3.383 F .883(gister a ne)-.15 F 3.383(wS)-.25 G .883 -(cheme primiti)253.538 659.583 R 1.183 -.15(ve a)-.25 H(nd).15 E F6(De\214ne_T) -3.383 E(ype\(\))-.74 E F0 .883(to re)3.383 F .883(gister a ne)-.15 F 3.382(wS) --.25 G(cheme)477.9 659.583 Q .027(data type.)72 679.583 R .027 -(Both functions tak)5.027 F 2.527(ep)-.1 G .027(ointers to C functions as ar) -201.745 679.583 R .027(guments that implement the ne)-.18 F 2.527(wp)-.25 G -(rimiti)447.125 679.583 Q .327 -.15(ve o)-.25 H 2.528(rt).15 G(he)494.56 -679.583 Q(basic access functions of the type \(such as the print function and \ -the equality predicates\).)72 699.583 Q EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-9-)279.67 56 S 2.5(As)97 92 S(imple e)110.61 92 Q -(xample for a library e)-.15 E(xtension is presented in Appendix A.)-.15 E/F1 -10/Times-Bold@0 SF 2.5(4. Notes)72 132 R(on the Implementation)2.5 E F0 .638 -(Designing Elk, not as another Scheme implementation, b)97 155.6 R .638 -(ut as an e)-.2 F .638(xtension language kit, pro)-.15 F .637(vided a)-.15 F -.344(design space dif)72 175.6 R .344(ferent from that traditionally a)-.25 F --.25(va)-.2 G .344(ilable for Lisp implementations.).25 F .345 -(The necessary de)5.344 F(viations)-.25 E 1.42 -(from the treaded paths of UNIX programming unco)72 195.6 R -.15(ve)-.15 G 1.42 -(red limitations in portability).15 F 3.92(,a)-.65 G(ggra)424.96 195.6 Q -.25 -(va)-.2 G 1.42(ted by badly).25 F 1.078(tested corners of standard UNIX f)72 -215.6 R 3.578(acilities. This)-.1 F 1.079 -(section discusses the more interesting e)3.579 F 1.079(xamples of such)-.15 F -(issues.)72 235.6 Q F1 2.5(4.1. Implementing)72 275.6 R(Continuations)2.5 E F0 -.267(Finding a w)97 299.2 R .267(ay to ef)-.1 F .267 -(\214ciently implement Scheme')-.25 F(s)-.55 E/F2 10/Times-Italic@0 SF -(continuations)2.767 E F0 .266(called for considerable ef)2.767 F .266 -(forts during)-.25 F .223(the design phase of Elk.)72 319.2 R .224 -(Continuations are a po)5.224 F .224(werful language feature; the)-.25 F 2.724 -(ys)-.15 G .224(upport the de\214nition of arbi-)389.224 319.2 R .135 -(trary control structures such as non-local loop and procedure e)72 339.2 R -(xits,)-.15 E F2(br)2.635 E(eak)-.37 E F0(and)2.635 E F2 -.37(re)2.635 G(turn) -.37 E F0 .134(as in C, e)2.634 F .134(xception han-)-.15 F(dling f)72 359.2 Q -(acilities, e)-.1 E -(xplicit backtracking, co-routines, or multitasking based on)-.15 E F2(engines) -2.5 E F0([Dyb)2.5 E(vig 1987].)-.15 E(The primiti)97 382.8 Q .3 -.15(ve p)-.25 -H(rocedure).15 E/F3 9/Courier@0 SF(\(call-with-current-continuation)100.346 -404.303 Q/F4 9/Times-Italic@0 SF -.333(re)5.4 G(ceiver).333 E F3(\))A F0 1.045 -(packages up the current e)72 434.303 R -.15(xe)-.15 G 1.046 -(cution state of the program into an object \(the).15 F F2(continuation)3.546 E -F0(or)3.546 E F2 1.046(escape pr)3.546 F(oce-)-.45 E(dur)72 454.303 Q(e)-.37 E -F0 2.868(\)a)C .368(nd passes this object as an ar)100.598 454.303 R .368 -(gument to)-.18 F F2 -.37(re)2.868 G(ceiver).37 E F0 .367 -(\(which is a procedure of one ar)2.868 F 2.867(gument\). Continua-)-.18 F .584 -(tions are \214rst-class objects in Scheme; the)72 474.303 R 3.084(ya)-.15 G -.584(re represented as procedures of one ar)255.638 474.303 R .584 -(gument \(not to be con-)-.18 F .128(fused with the)72 494.303 R F2 -.37(re) -2.627 G(ceiver).37 E F0 2.627(procedure\). Each)2.627 F .127 -(time a continuation procedure is called with a v)2.627 F .127 -(alue, it causes this)-.25 F -.25(va)72 514.303 S .083 -(lue to be returned as the result of the).25 F F2(call-with-curr)2.584 E -(ent-continuation)-.37 E F0 -.15(ex)2.584 G .084 -(pression which created this contin-).15 F 2.669(uation. If)72 534.303 R .169 -(the procedure)2.669 F F2 -.37(re)2.669 G(ceiver).37 E F0 .169 -(terminates normally \(i.)2.669 F .169(e. does not in)1.666 F -.2(vo)-.4 G .369 --.1(ke t).2 H .169(he continuation gi).1 F -.15(ve)-.25 G 2.669(nt).15 G 2.669 -(oi)470.052 534.303 S .169(t\), the)480.501 534.303 R -.25(va)72 554.303 S -(lue returned by).25 E F2(call-with-curr)2.5 E(ent-continuation)-.37 E F0 -(is the return v)2.5 E(alue of)-.25 E F2 -.37(re)2.5 G(ceiver).37 E F0(.)A .731 -(As long as the use of a continuation is con\214ned to the runtime of the)97 -577.903 R F2 -.37(re)3.232 G(ceiver).37 E F0(procedure,)3.232 E F2(call-with-) -3.232 E(curr)72 597.903 Q(ent-continuation)-.37 E F0 .211 -(is similar in its functionality to)2.711 F F2(catc)2.711 E(h/thr)-.15 E(ow) --.45 E F0 .211(in most Lisp dialects or)2.711 F F2(setjmp/longjmp)2.71 E F0(in) -2.71 E 2.966(C. Ho)72 617.903 R(we)-.25 E -.15(ve)-.25 G 1.267 -.4(r, c).15 H -.467(ontinuations, lik).4 F 2.967(ea)-.1 G .467(ll procedures in Scheme, ha) -209.367 617.903 R .767 -.15(ve i)-.2 H .467(nde\214nite e).15 F .467 -(xtent \(unlimited lifetime\); the)-.15 F(y)-.15 E .221(can be stored in v)72 -637.903 R .221(ariables and called an arbitrary number of times, e)-.25 F -.15 -(ve)-.25 G 2.72(na).15 G .22(fter the)366.92 637.903 R F2 -.37(re)2.72 G -(ceiver).37 E F0 .22(and the enclosing)2.72 F F2(call-with-curr)72 657.903 Q -(ent-continuation)-.37 E F0(ha)2.65 E .45 -.15(ve a)-.2 H .15 -(lready terminated.).15 F .15(Listing 2 sho)5.15 F .15 -(ws a program fragment where contin-)-.25 F .278(uations are used to get back \ -an arbitrary number of times into the middle of an e)72 677.903 R .277 -(xpression whose computa-)-.15 F .897(tion has already been completed.)72 -697.903 R .897(While not particularly useful, this e)5.897 F .897 -(xample demonstrates that continua-)-.15 F .313(tions can be used to b)72 -717.903 R .313(uild control structures that cannot be implemented by means of \ -less general language)-.2 F(features lik)72 737.903 Q 2.5(ec)-.1 G(atch/thro) -127.99 737.903 Q 2.5(wo)-.25 G 2.5(rs)178.01 737.903 S(etjmp/longjmp.)187.73 -737.903 Q EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(0-)288 56 S(___________________\ -___________________________________________________________________)74 105.6 Q -/F1 8/Courier@0 SF(\(define my-function)100.346 127.103 Q(\(lambda \(n m\)) -109.946 140.103 Q(\(+ n \(mark m\)\)\))119.546 153.103 Q 4.8(;r)287.546 153.103 -S(eturn n+m)301.946 153.103 Q(\(define get-back "uninitialized"\))100.346 -172.863 Q(\(define mark)100.346 192.623 Q 4.8(;i)287.546 192.623 S -(dentity function, but also)301.946 192.623 Q(\(lambda \(value\))109.946 -205.623 Q 4.8(;a)287.546 205.623 S(ssign current continuation)301.946 205.623 Q -14.4(\(call-with-current-continuation ;)119.546 218.623 R(to a global variable) -4.8 E(\(lambda \(continuation\))129.146 231.623 Q -(\(set! get-back continuation\))138.746 244.623 Q 4.8(;\()287.546 244.623 S -(assign it\))301.946 244.623 Q(value\)\)\)\))138.746 257.623 Q -(\(my-function 10 20\))100.346 284.143 Q 4.8(;i)287.546 284.143 S -(nvoke my-function)301.946 284.143 Q/F2 8/Times-Italic@0 SF(prints 30)407.546 -284.143 Q F1(\(get-back 5\))100.346 297.143 Q 4.8(;r)287.546 297.143 S -(esume with new value)301.946 297.143 Q F2(prints 15)9.6 E F1(\(get-back 0\)) -100.346 310.143 Q 4.8(;.)287.546 310.143 S(..once more)301.946 310.143 Q F2 -(prints 10)407.546 310.143 Q/F3 9/Times-Bold@0 SF(Listing 2:)191.686 344.143 Q -/F4 9/Times-Roman@0 SF(Using continuations with unlimited e)4.5 E(xtent)-.135 E -F0(___________________________________________________________________________\ -___________)74 367.743 Q .933(The dif)97 411.343 R .933(ferent approaches appl\ -icable to implementing continuations are intimately tied to the strate-)-.25 F -.525(gies used for interpreting the language itself.)72 431.343 R .525 -(Scheme interpreters generally emplo)5.525 F 3.025(yal)-.1 G -.15(ex)425.91 -431.343 S .525(ical analyzer and).15 F .392(parser \212 the)72 451.343 R/F5 10 -/Times-Italic@0 SF -.37(re)2.892 G(ader).37 E F0 2.892<8a74>2.892 G 2.892(or) -172.18 451.343 S .393 -(ead and parse the Scheme source code and produce an intermediate representa-) -183.402 451.343 R 1.019(tion of the program.)72 471.343 R 1.019 -(During this phase, symbols are collected in a global hash table \(in Lisp jar) -6.019 F 1.018(gon, the)-.18 F .307(symbols are)72 491.343 R F5(interned)2.807 E -F0 .307(\), and a tree structure representing the program')B 2.808(sS)-.55 G -(-e)361.402 491.343 Q .308(xpressions is b)-.15 F .308(uilt up on the heap)-.2 -F 1.549(of the interpreter)72 511.343 R 6.549(.T)-.55 G 1.548(he majority of i\ -nterpreters compile this intermediate representation into an abstract)156.907 -511.343 R 1.006(machine language \(such as)72 531.343 R F5 1.006(byte code) -3.506 F F0 3.507(\). The)B -.25(eva)3.507 G 1.007 -(luator is then implemented as an abstract machine which).25 F .75 -(interprets the lo)72 551.343 R(w-le)-.25 E -.15(ve)-.25 G 3.25(ll).15 G .75 -(anguage; this machine \212 usually a simple stack machine \212 may e)171.64 -551.343 R -.15(ve)-.25 G 3.25(nb).15 G 3.25(ei)470.2 551.343 S(mple-)480.67 -551.343 Q(mented in hardw)72 571.343 Q(are.)-.1 E .17 -(In an abstract machine implementation, the straightforw)97 594.943 R .17 -(ard approach to implement)-.1 F F5(call-with-curr)2.67 E(ent-)-.37 E -(continuation)72 614.943 Q F0 1.993 -(is to package up the contents of the abstract machine')4.493 F 4.493(sr)-.55 G --.15(eg)370.273 614.943 S 1.993(isters \(program counter).15 F 4.492(,s)-.4 G -(tack)487.34 614.943 Q(pointer)72 634.943 Q 2.792(,e)-.4 G .292 -(tc.\) and runtime stack.)109.662 634.943 R .292(Since continuations ha)5.292 F -.592 -.15(ve i)-.2 H .293(nde\214nite e).15 F .293(xtent, it w)-.15 F .293 -(ould not suf)-.1 F .293(\214ce to just cap-)-.25 F .993(ture its re)72 654.943 -R .993(gisters \(as the C library function)-.15 F F5(setjmp)3.493 E F0 .993 -(does for the real machine\).)3.493 F 2.592 -.8(To b)5.992 H 3.492(ea).8 G .992 -(ble to continue the)426.864 654.943 R -.25(eva)72 674.943 S .377 -(luation of procedures that ha).25 F .677 -.15(ve a)-.2 H .378 -(lready returned and whose frames are therefore no longer on the stack,).15 F -4.157(ac)72 694.943 S 1.657 -(ontinuation must also embody the contents of the abstract machine')85.037 -694.943 R 4.156(ss)-.55 G 1.656(tack at the time it is created.)381.584 694.943 -R .197(When a continuation is applied, the machine resumes the `)72 714.943 R -(`frozen')-.74 E 2.697('c)-.74 G .198(omputation by restoring the sa)348.81 -714.943 R -.15(ve)-.2 G 2.698(dr).15 G -.15(eg)491.38 714.943 S(-).15 E -(isters and stack contents of the abstract machine.)72 734.943 Q EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(1-)288 56 S .503(Just sa)97 92 R -.503(ving the abstract machine')-.2 F 3.003(ss)-.55 G .503(tate w)241.245 92 R -.503(ould not w)-.1 F .503(ork in Elk, because at the time a continuation is) --.1 F .652(created, arbitrary library functions may be acti)72 112 R .952 -.15 -(ve i)-.25 H 3.152(na).15 G .652(ddition to Scheme primiti)289.256 112 R -.15 -(ve)-.25 G 3.152(s. F).15 F .653(or instance, consider)-.15 F 1.127 -(the Elk interf)72 132 R 1.127(ace to the `)-.1 F(`Xt')-.74 E 3.627('t)-.74 G -1.127(oolkit intrinsics of the X windo)199.372 132 R 3.627(ws)-.25 G 3.626 -(ystem. Here,)344.774 132 R 3.626(at)3.626 G 1.126(ypical scenario is that) -413.692 132 R .332(some Scheme procedure in)72 152 R -.2(vo)-.4 G -.1(ke).2 G -2.832(st).1 G .332(he primiti)209.268 152 R .632 -.15(ve t)-.25 H .332 -(hat enters the toolkit').15 F 2.832(se)-.55 G -.15(ve)360.05 152 S .332 -(nt dispatching main loop \().15 F/F1 10/Times-Italic@0 SF(XtApp-)A -(MainLoop\(\))72 172 Q F0 3.76(\). When)B 1.26(an e)3.76 F -.15(ve)-.25 G 1.26 -(nt arri).15 F -.15(ve)-.25 G 3.76(s\().15 G 1.259(for e)232.18 172 R 1.259 -(xample, a mouse b)-.15 F 1.259(utton press e)-.2 F -.15(ve)-.25 G 1.259 -(nt\), the toolkit').15 F 3.759(sm)-.55 G 1.259(ain loop)470.241 172 R(in)72 -192 Q -.2(vo)-.4 G -.1(ke).2 G 3.313(sac).1 G .814 -(allback function, which in turn calls a user)117.916 192 R .814 -(-supplied Scheme procedure to be e)-.2 F -.15(xe)-.15 G .814(cuted when a).15 -F .417(mouse b)72 212 R .417(utton is pressed.)-.2 F .416 -(This Scheme procedure might in turn in)5.417 F -.2(vo)-.4 G .616 -.1(ke y).2 H -.416(et another function from the `).1 F(`Xt')-.74 E(')-.74 E(library)72 232 Q -3.547(,a)-.65 G 1.047(nd so on.)108.497 232 R 3.547(As)6.047 G 1.047(imilar e) -167.685 232 R 1.047(xample w)-.15 F 1.047(ould be a)-.1 F F1(qsort)3.547 E F0 -(or)3.547 E F1(ftw)3.547 E F0 -.15(ex)3.547 G 1.048 -(tension to Elk, where the user).15 F(-supplied)-.2 E(function called by the)72 -252 Q F1(qsort\(\))2.5 E F0(or)2.5 E F1(ftw\(\))2.5 E F0 2.5(Cl)2.5 G -(ibrary function w)235.32 252 Q(ould in)-.1 E -.2(vo)-.4 G .2 -.1(ke a p).2 H -(rocedure written in Scheme.).1 E 1.767(The interpreter')97 275.6 R 4.267(st) --.55 G 1.766(hread of e)172.184 275.6 R -.15(xe)-.15 G 1.766(cution at an).15 F -4.266(yt)-.15 G 1.766(ime ob)286.924 275.6 R 1.766(viously in)-.15 F -.2(vo)-.4 -G(lv).2 E 1.766(es both Scheme primiti)-.15 F -.15(ve)-.25 G 4.266(sa).15 G(nd) -494 275.6 Q 1.013(library functions \(such as)72 295.6 R F1(XtAppMainLoop\(\)) -3.513 E F0(and)3.513 E F1(qsort\(\))3.513 E F0 1.014(in the e)3.514 F 1.014 -(xamples abo)-.15 F -.15(ve)-.15 G 3.514(\)i).15 G 3.514(na)406.818 295.6 S -3.514(na)419.772 295.6 S 1.014(rbitrary combina-)432.726 295.6 R 2.778 -(tion. Therefore,)72 315.6 R 2.778(ac)2.778 G .277 -(ontinuation must embody not only the e)151.694 315.6 R -.15(xe)-.15 G .277 -(cution state of the acti).15 F .577 -.15(ve S)-.25 H .277(cheme procedures,) -.15 F -.2(bu)72 335.6 S 2.868(ta).2 G .368(lso that of the currently acti) -91.888 335.6 R .668 -.15(ve l)-.25 H .368(ibrary functions \(such as local v) -.15 F .369(ariables used by the library functions\).)-.25 F .113(In the approa\ -ch used by Elk, a continuation is created by capturing the machine')72 355.6 R -2.613(sr)-.55 G -.15(eg)404.358 355.6 S .113(isters \212 lik).15 F(e)-.1 E F1 -(setjmp)2.613 E F0(in)2.613 E 3.006(Cd)72 375.6 S .507 -(oes \212 and the C runtime stack.)86.676 375.6 R .507 -(When a continuation is applied later)5.507 F 3.007(,t)-.4 G .507(he re)376.165 -375.6 R .507(gisters and the sa)-.15 F -.15(ve)-.2 G 3.007(ds).15 G(tack)487.34 -375.6 Q .197(contents are copied back.)72 395.6 R(Actually)5.197 E 2.697(,w) --.65 G 2.697(ed)225.076 395.6 S .197(id not follo)237.213 395.6 R 2.697(wt)-.25 -G .197(he usual `)294.504 395.6 R .197(`abstract machine')-.74 F 2.697('t)-.74 -G .197(echnique in Elk at all;)415.442 395.6 R .285(instead, the Scheme e)72 -415.6 R -.25(va)-.25 G .285(luator directly interprets the intermediate repres\ -entation produced by the reader).25 F 5.286(.I)-.55 G(n)499 415.6 Q 3.412(as)72 -435.6 S .912(ense, it is the `)83.742 435.6 R(`real')-.74 E 3.412('m)-.74 G -.912(achine \(the hardw)180.132 435.6 R .912(are on which Elk is e)-.1 F -.15 -(xe)-.15 G .911(cuted\) that plays the role the abstract).15 F -(machine plays in implementations with byte-code compilation.)72 455.6 Q .463 -(Although the abstract machine technique usually yields f)97 479.2 R .463 -(aster e)-.1 F -.15(xe)-.15 G .463(cution of Scheme code, the perfor).15 F(-) --.2 E .859(mance of Elk resembles that of e)72 499.2 R .859 -(xisting interpreters emplo)-.15 F .858 -(ying this technique, and the implementation of)-.1 F 1.178(Elk is simpler tha\ -n that of comparable interpreters using byte-code compilation.)72 519.2 R 1.179 -(While the technique to)6.179 F 2.486(implement continuations in Elk is not st\ -rictly portable \212 it is based on certain assumptions on the)72 539.2 R -(machine')72 559.2 Q 3.422(ss)-.55 G .922 -(tack layout and the C compiler and runtime en)119.862 559.2 R .923 -(vironment \212 it w)-.4 F .923(orks on most major machine)-.1 F -(architectures \(with tw)72 579.2 Q 2.5(oe)-.1 G -(xceptions, which are supported using)170.89 579.2 Q F1(asm)2.5 E F0 -(statements\).)2.5 E/F2 10/Times-Bold@0 SF 2.5(4.2. The)72 619.2 R -(Implementation of `)2.5 E(`dump')-.63 E(')-.63 E F0 1.01(Continuations pro)97 -642.8 R 1.01(vide a natural basis for implementing the e)-.15 F -.15(xe)-.15 G -1.01(cution-state preserving semantics of).15 F(the)72 662.8 Q F1(dump)3.205 E -F0(primiti)3.205 E -.15(ve)-.25 G 5.705(.W).15 G .705(hen called,)166.765 662.8 -R F1(dump)3.205 E F0(in)3.205 E -.2(vo)-.4 G -.1(ke).2 G(s).1 E F1 -(call-with-curr)3.205 E(ent-continuation)-.37 E F0 5.705(.T)C .706(he real w) -409.2 662.8 R .706(ork is done in)-.1 F(the)72 682.8 Q F1 -.37(re)3.605 G -(ceiver).37 E F0 1.105(procedure; it stores the ne)3.605 F 1.104 -(wly created continuation into a global v)-.25 F 1.104(ariable, sets a global) --.25 F F1(was-)3.604 E(dumped)72 702.8 Q F0 .628 -(\215ag to indicate that a dump has tak)3.128 F .628(en place, creates an e)-.1 -F -.15(xe)-.15 G .629(cutable \214le from the image of the run-).15 F .361 -(ning process, and \214nally returns `)72 722.8 R(`f)-.74 E(alse')-.1 E 2.861 -('. The)-.74 F .361(return v)2.861 F .361(alue of the)-.25 F F1(dump)2.861 E F0 -(primiti)2.861 E .661 -.15(ve i)-.25 H 2.861(st).15 G .361(he return v)415.046 -722.8 R .361(alue of this)-.25 F EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(2-)288 56 S(call to)72 92 Q/F1 -10/Times-Italic@0 SF(call-with-curr)2.5 E(ent-continuation)-.37 E F0 2.5(,i)C -1.666(.e)228.85 92 S 2.5(.`)-1.666 G(`f)245.046 92 Q(alse')-.1 E 2.5('i)-.74 G -2.5(fad)278.356 92 S(ump has just been performed.)296.126 92 Q .175 -(When the interpreter \212 either the original program or a dumped e)97 115.6 R --.15(xe)-.15 G .176(cutable \212 is started, it e).15 F(xamines)-.15 E(the)72 -135.6 Q F1(was-dumped)3.616 E F0 1.116(\215ag as its v)3.616 F 1.116 -(ery \214rst action.)-.15 F 1.116 -(If the \215ag is set, the running interpreter w)6.116 F 1.115 -(as started from a)-.1 F .335(dumped e)72 155.6 R -.15(xe)-.15 G 2.835 -(cutable. In).15 F .335(this case the interpreter immediately in)2.835 F -.2 -(vo)-.4 G -.1(ke).2 G .335(s, with an ar).1 F .336(gument of `)-.18 F(`true') --.74 E .336(', the con-)-.74 F .242(tinuation that w)72 175.6 R .242(as sa)-.1 -F -.15(ve)-.2 G 2.742(da).15 G -.1(wa)175.688 175.6 S 2.742(yb).1 G 2.742(yac) -199.99 175.6 S .242(all to)219.354 175.6 R F1(dump)2.742 E F0 2.741(;t)C .241 -(his causes that call to)273.139 175.6 R F1(dump)2.741 E F0 .241 -(to \214nish and return `)2.741 F(`true')-.74 E 2.741('t)-.74 G(o)499 175.6 Q -1.092(its caller)72 195.6 R 6.092(.I)-.55 G 1.093(f, on the other hand, the) -118.624 195.6 R F1(was-dumped)3.593 E F0 1.093(\215ag is not set \(i.)3.593 F -1.093(e. the running process w)1.666 F 1.093(as not started)-.1 F -(from a dumped image\), the interpreter initializes and starts up as usual.)72 -215.6 Q .176(Before writing an image of the running process to disk,)97 239.2 R -F1(dump)2.676 E F0 .175(has to close all open Scheme \214le ports,)2.675 F -2.236(as open \214le descriptors w)72 259.2 R 2.236(ould not survi)-.1 F 2.537 --.15(ve a)-.25 H F1(dump)4.887 E F0 4.737<8a74>4.737 G(he)309.954 259.2 Q 4.737 -(yw)-.15 G 2.237(ould no longer be v)336.101 259.2 R 2.237(alid in the dumped) --.25 F -.15(exe)72 279.2 S 3.282(cutable. Generally).15 F 3.282(,t)-.65 G .781 -(his is true for all objects pointing to information maintained by the UNIX k) -170.084 279.2 R(ernel,)-.1 E .642(such as the current directory)72 299.2 R -3.142(,t)-.65 G .642 -(he current signal dispositions, resource limits, or interv)195.64 299.2 R .642 -(al timers.)-.25 F .642(Users and)5.642 F .389(implementors of Elk e)72 319.2 R -.389(xtensions must be a)-.15 F -.1(wa)-.15 G .389 -(re of this particular restriction.).1 F -.15(Fo)5.389 G 2.889(ri).15 G .388 -(nstance, users of the X11)401.638 319.2 R -.15(ex)72 339.2 S .486(tensions ha) -.15 F .786 -.15(ve t)-.2 H 2.986(om).15 G(ak)157.118 339.2 Q 2.986(es)-.1 G -.486(ure that, if)177.774 339.2 R F1(dump)2.987 E F0 .487 -(is to be used, connections to X-displays are only established in)2.987 F -(the dumped in)72 359.2 Q -.2(vo)-.4 G(cation.).2 E 1.871 -.8(To b)97 382.8 T -2.771(ea).8 G .271(ble to create an e)126.732 382.8 R -.15(xe)-.15 G .271 -(cutable from the running process,).15 F F1(dump)2.77 E F0 .27 -(has to open and read the a.out \214le)2.77 F .825 -(from which the running process w)72 402.8 R .825(as started \(actually)-.1 F -3.325(,i)-.65 G 3.325(ft)297.53 402.8 S .825(he system link)306.965 402.8 R -.825(er has been called to dynamically)-.1 F .291 -(load object \214les, the output of the most recent in)72 422.8 R -.2(vo)-.4 G -.29(cation of the link).2 F .29(er is used instead of the original a.out\).)-.1 -F .792(The symbol table of the ne)72 442.8 R 3.293(we)-.25 G -.15(xe)197.444 -442.8 S .793 -(cutable is copied from the a.out \214le of the running program; in addition,) -.15 F .431(the a.out header has to be read to obtain the length of the te)72 -462.8 R .43(xt se)-.15 F .43(gment and the start of the data se)-.15 F .43 -(gment of)-.15 F .282(the running process.)72 482.8 R 1.882 -.8(To d)5.282 H -2.782(os).8 G(o,)188.43 482.8 Q F1(dump)2.782 E F0 .282 -(has to determine the \214lename of the a.out \214le from which the process) -2.782 F -.1(wa)72 502.8 S 3.277(ss).1 G .777 -(tarted based on the information in)94.617 502.8 R F1(ar)3.277 E(gv[0])-.37 E -F0 .777(and in the P)3.277 F -1.11(AT)-.92 G 3.277(He)1.11 G -.4(nv)347.124 -502.8 S .777(ironment v).4 F 3.277(ariable. This)-.25 F .776(approach is)3.276 -F(ob)72 522.8 Q 1.314(viously based on se)-.15 F -.15(ve)-.25 G 1.314 -(ral prerequisites:).15 F F1(dump)3.814 E F0 1.314 -(must be able to access its a.out \214le \()3.814 F F1(ar)A(gv[0])-.37 E F0 -1.315(must carry)3.815 F .306(meaningful information; the \214le must be reada\ -ble\) and the running program')72 542.8 R 2.806(sa)-.55 G .306 -(.out \214le must not ha)392.27 542.8 R .606 -.15(ve b)-.2 H(een).15 E 3.871 -(stripped. It)72 562.8 R -.1(wo)3.871 G 1.371(uld ha).1 F 1.671 -.15(ve b)-.2 H -1.371(een adv).15 F 1.371(antageous for the implementation of)-.25 F F1(dump) -3.871 E F0 1.372(if the entire a.out \214le were)3.871 F -(automatically mapped into memory on startup, lik)72 582.8 Q 2.5(ei)-.1 G 2.5 -(ti)281.89 582.8 S 2.5(sd)289.95 582.8 S(one, for instance, in NeXT)301.34 -582.8 Q(-OS/Mach.)-.92 E F1(dump)97 606.4 Q F0 .042(combines the data se)2.542 -F .041(gment and the `)-.15 F(`bss')-.74 E 2.541('s)-.74 G -.15(eg)295.112 -606.4 S .041(ment of the running process into the data se).15 F(gment)-.15 E -.986(of the ne)72 626.4 R 3.486(we)-.25 G -.15(xe)123.708 626.4 S 3.486 -(cutable. If).15 F .987 -(Elk had a separate heap for storing constant objects \(future v)3.486 F .987 -(ersions may ha)-.15 F -.15(ve)-.2 G(one\),)72 646.4 Q F1(dump)2.653 E F0 .152 -(could place this read-only part of the memory into the ne)2.653 F 2.652(we) --.25 G -.15(xe)362.97 646.4 S(cutable').15 E 2.652(st)-.55 G -.15(ex)413.242 -646.4 S 2.652(ts).15 G -.15(eg)431.854 646.4 S .152(ment to mak).15 F 2.652(ei) --.1 G(t)501.22 646.4 Q 3.048(sharable. When)72 666.4 R .548(the interpreter') -3.048 F 3.048(sh)-.55 G .548(eap is written to disk,)211.932 666.4 R F1(dump) -3.048 E F0 .548(seeks o)3.048 F -.15(ve)-.15 G 3.048(rt).15 G .549 -(he unused portions of the heap,)376.276 666.4 R .032(so that f)72 686.4 R(ak) --.1 E 2.531(eb)-.1 G .031 -(locks \(holes\) can be used for these parts of the \214le.)125.494 686.4 R -.031(This results in a considerable conserv)5.031 F(ation)-.25 E .051 -(of disk space in the \214nal e)72 706.4 R -.15(xe)-.15 G .052 -(cutable, as at least half of the interpreter').15 F 2.552(sh)-.55 G .052 -(eap is unused at an)360.974 706.4 R 2.552(yt)-.15 G .052(ime due to the) -446.904 706.4 R -.05(ga)72 726.4 S(rbage collection algorithm of Elk.).05 E EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(3-)288 56 S .149 -(Since the a.out formats used in the numerous v)97 92 R .149 -(ersions of UNIX dif)-.15 F .149(fer v)-.25 F(astly)-.25 E 2.649(,E)-.65 G .148 -(lk has to include sepa-)413.977 92 R 1.304(rate implementations of)72 112 R/F1 -10/Times-Italic@0 SF(dump)3.804 E F0 1.304 -(for the currently supported a.out formats.)3.804 F -1.11(Ve)6.304 G 1.304 -(rsion 2.2 of Elk handles the)1.11 F .672 -(BSD-style a.out format used in BSD and `)72 132 R(`deri)-.74 E -.15(ve)-.25 G -(d').15 E 3.171('U)-.74 G .671(NIX v)294.072 132 R .671 -(ersions \(such as SunOS 4.1\), the COFF a.out)-.15 F .29 -(format \(used in older releases of UNIX System V and in A/UX\), Con)72 152 R -.59 -.15(vex S)-.4 H(OFF).15 E 2.79(,E)-.8 G .29(xtended COFF of MIPS-)403.96 -152 R .327(based computers \(DEC, SGI\), and the ELF a.out format of System V \ -Release 4 and related UNIX v)72 172 R(ersions)-.15 E(\(Solaris 2.x, OSF/1\).)72 -192 Q/F2 10/Times-Bold@0 SF 2.5(4.3. Dynamic)72 232 R(Loading of Object Files) -2.5 E F0 1.358(When loading an object \214le during runtime, addresses within \ -this object \214le must be relocated to)97 255.6 R .534(their ne)72 275.6 R -3.034(wl)-.25 G .534(ocation in the program')115.588 275.6 R 3.034(sa)-.55 G -.534(ddress space.)222.154 275.6 R 2.134 -.8(To a)5.534 H(llo).8 E 3.034(we) --.25 G .533(xtensions to directly reference objects of the)323.62 275.6 R .26 -(interpreter k)72 295.6 R .26(ernel, such as the heap and the b)-.1 F .261 -(uilt-in primiti)-.2 F -.15(ve)-.25 G .261(s, unresolv).15 F .261 -(ed references into the)-.15 F F1 .261(base pr)2.761 F -.1(og)-.45 G -.15(ra).1 -G(m).15 E F0 .274(must be resolv)72 315.6 R .274(ed during dynamic loading.) --.15 F(Finally)5.274 E 2.773(,t)-.65 G .273 -(he object \214le needs to be able to e)282.557 315.6 R .273 -(xport its entry points)-.15 F(\(such as Elk')72 335.6 Q 2.5(se)-.55 G -(xtension initialization functions\) to the base program.)134.34 335.6 Q .565 -(More than one object \214le may ha)97 359.2 R .865 -.15(ve t)-.2 H 3.065(ob) -.15 G 3.065(el)260.59 359.2 S .565(oaded into one in)270.875 359.2 R -.2(vo)-.4 -G .566(cation of Elk.).2 F 2.166 -.8(To m)5.566 H .566(anage non-tri).8 F -(vial,)-.25 E .895(hierarchically structured sets of e)72 379.2 R .894 -(xtensions, where a number of high-le)-.15 F -.15(ve)-.25 G 3.394(le).15 G .894 -(xtensions require one or more)381.004 379.2 R(lo)72 399.2 Q(wer)-.25 E(-le)-.2 -E -.15(ve)-.25 G 2.721(le).15 G .222(xtensions to be loaded, it is essential t\ -hat object \214les loaded later can mak)123.701 399.2 R 2.722(eu)-.1 G .222 -(se of the symbols)433.614 399.2 R .914(de\214ned by pre)72 419.2 R .914 -(viously loaded object \214les.)-.25 F .913 -(As this style of dynamic loading allo)5.913 F .913(ws b)-.25 F .913 -(uilding comple)-.2 F 3.413(xs)-.15 G(ys-)491.78 419.2 Q -(tems from small components incrementally)72 439.2 Q 2.5(,w)-.65 G 2.5(ew) -256.89 439.2 S(ill use the term)271.05 439.2 Q F1(incr)2.5 E(emental loading) --.37 E F0(.)A -.4(Wi)97 462.8 S 1.112(th the adv).4 F 1.112(ent of 4.0)-.15 F -1.112(BSD in 1980 [Jo)1.666 F 3.612(y1)-.1 G 1.112 -(980], support for incremental loading w)276.072 462.8 R 1.113(as added to the) --.1 F 1.232(system link)72 482.8 R 1.231 -(er and has since been supported by most major UNIX v)-.1 F 1.231 -(ariants: when the \255A option and the)-.25 F .079(name of the base e)72 502.8 -R -.15(xe)-.15 G .079(cutable are supplied to the link).15 F(er)-.1 E 2.579(,l) --.4 G .08(inking is performed in a w)294.44 502.8 R .08 -(ay that the object \214le pro-)-.1 F 1.405(duced by the link)72 522.8 R 1.404 -(er can be read into the already running e)-.1 F -.15(xe)-.15 G 3.904 -(cutable. The).15 F 1.404(symbol table of the resulting)3.904 F 1.196(object \ -\214le is a combination of the symbols de\214ned by the base program and the n\ -e)72 542.8 R 1.197(wly de\214ned symbols)-.25 F .426(added by the linking proc\ -ess, from the object \214le or from libraries used in linking.)72 562.8 R .425 -(Only this ne)5.425 F .425(wly link)-.25 F(ed)-.1 E .129 -(code and data is entered into the resulting object \214le.)72 582.8 R .129 -(The incremental style of dynamic loading is achie)5.129 F -.15(ve)-.25 G(d).15 -E .18(by sa)72 602.8 R .18(ving the resulting output \214le each time the link) --.2 F .18(er is in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 2.679(da).1 G .179 -(nd using this \214le as the base program for)339.808 602.8 R(the ne)72 622.8 Q -(xt incremental loading step, such that both old and ne)-.15 E 2.5(ws)-.25 G -(ymbols can be referenced.)323.24 622.8 Q .918 -(Incremental loading is generally supported by the link)97 646.4 R .919 -(ers of UNIX v)-.1 F .919(ersions that use the BSD-style)-.15 F .199 -(a.out format and by those of se)72 666.4 R -.15(ve)-.25 G .199 -(ral UNIX systems based on more modern a.out formats \(e.).15 F .199 -(g. Ultrix\).)1.666 F .199(It is)5.199 F 1.109(not supported by an)72 686.4 R -3.609(ye)-.15 G 1.109(xisting release of UNIX System V)167.236 686.4 R 6.109 -(.S)-1.29 G 1.11(ome ne)323.14 686.4 R 1.11(wer UNIX v)-.25 F 1.11 -(ersions that ha)-.15 F 1.41 -.15(ve s)-.2 H(hared).15 E 1.858 -(libraries and dynamic linking \(such as System V Release 4 or SunOS\) of)72 -706.4 R 1.858(fer a library interf)-.25 F 1.858(ace to the)-.1 F 1.909 -(dynamic link)72 726.4 R(er)-.1 E 6.909(.I)-.55 G 4.409(ns)146.268 726.4 S -1.909(ome systems this kind of interf)159.567 726.4 R 1.91 -(ace is intended to replace the incremental loading)-.1 F EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(4-)288 56 S .947 -(functionality of the system link)72 92 R(er)-.1 E 5.946(.T)-.55 G .946 -(hese dynamic link)222.464 92 R .946(er interf)-.1 F .946 -(aces usually come in the form of a library)-.1 F 1.094(that e)72 112 R 1.094 -(xports functions such as)-.15 F/F1 10/Times-Italic@0 SF(dlopen\(\))3.594 E F0 -1.095(to map a shared object module or shared library into the address)3.595 F -.911(space of the caller \(the base program\) and)72 132 R F1(dlsym\(\))3.411 E -F0 .91(to obtain the address of a function or data item in the)3.411 F(ne)72 -152 Q(wly attached object module.)-.25 E 1.074 -(In some implementations, object \214les attached through)97 175.6 R F1 -(dlopen\(\))3.574 E F0 1.074(may directly reference symbols in)3.574 F .028 -(the base program; in other implementations the)72 195.6 R 2.528(ym)-.15 G .028 -(ay not.)276.196 195.6 R .027(In an)5.027 F 2.527(yc)-.15 G .027 -(ase, object \214les cannot directly reference)340.585 195.6 R .291 -(symbols de\214ned by objects that ha)72 215.6 R .591 -.15(ve b)-.2 H .292 -(een placed into the program by pre).15 F .292(vious calls to)-.25 F F1 -(dlopen\(\))2.792 E F0(\(only)2.792 E 2.792(,i)-.65 G 2.792(fa)490.658 215.6 S -(t)501.22 215.6 Q .482(all, indirectly by calling)72 235.6 R F1(dlsym\(\))2.982 -E F0 2.982(\). Thus,)B .481(these dynamic link)2.982 F .481(er interf)-.1 F -.481(aces are clearly inferior to incremental)-.1 F .168(loading, as the)72 -255.6 R 2.668(yl)-.15 G .169 -(ack the important capability to load a set of object \214les)140.684 255.6 R -F1(incr)2.669 E(ementally)-.37 E F0 5.169(.M)C(an)435.642 255.6 Q 2.669(yv)-.15 -G .169(endors who)457.451 255.6 R(ha)72 275.6 Q .515 -.15(ve r)-.2 H .215 -(eplaced `).15 F .215(`/bin/ld \255A)-.74 F 1.695 -.74('' b)-1.11 H 2.715(ya) -.74 G F1(dlopen)A F0 .215 -(-style library in their UNIX systems, or who intend to do so, do not)B -(seem to be a)72 295.6 Q -.1(wa)-.15 G(re of the f).1 E(act that this change w\ -ill break applications that rely on incremental loading.)-.1 E -.15(Fo)97 319.2 -S 3.146(rE).15 G .647(lk, the consequence of being restricted to dynamic link) -119.996 319.2 R .647(er interf)-.1 F .647(aces of that kind is that, e)-.1 F -(xcept)-.15 E .886(for the simplest applications, one must pre-link all possib\ -le combinations of e)72 339.2 R .886(xtensions that are not com-)-.15 F .87 -(pletely independent of each other)72 359.2 R 5.87(.I)-.55 G 3.37(ng)219.93 -359.2 S .87(eneral, gi)233.3 359.2 R -.15(ve)-.25 G 3.37(nas).15 G .871(et of) -300.49 359.2 R F1(n)3.371 E F0 -.15(ex)3.371 G .871 -(tensions each of which can be based on).15 F .583(one out of)72 379.2 R F1(m) -3.083 E F0 .583(other e)3.083 F .583(xtensions, this means ha)-.15 F .583 -(ving to prepare and k)-.2 F .583(eep around)-.1 F F1(n)3.083 E/F2 10/Symbol SF -1.666 E F1(m)1.666 E F0(pre-link)3.082 E .582(ed object \214les;)-.1 F .558 -(not to mention the contortions one has to go through when the hierarch)72 -399.2 R 3.058(yo)-.05 G 3.058(fe)375.56 399.2 S .558 -(xtensions has a depth greater)386.238 399.2 R .552(than tw)72 419.2 R 3.052 -(o\()-.1 G .552(not an unlik)113.554 419.2 R .551(ely scenario in practice\).) --.1 F .551(If the number of e)5.551 F .551 -(xtensions and relations between them is)-.15 F(lar)72 439.2 Q 1.418 -(ger than tri)-.18 F 1.418(vial, or if the e)-.25 F 1.418(xtensions are lar) --.15 F 1.418(ge or require lar)-.18 F 1.418(ge libraries, k)-.18 F 1.419 -(eeping around all pre-link)-.1 F(ed)-.1 E .015 -(combinations of object modules will cause a maintenance problem and may w)72 -459.2 R .015(aste a considerable amount of)-.1 F(disk space.)72 479.2 Q -(Another)97 502.8 Q 2.746(,a)-.4 G .246(lthough minor)139.056 502.8 R 2.746(,p) --.4 G .246(roblem with these dynamic link)206.098 502.8 R .246(er interf)-.1 F -.247(aces is that the)-.1 F 2.747(yu)-.15 G .247(sually of)437.656 502.8 R .247 -(fer only)-.25 F 2.692(as)72 522.8 S .191(imple-minded function \(such as) -83.022 522.8 R F1(dlsym\(\))2.691 E F0 2.691(\)t)C 2.691(ol)252.008 522.8 S -.191(ook up the address of a speci\214c symbol of a ne)262.479 522.8 R .191 -(wly accessed)-.25 F .007 -(object module \(typically some kind of module initialization function\); b)72 -542.8 R .008(ut the)-.2 F 2.508(yd)-.15 G 2.508(on)394.222 542.8 S .008(ot pro) -406.73 542.8 R .008(vide a w)-.15 F .008(ay to scan)-.1 F 1.058(all ne)72 562.8 -R 1.058(wly de\214ned symbols.)-.25 F 1.058(This functionality is insuf)6.058 F -1.058(\214cient to implement e)-.25 F 1.057(xtension initialization in Elk,) --.15 F .296(where a dynamically loadable e)72 582.8 R .296 -(xtension often is composed from a number of small modules, each de\214ning) --.15 F 2.013(its o)72 602.8 R 2.013(wn initialization function.)-.25 F 2.012 -(Requiring a single, common initialization function name for the entire)7.013 F -.16(object \214le implies that \(often con\214guration-dependent\) `)72 622.8 R -.16(`glue code')-.74 F 2.66('m)-.74 G .16(ust be added to call all the indi) -355.64 622.8 R(vidual)-.25 E -(initialization functions, including the C++ static constructors.)72 642.8 Q --1.11(Ve)97 666.4 S .255(rsion 2.2 of Elk supports dynamic loading in en)1.11 F -.254(vironments with `)-.4 F .832(`ld \255A)-.74 F 1.734 -.74('' \()-1.11 H -.254(such as BSD, SunOS 4,).74 F 3.696(Ultrix, and certain v)72 686.4 R 3.697 -(ersions of SGI Irix and HP-UX\), in HP-UX 9 \(based on)-.15 F F1(shl_load) -6.197 E F0 3.697(\), and in)B(MA)72 706.4 Q(CH/NeXT)-.4 E .823(-OS \()-.92 F F1 -(rld_load)A F0 3.323(\). By)B .823(generating shared objects on the \215y)3.323 -F 3.323(,S)-.65 G .822(ystem V Release 4 and SunOS 5)369.077 706.4 R -(\(Solaris 2\) are also supported, although in a limited and not yet satisf)72 -726.4 Q(actory w)-.1 E(ay)-.1 E(.)-.65 E EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(5-)288 56 S/F1 10/Times-Bold@0 -SF 2.5(4.4. Non-Standard)72 92 R(Language F)2.5 E(eatur)-.25 E(es)-.18 E F0 -.625(As the current v)97 115.6 R .625 -(ersion of the Scheme standard \(deliberately\) does not specify se)-.15 F -.15 -(ve)-.25 G .625(ral important lan-).15 F .44 -(guage issues, such as error handling or syntactic e)72 135.6 R .44 -(xtensions, we ha)-.15 F .74 -.15(ve a)-.2 H .44 -(dded a number of non-standard lan-).15 F -(guage features to the Scheme interpreter of Elk to \214ll some of the holes.) -72 155.6 Q 3.975(Ap)97 179.2 S 1.475(roposal for a macro e)113.195 179.2 R -1.476(xtension has only recently been added as an addendum to the)-.15 F/F2 10 -/Times-Italic@0 SF(Re)3.976 E(vised)-.15 E/F3 9/Times-Italic@0 SF(4)499.5 174.2 -Q F2 1.045(Report on the Algorithmic Langua)72 199.2 R 1.245 -.1(ge S)-.1 H --.15(ch).1 G(eme).15 E F0 1.044 -([Clinger et al. 1991] and is still being discussed contro)3.545 F -.15(ve)-.15 -G -.2(r-).15 G 1.413(sially within the Scheme community)72 219.2 R 6.413(.T) --.65 G 3.913(oa)237.895 219.2 S -.2(vo)251.048 219.2 S 1.413(id ha).2 F 1.413 -(ving to w)-.2 F 1.413(ait for a \214nal v)-.1 F 1.414 -(ersion of a macro system to)-.15 F -2.2 -.25(ev o)72 239.2 T(lv).25 E 2.604 -(ea)-.15 G .103(nd be included in the Scheme standard, we implemented a simple\ --minded macro mechanism in Elk)105.104 239.2 R(that resembles the macro f)72 -259.2 Q(acilities of)-.1 E(fered by v)-.25 E(arious e)-.25 E -(xisting Scheme and Lisp systems.)-.15 E .638 -(One area where the Scheme standard does not specify an)97 282.8 R 3.138(yl) --.15 G .638(anguage features yet is error and e)340.94 282.8 R(xcep-)-.15 E -.265(tion handling; the standard merely states which error situations a confor\ -ming implementation is required to)72 302.8 R .129(detect and report.)72 322.8 -R .129(Since it is essential for a non-tri)5.129 F .13 -(vial application to be able to gracefully handle error situ-)-.25 F .141 -(ations \(such as f)72 342.8 R .141 -(ailures in interactions with the operating system\) and other e)-.1 F .14 -(xceptional conditions, we ha)-.15 F -.15(ve)-.2 G(added a simple error and e) -72 362.8 Q(xception handling f)-.15 E(acility to Elk.)-.1 E .152 -(When an error is detected by the interpreter)97 386.4 R 2.653(,au)-.4 G(ser) -289.022 386.4 Q .153(-supplied error handling procedure is in)-.2 F -.2(vo)-.4 -G -.1(ke).2 G 2.653(dw).1 G(ith)493.44 386.4 Q(ar)72 406.4 Q .407 -(guments identifying the type and source of the error)-.18 F 5.406(.T)-.55 G -.406(he standard interacti)304.05 406.4 R .706 -.15(ve e)-.25 H -.4(nv).15 G -.406(ironment \(top-le).4 F -.15(ve)-.25 G .406(l\) of).15 F .386(Elk pro)72 -426.4 R .386(vides a def)-.15 F .387(ault error handler that prints an error m\ -essage and then resumes the main read-e)-.1 F -.25(va)-.25 G(l-print).25 E .316 -(loop by means of a)72 446.4 R F2 -.37(re)2.816 G(set).37 E F0(primiti)2.816 E --.15(ve)-.25 G 5.316(.M).15 G .316(ost primiti)227.042 446.4 R -.15(ve)-.25 G -2.816(so).15 G 2.816(fE)289.504 446.4 S .315(lk and the e)301.76 446.4 R .315 -(xtensions use this error handling f)-.15 F(acil-)-.1 E .115 -(ity to signal an error)72 466.4 R 2.616(,a)-.4 G 2.616(so)162.716 466.4 S .116 -(pposed to indicating f)174.222 466.4 R .116(ailure by a distincti)-.1 F .416 --.15(ve r)-.25 H .116(eturn v).15 F .116(alue \(which w)-.25 F .116 -(ould be prone to)-.1 F 1.142(being ignored\).)72 486.4 R 2.742 -.8(To b)6.142 -H 1.141(y-pass the standard error handler and `).8 F(`catch')-.74 E 3.641('f) --.74 G 1.141(ailure of a particular primiti)356.505 486.4 R -.15(ve)-.25 G -3.641(,p).15 G(ro-)492.34 486.4 Q 1.476 -(grams may enclose the call to the primiti)72 506.4 R 1.776 -.15(ve b)-.25 H(y) -.15 E F2(call-with-curr)3.976 E(ent-continuation)-.37 E F0 1.477 -(and dynamically bind the)3.976 F(error handler to the continuation \(as sho)72 -526.4 Q(wn in listing 3\).)-.25 E .943(Elk pro)97 550 R .943(vides a similar f) --.15 F .943(acility to handle an)-.1 F F2(interrupt)3.443 E F0 -.15(ex)3.443 G -.943(ception: a user).15 F .942(-supplied interrupt handler is)-.2 F(in)72 570 -Q -.2(vo)-.4 G -.1(ke).2 G 3.528(dw).1 G 1.029(hen a SIGINT signal is sent to \ -the interpreter \(usually by typing the interrupt character on the)114.268 570 -R -.1(ke)72 590 S 2.5(yboard\). Support)-.05 F(for other e)2.5 E -(xceptions, such as timer interrupts, may be pro)-.15 E(vided in future v)-.15 -E(ersions.)-.15 E .006(Another non-standard primiti)97 613.6 R .306 -.15(ve t) --.25 H .006(hat f).15 F .006(acilitates handling of errors is)-.1 F F2 -(dynamic-wind)2.506 E F0 2.506(,a)C .005(generalization of)-.001 F(the)72 633.6 -Q F2(unwind-pr)3.579 E(otect)-.45 E F0 1.079(form of)3.579 F 1.079 -(fered by man)-.25 F 3.579(yL)-.15 G 1.079(isp dialects.)252.594 633.6 R F2 -(dynamic-wind)6.079 E F0 1.08(is used to implement the)3.579 F F2(\215uid-let) -3.58 E F0 .692(special form \(to create)72 653.6 R F2(\215uid)3.192 E F0 .692 -(or dynamic v)3.192 F .692(ariable bindings\).)-.25 F(Both)5.692 E F2 -(dynamic-wind)3.192 E F0(and)3.192 E F2(\215uid-let)3.192 E F0 .692 -(are also pro-)3.192 F(vided by se)72 673.6 Q -.15(ve)-.25 G -(ral other Scheme dialects [MIT 1984, Dyb).15 E(vig 1987].)-.15 E .349 -(The current v)97 697.2 R .349(ersion of the Scheme standard does not pro)-.15 -F .349(vide an)-.15 F 2.85(yl)-.15 G .35(anguage features that w)366.17 697.2 R -.35(ould mak)-.1 F(e)-.1 E .017(it possible to implement a useful Scheme deb)72 -717.2 R .016(ugger \(apart from a deb)-.2 F .016 -(ugger based on source code instrumen-)-.2 F 2.55(tation\). T)72 737.2 R 2.55 -(oc)-.8 G .05(ompensate for this shortcoming, we ha)122.96 737.2 R .35 -.15 -(ve a)-.2 H .05(dded a fe).15 F 2.55(wp)-.25 G(rimiti)345.54 737.2 Q -.15(ve) --.25 G 2.55(st).15 G .05(hat aid the implementation of)386.03 737.2 R EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(6-)288 56 S(___________________\ -___________________________________________________________________)74 105.6 Q -/F1 8/Courier@0 SF(\(define \(open-input-file-or-not name\))100.346 127.103 Q -(\(call-with-current-continuation)109.946 140.103 Q(\(lambda \(return\))119.546 -153.103 Q(;)277.946 153.103 Q/F2 8/Courier-Oblique@0 SF(return)4.8 E F1 -(becomes escape procedure)4.8 E(\(fluid-let \(\(error-handler)129.146 166.103 Q -4.8(;r)277.946 166.103 S(ebind)292.346 166.103 Q F2(error-handler)4.8 E F1 -(\(lambda args \(return #f\)\)\)\))196.346 179.103 Q -(\(open-input-file name\)\)\)\)\))138.746 192.103 Q/F3 9/Times-Bold@0 SF -(Listing 3:)112.707 226.103 Q/F4 9/Times-Roman@0 SF 2.25(Av)4.5 G -(ersion of open-input-\214le that returns the ne)167.076 226.103 Q -(wly opened port on success, #f on error)-.225 E F0(__________________________\ -____________________________________________________________)74 249.703 Q 4.016 -(as)72 289.703 S 1.516(imple interacti)84.346 289.703 R 1.816 -.15(ve d)-.25 H -(eb).15 E(ugger)-.2 E 4.016(,a)-.4 G 1.516(mong them an)204.534 289.703 R/F5 10 -/Times-Italic@0 SF -.15(ev)4.016 G(al).15 E F0(primiti)4.016 E 1.816 -.15 -(ve \()-.25 H 1.516(although, in theory).15 F(,)-.65 E F5 -.15(ev)4.016 G(al) -.15 E F0 1.516(could be imple-)4.016 F .898(mented by writing an e)72 309.703 R -.898(xpression into a temporary \214le and then loading this \214le\).)-.15 F -.899(In addition, Elk, lik)5.899 F 3.399(ea)-.1 G(fe)72 329.703 Q 2.67(wo)-.25 -G .17(ther Scheme dialects, pro)94.41 329.703 R .17(vides le)-.15 F .17 -(xical en)-.15 F .17(vironments as \214rst class \(b)-.4 F .17 -(ut immutable\) objects.)-.2 F .17(Other non-)5.17 F .813(standard primiti)72 -349.703 R -.15(ve)-.25 G 3.313(st).15 G .813(hat aid writing deb)155.446 -349.703 R .813(uggers are)-.2 F F5(pr)3.313 E(ocedur)-.45 E(e-lambda)-.37 E F0 -.813(to obtain the lambda e)3.313 F .814(xpression that)-.15 F -.25(eva)72 -369.703 S .672(luated to a gi).25 F -.15(ve)-.25 G 3.172(np).15 G .671 -(rocedure, and a primiti)161.548 369.703 R .971 -.15(ve t)-.25 H .671 -(hat returns the list of currently acti).15 F .971 -.15(ve p)-.25 H .671 -(rocedures together).15 F .744(with their actual ar)72 389.703 R .744 -(guments and the le)-.18 F .744(xical en)-.15 F .745 -(vironments in which the procedure calls took place \(a)-.4 F F5(bac)3.245 E -(k-)-.2 E(tr)72 409.703 Q(ace)-.15 E F0(\).)A/F6 10/Times-Bold@0 SF 2.5 -(4.5. Garbage)72 449.703 R(Collection)2.5 E F0 2.105(The g)97 473.303 R 2.105 -(arbage collector of Elk is based on the)-.05 F F5(stop-and-copy)4.605 E F0 -2.105(algorithm \(see e.)4.605 F 2.105(g. [Abelson et al.)1.666 F 2.649 -(1985]\). The)72 493.303 R .149(heap area is di)2.649 F .149(vided into tw)-.25 -F(o)-.1 E F5(semispaces)2.649 E F0 2.649(,o)C .15(nly one of which is acti) -297.951 493.303 R .45 -.15(ve d)-.25 H .15(uring normal operation.).15 F .551 -(In a g)72 513.303 R .551 -(arbage collection, all objects that are still reachable are mo)-.05 F -.15(ve) --.15 G 3.05(di).15 G .55(nto the unused semispace; the pre)355.69 513.303 R -(vi-)-.25 E .474(ously used semispace then remains unused until the ne)72 -533.303 R .474(xt g)-.15 F .474(arbage collection.)-.05 F .474 -(An incremental, generational)5.474 F -.05(ga)72 553.303 S .09 -(rbage collector for Elk, inspired by Y).05 F(ip')-.55 E 2.59(sg)-.55 G .09 -(arbage collector [Y)253.06 553.303 R .09 -(ip 1991], has recently been implemented as)-.55 F(an alternati)72 573.303 Q .3 --.15(ve t)-.25 H 2.5(ot).15 G(he stop-and-cop)141.31 573.303 Q 2.5(yg)-.1 G -(arbage collector)217.81 573.303 Q/F7 8/Times-Roman@0 SF(2)-3.2 I F0(.)3.2 I -.235(Extensions to Elk can re)97 596.903 R(gister)-.15 E F5(befor)2.735 E(e-GC) --.37 E F0(and)2.735 E F5(after)2.735 E(-GC)-.2 E F0 .234 -(functions with the interpreter; these functions)2.735 F 1.506(are in)72 -616.903 R -.2(vo)-.4 G -.1(ke).2 G 4.006(db).1 G 4.006(yt)128.742 616.903 S -1.506(he g)140.528 616.903 R 1.506 -(arbage collector immediately before and after each g)-.05 F 1.507 -(arbage collection run.)-.05 F -.4(Wi)6.507 G(thin).4 E F5(after)72 636.903 Q -(-GC)-.2 E F0 .342(functions, e)2.842 F .342 -(xtensions can determine whether a particular Scheme object has become g)-.15 F -.341(arbage, i.)-.05 F(e.)1.666 E .32 LW 76 646.903 72 646.903 DL 80 646.903 76 -646.903 DL 84 646.903 80 646.903 DL 88 646.903 84 646.903 DL 92 646.903 88 -646.903 DL 96 646.903 92 646.903 DL 100 646.903 96 646.903 DL 104 646.903 100 -646.903 DL 108 646.903 104 646.903 DL 112 646.903 108 646.903 DL 116 646.903 -112 646.903 DL 120 646.903 116 646.903 DL 124 646.903 120 646.903 DL 128 -646.903 124 646.903 DL 132 646.903 128 646.903 DL 136 646.903 132 646.903 DL -140 646.903 136 646.903 DL 144 646.903 140 646.903 DL/F8 6/Times-Roman@0 SF(2) -82 656.303 Q F7 -.32(Wi)4 2.4 O .737(th a generational g).32 F .737 -(arbage collector)-.04 F 2.737(,o)-.32 G .737(bjects survi)220.413 658.703 R -.737(ving g)-.2 F .738(arbage collections will not be touched ag)-.04 F .738 -(ain until there is)-.04 F .79 -(only a certain amount of memory left on the heap, triggering a full g)72 -668.703 R .79(arbage collection.)-.04 F -.12(Pa)4.789 G .789 -(rticularly in applications with).12 F(lar)72 678.703 Q .011 -(ge amounts of Scheme code or other constant data, partial GCs run much f)-.144 -F .012(aster than full GCs.)-.08 F -.32(Wi)4.012 G .012(th incremental g).32 F -(arbage)-.04 E .153(collection, starting a g)72 688.703 R .153(arbage collecti\ -on does not suspend the application until the GC is done; instead, the collect\ -or returns)-.04 F .485 -(control to the application almost immediately \(after ha)72 698.703 R .485 -(ving mark)-.16 F .486(ed pages of interest unreadable with the)-.08 F/F9 8 -/Times-Italic@0 SF(mpr)2.486 E(otect)-.36 E F7(system)2.486 E(call\) and re)72 -708.703 Q -.04(ga)-.12 G(ins control with a SIGSEGV signal.).04 E EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(7-)288 56 S .403 -(no references to the object e)72 92 R .403(xist an)-.15 F 2.903(yl)-.15 G -(onger)223.651 92 Q 5.403(.I)-.55 G 2.903(nt)257.104 92 S .403(his case, an e) -267.787 92 R .404(xtension may perform some kind of clean-up)-.15 F -(action; for e)72 112 Q(xample, if the no)-.15 E 2.5(wu)-.25 G -(nreferenced object contains a handle to an open \214le, close this \214le.) -202.41 112 Q .522(The Elk distrib)97 135.6 R .521 -(ution contains a library based on this mechanism that enables e)-.2 F .521 -(xtensions to re)-.15 F .521(gister a)-.15 F/F1 10/Times-Italic@0 SF .488 -(termination function)72 155.6 R F0 .488(for objects of a particular type.) -2.988 F .489(The termination function associated with an object is)5.489 F .49 -(then in)72 175.6 R -.2(vo)-.4 G -.1(ke).2 G 2.99(db).1 G 2.99(yt)131.72 175.6 -S .49(he g)142.49 175.6 R .489(arbage collector automatically when this object\ - has been detected to be unused.)-.05 F(The)5.489 E .519(Xlib e)72 195.6 R .519 -(xtension of Elk uses this library to perform suitable \214nalization operatio\ -ns on objects created by the)-.15 F -.15(ex)72 215.6 S .229(tensions, for e).15 -F .229(xample, close windo)-.15 F .229 -(ws, unload fonts, and free colormap objects that ha)-.25 F .528 -.15(ve b)-.2 -H .228(ecome unrefer).15 F(-)-.2 E 2.793(enced. This)72 235.6 R .294 -(mechanism is slightly complicated by the f)2.793 F .294 -(act that objects may ha)-.1 F .594 -.15(ve t)-.2 H 2.794(ob).15 G 2.794(et) -417.294 235.6 S .294(erminated in a pre-)427.308 235.6 R .494 -(de\214ned order; for instance, when an X11 display becomes g)72 255.6 R .493 -(arbage, all objects associated with this display)-.05 F -(must be terminated before the display itself is \214nally closed.)72 275.6 Q -/F2 10/Times-Bold@0 SF 2.5(4.6. Library)72 315.6 R(Extensions)2.5 E F0 .075 -(The problems we encountered when designing and implementing Elk')97 339.2 R -2.575(si)-.55 G(nterf)387.365 339.2 Q .075(aces to the C libraries of)-.1 F -.334(X11 are lik)72 359.2 R .334(ely to apply to a wide range of similar APIs.) --.1 F .333(The X11 libraries, especially Xlib, are quite com-)5.334 F(ple)72 -379.2 Q 1.323(x; the core Xlib alone e)-.15 F 1.323 -(xports more than 600 functions and macros, with numerous dif)-.15 F 1.324 -(ferent mecha-)-.25 F .692(nisms for passing ar)72 399.2 R .692(guments and fo\ -r manipulating objects, some of which could be considered rather v)-.18 F(er) --.15 E(-)-.2 E 1.085(bose and error)72 419.2 R 3.585(-prone. This)-.2 F(comple) -3.585 E 1.085(xity is, at least partly)-.15 F 3.585(,c)-.65 G 1.085 -(aused by the semantic restricti)314.335 419.2 R -.15(ve)-.25 G 1.085 -(ness of the C).15 F .83(programming language.)72 439.2 R .829 -(Thus, when designing the Scheme language interf)5.83 F .829 -(ace, we had the opportunity to)-.1 F(eliminate some of the `)72 459.2 Q(`w) --.74 E(arts.)-.1 E -.74('')-.7 G .07(If inte)97 482.8 R .07 -(gration of a library with an e)-.15 F .07(xtension language \(or interacti) --.15 F .37 -.15(ve l)-.25 H .07(anguage in general\) is not antici-).15 F 1.812 -(pated at the time the programmer')72 502.8 R 4.311(si)-.55 G(nterf)227.851 -502.8 Q 1.811(ace of the library is designed, writing a properly functioning) --.1 F -.15(ex)72 522.8 S .671(tension language interf).15 F .671 -(ace to this library can become rather challenging or e)-.1 F -.15(ve)-.25 G -3.172(ni).15 G 3.172(mpossible. This)412.656 522.8 R(prob-)3.172 E 1.28 -(lem is e)72 542.8 R -.15(xe)-.15 G 1.28(mpli\214ed by the `).15 F(`Xt')-.74 E -3.78('t)-.74 G 1.279 -(oolkit intrinsics library of X11, in particular by earlier v)210.11 542.8 R -1.279(ersions of this)-.15 F(library)72 562.8 Q 5.231(.T)-.65 G .231(he follo) -111.851 562.8 R .231(wing e)-.25 F .231(xample illustrates a typical dif)-.15 F -.231(\214culty caused by the `)-.25 F(`static')-.74 E 2.732('n)-.74 G .232 -(ature of the program-)418.054 562.8 R(mer')72 582.8 Q 2.5(si)-.55 G(nterf)99.5 -582.8 Q(ace to `)-.1 E(`Xt')-.74 E(':)-.74 E .497 -(Each class of graphical objects \()97 606.4 R F1(widg)A(ets)-.1 E F0 .497 -(in `)2.997 F(`Xt')-.74 E 2.997('t)-.74 G .497(erminology\) e)300.468 606.4 R -.497(xports a list of attrib)-.15 F .497(utes \()-.2 F F1 -.37(re)C(sour).37 E -(ces)-.37 E F0(\))A .267(that are associated with objects of this class.)72 -626.4 R 2.767(Af)5.267 G .267(unction is pro)269.093 626.4 R .267(vided by `) --.15 F(`Xt')-.74 E 2.768('t)-.74 G 2.768(oo)389.62 626.4 S .268 -(btain the list of resources)402.388 626.4 R .601 -(of a widget class together with the name and C type \(inte)72 646.4 R(ger)-.15 -E 3.101(,s)-.4 G .601(tring, pixmap, color)328.344 646.4 R 3.101(,e)-.4 G .601 -(tc.\) of each resource.)418.627 646.4 R .991(On this basis, operations lik)72 -666.4 R 3.491(es)-.1 G .991(etting the v)199.075 666.4 R .991 -(alue of a widget')-.25 F 3.491(sr)-.55 G .991 -(esource from within Scheme can be imple-)326.421 666.4 R .522 -(mented in a straightforw)72 686.4 R .522(ard w)-.1 F(ay)-.1 E 5.522(.T)-.65 G -.522(he `)217.34 686.4 R(`Xt')-.74 E 3.022('e)-.74 G .522 -(xtension just has to check if the user)258.954 686.4 R .521 -(-supplied Scheme v)-.2 F(alue)-.25 E .269(can be con)72 706.4 R -.15(ve)-.4 G -.269(rted into a C object of the resource').15 F 2.769(st)-.55 G .27 -(ype, perform this con)276.87 706.4 R -.15(ve)-.4 G .27 -(rsion, and call the Xt-function to).15 F 1.129 -(set the resource, or complain to the user if the v)72 726.4 R 1.128 -(alue is not suitable for this resource.)-.25 F(Ho)6.128 E(we)-.25 E -.15(ve) --.25 G 1.928 -.4(r, i).15 H 3.628(ne).4 G(arly)488.45 726.4 Q EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(8-)288 56 S -.15(ve)72 92 S .698 -(rsions of Xt, some classes of widgets had a subset of resources \(the).15 F/F1 -10/Times-Italic@0 SF(constr)3.198 E .698(aint r)-.15 F(esour)-.37 E(ces)-.37 E -F0 3.199(\)w)C .699(hose names)456.921 92 R .319 -(and types could not be obtained by an `)72 112 R(`Xt')-.74 E 2.819('a)-.74 G -2.819(pplication. While)257.521 112 R .319(this omission w)2.819 F .318 -(as usually not percei)-.1 F -.15(ve)-.25 G 2.818(da).15 G(s)500.11 112 Q 3.276 -(ap)72 132 S .777(roblem for C programmers \(who w)84.716 132 R .777(ould kno) --.1 F 3.277(we)-.25 G .777(ach widget')279.494 132 R 3.277(sr)-.55 G(esources) -337.148 132 Q F1 3.277(ap)3.277 G(riori)388.132 132 Q F0 .777 -(from reading the docu-)3.277 F .592(mentation\), it had a dramatic ef)72 152 R -.592(fect on Elk')-.25 F 3.092(s`)-.55 G(`Xt')257.656 152 Q 3.092('e)-.74 G -.592(xtension, as no)284.288 152 R 3.092(wt)-.25 G .592(he kno)358.034 152 R -.591(wledge about these resources)-.25 F 1.072(had to be hard-wired into the e) -72 172 R 3.573(xtension. As)-.15 F 3.573(ar)3.573 G 1.073(esult, the e)269.523 -172 R(xtension')-.15 E 3.573(ss)-.55 G 1.073 -(ource code had to be modi\214ed for)362.592 172 R(each ne)72 192 Q 2.5(ww)-.25 -G(idget set to be made usable from within Scheme code.)118.95 192 Q .039(This \ -particular problem has been remedied in recent releases of X11, though se)97 -215.6 R -.15(ve)-.25 G .038(ral similar problems).15 F .096(remain; e)72 235.6 -R -.15(ve)-.25 G 2.596(ni).15 G 2.596(nt)129.002 235.6 S .096 -(he UNIX C library)139.378 235.6 R 5.096(.W)-.65 G .096(hile design \215a) -231.312 235.6 R .096(ws of library interf)-.15 F .096 -(aces often go unnoticed or are con-)-.1 F .297 -(sidered minor when writing C or C++ programs \(e.)72 255.6 R .297(g. the f) -1.666 F .297(act that implementations of the)-.1 F F1(qsort\(\))2.797 E F0 -(functions)2.797 E .451(are non-reentrant\), the)72 275.6 R 2.951(yb)-.15 G -.451(ecome crucial when these libraries are made accessible to an e)174.833 -275.6 R .452(xtension language.)-.15 F 2.283(As the importance of e)72 295.6 R -2.283(xtension languages is gro)-.15 F 2.282 -(wing, it is essential that future library interf)-.25 F 2.282(aces are)-.1 F -(designed with the particular requirements of e)72 315.6 Q -(xtensions languages in mind.)-.15 E/F2 10/Times-Bold@0 SF 2.5(5. Practical)72 -359.2 R(Experiences with Elk)2.5 E 2.5(5.1. Elk)72 399.2 R(and ISO)2.5 E(TEXT) --.4 E F0 .575(In de)97 422.8 R -.15(ve)-.25 G .575 -(loping the document processing system ISO).15 F(TEXT)-.4 E 3.076(,E)-.74 G -.576(lk pro)342.238 422.8 R -.15(ve)-.15 G 3.076(dt).15 G 3.076(ob)386.42 422.8 -S 3.076(eam)399.496 422.8 S .576(ajor asset [Bormann)422.308 422.8 R 2.674 -(1991]. Scheme)72 442.8 R -.1(wa)2.674 G 2.674(su).1 G .173 -(sed as the implementation language for all user interf)160.462 442.8 R .173 -(ace aspects of ISO)-.1 F(TEXT)-.4 E 5.173(.A)-.74 G(part)488.45 442.8 Q .456 -(from pro)72 462.8 R .456(viding e)-.15 F .456(xtensibility to users of ISO) --.15 F(TEXT)-.4 E 2.956(,u)-.74 G .457(sing Elk as the base for ISO)284.852 -462.8 R .457(TEXT made it possible to)-.4 F .472 -(write the shell code in a high le)72 482.8 R -.15(ve)-.25 G 2.971(ll).15 G -.471(anguage with all its amenities, e.)218.135 482.8 R .471 -(g. automatic storage reclamation.)1.666 F(As)5.471 E 1.091 -(no recompilation and relinking is necessary)72 502.8 R 3.591(,i)-.65 G 3.592 -(ti)259.816 502.8 S 3.592(saq)268.968 502.8 S 1.092 -(uick operation to apply and test changes to the user)289.482 502.8 R(interf)72 -522.8 Q(ace.)-.1 E .77(Elk pro)97 546.4 R .77(vides for a strong `)-.15 F -(`\214re)-.74 E -.1(wa)-.25 G(ll').1 E 3.27('i)-.74 G 3.27(nt)250.72 546.4 S -.77(he ISO)261.77 546.4 R .77(TEXT system: b)-.4 F .77 -(ugs in the Scheme code gi)-.2 F 1.07 -.15(ve r)-.25 H .77(ise to).15 F 1.804 -(errors at the Scheme le)72 566.4 R -.15(ve)-.25 G 1.805 -(l, which can easily be deb).15 F 1.805(ugged using the \(primiti)-.2 F -.15 -(ve)-.25 G 4.305(,b).15 G 1.805(ut functional\) b)414.48 566.4 R(uilt-in)-.2 E -(deb)72 586.4 Q .192(ugger of Elk, while conditions such as core dumps al)-.2 F --.1(wa)-.1 G .192(ys are the result of b).1 F .191(ugs in the ISO)-.2 F .191 -(TEXT k)-.4 F(ernel)-.1 E(implementation.)72 606.4 Q .139 -(All this assistance for the de)97 630 R -.15(ve)-.25 G .139(lopment of ISO).15 -F .14(TEXT could be obtained without sacri\214cing the perfor)-.4 F(-)-.2 E -(mance of the ISO)72 650 Q(TEXT k)-.4 E -(ernel system, which is still written in ef)-.1 E(\214cient C++.)-.25 E .989 -(Elk also allo)97 673.6 R .989(wed us to isolate the ISO)-.25 F .989(TEXT k)-.4 -F .989(ernel from the choice of an X toolkit: the ISO)-.1 F(TEXT)-.4 E -.1(ke) -72 693.6 S .53(rnel is una).1 F -.1(wa)-.15 G .53 -(re of the toolkit being used \(`).1 F(`Xt')-.74 E 3.031('w)-.74 G .531 -(ith OSF/Motif\).)284.062 693.6 R .531(The Scheme code b)5.531 F .531 -(uilds a user inter)-.2 F(-)-.2 E -.1(fa)72 713.6 S .442 -(ce using the Motif library interf).1 F .442(ace and pro)-.1 F .442 -(vides X windo)-.15 F .442(ws to the ISO)-.25 F .442(TEXT k)-.4 F 2.942 -(ernel. Input)-.1 F .441(is processed)2.941 F .115 -(by the Scheme code which calls editor primiti)72 733.6 R -.15(ve)-.25 G 2.615 -(sp).15 G(ro)276.94 733.6 Q .115(vided by the ISO)-.15 F .116(TEXT k)-.4 F .116 -(ernel and schedules redisplay)-.1 F EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 56 S 2.5(9-)288 56 S 2.799 -(operations. Replacing)72 92 R .299(Xt and OSF/Motif by e.)2.799 F(g.)1.666 E -/F1 10/Times-Italic@0 SF(Xvie)2.798 E(w)-.15 E F0 -.1(wo)2.798 G .298 -(uld require no changes in the ISO).1 F .298(TEXT k)-.4 F(ernel.)-.1 E .546 -(The w)97 115.6 R .546(ork on ISO)-.1 F .546 -(TEXT clearly identi\214ed one single main problem in writing non-tri)-.4 F -.547(vial e)-.25 F(xtensions:)-.15 E .169(as an)72 135.6 R 2.669(yr)-.15 G .169 -(equest for ne)103.288 135.6 R 2.668(wh)-.25 G .168(eap space can trigger a g) -169.914 135.6 R .168(arbage collection, e)-.05 F .168(xtensions must re)-.15 F -.168(gister local or tempo-)-.15 F 1.626(rary Scheme objects with the g)72 -155.6 R 1.626 -(arbage collector to protect them from being discarded during a GC run)-.05 F -.259(caused by an)72 175.6 R 2.759(yn)-.15 G .259(ested procedure call.)136.777 -175.6 R .259(While this scheme has the adv)5.259 F .258 -(antage that maximum utilization of the)-.25 F -.2(av)72 195.6 S .854 -(ailable heap space is guaranteed, it imposes a strict discipline on the e)-.05 -F .854(xtension programmer)-.15 F 5.854(.F)-.55 G .854(ailure to)470.096 195.6 -R 1.339(properly protect temporary Scheme objects usually results in delayed c\ -rashes of the application that are)72 215.6 R .015 -(hard to trace back to the actual source of the problem.)72 235.6 R -.15(Fo) -5.016 G 2.516(ri).15 G .016(nstance, when de)311.424 235.6 R -.15(ve)-.25 G -.016(loping the X11 e).15 F .016(xtensions to)-.15 F -(Elk, most of the time spent for deb)72 255.6 Q(ugging w)-.2 E -(as due to GC-related b)-.1 E(ugs.)-.2 E/F2 10/Times-Bold@0 SF 2.5(5.2. Elk)72 -295.6 R(and TELES.VISION)2.5 E F0 .753(Another e)97 319.2 R .752 -(xample for using Elk and its X interf)-.15 F .752 -(ace as the basis for a user interf)-.1 F .752(ace subsystem is the)-.1 F 1.145 -(TELES.VISION desktop video conferencing system [TELES 1991].)72 339.2 R 1.146 -(First, a some)6.146 F 1.146(what generalized User)-.25 F(Interf)72 359.2 Q -1.43(ace Management System w)-.1 F 1.43(as b)-.1 F 1.429 -(uilt in about 1500 lines of Scheme, which w)-.2 F 1.429 -(as then instantiated to)-.1 F -.2(bu)72 379.2 S .81(ild a number of re).2 F -.811(visions of the TELES.VISION user interf)-.25 F 3.311(ace. The)-.1 F .811 -(user interf)3.311 F .811(ace communicates with)-.1 F .488 -(the rest of the conferencing system via a remote procedure call C library)72 -399.2 R 2.987(,u)-.65 G .487(sing Scheme continuations as a)377.062 399.2 R -.178(basis for a simple form of multithreading.)72 419.2 R .179 -(According to the TELES.VISION implementors [Bastian 1993],)5.178 F .096(Elk w) -72 439.2 R .096(as a `)-.1 F .096(`perfect \214t')-.74 F 2.596('f)-.74 G .096 -(or this application, with the single e)170.03 439.2 R .096 -(xception that its initial g)-.15 F .095(arbage collector placed)-.05 F .723 -(too hea)72 459.2 R .723(vy a b)-.2 F .723(urden on the memory starv)-.2 F .723 -(ed initial en)-.15 F .724(vironment \(where 8 MB of memory had to be shared) --.4 F .012(between an operating system, v)72 479.2 R .012(arious realtime de) --.25 F .012(vice dri)-.25 F -.15(ve)-.25 G .012(rs, dri).15 F -.15(ve)-.25 G -.012(rs for video codec hardw).15 F .012(are, and an MS-)-.1 F -.4(Wi)72 499.2 -S(ndo).4 E .437(ws emulation subsystem\).)-.25 F .437 -(This has since been remedied by adding memory)5.437 F 5.437(.U)-.65 G .438 -(sing Elk also helped)421.857 499.2 R .775(when TELES.VISION w)72 519.2 R .775 -(as ported to OS/2 \212 in particular)-.1 F 3.275(,i)-.4 G .774 -(ts continuations ported easily)319.835 519.2 R 5.774(.A)-.65 G .774 -(lso, Elk w)453.942 519.2 R(as)-.1 E .708 -(used in the TELES.VISION project to b)72 539.2 R .708 -(uild a rapid prototype of the central conference management sub-)-.2 F -(system \(ag)72 559.2 Q(ain using continuations to pro)-.05 E -(vide multithreading\) within less than tw)-.15 E 2.5(ow)-.1 G(eeks.)408.08 -559.2 Q F2 2.5(5.3. Other)72 599.2 R(Pr)2.5 E(ojects)-.18 E F0 .625 -(While Elk has been used in the ISO)97 622.8 R .625 -(TEXT project since 1987, le)-.4 F -.05(ga)-.15 G 3.125(li).05 G .625 -(ssues pre)377.47 622.8 R -.15(ve)-.25 G .625(nted making it pub-).15 F 1.472 -(licly a)72 642.8 R -.25(va)-.2 G 1.472(ilable until the f).25 F 1.472 -(all of 1989.)-.1 F 1.473(Since, Elk has g)6.472 F 1.473 -(ained acceptance, in f)-.05 F 1.473(act suf)-.1 F 1.473(\214cient momentum to) --.25 F 1.337(encourage others to contrib)72 662.8 R 1.337(ute softw)-.2 F 3.837 -(are. Elk)-.1 F 1.337(has been used successfully as an e)3.837 F 1.336 -(xtension language for a)-.15 F -.05(hy)72 682.8 S(perte).05 E .677 -(xt database, a distrib)-.15 F .677(uted v)-.2 F .677 -(ersion management system, v)-.15 F .678 -(arious CAD programs, testing and simula-)-.25 F .228 -(tion systems for digital circuits as well as en)72 702.8 R .228 -(vironmental models.)-.4 F .228(It also has found use simply as a Scheme)5.228 -F(programming en)72 722.8 Q -(vironment, in particular for its X and Motif interf)-.4 E(ace.)-.1 E EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(0-)288 56 S 1.634(The X e)97 92 -R 1.634(xtensions ha)-.15 F 1.934 -.15(ve p)-.2 H(ro).15 E -.15(ve)-.15 G 4.134 -(nu).15 G 1.634 -(seful in particular for writers of applications with graphical user)233.51 92 -R(interf)72 112 Q .336 -(aces based on X; Elk enables them to write their user interf)-.1 F .335 -(aces or parts thereof in Scheme to achie)-.1 F -.15(ve)-.25 G 2.5(ah)72 132 S -(igh de)83.94 132 Q(gree of customizability)-.15 E(.)-.65 E .276 -(Elk also has found use as a free-standing Scheme implementation.)97 155.6 R -.277(In combination with the X e)5.277 F(xten-)-.15 E .336 -(sions it is well-suited for teaching X to be)72 175.6 R .335 -(ginners, as a tool for interacti)-.15 F -.15(ve)-.25 G .335(ly e).15 F .335 -(xploring X, and as a platform)-.15 F -(for rapid prototyping of X-based applications.)72 195.6 Q .839 -(Outside of the UNIX w)97 219.2 R .839(orld, we are a)-.1 F -.1(wa)-.15 G .839 -(re of user).1 F .84(-done ports to DOS \(both 16 bit and 32 bit using)-.2 F -(DJGPP\), OS/2, and MacOS.)72 239.2 Q .229(Users cited the follo)97 262.8 R -.229(wing features as signi\214cant for their choice of Elk: dynamic object co\ -de loading,)-.25 F .586(dumping of ready-to-run e)72 282.8 R -.15(xe)-.15 G -.586(cutables, Elk').15 F 3.086(sp)-.55 G .586(erformance, its le)255.71 282.8 -R -.05(ga)-.15 G .587(lly unencumbered a).05 F -.25(va)-.2 G(ilability).25 E -3.087(,a)-.65 G .587(nd \214nally)465.353 282.8 R -(its simplicity and adaptability \(and, as users say)72 302.8 Q 2.5(,i)-.65 G -(ts consistent, clean and well-structured code\).)270.23 302.8 Q .516 -(Users are not happ)97 326.4 R 3.016(yw)-.1 G .516(ith v)188.384 326.4 R .516(\ -arious arti\214cial limitations still in the system \(such as the static heap \ -size)-.25 F 1.211(which with the stop-and-cop)72 346.4 R 3.711(yg)-.1 G 1.211 -(arbage collector needs to be \214x)203.344 346.4 R 1.211(ed at in)-.15 F -.2 -(vo)-.4 G 1.212(cation time\), with Elk').2 F 3.712(sp)-.55 G(erfor)481.44 -346.4 Q(-)-.2 E .964(mance, and with the f)72 366.4 R .964(act that Elk `)-.1 F -(`lik)-.74 E .964(es to be in control')-.1 F 3.464('\()-.74 G .964 -(i.e., supplies the main program\).)317.678 366.4 R .963(In addition,)5.963 F -(prospecti)72 386.4 Q .628 -.15(ve u)-.25 H .328 -(sers tend to ponder acceptance problems with their fello).15 F 2.829(ww)-.25 G -(ork)368.914 386.4 Q .329(ers and customers \(who might)-.1 F .395 -(not be well v)72 406.4 R .395 -(ersed in Lisp/Scheme\) before committing to Elk.)-.15 F(Finally)5.395 E 2.894 -(,f)-.65 G .394(or man)364.414 406.4 R 2.894(ye)-.15 G .394 -(xtension language appli-)404.892 406.4 R .62(cations, Elk is `)72 426.4 R .62 -(`too big')-.74 F .62(', and users ha)-.74 F .92 -.15(ve a)-.2 H(sk).15 E .62 -(ed for v)-.1 F .62(ersions without the more e)-.15 F(xpensi)-.15 E .92 -.15 -(ve E)-.25 H .62(lk features such).15 F .628 -(as arbitrary size number support or continuations.)72 446.4 R .627 -(On the other hand, users ha)5.628 F .927 -.15(ve a)-.2 H(sk).15 E .627 -(ed for additional fea-)-.1 F .382(tures such as an inter)72 466.4 R .382 -(-process communication interf)-.2 F .382(ace, or a better deb)-.1 F(ugger)-.2 -E 5.382(.A)-.55 G .382(lso, a port to MS-W)394.512 466.4 R(indo)-.4 E(ws)-.25 E -(has been acti)72 486.4 Q -.15(ve)-.25 G(ly sought.).15 E/F1 10/Times-Bold@0 SF -2.5(6. Conclusions)72 526.4 R F0 .286(Since the Elk project be)97 550 R -.05 -(ga)-.15 G .286 -(n, both the research community and signi\214cant industry projects ha).05 F -.585 -.15(ve g)-.2 H(en-).15 E 2.594(erated increasing numbers of `)72 570 R -2.594(`embeddable language')-.74 F 5.094('i)-.74 G 5.094(mplementations. While) -309.904 570 R(man)5.094 E 5.094(ys)-.15 G 2.594(uch languages)444.476 570 R -.367(inherit the syntactic \215a)72 590 R -.2(vo)-.2 G 2.867(ro).2 G 2.867(fB) -185.278 590 S .367(ASIC, those projects that focus on the ability to b)197.795 -590 R .366(uild non-tri)-.2 F .366(vial e)-.25 F(xtensions)-.15 E -(recently seem to almost e)72 610 Q(xclusi)-.15 E -.15(ve)-.25 G -(ly turn to the Scheme language.).15 E .315(Scheme has pro)97 633.6 R -.15(ve) --.15 G 2.815(nt).15 G 2.815(ob)180.685 633.6 S 2.815(ea)193.5 633.6 S 2.815(ne) -205.195 633.6 S -.25(ff)217.45 633.6 S(ecti).25 E .615 -.15(ve l)-.25 H .315 -(anguage for e).15 F .315(xtension language purposes.)-.15 F .316(In the be) -5.316 F .316(ginning of)-.15 F .802(the ISO)72 653.6 R .802(TEXT project, ther\ -e were concerns that an implementation of the full Scheme language w)-.4 F .802 -(ould be)-.1 F .296(both too lar)72 673.6 R .296(ge and too slo)-.18 F 4.096 --.65(w. T)-.25 H .296(hese reserv).65 F .296(ations pro)-.25 F -.15(ve)-.15 G -2.796(dt).15 G 2.796(ob)299.944 673.6 S 2.796(eu)312.74 673.6 S .297 -(nfounded: the binary code size of Elk is still)324.976 673.6 R 1.199 -(signi\214cantly belo)72 693.6 R 3.699(wt)-.25 G 1.198 -(hat of a medium size application such as)155.818 693.6 R/F2 10/Times-Italic@0 -SF(vi)3.698 E F0 6.198(.W)C 1.198(hile the performance of Elk may be)355.182 -693.6 R .085(uninspiring \(no compiler is a)72 713.6 R -.25(va)-.2 G .086 -(ilable\), this turned out not to be a critical issue, as an).25 F 2.586(yb) --.15 G .086(ottlenecks can easily)421.068 713.6 R(be replaced by a primiti)72 -733.6 Q .3 -.15(ve r)-.25 H(ecoded in C or C++.).15 E EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(1-)288 56 S .789 -(There also were concerns that Scheme w)97 92 R .789 -(as going to be hard to learn for UNIX users f)-.1 F .788(amiliar with,)-.1 F -(say)72 112 Q 2.871(,t)-.65 G .371(he Bourne Shell and C.)92.831 112 R .372 -(This seems to be more of a problem with initial acceptance than with a steep) -5.371 F .366(learning curv)72 132 R .366(e: after ha)-.15 F .366(ving o)-.2 F --.15(ve)-.15 G .366 -(rcome the initial barrier \(which generally had to do mainly with percei).15 F -(ving)-.25 E .918 -(the syntax as queer\), users reported the same rapid increase in producti)72 -152 R .918(vity the)-.25 F 3.418(ya)-.15 G .918(lready kne)409.014 152 R 3.419 -(wf)-.25 G .919(rom shell)465.581 152 R 2.64(programming. It)72 172 R .14 -(certainly has not been necessary to recruit Lisp programmers to be able to e) -2.64 F .14(xtend applica-)-.15 F(tions with Elk.)72 192 Q(Finally)97 215.6 Q -3.232(,E)-.65 G .732(lk w)136.532 215.6 R .732(as an e)-.1 F -.15(xe)-.15 G -.732(rcise in writing portable softw).15 F .732 -(are without being restricted to what is consid-)-.1 F .091 -(ered portable today)72 235.6 R 5.091(.A)-.65 G .091(part from the well-kno) -163.543 235.6 R .091(wn problem that true portability between current rele)-.25 -F -.25(va)-.25 G .09(nt plat-).25 F .065 -(forms cannot be attained by just picking one of the proclaimed `)72 255.6 R -(`standards')-.74 E .065(', and the unwieldy situation that)-.74 F .32 -(there are too man)72 275.6 R 2.82(ys)-.15 G .32 -(tandards for \(auto-\)con\214guration of softw)154.22 275.6 R .319 -(are, a signi\214cant part of the ef)-.1 F .319(fort in generat-)-.25 F 1.881 -(ing Elk w)72 295.6 R 1.881(as consumed by de)-.1 F 1.881 -(vising support for each ne)-.25 F 4.381(wp)-.25 G 1.882 -(latform for dynamic loading, generation of)323.51 295.6 R -.15(exe)72 315.6 S -1.054(cutables from running programs, and switching between threads of control\ - \(continuations\).).15 F 1.054(Note that)6.054 F(man)72 335.6 Q 2.848(yn)-.15 -G(on-tri)101.918 335.6 Q .348 -(vial applications of today \(apart from Lisp programming en)-.25 F .349 -(vironments, GNU emacs and T)-.4 F(E)2 I(X)-2 I 1.039 -(come to mind\) need one or more of these features; also note that most rele)72 -355.6 R -.25(va)-.25 G 1.039(nt current platforms can be).25 F -(made to support these features quite well \212 just in wildly dif)72 375.6 Q -(ferent w)-.25 E(ays.)-.1 E/F1 10/Times-Bold@0 SF 2.5(7. A)72 415.6 R -.1(va)-1 -G(ilability).1 E F0 1.341(Elk is a)97 439.2 R -.25(va)-.2 G 1.342(ilable in le) -.25 F -.05(ga)-.15 G 1.342(lly unencumbered status.).05 F 1.342(The current v) -6.342 F 1.342(ersion as of June 1994 is 2.2.)-.15 F(The)6.342 E 1.245 -(most recent v)72 459.2 R 1.245(ersion of Elk is a)-.15 F -.25(va)-.2 G 1.245 -(ilable via anon).25 F 1.245(ymous FTP from ftp.x.or)-.15 F 3.745(g\()-.18 G -1.245(/contrib\) and ftp.fu-berlin.de)387.09 459.2 R -(\(/pub/unix/languages/scheme\).)72 479.2 Q F1 2.5(8. Ackno)72 519.2 R -(wledgments)-.1 E F0 .2(An early v)97 542.8 R .2(ersion of Elk w)-.15 F .2 -(as written while one of us w)-.1 F .2(as emplo)-.1 F .2 -(yed at TELES GmbH, Berlin.)-.1 F 1.8 -.8(We a)5.2 H(re).8 E 1.107 -(grateful to Prof. Dr)72 562.8 R 3.607(.S)-.55 G 1.106 -(igram Schindler of TELES and TU Berlin for pro)163.088 562.8 R 1.106 -(viding the w)-.15 F 1.106(ork en)-.1 F 1.106(vironment for)-.4 F(ISO)72 582.8 -Q(TEXT and Elk and for the permission to publish this softw)-.4 E(are.)-.1 E -.231(The present v)97 606.4 R .232(ersion is a result of our research w)-.15 F -.232(ork at T)-.1 F .232(echnische Uni)-.7 F -.15(ve)-.25 G .232 -(rsit\344t Berlin, with the bene\214t).15 F .925(of the w)72 626.4 R .925 -(ork of man)-.1 F 3.425(yc)-.15 G(ontrib)164.965 626.4 Q 3.425(utors. In)-.2 F -(particular)3.425 E 3.425(,w)-.4 G 3.425(ew)279.9 626.4 S .924 -(ish to thank Marco Scheibe who wrote the genera-)294.985 626.4 R -(tional, incremental g)72 646.4 Q(arbage collector)-.05 E(.)-.55 E EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(2-)288 56 S/F1 10/Times-Bold@0 -SF 2.5(9. Refer)72 92 R(ences)-.18 E F0([Abelson et al. 1985])72 115.6 Q 1.344 -(Harold Abelson and Gerald J. Sussman with Julie Sussman,)97 135.6 R/F2 10 -/Times-Italic@0 SF(Structur)3.845 E 3.845(ea)-.37 G 1.345(nd Interpr)396.725 -135.6 R 1.345(etation of Com-)-.37 F(puter Pr)97 155.6 Q -.1(og)-.45 G -.15(ra) -.1 G(ms).15 E F0 2.5(,M)C(IT Press, Cambridge, Mass., 1985.)173.8 155.6 Q -([Bastian 1993])72 179.2 Q(Personal communication with Jan Bastian, TELES.)97 -199.2 Q([Bormann et al. 1988])72 222.8 Q .915 -(Ute Bormann, Carsten Bormann, C. Bathe, SDE \212 A WYSIWYG Editing and F)97 -242.8 R .914(ormatting System)-.15 F .813(for OD)97 262.8 R 3.313(Aa)-.4 G .814 -(nd SGML Documents, ESPRIT '88,)140.986 262.8 R F2(Pr)3.314 E .814 -(oceedings of the 5th Annual ESPRIT Confer)-.45 F(ence)-.37 E(,)-.1 E(Brussels) -97 282.8 Q F0 2.5(,N)C -.15(ove)143.11 282.8 S(mber 14-17, 1988.).15 E -([Bormann 1991])72 306.4 Q .021 -(Carsten Bormann, Open Document Processing and the ISO)97 326.4 R .021 -(TEXT System, Doctoral Dissertation, TU-)-.4 F(Berlin, 1991.)97 346.4 Q -([CFI 1991a])72 370 Q 2.583(CAD Frame)97 390 R -.1(wo)-.25 G 2.583(rk Initiati) -.1 F -.15(ve)-.25 G 5.083(,C).15 G 2.583(FI Extension Language Sub-Committee,) -223.989 390 R F2 2.584(CFI Extension Langua)5.084 F -.1(ge)-.1 G 1.974 -(Selection Document)97 410 R F0 4.474(,C)C 1.974 -(FI Document Number 87, CAD Frame)192.878 410 R -.1(wo)-.25 G 1.973 -(rk Initiati).1 F 2.273 -.15(ve I)-.25 H 1.973(nc., Austin, T).15 F -.15(ex)-.7 -G(as,).15 E(1991.)97 430 Q([CFI 1991b])72 453.6 Q 3.257(CAD Frame)97 473.6 R --.1(wo)-.25 G 3.257(rk Initiati).1 F -.15(ve)-.25 G 5.758(,E).15 G 3.258 -(xtension Language W)225.452 473.6 R 3.258(orking Group: Architecture T)-.8 F -3.258(echnical Sub-)-.7 F(Committee,)97 493.6 Q F2 .836(Extension Langua)3.336 -F -.1(ge)-.1 G 3.336(:C).1 G(or)243.198 493.6 Q 3.336(eL)-.37 G(angua)265.054 -493.6 Q 1.036 -.1(ge S)-.1 H(election).1 E F0 3.335(,D)C .835(raft Proposal V) -352.345 493.6 R .835(ersion 0.7, CFI Docu-)-1.11 F -(ment Number ARCH-91-G-1, CAD Frame)97 513.6 Q -.1(wo)-.25 G(rk Initiati).1 E -.3 -.15(ve I)-.25 H(nc., Austin, T).15 E -.15(ex)-.7 G(as, 1991.).15 E -([Clinger et al. 1991])72 537.2 Q -.4(Wi)97 557.2 S .023 -(lliam Clinger and Jonathan Rees \(Editors\),).4 F F2(Re)2.523 E(vised)-.15 E -/F3 9/Times-Italic@0 SF(4)314.448 552.2 Q F2 .024 -(Report on the Algorithmic Langua)321.471 557.2 R .224 -.1(ge S)-.1 H -.15(ch) -.1 G(eme).15 E F0(,)A(No)97 577.2 Q -.15(ve)-.15 G(mber 2, 1991.).15 E -1.27 --.74(Av a)5 H -(ilable as ftp://cs.indiana.edu/pub/scheme-repository/doc/r4rs.ps.Z.).74 E -([CLX 1991])72 600.8 Q .167(CLX \212 Common LISP X Interf)97 620.8 R .167 -(ace, 1991.)-.1 F(\(P)5.167 E .167(art of the X11 Release 5 distrib)-.15 F .167 -(ution a)-.2 F -.25(va)-.2 G .166(ilable from the).25 F(MIT softw)97 640.8 Q -(are distrib)-.1 E(ution center)-.2 E(.\))-.55 E([Co)72 664.4 Q(wlisha)-.25 E -2.5(w1)-.15 G(985])127.43 664.4 Q 1.813(M. F)97 684.4 R 4.313(.C)-.8 G -.25(ow) -130.946 684.4 S(lisha).25 E -.65(w,)-.15 G F2 1.813(The REXX Langua)4.963 F -2.013 -.1(ge \212 A P)-.1 H -.15(ra).1 G 1.813(ctical Appr).15 F(oac)-.45 E -4.313(ht)-.15 G 4.313(oP)378.16 684.4 S -1.7 -.45(ro g)393.583 684.4 T -.15(ra) -.45 G(mming).15 E F0 1.814(Prentice Hall,)4.313 F(Engle)97 704.4 Q -.1(wo)-.25 -G(od Clif).1 E(fs, NJ, 1985.)-.25 E EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(3-)288 56 S([Dyb)72 92 Q -(vig 1987])-.15 E(R. K)97 112 Q(ent Dyb)-.25 E(vig,)-.15 E/F1 10/Times-Italic@0 -SF(The Sc)2.5 E(heme Pr)-.15 E -.1(og)-.45 G -.15(ra).1 G(mming Langua).15 E --.1(ge)-.1 G F0 2.5(,P).1 G(rentice Hall, Engle)323.87 112 Q -.1(wo)-.25 G -(od Clif).1 E(fs, NJ, 1987.)-.25 E([Hansen 1990])72 135.6 Q -.4(Wi)97 155.6 S -.583(lfred J. Hansen, Enhancing documents with embedded programs: Ho).4 F 3.083 -(wN)-.25 G .583(ess e)406.268 155.6 R .583(xtends insets in the)-.15 F(Andre)97 -175.6 Q 3.916(wT)-.25 G(oolKit,)138.186 175.6 Q F1(Pr)3.916 E 1.416 -(oceedings of IEEE Computer Society 1990 International Confer)-.45 F 1.417 -(ence on Com-)-.37 F(puter Langua)97 195.6 Q -.1(ge)-.1 G(s).1 E F0 2.5(,M)C -(arch 12-15, 1990, Ne)178.19 195.6 Q 2.5(wO)-.25 G(rleans.)279.58 195.6 Q -.834 -([IEEE Std 1178-1990])72 219.2 R F1 .097(IEEE Standar)97 239.2 R 2.597(df)-.37 -G .096(or the Sc)162.934 239.2 R .096(heme Pr)-.15 F -.1(og)-.45 G -.15(ra).1 G -.096(mming Langua).15 F -.1(ge)-.1 G F0 2.596(,N).1 G .596 -.25(ew Y)332.344 -239.2 T .096(ork, May 28, 1991 \(appro)-.85 F -.15(ve)-.15 G 2.596(dD).15 G -(ecem-)479.57 239.2 Q(ber 10, 1990\).)97 259.2 Q([Jo)72 282.8 Q 2.5(y1)-.1 G -(980])96.62 282.8 Q 2.69(Bill Jo)97 302.8 R 3.99 -.65(y, C)-.1 H 2.69 -(hanges in the V).65 F 2.69(AX system in the F)-1.35 F 2.69(ourth Berk)-.15 F -(ele)-.1 E 5.19(yD)-.15 G(istrib)376.86 302.8 Q 2.69(ution, Computer Systems) --.2 F(Research Group, Uni)97 322.8 Q -.15(ve)-.25 G(rsity of California, Berk) -.15 E(ele)-.1 E 1.3 -.65(y, N)-.15 H -.15(ove).65 G(mber 1980.).15 E([Le)72 -346.4 Q(wis et al. 1990])-.25 E 1.184(Bil Le)97 366.4 R 1.183(wis, Dan LaLiber\ -te, the GNU Manual Group, GNU Emacs Lisp Reference Manual, Edition)-.25 F -(1.03, Free Softw)97 386.4 Q(are F)-.1 E -(oundation, Cambridge, Mass., December 1990.)-.15 E([MIT 1984])72 410 Q .173 -(MIT Scheme Manual, Se)97 430 R -.15(ve)-.25 G .174 -(nth Edition, Department of Electrical Engineering and Computer Science,).15 F -(Massachusetts Institute of T)97 450 Q(echnology)-.7 E 2.5(,C)-.65 G -(ambridge, Mass., September 1984.)261.47 450 Q([Ossanna 1979])72 473.6 Q .224 -(J. F)97 493.6 R 2.724(.O)-.8 G .224(ssanna, Nrof)123.318 493.6 R(f/T)-.25 E -(rof)-.35 E 2.724(fU)-.25 G(ser')210.386 493.6 Q 2.724(sM)-.55 G .224 -(anual, UNIX Programmer')240.33 493.6 R 2.724(sM)-.55 G .224(anual, Se)363.202 -493.6 R -.15(ve)-.25 G .224(nth Edition, v).15 F .223(ol. 2, Bell)-.2 F -.7(Te) -97 513.6 S(lephone Laboratories, Murray Hill, NJ, January 1979.).7 E -([Ousterhout 1990])72 537.2 Q 1.296 -(John K. Ousterhout, Tcl: An Embeddable Command Language,)97 557.2 R F1(Pr) -3.796 E 1.296(oceedings of the USENIX 1990)-.45 F -.55(Wi)97 577.2 S -(nter Confer).55 E(ence)-.37 E F0 2.5(,J)C(anuary 1990, pp. 133-146.)180.79 -577.2 Q([Schei\215er et al. 1986])72 600.8 Q .348(Robert W)97 620.8 R 2.848(.S) --.92 G .348(chei\215er and Jim Gettys, The X W)146.496 620.8 R(indo)-.4 E 2.847 -(wS)-.25 G(ystem,)316.038 620.8 Q F1 -.3(AC)2.847 G 2.847(MT).3 G -.15(ra) -373.942 620.8 S .347(nsactions on Gr).15 F(aphics)-.15 E F0 2.847(,v)C .347 -(ol. 5,)483.373 620.8 R(no. 2, pp. 79-109, 1986.)97 640.8 Q -([Schei\215er et al. 1992])72 664.4 Q(Robert Schei\215er and James Gettys,)97 -684.4 Q F1 2.5(XW)2.5 G(indow System)256.15 684.4 Q F0 2.5(,T)C -(hird Edition, Digital Press, 1992.)321.98 684.4 Q([Springer et al. 1989])72 -708 Q(Geor)97 728 Q 3.164(ge Springer and Daniel O. Friedman,)-.18 F F1(Sc) -5.665 E 3.165(heme and the Art of Pr)-.15 F -.1(og)-.45 G -.15(ra).1 G(mming) -.15 E F0 5.665(,M)C 3.165(IT Press,)465.285 728 R EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(4-)288 56 S -(Cambridge, Mass., 1989.)97 92 Q([Stallman 1981])72 115.6 Q 1.13 -(Richard M. Stallman, EMA)97 135.6 R 1.13 -(CS \212 The Extensible, Customizable, Self-documenting Display Editor)-.4 F -2.405(Production System,)97 155.6 R/F1 10/Times-Italic@0 SF 2.405 -(SIGPLAN Notices)4.905 F F0 4.905(,v)C 2.405 -(ol. 16, no. 6, pp. 147-156, Association for Computing)269.76 155.6 R -(Machinery)97 175.6 Q 2.5(,N)-.65 G .5 -.25(ew Y)151.89 175.6 T(ork, 1981.)-.85 -E([TELES 1991])72 199.2 Q .429(Das TELES.VISION System \212 Philosophie und T) -97 219.2 R .429(echnologie, TELES GmbH, Berlin, 1991 \(in Ger)-.7 F(-)-.2 E -(man\).)97 239.2 Q([Y)72 262.8 Q(ip 1991])-.55 E .546(G. May Y)97 282.8 R .546 -(ip, Incremental, Generational Mostly-Cop)-.55 F .546 -(ying Garbage Collection in Uncooperati)-.1 F .846 -.15(ve E)-.25 H -.4(nv).15 -G(i-).4 E 1.546(ronments, WRL Research Report 91/8, DEC W)97 302.8 R 1.545 -(estern Research Laboratory)-.8 F 4.045(,P)-.65 G 1.545(alo Alto, California,) -420.36 302.8 R(1991.)97 322.8 Q EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(5-)288 56 S/F1 10/Times-Bold@0 -SF -.25(Ap)72 92 S(pendix A:).25 E(Extending Elk \212 An Example)5 E 2.5 -(A.1. The)72 132 R -.63(``)2.5 G(ndbm').63 E 2.5('L)-.63 G(ibrary Extension) -159.63 132 Q F0 .535(The e)97 155.6 R .536 -(xtensibility mechanisms of Elk can be demonstrated best by e)-.15 F .536 -(xamining a simple library e)-.15 F(xten-)-.15 E 2.665(sion. Consider)72 175.6 -R(the)2.665 E/F2 10/Times-Italic@0 SF(ndbm)2.665 E F0 .165(library that is a) -2.665 F -.25(va)-.2 G .165(ilable on most v).25 F .165(ersions of UNIX.)-.15 F -.165(This library implements func-)5.165 F -(tions to maintain a simple database \214le of k)72 195.6 Q -.15(ey)-.1 G -(/contents pairs.).15 E 1.002(As sho)97 219.2 R 1.002 -(wn in Listing 4, both the k)-.25 F -.15(ey)-.1 G 3.502(sa).15 G 1.002 -(nd the data to be stored are described by the type)258.126 219.2 R F2(datum) -3.502 E F0 3.502(;i)C(t)501.22 219.2 Q 1.089 -(consists of the data \(a string of bytes\) and the length of the data.)72 -239.2 R F2(dbm_open\(\))6.089 E F0 1.089(opens a database \214le and)3.589 F -1.001(returns a handle to that \214le to be used in subsequent operations on t\ -hat database \(a pointer to an opaque)72 259.2 R 1.683 -(data type, similar to the)72 279.2 R F2(fopen)4.182 E F0(and)4.182 E F2 -.37 -(re)4.182 G(addir).37 E F0(interf)4.182 E 1.682 -(aces\); it returns a null pointer if the \214le could not be)-.1 F 3.244 -(opened. A)72 299.2 R .744(database is closed by a call to)3.244 F F2 -(dbm_close\(\))3.244 E F0 5.744(.T)C .744(he data stored under a gi)309.39 -299.2 R -.15(ve)-.25 G 3.245(nk).15 G 1.045 -.15(ey i)433.325 299.2 T 3.245(sa) -.15 G .745(ccessed by)460.215 299.2 R .192(the function)72 319.2 R F2(dbm_fetc) -2.692 E(h\(\))-.15 E F0 2.692(;i)C 2.692(tr)179.356 319.2 S .192 -(eturns an object of type)188.158 319.2 R F2(datum)2.692 E F0 .192 -(\(with a null)2.692 F F2(dptr)2.692 E F0 .192(if the k)2.692 F .492 -.15(ey c) --.1 H .192(ould not be found\).).15 F F2(dbm_stor)72 339.2 Q(e)-.37 E F0 .406 -(is used to insert an entry into a database and to modify an e)2.906 F .407 -(xisting entry; it returns zero on suc-)-.15 F(cess and a non-zero v)72 359.2 Q -(alue on error)-.25 E(.)-.55 E(_______________________________________________\ -_______________________________________)74 392.8 Q/F3 8/Courier@0 SF -(#include )100.346 414.303 Q(typedef struct {)100.346 440.823 Q -(char *dptr;)119.546 453.823 Q(int dsize;)119.546 466.823 Q 4.8(}d)100.346 -479.823 S(atum;)114.746 479.823 Q -(DBM *dbm_open\(char *file, int flags, int mode\);)100.346 506.343 Q -(void dbm_close\(DBM *db\);)100.346 526.103 Q -(datum dbm_fetch\(DBM *db, datum key\);)100.346 545.863 Q -(int dbm_store\(DBM *db, datum key, datum data, int flags\);)100.346 565.623 Q -/F4 9/Times-Bold@0 SF(Listing 4:)223.758 599.623 Q/F5 9/Times-Roman@0 SF -(The UNIX)4.5 E/F6 9/Times-Italic@0 SF(ndbm)2.25 E F5(library)2.25 E/F7 8 -/Times-Italic@0 SF(Note:)100.346 637.623 Q/F8 8/Times-Roman@0 SF -.12(Fo)2.623 -G 2.623(rs).12 G(implicity)137.472 637.623 Q 2.623(,s)-.52 G -1.72 -.2(ev e) -173.583 637.623 T .623(ral functions ha).2 F .864 -.12(ve b)-.16 H .624 -(een omitted.).12 F(The)4.624 E F7<8d61>2.624 E(gs)-.08 E F8(and)2.624 E F7 -(mode)2.624 E F8(ar)2.624 E .624(guments of)-.144 F F7(dbm_open)2.624 E F8 .624 -(are that of)2.624 F(the)100.346 655.623 Q F7(open)2.065 E F8 .065 -(system call.)2.065 F(The)4.065 E F7<8d61>2.065 E(gs)-.08 E F8(ar)2.065 E .065 -(gument of)-.144 F F7(dbm_stor)2.065 E(e)-.296 E F8 .065(can be DBM_INSER)2.065 -F 2.065(Tt)-.48 G 2.064(oi)356.542 655.623 S .064(nsert a ne)364.83 655.623 R -2.064(we)-.2 G .064(ntry into the database)406.806 655.623 R(or DBM_REPLA) -100.346 673.623 Q(CE to change an e)-.32 E(xisting entry)-.12 E(.)-.52 E F0(__\ -______________________________________________________________________________\ -______)74 691.223 Q EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(6-)288 56 S 1.163 -(The straightforw)97 92 R 1.163(ard w)-.1 F 1.163(ay to write an)-.1 F/F1 10 -/Times-Italic@0 SF(ndbm)3.663 E F0 -.15(ex)3.662 G 1.162 -(tension to Elk is to pro).15 F 1.162(vide a ne)-.15 F 3.662(wS)-.25 G 1.162 -(cheme data type)436.696 92 R F1(dbm-\214le)72 112 Q F0 .942 -(together with the oblig)3.442 F .942(atory type predicate)-.05 F F1 -(dbm-\214le?)3.442 E F0 .943(and the Scheme primiti)3.442 F 1.243 -.15(ve p) --.25 H(rocedures).15 E F1(dbm-)3.443 E(open)72 132 Q F0(,)A F1(dbm-close)2.5 E -F0(,)A F1(dbm-fetc)2.5 E(h)-.15 E F0(and)2.5 E F1(dbm-stor)2.5 E(e)-.37 E F0 -(that operate on objects of type)2.5 E F1(dbm-\214le)2.5 E F0(.)A F1(dbm-open) -97 155.6 Q F0(recei)3.534 E -.15(ve)-.25 G 3.534(st).15 G 1.033 -(he \214lename \(a string or a symbol\); the second ar)179.198 155.6 R 1.033 -(gument is one of the symbols)-.18 F F1 -.37(re)72 175.6 S(ader).37 E F0 .996 -(\(open the \214le read-only\),)3.496 F F1(writer)3.496 E F0 .996 -(\(read and write access\), and)3.496 F F1(cr)3.496 E(eate)-.37 E F0 .997 -(\(read and write access, create)3.496 F(ne)72 195.6 Q 2.994<778c>-.25 G .494 -(le if it does not e)96.964 195.6 R 2.994(xist\). The)-.15 F .494 -(optional \214lemode ar)2.994 F .494(gument is an inte)-.18 F(ger)-.15 E(.)-.55 -E F1(dbm-open)5.494 E F0 .493(returns an object of)2.994 F(type)72 215.6 Q F1 -(dbm-\214le)2.59 E F0 .09(or #f \(f)2.59 F .09 -(alse\) if the \214le could not be opened.)-.1 F F1(dbm-close)5.091 E F0 .091 -(closes the database \214le associated with)2.591 F 1.248(its ar)72 235.6 R -1.248(gument of type)-.18 F F1(dbm-\214le)3.748 E F0 6.248(.A)C 3.748(st)208.32 -235.6 S 1.248(his function is called for its side-ef)218.738 235.6 R 1.248 -(fect only)-.25 F 3.748(,a)-.65 G 1.248(nd for lack of a better)411.402 235.6 R -(result, it returns a non-printing object.)72 255.6 Q F1(dbm-fetc)97 279.2 Q(h) --.15 E F0 -.15(ex)2.977 G .477(pects a).15 F F1(dbm-\214le)2.977 E F0 .477 -(and a string ar)2.977 F .477(gument \(the k)-.18 F .777 -.15(ey t)-.1 H 2.977 -(ob).15 G 2.977(es)358.407 279.2 S .477(earched\) and returns a string \(the) -369.714 279.2 R 1.025(data stored under the k)72 299.2 R -.15(ey)-.1 G 3.525 -(\)o).15 G 3.525(r#)188.235 299.2 S 3.525(fi)200.09 299.2 S 3.525(ft)209.725 -299.2 S 1.025(he k)219.36 299.2 R 1.325 -.15(ey d)-.1 H 1.024(oes not e).15 F -3.524(xist. Note)-.15 F 1.024(that in Elk strings may contain arbitrary)3.524 F -.213(8-bit characters, including the null byte.)72 319.2 R F1(dbm-stor)5.213 E -(e)-.37 E F0 .213(is called with a)2.713 F F1(dbm-\214le)2.713 E F0 2.713(,t)C -.413 -.1(wo s)385.255 319.2 T .213(trings \(k).1 F .513 -.15(ey a)-.1 H .213 -(nd data\) and).15 F(one of the symbols)72 339.2 Q F1(insert)2.5 E F0(and)2.5 E -F1 -.37(re)2.5 G(place).37 E F0 5(.I)C(ts inte)233 339.2 Q(ger return v)-.15 E -(alue is the return v)-.25 E(alue of)-.25 E F1(dbm_stor)2.5 E(e\(\))-.37 E F0 -(.)A .683(These procedures and the ne)97 362.8 R(w)-.25 E F1(dbm-\214le)3.183 E -F0 .683(type can be used by application programmers to manipulate)3.183 F .198 -(database \214les in those parts of their applications that are written in Sch\ -eme.)72 382.8 R .198(Listing 5 sho)5.198 F .198(ws a small e)-.25 F(xam-)-.15 E -(ple.)72 402.8 Q(_____________________________________________________________\ -_________________________)74 436.4 Q/F2 8/Courier@0 SF -(\(define expand-mail-alias)100.346 457.903 Q(\(lambda \(alias\))109.946 -470.903 Q(\(let \(\(d \(dbm-open "/etc/aliases" 'reader\)\)\))119.546 483.903 Q -(\(if \(not d\))129.146 496.903 Q -(\(error 'expand-mail-alias "cannot open database"\)\))148.346 509.903 Q -(\(unwind-protect)129.146 522.903 Q(\(dbm-fetch d alias\))138.746 535.903 Q -(\(dbm-close d\)\)\)\)\))138.746 548.903 Q -(\(define address-of-staff \(expand-mail-alias "staff"\)\))100.346 568.663 Q/F3 -9/Times-Bold@0 SF(Listing 5:)220.315 602.663 Q/F4 9/Times-Roman@0 SF -(Using the ndbm e)4.5 E(xtension)-.135 E/F5 8/Times-Italic@0 SF(Note:)100.346 -640.663 Q/F6 8/Times-Roman@0 SF(The)2 E F5(unwind-pr)2 E(otect)-.36 E F6 -(and the)2 E F5(err)2 E(or)-.36 E F6(form are not present in standard Scheme.)2 -E F0(_________________________________________________________________________\ -_____________)74 658.263 Q EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(7-)288 56 S/F1 10/Times-Bold@0 -SF 2.5(A.2. The)72 92 R(Anatomy of a Scheme T)2.5 E(ype)-.74 E F0 .22 -(Listing 6 sho)97 115.6 R .22(ws the part of the e)-.25 F .22 -(xtension that deals with the ne)-.15 F 2.72(wd)-.25 G .22(ata type)363.91 -115.6 R/F2 10/Times-Italic@0 SF(dbm-\214le)2.72 E F0 .22(and the e)2.72 F -(xtension)-.15 E .484(initialization function.)72 135.6 R .484(The v)5.484 F -(ariable)-.25 E F2(T_Dbm)2.984 E F0 .484 -(will hold the unique identi\214er of the ne)2.984 F .484(wly de\214ned type.) --.25 F(The)5.484 E(structure)72 155.6 Q F2(S_Dbm)2.575 E F0 .074(de\214nes the\ - C representation of the type; one such C structure is declared for each compo\ -s-)2.575 F .707(ite Scheme type.)72 175.6 R .708(Its main component is the han\ -dle of the database \214le that is contained in each object of)5.708 F(type)72 -195.6 Q F2(dbm-\214le)2.5 E F0(.)A .415(Scheme objects can usually li)97 219.2 -R .715 -.15(ve l)-.25 H .414(onger than their underlying C objects.).15 F .414 -(In case of the)5.414 F F2(dbm-\214le)2.914 E F0(type,)2.914 E 2.633(aS)72 -239.2 S .133(cheme object of that type can ob)84.633 239.2 R .133 -(viously still be referenced after its database handle has been closed by a) --.15 F 1.152(call to)72 259.2 R F2(dbm-close)3.652 E F0 6.152(.A)C 3.652(sE) -158.496 259.2 S 1.152(lk e)172.148 259.2 R 1.152 -(xtensions must not crash the application, we must pre)-.15 F -.15(ve)-.25 G -1.151(nt such stale objects).15 F 1.341(from being used in further calls to)72 -279.2 R F2(dbm-fetc)3.842 E(h)-.15 E F0(,)A F2(dbm-stor)3.842 E(e)-.37 E F0 -3.842(,a)C(nd)317.124 279.2 Q F2(dbm-close)3.842 E F0 6.342(.O)C 1.342(ne w) -388.128 279.2 R 1.342(ay to achie)-.1 F 1.642 -.15(ve t)-.25 H 1.342(his is to) -.15 F 1.077 -(record in each Scheme object whether the underlying C object is still ali)72 -299.2 R 1.377 -.15(ve o)-.25 H 3.577(rh).15 G 1.077(as been terminated.)402.739 -299.2 R(The)6.077 E 1.078(boolean component)72 319.2 R F2(alive)3.578 E F0 -1.078(in the)3.578 F F2(dbm-\214le)3.578 E F0 1.078(type serv)3.578 F 1.078 -(es this purpose.)-.15 F 1.079(It is initialized with true and is set to)6.078 -F -.1(fa)72 339.2 S(lse in).1 E F2(dbm-close)2.5 E F0 5(.F)C -(urther operations on objects with)157.72 339.2 Q F2(alive)2.5 E F0(being f)2.5 -E(alse are rejected.)-.1 E .423(The interpreter stores all Scheme objects in v) -97 362.8 R .423(ariables of type)-.25 F F2(Object)2.922 E F0 5.422(.A)C(n) -387.73 362.8 Q F2(Object)2.922 E F0 .422(is typically a 32-bit)2.922 F -.25(va) -72 382.8 S .354(lue; it is composed of a).25 F F2(ta)2.854 E(g)-.1 E F0 .354 -(part and a)2.854 F F2(pointer)2.854 E F0 2.854(part. The)2.854 F F2(ta)2.854 E -(g)-.1 E F0 .354(part indicates the type of the object, and the)2.854 F .937 -(remaining bits hold the actual memory address of the object \(the)72 402.8 R -3.437(yp)-.15 G .937(oint into the interpreter')352.397 402.8 R 3.436(sh)-.55 G -3.436(eap\). The)462.804 402.8 R(macros)72 422.8 Q F2(TYPE)3.966 E F0(and)3.966 -E F2(POINTER)3.966 E F0 1.466(are pro)3.966 F 1.466(vided to e)-.15 F 1.466 -(xtract the \214elds of an)-.15 F F2(Object)3.966 E F0 6.467(.E)C 1.467 -(ach type de\214nition must)403.209 422.8 R .9(de\214ne a macro to e)72 442.8 R -.9(xtract the object')-.15 F 3.4(sm)-.55 G .899(emory address from an)235.62 -442.8 R F2(Object)3.399 E F0 .899(\(by means of)3.399 F F2(POINTER)3.399 E F0 -3.399(\)a)C .899(nd then)473.381 442.8 R -(cast it into a pointer to the underlying C structure \(see)72 462.8 Q F2 -(#de\214ne DBMF)2.5 E F0(in Listing 6\).)2.5 E F2(Dbm_Equal\(\))97 486.4 Q F0 -.008(implements both the)2.508 F F2(eqv?)2.508 E F0 .008(and the)2.508 F F2 -(equal?)2.509 E F0 .009(predicates for)5.009 F F2(dbm-\214le)2.509 E F0 .009 -(objects; it returns true)2.509 F(if both objects being compared are ali)72 -506.4 Q .3 -.15(ve a)-.25 H(nd contain identical).15 E F2(DBM)2.5 E F0 -(handles.)2.5 E F2(Dbm_Print\(\))97 530 Q F0 1.133 -(is called by the interpreter each time an object of type)3.633 F F2 -(dbm-\214le)3.633 E F0 1.132(is to be printed; it is)3.633 F(in)72 550 Q -.2 -(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G -(ith the object and the Scheme port to which the output is to be sent.)113.24 -550 Q F2(P_Is_Dbm\(\))97 573.6 Q F0 .876(implements the primiti)3.376 F 1.176 --.15(ve p)-.25 H(rocedure).15 E F2(dbm-\214le?)3.377 E F0 .877 -(\(the type predicate\).)5.877 F .877(As with all primi-)5.877 F(ti)72 593.6 Q --.15(ve)-.25 G(s, it recei).15 E -.15(ve)-.25 G 2.5(sa).15 G -.18(rg)142.85 -593.6 S(uments of type).18 E F2(Object)2.5 E F0(and returns an)2.5 E F2(Object) -2.5 E F0 2.5(,a)C(nd it has a name be)337.35 593.6 Q(ginning with `)-.15 E -(`P_')-.74 E('.)-.74 E 5.782(The de\214nition of the initialization function)97 -617.2 R F2(elk_init_dbm\(\))8.282 E F0 5.782(is straightforw)8.282 F 5.782 -(ard; it in)-.1 F -.2(vo)-.4 G -.1(ke).2 G(s).1 E F2(De\214ne_Primitive\(\))72 -637.2 Q F0 2.135(once for each primiti)4.635 F 2.435 -.15(ve p)-.25 H 2.135 -(rocedure and \214nally).15 F F2(De\214ne_T)4.635 E(ype\(\))-.74 E F0 2.136 -(to mak)4.636 F 4.636(et)-.1 G 2.136(he ne)451.658 637.2 R 4.636(wt)-.25 G(ype) -489.56 637.2 Q(kno)72 657.2 Q(wn to the interpreter)-.25 E(.)-.55 E .438 -(The ar)97 680.8 R .438(guments that can be supplied to)-.18 F F2 -(De\214ne_Primitive\(\))2.938 E F0 .438 -(are a pointer to the function implementing)2.938 F .85(the primiti)72 700.8 R -1.15 -.15(ve p)-.25 H .85(rocedure, the Scheme name of the primiti).15 F -.15 -(ve)-.25 G 3.35(,t).15 G .85(he minimum and maximum number of ar)320.76 700.8 R -(gu-)-.18 E 1.229(ments, and a symbol indicating the)72 720.8 R F2 1.228 -(calling discipline)3.728 F F0 1.228(of the primiti)3.728 F -.15(ve)-.25 G -6.228(.F).15 G 1.228(or most of the functions in this)373.852 720.8 R EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(8-)288 56 S(___________________\ -___________________________________________________________________)74 105.6 Q -/F1 8/Courier@0 SF(#include )100.346 127.103 Q(#include ) -100.346 140.103 Q(int T_Dbm;)100.346 159.863 Q(struct S_Dbm {)100.346 179.623 Q -(DBM *dbm;)119.546 192.623 Q(char alive;)119.546 205.623 Q(/* 0 or 1 */)186.746 -205.623 Q(};)100.346 218.623 Q -(#define DBMF\(obj\) \(\(struct S_Dbm *\)POINTER\(obj\)\))100.346 238.383 Q -(int Dbm_Equal\(a, b\) Object a, b; {)100.346 258.143 Q(return DBMF\(a\)->aliv\ -e && DBMF\(b\)->alive && DBMF\(a\)->dbm == DBMF\(b\)->dbm;)119.546 271.143 Q(}) -100.346 284.143 Q(void Dbm_Print\(d, port\) Object d, port; {)100.346 303.903 Q -(Printf\(port, "#[dbm-file %lu]", DBMF\(d\)->dbm\);)119.546 316.903 Q(})100.346 -329.903 Q(Object P_Is_Dbm\(x\) Object x; {)100.346 349.663 Q -(return TYPE\(x\) == T_Dbm ? True : False;)119.546 362.663 Q(})100.346 375.663 -Q(void elk_init_dbm\(\) {)100.346 395.423 Q 14.4 -(Define_Primitive\(P_Is_Dbm, "dbm-file?",)119.546 408.423 R(1, 1, EVAL\);)4.8 E -4.8(Define_Primitive\(P_Dbm_Open, "dbm-open", 2,)119.546 421.423 R -(3, VARARGS\);)4.8 E(Define_Primitive\(P_Dbm_Close, "dbm-close", 1, 1, EVAL\);) -119.546 434.423 Q(Define_Primitive\(P_Dbm_Store, "dbm-store", 4, 4, EVAL\);) -119.546 447.423 Q(Define_Primitive\(P_Dbm_Fetch, "dbm-fetch", 2, 2, EVAL\);) -119.546 460.423 Q(T_Dbm = Define_Type\("dbm-file", sizeof\(struct S_Dbm\),) -119.546 480.183 Q(Dbm_Equal, Dbm_Equal, Dbm_Print, NOFUNC\);)138.746 493.183 Q -(})100.346 506.183 Q/F2 9/Times-Bold@0 SF(Listing 6:)210.487 540.183 Q/F3 9 -/Times-Roman@0 SF(Sk)4.5 E(eleton of the ndbm e)-.09 E(xtension)-.135 E/F4 8 -/Times-Italic@0 SF(Note:)100.346 578.183 Q/F5 8/Times-Roman@0 SF -.12(Fo)2.643 -G 2.643(rs).12 G .643(implicity some details ha)137.512 578.183 R .884 -.12 -(ve b)-.16 H .644(een omitted in this listing, and the calling interf).12 F -.644(ace of some functions has)-.08 F .176(been simpli\214ed; the program w) -100.346 596.183 R .176(ould not compile in this form.)-.08 F 2.176(Aw)4.176 G -(orking)315.226 596.183 Q F4(gdbm)2.176 E F5 .176(\(GNU dbm\) e)2.176 F .175 -(xtension is included in)-.12 F(the Elk distrib)100.346 614.183 Q(ution.)-.16 E -F0(___________________________________________________________________________\ -___________)74 631.783 Q -.15(ex)72 671.783 S .653 -(ample, the calling discipline is).15 F/F6 10/Times-Italic@0 SF(EV)3.153 E(AL) --.6 E F0 3.153(,i)C .653(ndicating a normal procedure with a \214x)240.718 -671.783 R .654(ed number of ar)-.15 F(guments,)-.18 E .558(such as)72 691.783 R -F6(car)3.058 E F0 5.558(.E)C .558(lk also supports procedures with v)132.274 -691.783 R .557(ariable ar)-.25 F .557(gument list, such as)-.18 F F6(list)3.057 -E F0(\()3.057 E F6 -.6(VA)C(RARGS).6 E F0 .557(\); and)B F6(NOE-)3.057 E -.6 -(VA)72 711.783 S(L).6 E F0(for)2.5 E F6(special forms)2.5 E F0(\(v)2.5 E -(ariable number of une)-.25 E -.25(va)-.25 G(luated ar).25 E(guments\).)-.18 E -EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2)277.17 56 S 2.5(9-)288 56 S/F1 10/Times-Italic@0 -SF(De\214ne_T)97 92 Q(ype\(\))-.74 E F0 .173(is in)2.673 F -.2(vo)-.4 G -.1(ke) -.2 G 2.673(dw).1 G .174(ith the Scheme name of the type, the size of the type') -206.889 92 R 2.674(sr)-.55 G .174(epresentation in C)430.882 92 R .632 -(or C++ \(gi)72 112 R -.15(ve)-.25 G 3.132(na).15 G 3.131(sac)137.266 112 S -.631(onstant or as a function\), tw)156.298 112 R 3.131(of)-.1 G .631 -(unctions implementing the)282.464 112 R F1(eqv?)3.131 E F0(and)3.131 E F1 -(equal?)3.131 E F0(predicates)3.131 E .93(for objects of this type, a function\ - that is called by the interpreter to print an object of the ne)72 132 R 3.431 -(wt)-.25 G .931(ype \(the)470.579 132 R(type')72 152 Q(s)-.55 E F1 1.076 -(print function)3.576 F F0 1.076(\), and a function pro)B 1.075 -(viding information about the type to the g)-.15 F 1.075(arbage collector)-.05 -F 6.075(.T)-.55 G(he)494.56 152 Q .977(return v)72 172 R .977(alue of)-.25 F F1 -(De\214ne_T)3.477 E(ype\(\))-.74 E F0 .977(is a `)3.477 F(`handle')-.74 E 3.478 -('t)-.74 G 3.478(ot)258.81 172 S .978(he ne)270.068 172 R .978 -(wly de\214ned type \(a small, unique inte)-.25 F .978(ger\); its main)-.15 F -.793(uses are to check the type of ar)72 192 R .792 -(guments supplied to primiti)-.18 F 1.092 -.15(ve p)-.25 H .792 -(rocedures and to instantiate objects of this).15 F(type.)72 212 Q/F2 10 -/Times-Bold@0 SF 2.5(A.3. Primiti)72 252 R .2 -.1(ve P)-.1 H -.18(ro).1 G -(cedur).18 E(es \212 The Details)-.18 E F0(Listing 7 gi)97 275.6 Q -.15(ve)-.25 -G 2.5(st).15 G(he de\214nitions of the primiti)161.33 275.6 Q -.15(ve)-.25 G(s) -.15 E F1(dbm-open)2.5 E F0(and)2.5 E F1(dbm-close)2.5 E F0(.)A F1(dbm-open)97 -299.2 Q F0 3.196(,a)C 3.196(si)147.126 299.2 S 3.197(th)156.992 299.2 S .697 -(as an optional ar)167.969 299.2 R .697(gument, is a function with)-.18 F F1 --.6(VA)3.197 G(RARGS).6 E F0 .697(calling discipline \(not to be)3.197 F 2.682 -(confused with the C language feature of the same name\), as indicated by the \ -last ar)72 319.2 R 2.681(gument to the)-.18 F F1(De\214ne_Primitive)72 339.2 Q -F0 2.5(call. Primiti)2.5 F -.15(ve)-.25 G 2.5(so).15 G 2.5(ft)212.98 339.2 S -(his type recei)221.59 339.2 Q .3 -.15(ve a)-.25 H 2.5(na).15 G(rray of)302.83 -339.2 Q F1(Objects)2.5 E F0(and a count.)2.5 E .222 -(The initial call to the macro)97 362.8 R F1(Mak)2.722 E(e_C_String)-.1 E F0 -.222(checks if the \214rst ar)2.722 F .222(gument to)-.18 F F1(dbm-open)2.722 E -F0 .223(is a string \(or a)2.722 F .368(symbol\) and con)72 382.8 R -.15(ve)-.4 -G .368(rts it to a C string.).15 F 1.968 -.8(To o)5.368 H .368 -(btain the second ar).8 F .368(gument to)-.18 F F1(dbm_open\(\))2.868 E F0 -2.867(,t)C .367(he symbol passed to)422.069 382.8 R 2.661(the Scheme primiti)72 -402.8 R 2.961 -.15(ve \()-.25 H F1 -.37(re).15 G(ader).37 E F0(,)A F1(writer) -5.161 E F0 5.161(,e)C 5.161(tc.\) has)241.465 402.8 R 2.662 -(to be mapped to a corresponding \215ags combination)5.161 F(\()72 422.8 Q F1 -(O_RDONL)A(Y)-.2 E F0(,)A F1(O_RD)3.126 E(WR)-.4 E F0 3.126(,e)C 3.126 -(tc.\). This)180.972 422.8 R .625(is accomplished by the Elk function)3.126 F -F1(Symbols_T)3.125 E(o_Bits\(\))-.92 E F0 3.125(;i)C 3.125(ti)456.78 422.8 S -3.125(si)465.465 422.8 S -1.9 -.4(nv o)475.26 422.8 T -.1(ke).4 G(d).1 E .176(\ -with a Scheme symbol, a \215ag indicating whether a single symbol or a list of\ - symbols \(a mask\) is to be con-)72 442.8 R -.15(ve)72 462.8 S .719 -(rted, and a table of pairs of symbol names and C inte).15 F 3.218(gers. The) --.15 F .718(third ar)3.218 F .718(gument to)-.18 F F1(dbm_open)3.218 E F0 .718 -(is the \214le-)3.218 F(mode;)72 482.8 Q F1(Get_Inte)3.235 E -.1(ge)-.4 G -(r\(\)).1 E F0(con)3.235 E -.15(ve)-.4 G .735(rts a Scheme number to a C inte) -.15 F(ger)-.15 E(.)-.55 E F1(dbm-open)5.735 E F0 .736(\214nally allocates a ne) -3.236 F 3.236(wS)-.25 G(cheme)477.9 482.8 Q(object of type)72 502.8 Q F1(T_Dbm) -2.5 E F0 -(on the heap, initializes the components of the object, and returns it.)2.5 E -1.013(The auxiliary function)97 526.4 R F1(Chec)3.513 E(k_Dbm\(\))-.2 E F0 -1.013(is used by the remaining primiti)3.513 F -.15(ve)-.25 G 3.513(st).15 G -3.513(oc)403.16 526.4 S 1.012(heck whether a gi)416.113 526.4 R -.15(ve)-.25 G -(n).15 E .658(object is of type)72 546.4 R F1(dbm-\214le)3.158 E F0 .658 -(and if so, whether it is stale.)3.158 F .659 -(In this case an error is signaled;)5.659 F F1(Primitive_Err)3.159 E(or\(\)) --.45 E F0(enters the error handler of Elk.)72 566.4 Q F1(P_Dbm_Close\(\))97 590 -Q F0(just marks the object as stale by setting)2.5 E F1(alive)2.5 E F0(to f)2.5 -E(alse and closes the database \214le.)-.1 E .795(Listing 8 sho)97 613.6 R .795 -(ws the implementation of)-.25 F F1(dbm-stor)3.295 E(e)-.37 E F0(and)3.295 E F1 -(dbm-fetc)3.295 E(h)-.15 E F0(.)A F1(Mak)5.795 E(e_Inte)-.1 E -.1(ge)-.4 G -(r\(\)).1 E F0 .795(is the counterpart)3.295 F(to)72 633.6 Q F1(Get_Inte)4.08 E --.1(ge)-.4 G(r\(\)).1 E F0 4.08(;i)C 4.08(tc)147.98 633.6 S(on)159.28 633.6 Q --.15(ve)-.4 G 1.58(rts a C inte).15 F 1.581(ger into a Scheme number)-.15 F -6.581(.L)-.55 G(ik)352.316 633.6 Q -.25(ew)-.1 G(ise,).25 E F1(Mak)4.081 E -(e_String\(\))-.1 E F0(con)4.081 E -.15(ve)-.4 G 1.581(rts a C).15 F -(string into a Scheme string.)72 653.6 Q EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-3)277.17 56 S 2.5(0-)288 56 S(___________________\ -___________________________________________________________________)74 105.6 Q -/F1 8/Courier@0 SF(static SYMDESCR Flag_Syms[] = {)100.346 127.103 Q 4.8({") -119.546 140.103 S(reader", O_RDONLY },)133.946 140.103 Q 4.8({")119.546 153.103 -S(writer", O_RDWR },)133.946 153.103 Q 4.8({")119.546 166.103 S -(create", O_RDWR|O_CREAT },)133.946 166.103 Q 4.8({0)119.546 179.103 S 4.8(,0}) -133.946 179.103 S(};)100.346 192.103 Q -(Object P_Dbm_Open\(argc, argv\) int argc; Object *argv; {)100.346 211.863 Q -(char *p;)119.546 224.863 Q(DBM *dp;)119.546 237.863 Q(Object d;)119.546 -250.863 Q(Make_C_String\(argv[0], p\);)119.546 270.623 Q -(dp = dbm_open\(p, Symbols_To_Bits\(argv[1], 0, Flag_Syms\),)119.546 283.623 Q -(argc == 3 ? Get_Integer\(argv[2]\) : 0666\);)186.746 296.623 Q(if \(dp == 0\)) -119.546 309.623 Q(return False;)138.746 322.623 Q 4.8(d=A)119.546 335.623 S -(lloc_Object\(sizeof\(struct S_Dbm\), T_Dbm, 0\);)143.546 335.623 Q -(DBMF\(d\)->dbm = dp;)119.546 348.623 Q(DBMF\(d\)->alive = 1;)119.546 361.623 Q -(return d;)119.546 374.623 Q(})100.346 387.623 Q -(void Check_Dbm\(d\) Object d; {)100.346 407.383 Q(Check_Type\(d, T_Dbm\);) -119.546 420.383 Q(if \(!DBMF\(d\)->alive\))119.546 433.383 Q -(Primitive_Error\("invalid dbm-file: ~s", d\);)138.746 446.383 Q(})100.346 -459.383 Q(Object P_Dbm_Close\(d\) Object d; {)100.346 479.143 Q -(Check_Dbm\(d\);)119.546 492.143 Q(DBMF\(d\)->alive = 0;)119.546 505.143 Q -(dbm_close\(DBMF\(d\)->dbm\);)119.546 518.143 Q(return Void;)119.546 531.143 Q -(})100.346 544.143 Q/F2 9/Times-Bold@0 SF(Listing 7:)152.577 578.143 Q/F3 9 -/Times-Roman@0 SF(ndbm e)4.5 E(xtension \212 implementation of)-.135 E/F4 9 -/Times-Italic@0 SF(dbm-open)2.25 E F3(and)2.25 E F4(dbm-close)2.25 E F0(______\ -______________________________________________________________________________\ -__)74 601.743 Q EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-3)277.17 56 S 2.5(1-)288 56 S(___________________\ -___________________________________________________________________)74 105.6 Q -/F1 8/Courier@0 SF(static SYMDESCR Store_Syms[] = {)100.346 127.103 Q 4.8({") -119.546 140.103 S 4.8(insert", DBM_INSERT)133.946 140.103 R(},)4.8 E 4.8({") -119.546 153.103 S(replace", DBM_REPLACE },)133.946 153.103 Q 4.8({0)119.546 -166.103 S 4.8(,0})133.946 166.103 S(};)100.346 179.103 Q -(Object P_Dbm_Store\(d, key, content, flag\) Object d, key, content, flag; {) -100.346 198.863 Q(datum k, c;)119.546 211.863 Q(int result;)119.546 224.863 Q -(Check_Dbm\(d\);)119.546 244.623 Q(Check_Type\(key, T_String\);)119.546 257.623 -Q(Check_Type\(content, T_String\);)119.546 270.623 Q -(k.dptr = STRING\(key\)->data;)119.546 283.623 Q -(k.dsize = STRING\(key\)->size;)282.746 283.623 Q -(c.dptr = STRING\(content\)->data;)119.546 296.623 Q -(c.dsize = STRING\(content\)->size;)282.746 296.623 Q -(result = dbm_store\(DBMF\(d\)->dbm, k, c,)119.546 309.623 Q -(Symbols_To_Bits\(flag, 0, Store_Syms\)\);)210.746 322.623 Q -(return Make_Integer\(result\);)119.546 335.623 Q(})100.346 348.623 Q -(Object P_Dbm_Fetch\(d, key\) Object d, key; {)100.346 368.383 Q(datum k, c;) -119.546 381.383 Q(Check_Dbm\(d\);)119.546 401.143 Q -(Check_Type\(key, T_String\);)119.546 414.143 Q(k.dptr = STRING\(key\)->data;) -119.546 427.143 Q(k.dsize = STRING\(key\)->size;)282.746 427.143 Q 4.8(c=d) -119.546 440.143 S(bm_fetch\(DBMF\(d\)->dbm, k\);)143.546 440.143 Q -(return c.dptr ? Make_String\(c.dptr, c.dsize\) : False;)119.546 453.143 Q(}) -100.346 466.143 Q/F2 9/Times-Bold@0 SF(Listing 8:)153.058 500.143 Q/F3 9 -/Times-Roman@0 SF(ndbm e)4.5 E(xtension \212 implementation of)-.135 E/F4 9 -/Times-Italic@0 SF(dbm-stor)2.25 E(e)-.333 E F3(and)2.25 E F4(dbm-fetc)2.25 E -(h)-.135 E F0(________________________________________________________________\ -______________________)74 523.743 Q 2.5(-3)277.17 563.743 S 2.5(1-)288 563.743 -S EP -%%Trailer -end -%%EOF diff --git a/doc/xlib/Makefile.am b/doc/xlib/Makefile.am index 3f399d3..6f0240c 100644 --- a/doc/xlib/Makefile.am +++ b/doc/xlib/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = xlib.ms xlib.ps +EXTRA_DIST = xlib.ms + +if HAVE_GROFF +doc_DATA = xlib.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= xlib +TROFF= groff -ms -t +UNROFF= unroff -ms + +xlib.ps: xlib.ms index.ms + (cat xlib.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > xlib.ps + +xlib.html: xlib.ms + (cat $?; echo ".Tc") | $(UNROFF) document=xlib + +index.ms: xlib.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: xlib.ms + $(TROFF) xlib.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] xlib.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms xlib.ps xlib.html diff --git a/doc/xlib/xlib.ps b/doc/xlib/xlib.ps deleted file mode 100644 index d096c7f..0000000 --- a/doc/xlib/xlib.ps +++ /dev/null @@ -1,3182 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 37 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Elk/Xlib Refer)217.776 120 Q(ence Manual)-.216 E/F1 10 -/Times-Italic@0 SF(Oliver Laumann)255.085 144 Q/F2 11/Times-Bold@0 SF 2.75 -(1. Intr)72 216 R(oduction)-.198 E/F3 11/Times-Roman@0 SF .906 -(This manual lists the functions, special forms, and v)97 234.6 R .906 -(ariables de\214ned by the Xlib e)-.275 F(xtension)-.165 E .352 -(included in the Elk distrib)72 249.6 R 3.102(ution. Most)-.22 F .353 -(of the functions are directly equi)3.102 F -.275(va)-.275 G .353 -(lent to a function of the).275 F .72(Xlib C library)72 264.6 R 3.47(,s)-.715 G -3.47(ot)144.945 264.6 S .72(hat the description need not be repeated.)156.973 -264.6 R .719(In such cases, only the name of the)6.22 F 1.932 -(corresponding Xlib function is mentioned.)72 279.6 R 1.933 -(Thus, you should ha)7.432 F 2.263 -.165(ve t)-.22 H(he).165 E/F4 11 -/Times-Italic@0 SF 1.933(Xlib \255 C Langua)4.683 F 2.153 -.11(ge X)-.11 H -(Interface)72 294.6 Q F3(manual within reach when using this reference manual.) -2.75 E(The functions listed in this document can be loaded by e)97 313.2 Q --.275(va)-.275 G(luating the e).275 E(xpression)-.165 E/F5 11/Courier@0 SF -(\(require 'xlib\).)108 334.2 Q F3(in the interpreter')72 355.2 Q 2.75(st)-.605 -G(op le)158.46 355.2 Q -.165(ve)-.275 G 2.75(lo).165 G 2.75(ri)201.404 355.2 S -2.75(naS)210.875 355.2 S(cheme program.)232.875 355.2 Q .04(The types of ar)97 -373.8 R .04(guments of the procedures listed belo)-.198 F 2.79(wa)-.275 G .039 -(re not described when the)343.419 373.8 R 2.789(ya)-.165 G .039(re ob)469.608 -373.8 R(vi-)-.165 E 1.02(ous from the conte)72 388.8 R 1.021 -(xt or from the name.)-.165 F -.165(Fo)6.521 G 3.771(ri).165 G 1.021 -(nstance, an ar)279.746 388.8 R 1.021(gument named)-.198 F F4(window)3.771 E F3 -1.021(is al)3.771 F -.11(wa)-.11 G 1.021(ys of).11 F(type)72 403.8 Q F4(window) -3.615 E F3 3.615(,a)C 3.615(na)140.038 403.8 S -.198(rg)154.037 403.8 S .865 -(ument named).198 F F4(atom)3.615 E F3 .865(is an object of type)3.615 F F4 -(atom)3.615 E F3 3.614(,e)C 3.614(tc. Ar)376.706 403.8 R .864 -(guments the names of)-.198 F(which end in `)72 418.8 Q(`?')-.814 E 2.75('a) --.814 G(re al)157.118 418.8 Q -.11(wa)-.11 G(ys of type).11 E F4(boolean)2.75 E -F3(.)A 1.424(If a function returns se)97 437.4 R -.165(ve)-.275 G 1.425 -(ral items of the same type \(for instance, a list of windo).165 F 1.425 -(ws\), the)-.275 F .164(return v)72 452.4 R .164(alue is a v)-.275 F .164 -(ector of objects of this type.)-.165 F .163 -(If a function returns a collection of items of dif)5.664 F(fer)-.275 E(-)-.22 -E 1.108(ent types or of dif)72 467.4 R 1.108(ferent semantics, the return v) --.275 F 1.108(alue is a list of objects \(or a pair\).)-.275 F 1.108 -(In this case,)6.608 F F4(multiple-value-bind)72 482.4 Q F3 -(can be used to bind v)2.75 E(ariables to the return v)-.275 E(alues.)-.275 E -.613(In the follo)97 501 R .612 -(wing, each description of a procedure, special form, or v)-.275 F .612 -(ariable lists the kind of)-.275 F .735(object in boldf)72 516 R 3.485 -(ace. Here,)-.11 F F2(pr)3.485 E(ocedur)-.198 E(e)-.198 E F3 .735 -(denotes either a primiti)3.485 F 1.065 -.165(ve p)-.275 H .735 -(rocedure or a compound proce-).165 F(dure,)72 531 Q F2(syntax)3.617 E F3 .866 -(denotes a special form or a macro, and)3.616 F F2 -.11(va)3.616 G(riable).11 E -F3 .866(denotes a global v)3.616 F .866(ariable that has)-.275 F -(some initial v)72 546 Q(alue and can be re-assigned a ne)-.275 E 2.75(wv)-.275 -G(alue by the user \(by means of)288.986 546 Q F4(set!)2.75 E F3(or)2.75 E F4 -(\215uid-let)2.75 E F3(\).)A F2 2.75(2. Display)72 576 R(Functions)2.75 E -(\(display?)72 606 Q F4(x)4.583 E F2 328.208(\)p)C -.198(ro)462.244 606 S -(cedur).198 E(e)-.198 E F3(Returns #t if)72 624.6 Q(f)-.275 E F4(x)2.75 E F3 -(is an object of type)2.75 E F4(display)2.75 E F3(.)A F2(\(open-display)72 -654.6 Q F4 2.75(.n)4.583 G(ame-of-display)151.152 654.6 Q F2 235.324(\)p)C --.198(ro)462.244 654.6 S(cedur).198 E(e)-.198 E F3(See)72 673.2 Q F4 -(XOpenDisplay)3.972 E F3(.)A F4(name-of-display)6.722 E F3 1.222 -(is a string or a symbol.)3.972 F 1.223(If no name is speci\214ed, a NULL)6.722 -F(name will be passed to)72 688.2 Q F4(XOpenDisplay)2.75 E F3(.)A EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(close-display)72 87 Q/F2 11/Times-Italic@0 -SF(display)4.583 E F1 280.545(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 -E F0(See)72 105.6 Q F2(XCloseDisplay)2.75 E F0 5.5(.F)C -(inalizes all objects associated with the display)171 105.6 Q 2.75(,t)-.715 G -(hen closes the display)381.1 105.6 Q(.)-.715 E F1(\(display-default-r)72 135.6 -Q(oot-windo)-.198 E(w)-.11 E F2(display)4.583 E F1 206.911(\)p)C -.198(ro) -462.244 135.6 S(cedur).198 E(e)-.198 E(\(display-r)72 150.6 Q(oot-windo)-.198 E -(w)-.11 E F2(display)4.583 E F1 243.574(\)p)C -.198(ro)462.244 150.6 S(cedur) -.198 E(e)-.198 E F0(See)72 169.2 Q F2(XDefaultRootW)2.75 E(indow)-.605 E F0(.)A -F1(\(display-default-colormap)72 199.2 Q F2(display)4.583 E F1 221.882(\)p)C --.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 E(\(display-colormap)72 214.2 Q -F2(display)4.583 E F1 258.545(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e) --.198 E F0(See)72 232.8 Q F2(XDefaultColormap)2.75 E F0 5.5(.R)C -(eturns the def)190.558 232.8 Q(ault colormap of the display')-.11 E 2.75(sd) --.605 G(ef)389.339 232.8 Q(ault screen.)-.11 E F1(\(display-default-gcontext)72 -262.8 Q F2(display)4.583 E F1 226.777(\)p)C -.198(ro)462.244 262.8 S(cedur).198 -E(e)-.198 E F0(See)72 281.4 Q F2(XDefaultGC)2.75 E F0 5.5(.R)C(eturns the def) -161.221 281.4 Q(ault graphics conte)-.11 E(xt of the display')-.165 E 2.75(sd) --.605 G(ef)390.692 281.4 Q(ault screen.)-.11 E F1(\(display-default-depth)72 -311.4 Q F2(display)4.583 E F1 239.592(\)p)C -.198(ro)462.244 311.4 S(cedur).198 -E(e)-.198 E F0(See)72 330 Q F2(XDefaultDepth)2.75 E F0 5.5(.R)C(eturns the def) -172.826 330 Q(ault depth of the display')-.11 E 2.75(sd)-.605 G(ef)354.502 330 -Q(ault screen.)-.11 E F1(\(display-default-scr)72 360 Q(een-number)-.198 E F2 -(display)4.583 E F1 195.812(\)p)C -.198(ro)462.244 360 S(cedur).198 E(e)-.198 E -F0(See)72 378.6 Q F2(XDefaultScr)2.75 E(een)-.407 E F0 5.5(.R)C(eturns an inte) -175.466 378.6 Q(ger)-.165 E(.)-.605 E F1(\(display-cells)72 408.6 Q F2 -(display scr)4.583 E(een-number)-.407 E F1 214.666(\)p)C -.198(ro)462.244 408.6 -S(cedur).198 E(e)-.198 E F0(See)72 427.2 Q F2(XDisplayCells)2.75 E F0 5.5(.R)C -(eturns an inte)169.779 427.2 Q(ger)-.165 E(.)-.605 E F1(\(display-planes)72 -457.2 Q F2(display scr)4.583 E(een-number)-.407 E F1 204.876(\)p)C -.198(ro) -462.244 457.2 S(cedur).198 E(e)-.198 E F0(See)72 475.8 Q F2(XDisplayPlanes)2.75 -E F0 5.5(.R)C(eturns an inte)177.105 475.8 Q(ger)-.165 E(.)-.605 E F1 -(\(display-string)72 505.8 Q F2(display)4.583 E F1 275.65(\)p)C -.198(ro) -462.244 505.8 S(cedur).198 E(e)-.198 E F0(See)72 524.4 Q F2(XDisplayString)2.75 -E F0 5.5(.R)C(eturns a string.)174.058 524.4 Q F1(\(display-v)72 554.4 Q(endor) --.11 E F2(display)4.583 E F1 270.26(\)p)C -.198(ro)462.244 554.4 S(cedur).198 E -(e)-.198 E F0(See)72 573 Q F2(XServerV)4.129 E(endor)-1.221 E F0(,)A F2(XV) -4.129 E(endorRelease)-1.221 E F0 6.878(.R)C 1.378 -(eturns a pair; the car is a string \(the v)254.545 573 R 1.378 -(endor identi\214ca-)-.165 F(tion\), and the cdr is an inte)72 588 Q -(ger \(the v)-.165 E(endor release number\).)-.165 E F1(\(display-pr)72 618 Q -(otocol-v)-.198 E(ersion)-.11 E F2(display)4.583 E F1 226.469(\)p)C -.198(ro) -462.244 618 S(cedur).198 E(e)-.198 E F0(See)72 636.6 Q F2(XPr)3.098 E(otocolV) --.495 E(er)-1.221 E(sion)-.11 E F0(,)A F2(XPr)3.098 E(otocolRe)-.495 E(vision) --.165 E F0 5.848(.R)C .348(eturns a pair of inte)272.826 636.6 R .348 -(gers \(the X protocol')-.165 F 3.098(sm)-.605 G .349(ajor and)467.912 636.6 R -(minor v)72 651.6 Q(ersion numbers\).)-.165 E F1(\(display-scr)72 681.6 Q -(een-count)-.198 E F2(display)4.583 E F1 243.475(\)p)C -.198(ro)462.244 681.6 S -(cedur).198 E(e)-.198 E F0(See)72 700.2 Q F2(XScr)2.75 E(eenCount)-.407 E F0 -5.5(.R)C(eturns an inte)169.361 700.2 Q(ger)-.165 E(.)-.605 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(display-image-byte-order)72 87 Q/F2 11 -/Times-Italic@0 SF(display)4.583 E F1 221.288(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XIma)2.75 E -.11(ge)-.11 G(ByteOr) -.11 E(der)-.407 E F0 5.5(.R)C(eturns a symbol \()186.235 105.6 Q/F3 11 -/Courier@0 SF(lsb-first)A F0(or)2.75 E F3(msb-first)2.75 E F0(\).)A F1 -(\(display-bitmap-unit)72 135.6 Q F2(display)4.583 E F1 246.918(\)p)C -.198(ro) -462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2(XBitmapUnit)2.75 E -F0 5.5(.R)C(eturns an inte)164.279 154.2 Q(ger)-.165 E(.)-.605 E F1 -(\(display-bitmap-bit-order)72 184.2 Q F2(display)4.583 E F1 223.103(\)p)C --.198(ro)462.244 184.2 S(cedur).198 E(e)-.198 E F0(See)72 202.8 Q F2 -(XBitmapBitOr)2.75 E(der)-.407 E F0 5.5(.R)C(eturns a symbol \()184.035 202.8 Q -F3(lsb-first)A F0(or)2.75 E F3(msb-first)2.75 E F0(\).)A F1 -(\(display-bitmap-pad)72 232.8 Q F2(display)4.583 E F1 248.139(\)p)C -.198(ro) -462.244 232.8 S(cedur).198 E(e)-.198 E F0(See)72 251.4 Q F2(XBitmapP)2.75 E(ad) --.88 E F0 5.5(.R)C(eturns an inte)161.562 251.4 Q(ger)-.165 E(.)-.605 E F1 -(\(display-width)72 281.4 Q F2(display)4.583 E F1 276.255(\)p)C -.198(ro) -462.244 281.4 S(cedur).198 E(e)-.198 E(\(display-height)72 296.4 Q F2(display) -4.583 E F1 273.813(\)p)C -.198(ro)462.244 296.4 S(cedur).198 E(e)-.198 E F0 -(See)72 315 Q F2(XDisplayW)2.75 E(idth)-.605 E F0(,)A F2(XDisplayHeight)2.75 E -F0 5.5(.R)C(eturns the width/height of the display')249.221 315 Q 2.75(sd)-.605 -G(ef)428.884 315 Q(ault screen.)-.11 E F1(\(display-width-mm)72 345 Q F2 -(display)4.583 E F1 254.266(\)p)C -.198(ro)462.244 345 S(cedur).198 E(e)-.198 E -(\(display-height-mm)72 360 Q F2(display)4.583 E F1 251.824(\)p)C -.198(ro) -462.244 360 S(cedur).198 E(e)-.198 E F0(See)72 378.6 Q F2(XDisplayW)4.253 E -(idthMM)-.605 E F0(,)A F2(XDisplayHeightMM)4.253 E F0 7.003(.R)C 1.503 -(eturns the width/height of the display')290.382 378.6 R 4.253(sd)-.605 G(ef) -479.063 378.6 Q(ault)-.11 E(screen in millimeters.)72 393.6 Q F1 -(\(display-motion-b)72 423.6 Q(uffer)-.22 E(-size)-.407 E F2(display)4.583 E F1 -217.02(\)p)C -.198(ro)462.244 423.6 S(cedur).198 E(e)-.198 E F0(See)72 442.2 Q -F2(XDisplayMotionBuf)2.75 E(ferSize)-.198 E F0 5.5(.R)C(eturns an inte)223.965 -442.2 Q(ger)-.165 E(.)-.605 E F1(\(display-\215ush-output)72 472.2 Q F2 -(display)4.583 E F1 245.686(\)p)C -.198(ro)462.244 472.2 S(cedur).198 E(e)-.198 -E F0(See)72 490.8 Q F2(XFlush)2.75 E F0(.)A F1(\(display-wait-output)72 520.8 Q -F2(display discar)4.583 E(d-e)-.407 E(vents?)-.165 E F1 176.32(\)p)C -.198(ro) -462.244 520.8 S(cedur).198 E(e)-.198 E F0(See)72 539.4 Q F2(XSync)2.75 E F0(.)A -F1(\(no-op)72 569.4 Q F2(display)4.583 E F1 313.545(\)p)C -.198(ro)462.244 -569.4 S(cedur).198 E(e)-.198 E F0(See)72 588 Q F2(XNoOp)2.75 E F0(.)A F1 -(\(list-depths)72 618 Q F2(display scr)4.583 E(een-number)-.407 E F1 223.224 -(\)p)C -.198(ro)462.244 618 S(cedur).198 E(e)-.198 E F0(See)72 636.6 Q F2 -(XListDepths)2.75 E F0 5.5(.R)C(eturns a v)160.616 636.6 Q(ector of inte)-.165 -E(gers.)-.165 E F1(\(list-pixmap-f)72 666.6 Q(ormats)-.275 E F2(display)4.583 E -F1 247.226(\)p)C -.198(ro)462.244 666.6 S(cedur).198 E(e)-.198 E F0(See)72 -685.2 Q F2(XListPixmapF)4.089 E(ormats)-1.155 E F0 6.839(.R)C 1.339(eturns a v) -201.86 685.2 R 1.339(ector of lists of three inte)-.165 F 1.34 -(gers \(depth, bits per pix)-.165 F 1.34(el, and)-.165 F(scanline pad\).)72 -700.2 Q EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(set-after)72 87 Q(-function!)-.407 E/F2 11 -/Times-Italic@0 SF(display pr)4.583 E(ocedur)-.495 E(e)-.407 E F1 208.264(\)p)C --.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2 -(XSetAfterFunction)3.276 E F0 6.026(.R)C .526(eturns the old after function.) -189.157 105.6 R(If)6.025 E F2(pr)3.275 E(ocedur)-.495 E(e)-.407 E F0 .525 -(is #f, the current after func-)3.275 F(tion is disassociated from the display) -72 120.6 Q(.)-.715 E F1(\(after)72 150.6 Q(-function)-.407 E F2(display)4.583 E -F1 275.474(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0 -(Returns the after function currently associated with the gi)72 169.2 Q -.165 -(ve)-.275 G 2.75(nd).165 G(isplay \(#f if there is none\).)348.65 169.2 Q F1 -(\(synchr)72 199.2 Q(onize)-.198 E F2(display)4.583 E F1 284.417(\)p)C -.198 -(ro)462.244 199.2 S(cedur).198 E(e)-.198 E F0(Sets the display')72 217.8 Q 2.75 -(sa)-.605 G(fter function to)156.029 217.8 Q F2(display-wait-output)2.75 E F0 -(.)A F1 2.75(3. W)72 247.8 R(indo)-.198 E 2.75(wF)-.11 G(unctions)134.645 247.8 -Q(\(windo)72 277.8 Q(w?)-.11 E F2(x)4.583 E F1 325.271(\)p)C -.198(ro)462.244 -277.8 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 296.4 Q(f)-.275 E F2(x)2.75 -E F0(is an object of type)2.75 E F2(window)2.75 E F0(.)A F1(\(drawable?)72 -326.4 Q F2(x)4.583 E F1 317.835(\)p)C -.198(ro)462.244 326.4 S(cedur).198 E(e) --.198 E F0(Returns #t if)72 345 Q(f)-.275 E F2(x)2.75 E F0(is a `)2.75 E(`dra) --.814 E -.11(wa)-.165 G(ble').11 E 2.75('\()-.814 G(windo)217.97 345 Q 2.75(wo) --.275 G 2.75(rp)261.387 345 S(ixmap\).)273.3 345 Q F1(\(windo)72 375 Q -(w-display)-.11 E F2(window)4.583 E F1 264.133(\)p)C -.198(ro)462.244 375 S -(cedur).198 E(e)-.198 E F0(Returns the display associated with the windo)72 -393.6 Q -.715(w.)-.275 G F1(\(cr)72 423.6 Q(eate-windo)-.198 E(w)-.11 E F2 2.75 -(.a)4.583 G -.407(rg)159.974 423.6 S(s).407 E F1 278.84(\)p)C -.198(ro)462.244 -423.6 S(cedur).198 E(e)-.198 E F0(See)72 442.2 Q F2(XCr)2.75 E(eateW)-.407 E -(indow)-.605 E F0 5.5(.T)C(his function is used to create a ne)177.314 442.2 Q -2.75(ww)-.275 G(indo)342.006 442.2 Q -.715(w.)-.275 G .2(The number of ar)72 -460.8 R .2(guments must be e)-.198 F -.165(ve)-.275 G 2.95(n. The).165 F .2 -(1st, 3rd, etc. ar)2.95 F .201(gument is the name \(a symbol\) of an)-.198 F -(attrib)72 475.8 Q .999(ute to be set when the windo)-.22 F 3.749(wi)-.275 G -3.749(sc)241.342 475.8 S .999(reated, the 2nd, 4th, etc. ar)254.254 475.8 R -.998(gument is the corresponding)-.198 F -.275(va)72 490.8 S 2.75(lue. The).275 -F(attrib)2.75 E(utes can be speci\214ed in an)-.22 E 2.75(yo)-.165 G(rder) -275.412 490.8 Q(.)-.605 E(Attrib)72 509.4 Q .648(utes are)-.22 F F2(x)3.398 E -F0(,)A F2(y)3.398 E F0(,)A F2(width)3.398 E F0(,)A F2(height)3.398 E F0(,)A F2 -(bor)3.398 E(der)-.407 E F0 .648(\(each of which has an inte)3.398 F .648 -(ger v)-.165 F(alue\),)-.275 E F2(par)3.398 E(ent)-.407 E F0 .649(\(the parent) -3.399 F(windo)72 524.4 Q 1.013(w\), and all attrib)-.275 F 1.013 -(utes that can be set by means of the)-.22 F/F3 11/Courier@0 SF(set-window-) -3.762 E F2(attrib)A(ute)-.22 E F3(!)A F0(functions)3.762 E(belo)72 539.4 Q 4.47 -(we)-.275 G(xcept)107.798 539.4 Q F2(sibling)4.47 E F0(and)4.47 E F2(stac)4.47 -E(k-mode)-.22 E F0 7.22(.T)C 1.72(he attrib)257.436 539.4 R(utes)-.22 E F2(par) -4.47 E(ent)-.407 E F0(,)A F2(width)4.47 E F0 4.471(,a)C(nd)389.574 539.4 Q F2 -(height)4.471 E F0 1.721(are mandatory)4.471 F(.)-.715 E(The def)72 554.4 Q -(ault for)-.11 E F2(x)2.75 E F0(and)2.75 E F2(y)2.75 E F0(is 0, the def)2.75 E -(ault for)-.11 E F2(bor)2.75 E(der)-.407 E F0(is 2.)2.75 E F1(\(set-windo)72 -584.4 Q(w-x!)-.11 E F2(window value)4.583 E F1 245.532(\)p)C -.198(ro)462.244 -584.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 599.4 Q(w-y!)-.11 E F2 -(window value)4.583 E F1 245.532(\)p)C -.198(ro)462.244 599.4 S(cedur).198 E(e) --.198 E(\(set-windo)72 614.4 Q(w-width!)-.11 E F2(window value)4.583 E F1 -224.137(\)p)C -.198(ro)462.244 614.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 -629.4 Q(w-height!)-.11 E F2(window value)4.583 E F1 221.695(\)p)C -.198(ro) -462.244 629.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 644.4 Q(w-border)-.11 E -(-width!)-.407 E F2(window value)4.583 E F1 188.497(\)p)C -.198(ro)462.244 -644.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 659.4 Q(w-sibling!)-.11 E F2 -(window value)4.583 E F1 219.847(\)p)C -.198(ro)462.244 659.4 S(cedur).198 E(e) --.198 E(\(set-windo)72 674.4 Q(w-stack-mode!)-.11 E F2(window value)4.583 E F1 -197.264(\)p)C -.198(ro)462.244 674.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 -689.4 Q(w-backgr)-.11 E(ound-pixmap!)-.198 E F2(window value)4.583 E F1 155.266 -(\)p)C -.198(ro)462.244 689.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 704.4 Q -(w-backgr)-.11 E(ound-pixel!)-.198 E F2(window value)4.583 E F1 168.103(\)p)C --.198(ro)462.244 704.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 719.4 Q -(w-border)-.11 E(-pixmap!)-.407 E F2(window value)4.583 E F1 179.939(\)p)C --.198(ro)462.244 719.4 S(cedur).198 E(e)-.198 E(\(set-windo)72 734.4 Q -(w-border)-.11 E(-pixel!)-.407 E F2(window value)4.583 E F1 192.776(\)p)C -.198 -(ro)462.244 734.4 S(cedur).198 E(e)-.198 E EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(set-windo)72 87 Q(w-bit-gra)-.11 E(vity!) --.275 E/F2 11/Times-Italic@0 SF(window value)4.583 E F1 201.202(\)p)C -.198(ro) -462.244 87 S(cedur).198 E(e)-.198 E(\(set-windo)72 102 Q(w-gra)-.11 E(vity!) --.275 E F2(window value)4.583 E F1 217.702(\)p)C -.198(ro)462.244 102 S(cedur) -.198 E(e)-.198 E(\(set-windo)72 117 Q(w-backing-stor)-.11 E(e!)-.198 E F2 -(window value)4.583 E F1 187.067(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e) --.198 E(\(set-windo)72 132 Q(w-backing-planes!)-.11 E F2(window value)4.583 E -F1 180.126(\)p)C -.198(ro)462.244 132 S(cedur).198 E(e)-.198 E(\(set-windo)72 -147 Q(w-backing-pixel!)-.11 E F2(window value)4.583 E F1 187.463(\)p)C -.198 -(ro)462.244 147 S(cedur).198 E(e)-.198 E(\(set-windo)72 162 Q(w-sa)-.11 E -.11 -(ve)-.275 G(-under!).11 E F2(window value)4.583 E F1 199.475(\)p)C -.198(ro) -462.244 162 S(cedur).198 E(e)-.198 E(\(set-windo)72 177 Q(w-e)-.11 E -.11(ve) --.165 G(nt-mask!).11 E F2(window value)4.583 E F1 197.539(\)p)C -.198(ro) -462.244 177 S(cedur).198 E(e)-.198 E(\(set-windo)72 192 Q(w-do-not-pr)-.11 E -(opagate-mask!)-.198 E F2(window value)4.583 E F1 140.625(\)p)C -.198(ro) -462.244 192 S(cedur).198 E(e)-.198 E(\(set-windo)72 207 Q(w-o)-.11 E -.11(ve) --.11 G(rride-r).11 E(edir)-.198 E(ect!)-.198 E F2(window value)4.583 E F1 -171.018(\)p)C -.198(ro)462.244 207 S(cedur).198 E(e)-.198 E(\(set-windo)72 222 -Q(w-colormap!)-.11 E F2(window value)4.583 E F1 206.427(\)p)C -.198(ro)462.244 -222 S(cedur).198 E(e)-.198 E(\(set-windo)72 237 Q(w-cursor!)-.11 E F2 -(window value)4.583 E F1 220.485(\)p)C -.198(ro)462.244 237 S(cedur).198 E(e) --.198 E F0(See)72 255.6 Q F2(XCon\214gur)5.517 E(eW)-.407 E(indow)-.605 E F0(,) -A F2(XChang)5.516 E(eW)-.11 E(indowAttrib)-.605 E(utes)-.22 E F0 8.266(.S)C -2.766(et the sibling windo)324.026 255.6 R 4.196 -.715(w, s)-.275 H 2.766 -(tacking mode,).715 F 1.245(background pixmap, background pix)72 270.6 R 1.245 -(el, border pix)-.165 F 1.245(el, cursor)-.165 F 3.996(,a)-.44 G 1.246 -(nd other attrib)352.141 270.6 R 1.246(utes \(see the)-.22 F/F3 11/Courier@0 SF -(win-)3.996 E(dow-)72 285.6 Q F0(functions belo)2.75 E -(w\) of the speci\214ed windo)-.275 E -.715(w.)-.275 G 1.836 -(The stacking mode is a symbol \()72 304.2 R F3(above)A F0(,)A F3(below)4.586 E -F0(,)A F3(top-if)4.586 E F0(,)A F3(bottom-if)4.585 E F0(,)A F3(opposite)4.585 E -F0 4.585(\). The)B F2(value)72 319.2 Q F0(ar)6.46 E 3.71(gument to)-.198 F F2 -(set-window-sibling!)6.461 E F0 3.711(must be a windo)6.461 F -.715(w,)-.275 G -F2(set-window-bac)7.176 E(kgr)-.22 E(ound-pixmap!)-.495 E F0 -.165(ex)72 334.2 -S 1.722(pects a pixmap,).165 F F2(set-window-bac)4.471 E(kgr)-.22 E -(ound-pixel!)-.495 E F0(and)4.471 E F2(set-window-bor)4.471 E(der)-.407 E -(-pixel!)-.22 E F0 -.165(ex)7.221 G 1.721(pect a pix).165 F(el,)-.165 E(and)72 -349.2 Q F2(set-window-cur)3.989 E(sor!)-.11 E F0 -.165(ex)3.989 G 1.239 -(pects a cursor ar).165 F 3.99(gument. F)-.198 F 1.24(or the types of the)-.165 -F F2(value)3.99 E F0(ar)3.99 E 1.24(gument of the)-.198 F -(other functions see the return v)72 364.2 Q(alues of the)-.275 E F2(window-) -2.75 E F0(functions belo)2.75 E -.715(w.)-.275 G F1(\(windo)72 394.2 Q(w-x)-.11 -E F2(window)4.583 E F1 292.26(\)p)C -.198(ro)462.244 394.2 S(cedur).198 E(e) --.198 E(\(windo)72 409.2 Q(w-y)-.11 E F2(window)4.583 E F1 292.26(\)p)C -.198 -(ro)462.244 409.2 S(cedur).198 E(e)-.198 E(\(windo)72 424.2 Q(w-width)-.11 E F2 -(window)4.583 E F1 270.865(\)p)C -.198(ro)462.244 424.2 S(cedur).198 E(e)-.198 -E(\(windo)72 439.2 Q(w-height)-.11 E F2(window)4.583 E F1 268.423(\)p)C -.198 -(ro)462.244 439.2 S(cedur).198 E(e)-.198 E(\(windo)72 454.2 Q(w-border)-.11 E -(-width)-.407 E F2(window)4.583 E F1 235.225(\)p)C -.198(ro)462.244 454.2 S -(cedur).198 E(e)-.198 E(\(windo)72 469.2 Q(w-depth)-.11 E F2(window)4.583 E F1 -270.865(\)p)C -.198(ro)462.244 469.2 S(cedur).198 E(e)-.198 E(\(windo)72 484.2 -Q(w-visual)-.11 E F2(window)4.583 E F1 270.249(\)p)C -.198(ro)462.244 484.2 S -(cedur).198 E(e)-.198 E(\(windo)72 499.2 Q(w-r)-.11 E(oot)-.198 E F2(window) -4.583 E F1 278.411(\)p)C -.198(ro)462.244 499.2 S(cedur).198 E(e)-.198 E -(\(windo)72 514.2 Q(w-class)-.11 E F2(window)4.583 E F1 275.76(\)p)C -.198(ro) -462.244 514.2 S(cedur).198 E(e)-.198 E(\(windo)72 529.2 Q(w-bit-gra)-.11 E -(vity)-.275 E F2(window)4.583 E F1 247.93(\)p)C -.198(ro)462.244 529.2 S(cedur) -.198 E(e)-.198 E(\(windo)72 544.2 Q(w-gra)-.11 E(vity)-.275 E F2(window)4.583 E -F1 264.43(\)p)C -.198(ro)462.244 544.2 S(cedur).198 E(e)-.198 E(\(windo)72 -559.2 Q(w-backing-stor)-.11 E(e)-.198 E F2(window)4.583 E F1 233.795(\)p)C --.198(ro)462.244 559.2 S(cedur).198 E(e)-.198 E(\(windo)72 574.2 Q -(w-backing-planes)-.11 E F2(window)4.583 E F1 226.854(\)p)C -.198(ro)462.244 -574.2 S(cedur).198 E(e)-.198 E(\(windo)72 589.2 Q(w-backing-pixel)-.11 E F2 -(window)4.583 E F1 234.191(\)p)C -.198(ro)462.244 589.2 S(cedur).198 E(e)-.198 -E(\(windo)72 604.2 Q(w-sa)-.11 E -.11(ve)-.275 G(-under).11 E F2(window)4.583 E -F1 246.203(\)p)C -.198(ro)462.244 604.2 S(cedur).198 E(e)-.198 E(\(windo)72 -619.2 Q(w-colormap)-.11 E F2(window)4.583 E F1 253.155(\)p)C -.198(ro)462.244 -619.2 S(cedur).198 E(e)-.198 E(\(windo)72 634.2 Q(w-map-installed)-.11 E F2 -(window)4.583 E F1 233.586(\)p)C -.198(ro)462.244 634.2 S(cedur).198 E(e)-.198 -E(\(windo)72 649.2 Q(w-map-state)-.11 E F2(window)4.583 E F1 251.329(\)p)C --.198(ro)462.244 649.2 S(cedur).198 E(e)-.198 E(\(windo)72 664.2 Q(w-all-e)-.11 -E -.11(ve)-.165 G(nt-masks).11 E F2(window)4.583 E F1 224.709(\)p)C -.198(ro) -462.244 664.2 S(cedur).198 E(e)-.198 E(\(windo)72 679.2 Q(w-y)-.11 E(our)-.275 -E(-e)-.407 E -.11(ve)-.165 G(nt-mask).11 E F2(window)4.583 E F1 219.286(\)p)C --.198(ro)462.244 679.2 S(cedur).198 E(e)-.198 E(\(windo)72 694.2 Q(w-do-not-pr) --.11 E(opagate-mask)-.198 E F2(window)4.583 E F1 187.353(\)p)C -.198(ro)462.244 -694.2 S(cedur).198 E(e)-.198 E(\(windo)72 709.2 Q(w-o)-.11 E -.11(ve)-.11 G -(rride-r).11 E(edir)-.198 E(ect)-.198 E F2(window)4.583 E F1 217.746(\)p)C --.198(ro)462.244 709.2 S(cedur).198 E(e)-.198 E(\(windo)72 724.2 Q(w-scr)-.11 E -(een)-.198 E F2(window)4.583 E F1 268.027(\)p)C -.198(ro)462.244 724.2 S(cedur) -.198 E(e)-.198 E EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(See)72 87 Q/F1 11/Times-Italic@0 SF(XGetW)3.301 E(indowAttrib)-.605 -E(utes)-.22 E F0 6.051(.R)C .551 -(eturns the x and y coordinates, width, height, border width, depth,)208.556 87 -R .437(visual, root windo)72 102 R 1.867 -.715(w, c)-.275 H .437(lass, bit gra) -.715 F(vity)-.22 E 3.187(,w)-.715 G(indo)251.744 102 Q 3.187(wg)-.275 G(ra) -287.656 102 Q(vity)-.22 E 3.187(,b)-.715 G .437(acking store a)323.821 102 R --.275(va)-.22 G(ilability).275 E 3.187(,b)-.715 G .437(acking planes,)440.632 -102 R 1.856(backing pix)72 117 R 1.856(el, sa)-.165 F 2.186 -.165(ve u)-.22 H -1.856(nder a).165 F -.275(va)-.22 G(ilability).275 E 4.605(,c)-.715 G 1.855 -(olormap, colormap installation information, map state,)254.573 117 R 1.314 -(global e)72 132 R -.165(ve)-.275 G 1.314(nt mask, local e).165 F -.165(ve) --.275 G 1.315(nt mask, `).165 F(`do-not-propag)-.814 E(ate')-.055 E 4.065('m) --.814 G 1.315(ask, o)345.334 132 R -.165(ve)-.165 G 1.315 -(rride redirect attrib).165 F 1.315(ute, and)-.22 F -(screen of the speci\214ed windo)72 147 Q -.715(w.)-.275 G F1(window-visual)72 -165.6 Q F0(and)3.45 E F1(window-scr)3.45 E(een)-.407 E F0(al)3.45 E -.11(wa) --.11 G .7(ys return the empty list in the current release of the soft-).11 F --.11(wa)72 180.6 S(re.).11 E F1(window-r)9.503 E(oot)-.495 E F0 4.003 -(returns a windo)6.753 F -.715(w.)-.275 G F1(window-class)263.65 180.6 Q F0 -4.004(returns a symbol \()6.754 F/F2 11/Courier@0 SF(input-output)A F0(,)A F2 -(input-only)72 195.6 Q F0(\).)A F1(window-bit-gr)154.924 195.6 Q(avity)-.165 E -F0 5.011(returns a symbol \()7.761 F F2(forget)A F0(,)A F2(north-west)7.761 E -F0(,)A F2(north)7.76 E F0(,)A F2(north-east)72 210.6 Q F0(,)A F2(west)6.191 E -F0(,)A F2(center)6.191 E F0(,)A F2(east)6.191 E F0(,)A F2(south-west)6.191 E F0 -(,)A F2(south)6.191 E F0(,)A F2(south-east)6.191 E F0(,)A F2(static)6.191 E F0 -(\).)A F1(window-gr)72 225.6 Q(avity)-.165 E F0 .594 -(returns a symbol \(same as)3.344 F F1(window-bit-gr)3.344 E(avity)-.165 E F0 -(with)3.344 E F2(unmap)3.344 E F0 .593(instead of)3.343 F F2(forget)3.343 E F0 -(\).)A F1(window-bac)72 240.6 Q(king-stor)-.22 E(e)-.407 E F0 1.821 -(returns a symbol \()4.57 F F2(not-useful)A F0(,)A F2(when-mapped)4.571 E F0(,) -A F2(always)4.571 E F0(\).)A F1(window-)7.321 E(bac)72 255.6 Q(king-planes)-.22 -E F0(and)6.154 E F1(window-bac)6.154 E(king-pixel)-.22 E F0 3.403(return a pix) -6.153 F(el.)-.165 E F1(window-save-under)8.903 E F0(,)A F1(window-map-)6.153 E -(installed)72 270.6 Q F0(and)4.705 E F1(window-o)4.705 E(verride-r)-.11 E(edir) --.407 E(ect)-.407 E F0 1.955(return #t or #f.)4.705 F F1(window-colormap)7.456 -E F0 1.956(returns a colormap.)4.706 F F1(window-map-state)72 285.6 Q F0 2.935 -(returns a symbol \()5.685 F F2(unmapped)A F0(,)A F2(unviewable)5.685 E F0(,)A -F2(viewable)5.685 E F0(\).)A F1(window-all-)8.435 E -.165(ev)72 300.6 S -(ent-masks).165 E F0(,)A F1(window-your)3.659 E(-e)-.22 E(vent-mask)-.165 E F0 -3.66(,a)C(nd)254.109 300.6 Q F1(window-do-not-pr)3.66 E(opa)-.495 E(gate-mask) --.11 E F0 .91(return a list of sym-)3.66 F 1.273(bols \(e)72 315.6 R -.165(ve) --.275 G 1.273(nt mask names such as).165 F F2(enter-window)4.023 E F0(,)A F2 -(pointer-motion)4.023 E F0 4.023(,e)C 4.022(tc.\). All)412.206 315.6 R 1.272 -(other func-)4.022 F(tions return an inte)72 330.6 Q(ger)-.165 E(.)-.605 E/F3 -11/Times-Bold@0 SF(\(drawable-r)72 360.6 Q(oot)-.198 E F1(dr)4.583 E(awable) --.165 E F3 263.814(\)p)C -.198(ro)462.244 360.6 S(cedur).198 E(e)-.198 E -(\(drawable-x)72 375.6 Q F1(dr)4.583 E(awable)-.165 E F3 277.663(\)p)C -.198 -(ro)462.244 375.6 S(cedur).198 E(e)-.198 E(\(drawable-y)72 390.6 Q F1(dr)4.583 -E(awable)-.165 E F3 277.663(\)p)C -.198(ro)462.244 390.6 S(cedur).198 E(e)-.198 -E(\(drawable-width)72 405.6 Q F1(dr)4.583 E(awable)-.165 E F3 256.268(\)p)C --.198(ro)462.244 405.6 S(cedur).198 E(e)-.198 E(\(drawable-height)72 420.6 Q F1 -(dr)4.583 E(awable)-.165 E F3 253.826(\)p)C -.198(ro)462.244 420.6 S(cedur).198 -E(e)-.198 E(\(drawable-border)72 435.6 Q(-width)-.407 E F1(dr)4.583 E(awable) --.165 E F3 220.628(\)p)C -.198(ro)462.244 435.6 S(cedur).198 E(e)-.198 E -(\(drawable-depth)72 450.6 Q F1(dr)4.583 E(awable)-.165 E F3 256.268(\)p)C --.198(ro)462.244 450.6 S(cedur).198 E(e)-.198 E F0(See)72 469.2 Q F1 -(XGetGeometry)3.625 E F0 6.375(.R)C .875(eturns the root windo)173.949 469.2 R -2.305 -.715(w, x a)-.275 H .876(nd y coordinates, width, height, border width,) -.715 F .949(and depth of the speci\214ed dra)72 484.2 R -.11(wa)-.165 G(ble.) -.11 E F1(dr)6.448 E(awable-r)-.165 E(oot)-.495 E F0 .948(returns a windo)3.698 -F 2.378 -.715(w, a)-.275 H .948(ll other functions return).715 F(an inte)72 -499.2 Q(ger)-.165 E(.)-.605 E F3(\(map-windo)72 529.2 Q(w)-.11 E F1(window) -4.583 E F3 276.981(\)p)C -.198(ro)462.244 529.2 S(cedur).198 E(e)-.198 E F0 -(See)72 547.8 Q F1(XMapW)2.75 E(indow)-.605 E F0(.)A F3(\(unmap-windo)72 577.8 -Q(w)-.11 E F1(window)4.583 E F3 264.749(\)p)C -.198(ro)462.244 577.8 S(cedur) -.198 E(e)-.198 E F0(See)72 596.4 Q F1(XUnmapW)2.75 E(indow)-.605 E F0(.)A F3 -(\(destr)72 626.4 Q(oy-windo)-.198 E(w)-.11 E F1(window)4.583 E F3 263.132(\)p) -C -.198(ro)462.244 626.4 S(cedur).198 E(e)-.198 E F0(See)72 645 Q F1(XDestr) -2.75 E(oyW)-.495 E(indow)-.605 E F0(.)A F3(\(destr)72 675 Q(oy-subwindo)-.198 E -(ws)-.11 E F1(window)4.583 E F3 242.342(\)p)C -.198(ro)462.244 675 S(cedur).198 -E(e)-.198 E F0(See)72 693.6 Q F1(XDestr)2.75 E(oySubwindows)-.495 E F0(.)A EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-7-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(map-subwindo)72 87 Q(ws)-.11 E/F2 11 -/Times-Italic@0 SF(window)4.583 E F1 256.191(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E F0(See)72 105.6 Q F2(XMapSubwindows)2.75 E F0(.)A F1 -(\(unmap-subwindo)72 135.6 Q(ws)-.11 E F2(window)4.583 E F1 243.959(\)p)C -.198 -(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2 -(XUnmapSubwindows)2.75 E F0(.)A F1(\(cir)72 184.2 Q(culate-subwindo)-.198 E(ws) --.11 E F2(window dir)4.583 E(ection)-.407 E F1 194.173(\)p)C -.198(ro)462.244 -184.2 S(cedur).198 E(e)-.198 E F0(See)72 202.8 Q F2(XCir)2.75 E -(culateSubwindows)-.407 E F0(.)A F2(dir)5.5 E(ection)-.407 E F0(is a symbol \() -2.75 E/F3 11/Courier@0 SF(raise-lowest)A F0(or)2.75 E F3(lower-highest)2.75 E -F0(\).)A F1(\(clear)72 232.8 Q(-windo)-.407 E(w)-.11 E F2(window)4.583 E F1 -274.957(\)p)C -.198(ro)462.244 232.8 S(cedur).198 E(e)-.198 E F0(Performs a)72 -251.4 Q F2(clear)2.75 E(-ar)-.22 E(ea)-.407 E F0(on the entire windo)2.75 E --.715(w.)-.275 G F1(\(raise-windo)72 281.4 Q(w)-.11 E F2(window)4.583 E F1 -275.155(\)p)C -.198(ro)462.244 281.4 S(cedur).198 E(e)-.198 E F0(See)72 300 Q -F2(XRaiseW)2.75 E(indow)-.605 E F0(.)A F1(\(lo)72 330 Q(wer)-.11 E(-windo)-.407 -E(w)-.11 E F2(window)4.583 E F1 272.009(\)p)C -.198(ro)462.244 330 S(cedur).198 -E(e)-.198 E F0(See)72 348.6 Q F2(XLowerW)2.75 E(indow)-.605 E F0(.)A F1(\(r)72 -378.6 Q(estack-windo)-.198 E(ws)-.11 E F2(list-of-windows)4.583 E F1 225.853 -(\)p)C -.198(ro)462.244 378.6 S(cedur).198 E(e)-.198 E F0(See)72 397.2 Q F2 -(XRestac)2.75 E(kW)-.22 E(indows)-.605 E F0(.)A F1(\(query-tr)72 427.2 Q(ee) --.198 E F2(window)4.583 E F1 288.707(\)p)C -.198(ro)462.244 427.2 S(cedur).198 -E(e)-.198 E F0(See)72 445.8 Q F2(XQueryT)3.663 E -.407(re)-.605 G(e).407 E F0 -6.413(.R)C .913(eturns a list of three elements: root windo)161.408 445.8 R -2.344 -.715(w, p)-.275 H .914(arent windo).715 F 2.344 -.715(w, a)-.275 H .914 -(nd children \(a).715 F -.165(ve)72 460.8 S(ctor of windo).165 E(ws\).)-.275 E -F1(\(translate-coordinates)72 490.8 Q F2(sr)4.583 E(c-window x y dst-window) --.407 E F1 152.945(\)p)C -.198(ro)462.244 490.8 S(cedur).198 E(e)-.198 E F0 -(See)72 509.4 Q F2(XT)3.385 E -.165(ra)-.605 G(nslateCoor).165 E(dinates)-.407 -E F0 6.135(.R)C .635(eturns a list of three elements: destination x and y) -209.604 509.4 R 3.384(,a)-.715 G .634(nd child win-)444.069 509.4 R(do)72 524.4 -Q -.715(w.)-.275 G F1(\(query-pointer)72 554.4 Q F2(window)4.583 E F1 272.603 -(\)p)C -.198(ro)462.244 554.4 S(cedur).198 E(e)-.198 E F0(See)72 573 Q F2 -(XQueryP)3.793 E(ointer)-.88 E F0 6.543(.R)C 1.043 -(eturns a list of eight elements: x and y)174.637 573 R 3.794(,ab)-.715 G 1.044 -(oolean indicating whether the)370.419 573 R .058 -(pointer is on the same screen as the speci\214ed windo)72 588 R 1.487 -.715 -(w, t)-.275 H .057(he root windo).715 F 1.487 -.715(w, t)-.275 H .057 -(he root windo).715 F(w')-.275 E 2.807(sxa)-.605 G .057(nd y)484.693 588 R -(coordinates, the child windo)72 603 Q 1.43 -.715(w, a)-.275 H -(nd a list of modi\214er names \(see).715 E F2(gr)2.75 E(ab-b)-.165 E(utton) --.22 E F0(belo)2.75 E(w\).)-.275 E F1 2.75(4. W)72 633 R(indo)-.198 E 2.75(wP) --.11 G -.198(ro)134.645 633 S(perty and Selection Functions).198 E(\(atom?)72 -663 Q F2(x)4.583 E F1 338.009(\)p)C -.198(ro)462.244 663 S(cedur).198 E(e)-.198 -E F0(Returns #t if)72 681.6 Q(f)-.275 E F2(x)2.75 E F0(is an object of type) -2.75 E F2(atom)2.75 E F0(.)A EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-8-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(mak)72 87 Q(e-atom)-.11 E/F2 11 -/Times-Italic@0 SF(value)4.583 E F1 295.351(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E F0(Returns an atom with the gi)72 105.6 Q -.165(ve)-.275 G(n) -.165 E F2(value)2.75 E F0(.)A F2(value)5.5 E F0(is an inte)2.75 E(ger)-.165 E -(.)-.605 E F1(\(inter)72 135.6 Q(n-atom)-.165 E F2(display name)4.583 E F1 -257.819(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q -F2(XInternAtom)2.75 E F0(.)A F2(name)5.5 E F0(is a string or a symbol.)2.75 E -(The atom is created if it does not yet e)5.5 E(xist.)-.165 E F1(\(\214nd-atom) -72 184.2 Q F2(display name)4.583 E F1 268.027(\)p)C -.198(ro)462.244 184.2 S -(cedur).198 E(e)-.198 E F0(See)72 202.8 Q F2(XInternAtom)3.378 E F0(.)A F2 -(name)6.128 E F0 .628(is a string or a symbol.)3.378 F .629 -(If the atom does not e)6.129 F .629(xist, the symbol)-.165 F/F3 11/Courier@0 -SF(none)3.379 E F0(is)3.379 E(returned.)72 217.8 Q F1(\(atom-name)72 247.8 Q F2 -(display atom)4.583 E F1 262.538(\)p)C -.198(ro)462.244 247.8 S(cedur).198 E(e) --.198 E F0(See)72 266.4 Q F2(XGetAtomName)2.75 E F0 5.5(.R)C(eturns a string.) -177.71 266.4 Q F1(\(list-pr)72 296.4 Q(operties)-.198 E F2(window)4.583 E F1 -272.196(\)p)C -.198(ro)462.244 296.4 S(cedur).198 E(e)-.198 E F0(See)72 315 Q -F2(XListPr)2.75 E(operties)-.495 E F0 5.5(.R)C(eturns a v)175.4 315 Q -(ector of atoms.)-.165 E F1(\(get-pr)72 345 Q(operty)-.198 E F2(window pr)4.583 -E(operty r)-.495 E(equest-type of)-.407 E(fset length delete?)-.198 E F1 90.916 -(\)p)C -.198(ro)462.244 345 S(cedur).198 E(e)-.198 E F0(See)72 363.6 Q F2 -(XGetW)3.719 E(indowPr)-.605 E(operty)-.495 E F0(.)A F2(pr)6.469 E(operty)-.495 -E F0 .969(is an object of type)3.719 F F2(atom)3.719 E F0(.)A F2 -.407(re)6.468 -G(quest-type).407 E F0 .968(is an atom or #f in)3.718 F .622(which case)72 -378.6 R F2(AnyPr)3.372 E(opertyT)-.495 E(ype)-.814 E F0 .622(will be used.) -3.372 F F2(of)6.122 E(fset)-.198 E F0(and)3.372 E F2(length)3.372 E F0 .623 -(are inte)3.372 F 3.373(gers. An)-.165 F .623(error is signaled if)3.373 F F2 -(XGetW)72 393.6 Q(indowPr)-.605 E(operty)-.495 E F0 -.11(fa)2.75 G(ils.).11 E -F2 -.11(ge)72 412.2 S(t-pr).11 E(operty)-.495 E F0 .573 -(returns a list of four items: the `)3.323 F .572(`actual type')-.814 F 3.322 -('\()-.814 G .572(an atom\), the format \(an inte)338.219 412.2 R .572 -(ger\), the)-.165 F(data \(if an)72 427.2 Q 1.43 -.715(y, t)-.165 H -(he empty list otherwise\), and the number of bytes left \(an inte).715 E -(ger\).)-.165 E(The data returned is either a string \(if the format indicates\ - 8-bit data\) or a v)72 445.8 Q(ector of inte)-.165 E(gers.)-.165 E F1 -(\(change-pr)72 475.8 Q(operty)-.198 E F2(window pr)4.583 E -(operty type format mode data)-.495 E F1 117.789(\)p)C -.198(ro)462.244 475.8 S -(cedur).198 E(e)-.198 E F0(See)72 494.4 Q F2(XChang)2.829 E(ePr)-.11 E(operty) --.495 E F0(.)A F2(pr)5.579 E(operty)-.495 E F0(and)2.829 E F2(type)2.829 E F0 -.079(are atoms.)2.829 F F2(format)5.579 E F0 .08(is an inte)2.83 F .08 -(ger \(8, 16, or 32\).)-.165 F(If)5.58 E F2(format)2.83 E F0 .534(is 8)72 509.4 -R F2(data)3.283 E F0 .533(must be a string, otherwise a v)3.283 F .533 -(ector of inte)-.165 F .533(gers of the appropriate size.)-.165 F .533 -(An error is sig-)6.033 F .182(naled if the v)72 524.4 R .182(alue of)-.275 F -F2(format)2.932 E F0 .182(is in)2.932 F -.275(va)-.44 G .182(lid or if).275 F -F2(data)2.932 E F0 .182(holds an inte)2.932 F .182(ger that e)-.165 F .183 -(xceeds the size indicated by)-.165 F F2(format)72 539.4 Q F0(.)A F2(mode)5.5 E -F0(is a symbol \()2.75 E F3(replace)A F0(,)A F3(prepend)2.75 E F0 2.75(,o)C(r) -301.592 539.4 Q F3(append)2.75 E F0(\).)A F1(\(delete-pr)72 569.4 Q(operty) --.198 E F2(window pr)4.583 E(operty)-.495 E F1 225.347(\)p)C -.198(ro)462.244 -569.4 S(cedur).198 E(e)-.198 E F0(See)72 588 Q F2(XDeletePr)2.75 E(operty)-.495 -E F0(.)A F1(\(r)72 618 Q(otate-pr)-.198 E(operties)-.198 E F2(window vector) -4.583 E(-of-atoms delta)-.22 E F1 161.426(\)p)C -.198(ro)462.244 618 S(cedur) -.198 E(e)-.198 E F0(See)72 636.6 Q F2(XRotateW)2.75 E(indowPr)-.605 E(operties) --.495 E F0(.)A F2(delta)5.5 E F0(is the amount to rotate \(an inte)2.75 E -(ger\).)-.165 E F1(\(set-selection-o)72 666.6 Q(wner!)-.11 E F2 -(display selection owner time)4.583 E F1 153.286(\)p)C -.198(ro)462.244 666.6 S -(cedur).198 E(e)-.198 E F0(See)72 685.2 Q F2(XSetSelectionOwner)3.045 E F0(.)A -F2(selection)5.794 E F0 .294(is an atom;)3.044 F F2(owner)3.044 E F0 .294 -(is a windo)3.044 F(w;)-.275 E F2(time)3.044 E F0 .294(is an inte)3.044 F .294 -(ger or the sym-)-.165 F(bol)72 700.2 Q F3(now)2.75 E F0(\(for)2.75 E F2(Curr) -2.75 E(entT)-.407 E(ime)-.605 E F0(\).)A EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-9-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(selection-o)72 87 Q(wner)-.11 E/F2 11 -/Times-Italic@0 SF(display selection)4.583 E F1 225.38(\)p)C -.198(ro)462.244 -87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XGetSelectionOwner)2.75 E F0 -(.)A F1(\(con)72 135.6 Q -.11(ve)-.44 G(rt-selection).11 E F2(selection tar) -4.583 E -.11(ge)-.407 G 2.75(tp).11 G -.495(ro)234.983 135.6 S(perty r).495 E -(equestor)-.407 E(-window time)-.22 E F1 81.72(\)p)C -.198(ro)462.244 135.6 S -(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2(XCon)3.127 E(vertSelection)-.44 E -F0(.)A F2(selection)5.877 E F0(and)3.127 E F2(tar)3.127 E -.11(ge)-.407 G(t).11 -E F0 .378(are atoms;)3.128 F F2(pr)3.128 E(operty)-.495 E F0 .378 -(is an atom or the symbol)3.128 F/F3 11/Courier@0 SF(none)3.128 E F0(.)A F1 -2.75(5. Colormap)72 184.2 R(Functions)2.75 E(\(color?)72 214.2 Q F2(x)4.583 E -F1 338.009(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 E F0 -(Returns #t if)72 232.8 Q(f)-.275 E F2(x)2.75 E F0(is an object of type)2.75 E -F2(color)2.75 E F0(.)A F1(\(mak)72 262.8 Q(e-color)-.11 E F2 2.75(rgb)4.583 G -F1 298.398(\)p)154.067 262.8 S -.198(ro)462.244 262.8 S(cedur).198 E(e)-.198 E -F0 .747(Returns an object of type)72 281.4 R F2(color)3.497 E F0 .747 -(with the speci\214ed RGB components.)3.497 F F2(r)6.247 E F0(,)A F2(g)3.496 E -F0 3.496(,a)C(nd)413.821 281.4 Q F2(b)3.496 E F0 .746(are reals in the)3.496 F -(range 0.0 to 1.0.)72 296.4 Q F1(\(color)72 326.4 Q(-r)-.407 E(gb-v)-.11 E -(alues)-.11 E F2(color)4.583 E F1 272.636(\)p)C -.198(ro)462.244 326.4 S(cedur) -.198 E(e)-.198 E F0 -(Returns a list of three elements, the RGB components of the gi)72 345 Q -.165 -(ve)-.275 G 2.75(nc).165 G(olor \(see)371.277 345 Q F2(mak)2.75 E(e-color)-.11 -E F0(abo)2.75 E -.165(ve)-.165 G(\).).165 E F1(\(query-color)72 375 Q F2 -(colormap pixel)4.583 E F1 250.933(\)p)C -.198(ro)462.244 375 S(cedur).198 E(e) --.198 E F0(See)72 393.6 Q F2(XQueryColor)2.75 E F0(.)A F1(\(query-colors)72 -423.6 Q F2(colormap pixels)4.583 E F1 242.375(\)p)C -.198(ro)462.244 423.6 S -(cedur).198 E(e)-.198 E F0(See)72 442.2 Q F2(XQueryColor)2.751 E(s)-.11 E F0(.) -A F2(pixels)5.501 E F0 .001(is a v)2.751 F .001(ector of pix)-.165 F 2.751 -(els. Returns)-.165 F 2.751(av)2.751 G .001 -(ector of colors of the same size as)335.372 442.2 R F2(pix-)2.752 E(els)72 -457.2 Q F0(.)A F1(\(lookup-color)72 487.2 Q F2(colormap color)4.583 E(-name) --.22 E F1 216.921(\)p)C -.198(ro)462.244 487.2 S(cedur).198 E(e)-.198 E F0(See) -72 505.8 Q F2(XLookupColor)2.75 E F0(.)A F2(color)5.5 E(-name)-.22 E F0 -(is a string or a symbol.)2.75 E(Returns a pair of colors.)5.5 E F1 -(\(alloc-color)72 535.8 Q F2(colormap color)4.583 E F1 254.596(\)p)C -.198(ro) -462.244 535.8 S(cedur).198 E(e)-.198 E F0(See)72 554.4 Q F2(XAllocColor)2.75 E -F0 5.5(.R)C(eturns a pix)161.837 554.4 Q(el \(or #f in case of an error\).) --.165 E F1(\(alloc-named-color)72 584.4 Q F2(colormap color)4.583 E(-name)-.22 -E F1 191.885(\)p)C -.198(ro)462.244 584.4 S(cedur).198 E(e)-.198 E F0(See)72 -603 Q F2(AllocNamedColor)4.006 E F0(.)A F2(color)6.756 E(-name)-.22 E F0 1.256 -(is a string or a symbol.)4.006 F 1.256(Returns a list of three elements: a) -6.756 F(pix)72 618 Q(el, and tw)-.165 E 2.75(oc)-.11 G -(olors \(the closest color and the e)141.993 618 Q -(xact color\); or #f in case of an error)-.165 E(.)-.605 E F1(\(colormap?)72 -648 Q F2(x)4.583 E F1 317.23(\)p)C -.198(ro)462.244 648 S(cedur).198 E(e)-.198 -E F0(Returns #t if)72 666.6 Q(f)-.275 E F2(x)2.75 E F0(is an object of type) -2.75 E F2(colormap)2.75 E F0(.)A EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(colormap-display)72 87 Q/F2 11 -/Times-Italic@0 SF(colormap)4.583 E F1 248.161(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0(Returns the display associated with the gi)72 105.6 -Q -.165(ve)-.275 G 2.75(nc).165 G(olormap.)277.788 105.6 Q F1(\(fr)72 135.6 Q -(ee-colormap)-.198 E F2(colormap)4.583 E F1 263.671(\)p)C -.198(ro)462.244 -135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2(XF)2.75 E -.407(re)-.605 G -(eColormap).407 E F0(.)A F1 2.75(6. Pixel)72 184.2 R(Functions)2.75 E(\(pixel?) -72 214.2 Q F2(x)4.583 E F1 339.219(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E -(e)-.198 E F0(Returns #t if)72 232.8 Q(f)-.275 E F2(x)2.75 E F0 -(is an object of type)2.75 E F2(pixel)2.75 E F0(.)A F1(\(pixel-v)72 262.8 Q -(alue)-.11 E F2(pixel)4.583 E F1 299.608(\)p)C -.198(ro)462.244 262.8 S(cedur) -.198 E(e)-.198 E F0(Returns the v)72 281.4 Q(alue of the pix)-.275 E -(el as an unsigned inte)-.165 E(ger)-.165 E(.)-.605 E F1(\(black-pixel)72 311.4 -Q F2(display)4.583 E F1 288.487(\)p)C -.198(ro)462.244 311.4 S(cedur).198 E(e) --.198 E(\(white-pixel)72 326.4 Q F2(display)4.583 E F1 288.498(\)p)C -.198(ro) -462.244 326.4 S(cedur).198 E(e)-.198 E F0(See)72 345 Q F2(XBlac)2.75 E(kPixel) --.22 E F0(,)A F2(XWhitePixel)2.75 E F0 5.5(.R)C(eturns the black/white pix) -220.863 345 Q(el of the display')-.165 E 2.75(sd)-.605 G(ef)420.821 345 Q -(ault screen.)-.11 E F1 2.75(7. Pixmap)72 375 R(Functions)2.75 E(\(pixmap?)72 -405 Q F2(x)4.583 E F1 326.382(\)p)C -.198(ro)462.244 405 S(cedur).198 E(e)-.198 -E F0(Returns #t if)72 423.6 Q(f)-.275 E F2(x)2.75 E F0(is an object of type) -2.75 E F2(pixmap)2.75 E F0(.)A F1(\(pixmap-display)72 453.6 Q F2(pixmap)4.583 E -F1 267.092(\)p)C -.198(ro)462.244 453.6 S(cedur).198 E(e)-.198 E F0 -(Returns the display associated with the pixmap.)72 472.2 Q F1(\(fr)72 502.2 Q -(ee-pixmap)-.198 E F2(pixmap)4.583 E F1 282.602(\)p)C -.198(ro)462.244 502.2 S -(cedur).198 E(e)-.198 E F0(See)72 520.8 Q F2(XF)2.75 E -.407(re)-.605 G -(ePixmap).407 E F0(.)A F1(\(cr)72 550.8 Q(eate-pixmap)-.198 E F2(dr)4.583 E -(awable width height depth)-.165 E F1 178.564(\)p)C -.198(ro)462.244 550.8 S -(cedur).198 E(e)-.198 E F0(See)72 569.4 Q F2(XCr)2.75 E(eatePixmap)-.407 E F0 -(.)A F1(\(cr)72 599.4 Q(eate-bitmap-fr)-.198 E(om-data)-.198 E F2 -(window data width height)4.583 E F1 141.329(\)p)C -.198(ro)462.244 599.4 S -(cedur).198 E(e)-.198 E F0(See)72 618 Q F2(XCr)4.628 E(eateBitmapF)-.407 E --.495(ro)-.605 G(mData).495 E F0(.)A F2(data)7.378 E F0 1.878(is a string.) -4.628 F/F3 11/Courier@0 SF 1.878(\(* width height\))7.378 F F0 1.878 -(must not e)4.628 F 1.878(xceed the)-.165 F(number of bits in)72 633 Q F2 -(string)2.75 E F0(.)A F1(\(cr)72 663 Q(eate-pixmap-fr)-.198 E(om-bitmap-data) --.198 E F2(win data width height for)4.583 E -.44(eg)-.407 G(rnd bac).44 E -(kgrnd depth)-.22 E F1 8.878(\)p)C -.198(ro)462.244 663 S(cedur).198 E(e)-.198 -E F0(See)72 681.6 Q F2(XCr)3.216 E(eatePixmapF)-.407 E -.495(ro)-.605 G -(mBitmapData).495 E F0(.)A F2(data)5.966 E F0 .466(is a string.)3.216 F F3 .466 -(\(* width height\))5.966 F F0 .465(must not e)3.215 F(xceed)-.165 E -(the number of bits in)72 696.6 Q F2(string)2.75 E F0(.)A EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(ead-bitmap-\214le)-.198 E/F2 11 -/Times-Italic@0 SF(dr)4.583 E(awable \214lename)-.165 E F1 214.622(\)p)C -.198 -(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XReadBitmapF)4.27 -E(ile)-.495 E F0(.)A F2(\214lename)7.02 E F0 1.52(is a string or a symbol.)4.27 -F(If)7.02 E F2(XReadBitmapF)4.271 E(ile)-.495 E F0 1.521(signals an error)4.271 -F(,)-.44 E F2 -.407(re)72 120.6 S(ad-bitmap-\214le).407 E F0 1.801 -(returns a symbol \()4.552 F/F3 11/Courier@0 SF(open-failed)A F0(,)A F3 -(file-invalid)4.551 E F0 4.551(,o)C(r)404.679 120.6 Q F3(no-memory)4.551 E F0 -4.551(\). If)B(it)4.551 E(succeeds,)72 135.6 Q F2 -.407(re)3.621 G -(ad-bitmap-\214le).407 E F0 .871(returns a list of \214v)3.621 F 3.621(ee)-.165 -G .871(lements: the bitmap \(an object of type)289.539 135.6 R F2(pixmap)3.622 -E F0(\),)A(the width and height of the bitmap, and the x and y coordinates of \ -the hotspot.)72 150.6 Q F1(\(write-bitmap-\214le)72 180.6 Q F2 -(\214lename pixmap width height x-hot y-hot)4.583 E F1 112.223(\)p)C -.198(ro) -462.244 180.6 S(cedur).198 E(e)-.198 E F0(See)72 199.2 Q F2(XWriteBitmapF)3.168 -E(ile)-.495 E F0(.)A F2(\214lename)5.918 E F0 .417(is a string or a symbol.) -3.167 F F2(x-hot)5.917 E F0(and)3.167 E F2(y-hot)3.167 E F0 .417 -(are optional \()3.167 F/F4 11/Symbol SF(-)A F0 3.167(1i)C 3.167(su)476.391 -199.2 S(sed)489.337 199.2 Q 1.139(if the)72 214.2 R 3.889(ya)-.165 G 1.139 -(re omitted\), b)110.16 214.2 R 1.14(ut either both or none of them must be gi) --.22 F -.165(ve)-.275 G(n.).165 E F2(write-bitmap-\214le)6.64 E F0 1.14 -(returns a)3.89 F(symbol \()72 229.2 Q F3(success)A F0(,)A F3(open-failed)2.75 -E F0(,)A F3(file-invalid)2.75 E F0 2.75(,o)C(r)330.808 229.2 Q F3(no-memory) -2.75 E F0(\).)A F1 2.75(8. Graphics)72 259.2 R(Context Functions)2.75 E -(\(gcontext?)72 289.2 Q F2(x)4.583 E F1 322.125(\)p)C -.198(ro)462.244 289.2 S -(cedur).198 E(e)-.198 E F0(Returns #t if)72 307.8 Q(f)-.275 E F2(x)2.75 E F0 -(is an object of type)2.75 E F2(gconte)2.75 E(xt)-.22 E F0(.)A F1 -(\(gcontext-display)72 337.8 Q F2(gconte)4.583 E(xt)-.22 E F1 258.171(\)p)C --.198(ro)462.244 337.8 S(cedur).198 E(e)-.198 E F0 -(Returns the display associated with the gi)72 356.4 Q -.165(ve)-.275 G 2.75 -(nG).165 G(C.)280.846 356.4 Q F1(\(cr)72 386.4 Q(eate-gcontext)-.198 E F2 2.75 -(.a)4.583 G -.407(rg)163.12 386.4 S(s).407 E F1 275.694(\)p)C -.198(ro)462.244 -386.4 S(cedur).198 E(e)-.198 E F0(See)72 405 Q F2(XCr)2.75 E(eateGC)-.407 E F0 -5.5(.T)C(his function is used to create a ne)157.14 405 Q 2.75(wG)-.275 G(C.) -321.832 405 Q .201(The number of ar)72 423.6 R .201(guments must be e)-.198 F --.165(ve)-.275 G 2.95(n. The).165 F .2(1st, 3rd, etc. ar)2.95 F .2 -(gument is the name \(a symbol\) of an)-.198 F(attrib)72 438.6 Q .916 -(ute to be set when the graphics conte)-.22 F .917 -(xt is created, the 2nd, 4th, etc. ar)-.165 F .917(gument is the corre-)-.198 F -(sponding v)72 453.6 Q 2.75(alue. The)-.275 F(attrib)2.75 E -(utes can be speci\214ed in an)-.22 E 2.75(yo)-.165 G(rder)318.499 453.6 Q(.) --.605 E(Attrib)72 472.2 Q .497(utes are)-.22 F F2(window)3.247 E F0 .496 -(\(a dra)3.247 F -.11(wa)-.165 G .496(ble; mandatory\) and all the attrib).11 F -.496(utes that can be set by the)-.22 F F3(set-)3.246 E(gcontext-)72 487.2 Q F2 -(attrib)A(ute)-.22 E F3(!)A F0(functions belo)2.75 E -.715(w.)-.275 G F1 -(\(copy-gcontext)72 517.2 Q F2(gconte)4.583 E(xt dr)-.22 E(awable)-.165 E F1 -225.655(\)p)C -.198(ro)462.244 517.2 S(cedur).198 E(e)-.198 E F0(See)72 535.8 Q -F2(XCopyGC)2.75 E F0 5.5(.R)C(eturns a cop)151.442 535.8 Q 2.75(yo)-.11 G(f) -218.234 535.8 Q F2(gconte)2.75 E(xt)-.22 E F0 -(\(associated with the speci\214ed dra)2.75 E -.11(wa)-.165 G(ble\).).11 E F1 -(\(fr)72 565.8 Q(ee-gcontext)-.198 E F2(gconte)4.583 E(xt)-.22 E F1 273.681 -(\)p)C -.198(ro)462.244 565.8 S(cedur).198 E(e)-.198 E F0(See)72 584.4 Q F2(XF) -2.75 E -.407(re)-.605 G(eGC).407 E F0(.)A F1(\(query-best-size)72 614.4 Q F2 -(display width height shape)4.583 E F1 183.701(\)p)C -.198(ro)462.244 614.4 S -(cedur).198 E(e)-.198 E F0(See)72 633 Q F2(XQueryBestSize)3.159 E F0(.)A F2 -(shape)5.91 E F0 .41(is a symbol \()3.16 F F3(cursor)A F0(,)A F3(tile)3.16 E F0 -3.16(,o)C(r)340.478 633 Q F3(stipple)3.16 E F0 3.16(\). Returns)B 3.16(ap)3.16 -G .41(air of inte-)456.749 633 R(gers \(result width and result height\).)72 -648 Q F1(\(query-best-cursor)72 678 Q F2(display width height)4.583 E F1 -198.672(\)p)C -.198(ro)462.244 678 S(cedur).198 E(e)-.198 E(\(query-best-tile) -72 693 Q F2(display width height)4.583 E F1 214.556(\)p)C -.198(ro)462.244 693 -S(cedur).198 E(e)-.198 E(\(query-best-stipple)72 708 Q F2(display width height) -4.583 E F1 198.045(\)p)C -.198(ro)462.244 708 S(cedur).198 E(e)-.198 E EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(See)72 87 Q/F1 11/Times-Italic@0 SF(XQueryBestSize)3.262 E F0 6.012 -(.I)C -2.09 -.44(nv o)174.444 87 T -.11(ke).44 G(s).11 E F1(query-best-size) -3.262 E F0 .511(with the gi)3.261 F -.165(ve)-.275 G 3.261(na).165 G -.198(rg) -349.623 87 S .511(uments and a shape of).198 F/F2 11/Courier@0 SF(cursor)3.261 -E F0(,)A F2(tile)72 102 Q F0 2.75(,o)C(r)109.4 102 Q F2(stipple)2.75 E F0 2.75 -(,r)C(especti)171.176 102 Q -.165(ve)-.275 G(ly).165 E(.)-.715 E/F3 11 -/Times-Bold@0 SF(\(gcontext-function)72 132 Q F1(gconte)4.583 E(xt)-.22 E F3 -252.682(\)p)C -.198(ro)462.244 132 S(cedur).198 E(e)-.198 E -(\(gcontext-plane-mask)72 147 Q F1(gconte)4.583 E(xt)-.22 E F3 237.403(\)p)C --.198(ro)462.244 147 S(cedur).198 E(e)-.198 E(\(gcontext-f)72 162 Q(or)-.275 E -(egr)-.198 E(ound)-.198 E F1(gconte)4.583 E(xt)-.22 E F3 239.306(\)p)C -.198 -(ro)462.244 162 S(cedur).198 E(e)-.198 E(\(gcontext-backgr)72 177 Q(ound)-.198 -E F1(gconte)4.583 E(xt)-.22 E F3 235.148(\)p)C -.198(ro)462.244 177 S(cedur) -.198 E(e)-.198 E(\(gcontext-line-width)72 192 Q F1(gconte)4.583 E(xt)-.22 E F3 -244.124(\)p)C -.198(ro)462.244 192 S(cedur).198 E(e)-.198 E -(\(gcontext-line-style)72 207 Q F1(gconte)4.583 E(xt)-.22 E F3 249.635(\)p)C --.198(ro)462.244 207 S(cedur).198 E(e)-.198 E(\(gcontext-cap-style)72 222 Q F1 -(gconte)4.583 E(xt)-.22 E F3 250.251(\)p)C -.198(ro)462.244 222 S(cedur).198 E -(e)-.198 E(\(gcontext-join-style)72 237 Q F1(gconte)4.583 E(xt)-.22 E F3 -248.414(\)p)C -.198(ro)462.244 237 S(cedur).198 E(e)-.198 E -(\(gcontext-\214ll-style)72 252 Q F1(gconte)4.583 E(xt)-.22 E F3 254.519(\)p)C --.198(ro)462.244 252 S(cedur).198 E(e)-.198 E(\(gcontext-\214ll-rule)72 267 Q -F1(gconte)4.583 E(xt)-.22 E F3 256.961(\)p)C -.198(ro)462.244 267 S(cedur).198 -E(e)-.198 E(\(gcontext-ar)72 282 Q(c-mode)-.198 E F1(gconte)4.583 E(xt)-.22 E -F3 247.402(\)p)C -.198(ro)462.244 282 S(cedur).198 E(e)-.198 E(\(gcontext-tile) -72 297 Q F1(gconte)4.583 E(xt)-.22 E F3 277.135(\)p)C -.198(ro)462.244 297 S -(cedur).198 E(e)-.198 E(\(gcontext-stipple)72 312 Q F1(gconte)4.583 E(xt)-.22 E -F3 260.624(\)p)C -.198(ro)462.244 312 S(cedur).198 E(e)-.198 E(\(gcontext-ts-x) -72 327 Q F1(gconte)4.583 E(xt)-.22 E F3 274.693(\)p)C -.198(ro)462.244 327 S -(cedur).198 E(e)-.198 E(\(gcontext-ts-y)72 342 Q F1(gconte)4.583 E(xt)-.22 E F3 -274.693(\)p)C -.198(ro)462.244 342 S(cedur).198 E(e)-.198 E -(\(gcontext-subwindo)72 357 Q(w-mode)-.11 E F1(gconte)4.583 E(xt)-.22 E F3 -209.397(\)p)C -.198(ro)462.244 357 S(cedur).198 E(e)-.198 E(\(gcontext-exposur) -72 372 Q(es)-.198 E F1(gconte)4.583 E(xt)-.22 E F3 245.554(\)p)C -.198(ro) -462.244 372 S(cedur).198 E(e)-.198 E(\(gcontext-clip-x)72 387 Q F1(gconte)4.583 -E(xt)-.22 E F3 265.519(\)p)C -.198(ro)462.244 387 S(cedur).198 E(e)-.198 E -(\(gcontext-clip-y)72 402 Q F1(gconte)4.583 E(xt)-.22 E F3 265.519(\)p)C -.198 -(ro)462.244 402 S(cedur).198 E(e)-.198 E(\(gcontext-dash-offset)72 417 Q F1 -(gconte)4.583 E(xt)-.22 E F3 240.472(\)p)C -.198(ro)462.244 417 S(cedur).198 E -(e)-.198 E F0(See)72 435.6 Q F1(XGetGCV)3.086 E(alues)-1.221 E F0 5.836(.R)C -.337(eturns the logical operation, plane mask, fore)173.498 435.6 R .337 -(ground and background pix)-.165 F(el)-.165 E -.275(va)72 450.6 S 1.128(lue, l\ -ine width and style, cap and join style, \214ll style and rule, arc mode, tili\ -ng and stippling).275 F .47(pixmap, tiling x- and y-origin, subwindo)72 465.6 R -3.22(wm)-.275 G .471(ode, clipping x- and y-origin, and dashed line infor) -272.545 465.6 R(-)-.22 E(mation of the speci\214ed graphics conte)72 480.6 Q -(xt.)-.165 E F1(gconte)72 499.2 Q(xt-function)-.22 E F0 2.124 -(returns a symbol \()4.874 F F2(clear)A F0(,)A F2(and)4.874 E F0(,)A F2 -(and-reverse)4.874 E F0(,)A F2(copy)4.874 E F0(,)A F2(and-inverted)4.874 E F0 -(,)A F2(no-op)72 514.2 Q F0(,)A F2(xor)3.527 E F0(,)A F2(or)3.527 E F0(,)A F2 -(nor)3.527 E F0(,)A F2(equiv)3.527 E F0(,)A F2(invert)3.527 E F0(,)A F2 -(or-reverse)3.527 E F0(,)A F2(copy-inverted)3.528 E F0(,)A F2(nand)3.528 E F0 -3.528(,o)C(r)470.596 514.2 Q F2(set)3.528 E F0(\).)A F1(gconte)72 529.2 Q -(xt-plane-mask)-.22 E F0(,)A F1(gconte)3.504 E(xt-for)-.22 E -.44(eg)-.407 G --.495(ro).44 G(und).495 E F0 3.504(,a)C(nd)269.682 529.2 Q F1(gconte)3.504 E -(xt-bac)-.22 E(kgr)-.22 E(ound)-.495 E F0 .754(return a pix)3.504 F(el.)-.165 E -F1(gconte)6.253 E(xt-tile)-.22 E F0(and)72 544.2 Q F1(gconte)4.819 E -(xt-stipple)-.22 E F0 2.069(return a pixmap.)4.819 F 2.07 -(The line style is a symbol \()7.569 F F2(solid)A F0(,)A F2(dash)4.82 E F0(,)A -F2(double-)4.82 E(dash)72 559.2 Q F0 .209(\); the cap style is a symbol \()B F2 -(not-last)A F0(,)A F2(butt)2.959 E F0(,)A F2(round)2.959 E F0(,)A F2 -(projecting)2.959 E F0 .208(\); the join style is a)B 2.494(symbol \()72 574.2 -R F2(miter)A F0(,)A F2(round)5.245 E F0(,)A F2(bevel)5.245 E F0 2.495 -(\); the \214ll style is a symbol \()B F2(solid)A F0(,)A F2(tiled)5.245 E F0(,) -A F2(stippled)5.245 E F0(,)A F2(opaque-stippled)72 589.2 Q F0 .194 -(\); the \214ll rule is a symbol \()B F2(even-odd)A F0(,)A F2(winding)2.944 E -F0 .194(\); the arc mode is a sym-)B 5.223(bol \()72 604.2 R F2(chord)A F0(,)A -F2(pie-slice)7.973 E F0 5.223(\); the subwindo)B 5.223(w-mode is a symbol \() --.275 F F2(clip-by-children)A F0(,)A F2(include-inferiors)72 619.2 Q F0(\).)A -F1(gconte)6.812 E(xt-e)-.22 E(xposur)-.22 E(es)-.407 E F0 1.311 -(returns a boolean.)4.061 F 1.311(All other functions return an)6.811 F(inte)72 -634.2 Q(ger)-.165 E(.)-.605 E F3(\(set-gcontext-function!)72 664.2 Q F1(gconte) -4.583 E(xt value)-.22 E F3 205.954(\)p)C -.198(ro)462.244 664.2 S(cedur).198 E -(e)-.198 E(\(set-gcontext-plane-mask!)72 679.2 Q F1(gconte)4.583 E(xt value) --.22 E F3 190.675(\)p)C -.198(ro)462.244 679.2 S(cedur).198 E(e)-.198 E -(\(set-gcontext-f)72 694.2 Q(or)-.275 E(egr)-.198 E(ound!)-.198 E F1(gconte) -4.583 E(xt value)-.22 E F3 192.578(\)p)C -.198(ro)462.244 694.2 S(cedur).198 E -(e)-.198 E(\(set-gcontext-backgr)72 709.2 Q(ound!)-.198 E F1(gconte)4.583 E -(xt value)-.22 E F3 188.42(\)p)C -.198(ro)462.244 709.2 S(cedur).198 E(e)-.198 -E(\(set-gcontext-line-width!)72 724.2 Q F1(gconte)4.583 E(xt value)-.22 E F3 -197.396(\)p)C -.198(ro)462.244 724.2 S(cedur).198 E(e)-.198 E EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(set-gcontext-line-style!)72 87 Q/F2 11 -/Times-Italic@0 SF(gconte)4.583 E(xt value)-.22 E F1 202.907(\)p)C -.198(ro) -462.244 87 S(cedur).198 E(e)-.198 E(\(set-gcontext-cap-style!)72 102 Q F2 -(gconte)4.583 E(xt value)-.22 E F1 203.523(\)p)C -.198(ro)462.244 102 S(cedur) -.198 E(e)-.198 E(\(set-gcontext-join-style!)72 117 Q F2(gconte)4.583 E -(xt value)-.22 E F1 201.686(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e)-.198 E -(\(set-gcontext-\214ll-style!)72 132 Q F2(gconte)4.583 E(xt value)-.22 E F1 -207.791(\)p)C -.198(ro)462.244 132 S(cedur).198 E(e)-.198 E -(\(set-gcontext-\214ll-rule!)72 147 Q F2(gconte)4.583 E(xt value)-.22 E F1 -210.233(\)p)C -.198(ro)462.244 147 S(cedur).198 E(e)-.198 E(\(set-gcontext-ar) -72 162 Q(c-mode!)-.198 E F2(gconte)4.583 E(xt value)-.22 E F1 200.674(\)p)C --.198(ro)462.244 162 S(cedur).198 E(e)-.198 E(\(set-gcontext-tile!)72 177 Q F2 -(gconte)4.583 E(xt value)-.22 E F1 230.407(\)p)C -.198(ro)462.244 177 S(cedur) -.198 E(e)-.198 E(\(set-gcontext-stipple!)72 192 Q F2(gconte)4.583 E(xt value) --.22 E F1 213.896(\)p)C -.198(ro)462.244 192 S(cedur).198 E(e)-.198 E -(\(set-gcontext-ts-x!)72 207 Q F2(gconte)4.583 E(xt value)-.22 E F1 227.965 -(\)p)C -.198(ro)462.244 207 S(cedur).198 E(e)-.198 E(\(set-gcontext-ts-y!)72 -222 Q F2(gconte)4.583 E(xt value)-.22 E F1 227.965(\)p)C -.198(ro)462.244 222 S -(cedur).198 E(e)-.198 E(\(set-gcontext-f)72 237 Q(ont!)-.275 E F2(gconte)4.583 -E(xt value)-.22 E F1 226.403(\)p)C -.198(ro)462.244 237 S(cedur).198 E(e)-.198 -E(\(set-gcontext-subwindo)72 252 Q(w-mode!)-.11 E F2(gconte)4.583 E(xt value) --.22 E F1 162.669(\)p)C -.198(ro)462.244 252 S(cedur).198 E(e)-.198 E -(\(set-gcontext-exposur)72 267 Q(es!)-.198 E F2(gconte)4.583 E(xt value)-.22 E -F1 198.826(\)p)C -.198(ro)462.244 267 S(cedur).198 E(e)-.198 E -(\(set-gcontext-clip-x!)72 282 Q F2(gconte)4.583 E(xt value)-.22 E F1 218.791 -(\)p)C -.198(ro)462.244 282 S(cedur).198 E(e)-.198 E(\(set-gcontext-clip-y!)72 -297 Q F2(gconte)4.583 E(xt value)-.22 E F1 218.791(\)p)C -.198(ro)462.244 297 S -(cedur).198 E(e)-.198 E(\(set-gcontext-clip-mask!)72 312 Q F2(gconte)4.583 E -(xt value)-.22 E F1 199.233(\)p)C -.198(ro)462.244 312 S(cedur).198 E(e)-.198 E -(\(set-gcontext-dash-offset!)72 327 Q F2(gconte)4.583 E(xt value)-.22 E F1 -193.744(\)p)C -.198(ro)462.244 327 S(cedur).198 E(e)-.198 E F0(See)72 345.6 Q -F2(XChang)2.835 E(eGC)-.11 E F0 5.586(.S)C .086 -(ets the logical operation, plane mask, fore)161.282 345.6 R .086 -(ground and background pix)-.165 F .086(el v)-.165 F(alue,)-.275 E .572(line w\ -idth and style, cap and join style, \214ll style and rule, arc mode, tiling an\ -d stippling pixmap,)72 360.6 R 2.086(tiling x- and y-origin, font, subwindo)72 -375.6 R 4.836(wm)-.275 G 2.087 -(ode, clipping x- and y-origin, clipping bitmap, and)266.962 375.6 R -(dashed line information for the speci\214ed graphics conte)72 390.6 Q(xt.) --.165 E(The)72 409.2 Q F2(value)3.945 E F0(ar)3.945 E 1.195(gument to)-.198 F -F2(set-gconte)3.945 E(xt-font!)-.22 E F0 1.195(is a font, and the)3.945 F F2 -(value)3.944 E F0(ar)3.944 E 1.194(gument to)-.198 F F2(set-gconte)3.944 E -(xt-clip-)-.22 E(mask!)72 424.2 Q F0 .359(is a pixmap.)5.859 F -.165(Fo)5.859 G -3.109(rt).165 G .359(he types of the)185.456 424.2 R F2(value)3.109 E F0(ar) -3.109 E .359(gument of the other functions see the return v)-.198 F(al-)-.275 E -(ues of the)72 439.2 Q F2(gconte)2.75 E(xt-)-.22 E F0(functions abo)2.75 E --.165(ve)-.165 G(.).165 E F1(\(set-gcontext-clip-r)72 469.2 Q(ectangles!)-.198 -E F2(gconte)4.583 E(xt x y r)-.22 E(ectangles or)-.407 E(dering)-.407 E F1 -99.133(\)p)C -.198(ro)462.244 469.2 S(cedur).198 E(e)-.198 E F0(See)72 487.8 Q -F2(XSetClipRectangles)3.761 E F0(.)A F2(x)6.51 E F0(and)3.76 E F2(y)3.76 E F0 -1.01(are inte)3.76 F 1.01(gers \(the coordinates of the clip-mask origin\).) --.165 F F2 -.407(re)6.51 G(ctan-).407 E(gles)72 502.8 Q F0 .72(is a v)3.47 F -.72(ector of lists of four inte)-.165 F .721(gers \(x, y)-.165 F 3.471(,w)-.715 -G .721(idth, and height of each rectangle\).)283.875 502.8 R F2(or)6.221 E -(dering)-.407 E F0 .721(is a)3.471 F(symbol \()72 517.8 Q/F3 11/Courier@0 SF -(unsorted)A F0(,)A F3(y-sorted)2.75 E F0(,)A F3(yx-sorted)2.75 E F0 2.75(,o)C -(r)297.808 517.8 Q F3(yx-banded)2.75 E F0(\).)A F1(\(set-gcontext-dashlist!)72 -547.8 Q F2(gconte)4.583 E(xt dash-of)-.22 E(fset dash-list)-.198 E F1 144.101 -(\)p)C -.198(ro)462.244 547.8 S(cedur).198 E(e)-.198 E F0(See)72 566.4 Q F2 -(XSetDashes)2.75 E F0(.)A F2(dash-of)5.5 E(fset)-.198 E F0(is an inte)2.75 E -(ger)-.165 E(.)-.605 E F2(dash-list)5.5 E F0(is a v)2.75 E(ector of inte)-.165 -E(gers between 0 and 255.)-.165 E F1 2.75(9. Graphics)72 596.4 R(Functions)2.75 -E(\(clear)72 626.4 Q(-ar)-.407 E(ea)-.198 E F2(window x y width height e)4.583 -E(xposur)-.22 E(es?)-.407 E F1 166.618(\)p)C -.198(ro)462.244 626.4 S(cedur) -.198 E(e)-.198 E F0(See)72 645 Q F2(XClearAr)2.75 E(ea)-.407 E F0(.)A F1 -(\(copy-ar)72 675 Q(ea)-.198 E F2(sr)4.583 E(c-dr)-.407 E(awable gconte)-.165 E -(xt sr)-.22 E(c-x sr)-.407 E(c-y width height dst-dr)-.407 E -(awable dst-x dst-y)-.165 E F1 13.069(\)p)C -.198(ro)462.244 675 S(cedur).198 E -(e)-.198 E F0(See)72 693.6 Q F2(XCopyAr)2.75 E(ea)-.407 E F0(.)A EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(copy-plane)72 87 Q/F2 11/Times-Italic@0 SF -(sr)4.583 E(c-dr)-.407 E(awable gconte)-.165 E(xt plane sr)-.22 E(c-x sr)-.407 -E(c-y width height dst-dr)-.407 E(awable dst-x dst-y)-.165 E F1 -19.227(\)p)C --.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XCopyPlane) -2.75 E F0(.)A F2(plane)5.5 E F0(is an inte)2.75 E(ger)-.165 E 5.5(.A)-.605 G -2.75(ne)250.871 105.6 S(rror is signaled unless e)264.005 105.6 Q -(xactly one bit is set in)-.165 E F2(plane)2.75 E F0(.)A F1(\(draw-point)72 -135.6 Q F2(dr)4.583 E(awable gconte)-.165 E(xt x y)-.22 E F1 223.202(\)p)C --.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2(XDr)2.75 E -(awP)-.165 E(oint)-.88 E F0(.)A F1(\(draw-points)72 184.2 Q F2(dr)4.583 E -(awable gconte)-.165 E(xt vector)-.22 E(-of-points r)-.22 E(elative?)-.407 E F1 -119.945(\)p)C -.198(ro)462.244 184.2 S(cedur).198 E(e)-.198 E F0(See)72 202.8 Q -F2(XDr)4.188 E(awP)-.165 E(oints)-.88 E F0(.)A F2(vector)6.938 E(-of-points) --.22 E F0 1.437(is a v)4.187 F 1.437(ector of pairs consisting of tw)-.165 F -4.187(oi)-.11 G(nte)411.66 202.8 Q 1.437(gers \(the x and y)-.165 F 3.2 -(coordinates\). If)72 217.8 R F2 -.407(re)3.2 G(lative?).407 E F0 .451(is #t,) -3.2 F F2(Coor)3.201 E(dModePr)-.407 E -.165(ev)-.407 G(ious).165 E F0 .451 -(is passed to)3.201 F F2(XDr)3.201 E(awP)-.165 E(oints)-.88 E F0 3.201(,o)C -(therwise)432.159 217.8 Q F2(Coor)3.201 E(d-)-.407 E(ModeOrigin)72 232.8 Q F0 -(is used.)2.75 E F1(\(draw-line)72 262.8 Q F2(dr)4.583 E(awable gconte)-.165 E -(xt x1 y1 x2 y2)-.22 E F1 193.271(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E -(e)-.198 E F0(See)72 281.4 Q F2(XDr)2.75 E(awLine)-.165 E F0(.)A F1 -(\(draw-lines)72 311.4 Q F2(dr)4.583 E(awable gconte)-.165 E(xt vector)-.22 E -(-of-points r)-.22 E(elative?)-.407 E F1 127.282(\)p)C -.198(ro)462.244 311.4 S -(cedur).198 E(e)-.198 E F0(See)72 330 Q F2(XDr)2.75 E(awLines)-.165 E F0 5.5 -(.S)C(ee)160.451 330 Q F2(dr)2.75 E(aw-points)-.165 E F0(abo)2.75 E -.165(ve) --.165 G(.).165 E F1(\(draw-segments)72 360 Q F2(dr)4.583 E(awable gconte)-.165 -E(xt vector)-.22 E(-of-points)-.22 E F1 147.357(\)p)C -.198(ro)462.244 360 S -(cedur).198 E(e)-.198 E F0(See)72 378.6 Q F2(XDr)2.75 E(awSe)-.165 E(gments) --.44 E F0(.)A F2(vector)5.5 E(-of-points)-.22 E F0(is a v)2.75 E -(ector of lists of four inte)-.165 E(gers \(x1, y1, x2, and y2\).)-.165 E F1 -(\(draw-r)72 408.6 Q(ectangle)-.198 E F2(dr)4.583 E(awable gconte)-.165 E -(xt x y width height)-.22 E F1 147.027(\)p)C -.198(ro)462.244 408.6 S(cedur) -.198 E(e)-.198 E F0(See)72 427.2 Q F2(XDr)2.75 E(awRectangle)-.165 E F0(.)A F1 -(\(\214ll-r)72 457.2 Q(ectangle)-.198 E F2(dr)4.583 E(awable gconte)-.165 E -(xt x y width height)-.22 E F1 159.237(\)p)C -.198(ro)462.244 457.2 S(cedur) -.198 E(e)-.198 E F0(See)72 475.8 Q F2(XF)2.75 E(illRectangle)-.495 E F0(.)A F1 -(\(draw-r)72 505.8 Q(ectangles)-.198 E F2(dr)4.583 E(awable gconte)-.165 E -(xt vector)-.22 E(-of-r)-.22 E(ectangles)-.407 E F1 124.147(\)p)C -.198(ro) -462.244 505.8 S(cedur).198 E(e)-.198 E F0(See)72 524.4 Q F2(XDr)3.603 E -(awRectangles)-.165 E F0(.)A F2(vector)6.353 E(-of-r)-.22 E(ectangles)-.407 E -F0 .853(is a v)3.603 F .852(ector of lists of four inte)-.165 F .852 -(gers \(x, y)-.165 F 3.602(,w)-.715 G .852(idth, and)464.648 524.4 R -(height of each rectangle\).)72 539.4 Q F1(\(\214ll-r)72 569.4 Q(ectangles) --.198 E F2(dr)4.583 E(awable gconte)-.165 E(xt vector)-.22 E(-of-r)-.22 E -(ectangles)-.407 E F1 136.357(\)p)C -.198(ro)462.244 569.4 S(cedur).198 E(e) --.198 E F0(See)72 588 Q F2(XF)2.75 E(illRectangles)-.495 E F0 5.5(.S)C(ee) -175.389 588 Q F2(dr)2.75 E(aw-r)-.165 E(ectangles)-.407 E F0(abo)2.75 E -.165 -(ve)-.165 G(.).165 E F1(\(draw-ar)72 618 Q(c)-.198 E F2(dr)4.583 E -(awable gconte)-.165 E(xt x y width height angle1 angle2)-.22 E F1 109.748(\)p) -C -.198(ro)462.244 618 S(cedur).198 E(e)-.198 E F0(See)72 636.6 Q F2(XDr)2.75 E -(awAr)-.165 E(c)-.407 E F0(.)A F1(\(\214ll-ar)72 666.6 Q(c)-.198 E F2(dr)4.583 -E(awable gconte)-.165 E(xt x y width height angle1 angle2)-.22 E F1 121.958 -(\)p)C -.198(ro)462.244 666.6 S(cedur).198 E(e)-.198 E F0(See)72 685.2 Q F2(XF) -2.75 E(illAr)-.495 E(c)-.407 E F0(.)A EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(draw-ar)72 87 Q(cs)-.198 E/F2 11 -/Times-Italic@0 SF(dr)4.583 E(awable gconte)-.165 E(xt vector)-.22 E(-of-data) --.22 E F1 178.113(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 -105.6 Q F2(XDr)2.998 E(awAr)-.165 E(cs)-.407 E F0(.)A F2(vector)5.748 E -(-of-data)-.22 E F0 .248(is a v)2.998 F .248(ector of lists of six inte)-.165 F -.248(gers \(x, y)-.165 F 2.998(,w)-.715 G .248(idth, height, angle1, and)396.93 -105.6 R(angle2\).)72 120.6 Q F1(\(\214ll-ar)72 150.6 Q(cs)-.198 E F2(dr)4.583 E -(awable gconte)-.165 E(xt vector)-.22 E(-of-data)-.22 E F1 190.323(\)p)C -.198 -(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0(See)72 169.2 Q F2(XF)2.75 E -(illAr)-.495 E(cs)-.407 E F0 5.5(.S)C(ee)146.877 169.2 Q F2(dr)2.75 E(aw-ar) --.165 E(cs)-.407 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1(\(\214ll-polygon) -72 199.2 Q F2(dr)4.583 E(awable gconte)-.165 E(xt vector)-.22 E(-of-points r) --.22 E(elative? shape)-.407 E F1 95.184(\)p)C -.198(ro)462.244 199.2 S(cedur) -.198 E(e)-.198 E F0(See)72 217.8 Q F2(XF)4.689 E(illP)-.495 E(olygon)-.88 E F0 -7.439(.S)C(ee)166.782 217.8 Q F2(dr)4.689 E(aw-points)-.165 E F0(abo)4.689 E --.165(ve)-.165 G(.).165 E F2(shape)7.439 E F0 1.939(is a symbol \()4.689 F/F3 -11/Courier@0 SF(complex)A F0(,)A F3(non-convex)4.688 E F0 4.688(,o)C(r)500.337 -217.8 Q F3(convex)72 232.8 Q F0(\).)A F1 2.75(10. F)72 262.8 R(ont Functions) --.275 E(\(f)72 292.8 Q(ont?)-.275 E F2(x)4.583 E F1 343.168(\)p)C -.198(ro) -462.244 292.8 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 311.4 Q(f)-.275 E F2 -(x)2.75 E F0(is an object of type)2.75 E F2(font)2.75 E F0(.)A F1(\(f)72 341.4 -Q -.917(ont-display \))-.275 F(pr)456.128 341.4 Q(ocedur)-.198 E(e)-.198 E F0 -(Returns the display associated with the gi)72 360 Q -.165(ve)-.275 G 2.75(nf) -.165 G(ont.)276.567 360 Q F1(\(open-f)72 390 Q(ont)-.275 E F2 -(display font-name)4.583 E F1 248.139(\)p)C -.198(ro)462.244 390 S(cedur).198 E -(e)-.198 E F0(See)72 408.6 Q F2(XLoadQueryF)2.75 E(ont)-1.155 E F0(.)A F2 -(font-name)5.5 E F0(is a string or a symbol.)2.75 E F1(\(close-f)72 438.6 Q -(ont)-.275 E F2(font)4.583 E F1 310.168(\)p)C -.198(ro)462.244 438.6 S(cedur) -.198 E(e)-.198 E F0(See)72 457.2 Q F2(XUnloadF)2.75 E(ont)-1.155 E F0(.)A F1 -(\(f)72 487.2 Q(ont-name)-.275 E F2(font)4.583 E F1 307.11(\)p)C -.198(ro) -462.244 487.2 S(cedur).198 E(e)-.198 E F0 .68(Returns the name of the speci\ -\214ed font \(a string\) or #f if the name could not be determined \(e.)72 -505.8 R(g.)1.833 E(when the font has been obtained by a call to)72 520.8 Q F2 -(gconte)2.75 E(xt-font)-.22 E F0(\).)A F1(\(gcontext-f)72 550.8 Q(ont)-.275 E -F2(gconte)4.583 E(xt)-.22 E F1 273.131(\)p)C -.198(ro)462.244 550.8 S(cedur) -.198 E(e)-.198 E F0(Calls)72 569.4 Q F2(XQueryF)3.198 E(ont)-1.155 E F0 .448 -(with the GC obtained by)3.198 F F2(XGConte)3.197 E(xtF)-.22 E -.495(ro)-.605 G -(mGC).495 E F0 5.947(.O)C .447(nly a limited number of func-)371.921 569.4 R -(tions can be applied to a font returned by)72 584.4 Q F2(gconte)2.75 E -(xt-font)-.22 E F0 2.75(,s)C(ince it has neither a name nor a font-ID.)322.602 -584.4 Q F1(\(list-f)72 614.4 Q(ont-names)-.275 E F2(display pattern)4.583 E F1 -235.918(\)p)C -.198(ro)462.244 614.4 S(cedur).198 E(e)-.198 E F0(See)72 633 Q -F2(XListF)2.75 E(onts)-1.155 E F0(.)A F2(pattern)5.5 E F0 -(is a string or a symbol.)2.75 E(Returns a v)5.5 E -(ector of font names \(strings\).)-.165 E F1(\(list-f)72 663 Q(onts)-.275 E F2 -(display pattern)4.583 E F1 265.244(\)p)C -.198(ro)462.244 663 S(cedur).198 E -(e)-.198 E F0(See)72 681.6 Q F2(XListF)3.548 E(ontsW)-1.155 E(ithInfo)-.605 E -F0(.)A F2(pattern)6.298 E F0 .798(is a string or a symbol.)3.548 F .799 -(Returns a v)6.298 F .799(ector of fonts.)-.165 F .799(These fonts)6.299 F -1.746(are `)72 696.6 R 1.746(`pseudo fonts')-.814 F 4.495('w)-.814 G 1.745 -(hich do not ha)173.047 696.6 R 2.075 -.165(ve a f)-.22 H 4.495(ont-ID. A).165 -F 1.745(pseudo font is loaded automatically and)4.495 F(turned into a `)72 -711.6 Q(`real')-.814 E 2.75('f)-.814 G -(ont the \214rst time it is passed to a function that mak)166.281 711.6 Q -(es use of the font-ID.)-.11 E EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(f)72 87 Q(ont-dir)-.275 E(ection)-.198 E/F2 -11/Times-Italic@0 SF(font)4.583 E F1 290.808(\)p)C -.198(ro)462.244 87 S(cedur) -.198 E(e)-.198 E(\(f)72 102 Q(ont-min-byte2)-.275 E F2(font)4.583 E F1 285.11 -(\)p)C -.198(ro)462.244 102 S(cedur).198 E(e)-.198 E(\(f)72 117 Q -(ont-max-byte2)-.275 E F2(font)4.583 E F1 283.284(\)p)C -.198(ro)462.244 117 S -(cedur).198 E(e)-.198 E(\(f)72 132 Q(ont-min-byte1)-.275 E F2(font)4.583 E F1 -285.11(\)p)C -.198(ro)462.244 132 S(cedur).198 E(e)-.198 E(\(f)72 147 Q -(ont-max-byte1)-.275 E F2(font)4.583 E F1 283.284(\)p)C -.198(ro)462.244 147 S -(cedur).198 E(e)-.198 E(\(f)72 162 Q(ont-all-chars-exist?)-.275 E F2(font)4.583 -E F1 261.284(\)p)C -.198(ro)462.244 162 S(cedur).198 E(e)-.198 E(\(f)72 177 Q -(ont-default-char)-.275 E F2(font)4.583 E F1 274.726(\)p)C -.198(ro)462.244 177 -S(cedur).198 E(e)-.198 E(\(f)72 192 Q(ont-ascent)-.275 E F2(font)4.583 E F1 -303.447(\)p)C -.198(ro)462.244 192 S(cedur).198 E(e)-.198 E(\(f)72 207 Q -(ont-descent)-.275 E F2(font)4.583 E F1 297.947(\)p)C -.198(ro)462.244 207 S -(cedur).198 E(e)-.198 E F0 .066 -(These functions return the font direction as a symbol \()72 225.6 R/F3 11 -/Courier@0 SF(left-to-right)A F0(or)2.816 E F3(right-to-left)2.816 E F0(\),)A -.2(the \214rst and last character \(as an inte)72 240.6 R .2 -(ger\), the \214rst and last ro)-.165 F 2.95(w\()-.275 G(inte)354.594 240.6 Q -.199(ger\), an indication whether all)-.165 F 2.966(characters ha)72 255.6 R -3.296 -.165(ve n)-.22 H 2.966(on-zero size \(boolean\), the def).165 F 2.966 -(ault character \(inte)-.11 F 2.966(ger\), and the ascent and)-.165 F -(descent \(inte)72 270.6 Q(ger\) of the speci\214ed font.)-.165 E F1(\(char)72 -300.6 Q(-rbearing)-.407 E F2(font inde)4.583 E(x)-.22 E F1 263.165(\)p)C -.198 -(ro)462.244 300.6 S(cedur).198 E(e)-.198 E(\(char)72 315.6 Q(-lbearing)-.407 E -F2(font inde)4.583 E(x)-.22 E F1 264.991(\)p)C -.198(ro)462.244 315.6 S(cedur) -.198 E(e)-.198 E(\(char)72 330.6 Q(-width)-.407 E F2(font inde)4.583 E(x)-.22 E -F1 277.212(\)p)C -.198(ro)462.244 330.6 S(cedur).198 E(e)-.198 E(\(char)72 -345.6 Q(-ascent)-.407 E F2(font inde)4.583 E(x)-.22 E F1 274.781(\)p)C -.198 -(ro)462.244 345.6 S(cedur).198 E(e)-.198 E(\(char)72 360.6 Q(-descent)-.407 E -F2(font inde)4.583 E(x)-.22 E F1 269.281(\)p)C -.198(ro)462.244 360.6 S(cedur) -.198 E(e)-.198 E F0 .074 -(These functions return the metrics of the character speci\214ed by the inte)72 -379.2 R(ger)-.165 E F2(inde)2.823 E(x)-.22 E F0 .073(of the gi)2.823 F -.165 -(ve)-.275 G 2.823(nf).165 G(ont.)487.192 379.2 Q(Each function returns an inte) -72 394.2 Q(ger)-.165 E(.)-.605 E F2(font)5.5 E F0 -(can be a 1-byte as well as a 2-byte font.)2.75 E F1(\(max-char)72 424.2 Q -(-lbearing)-.407 E F2(font)4.583 E F1 267.521(\)p)C -.198(ro)462.244 424.2 S -(cedur).198 E(e)-.198 E(\(max-char)72 439.2 Q(-rbearing)-.407 E F2(font)4.583 E -F1 265.695(\)p)C -.198(ro)462.244 439.2 S(cedur).198 E(e)-.198 E(\(max-char)72 -454.2 Q(-width)-.407 E F2(font)4.583 E F1 279.742(\)p)C -.198(ro)462.244 454.2 -S(cedur).198 E(e)-.198 E(\(max-char)72 469.2 Q(-ascent)-.407 E F2(font)4.583 E -F1 277.311(\)p)C -.198(ro)462.244 469.2 S(cedur).198 E(e)-.198 E(\(max-char)72 -484.2 Q(-descent)-.407 E F2(font)4.583 E F1 271.811(\)p)C -.198(ro)462.244 -484.2 S(cedur).198 E(e)-.198 E F0 .375 -(These functions return the maximum metrics o)72 502.8 R -.165(ve)-.165 G 3.125 -(ra).165 G .376(ll characters in the speci\214ed font.)301.896 502.8 R .376 -(Each func-)5.876 F(tion returns an inte)72 517.8 Q(ger)-.165 E(.)-.605 E F1 -(\(min-char)72 547.8 Q(-lbearing)-.407 E F2(font)4.583 E F1 269.347(\)p)C -.198 -(ro)462.244 547.8 S(cedur).198 E(e)-.198 E(\(min-char)72 562.8 Q(-rbearing) --.407 E F2(font)4.583 E F1 267.521(\)p)C -.198(ro)462.244 562.8 S(cedur).198 E -(e)-.198 E(\(min-char)72 577.8 Q(-width)-.407 E F2(font)4.583 E F1 281.568(\)p) -C -.198(ro)462.244 577.8 S(cedur).198 E(e)-.198 E(\(min-char)72 592.8 Q -(-ascent)-.407 E F2(font)4.583 E F1 279.137(\)p)C -.198(ro)462.244 592.8 S -(cedur).198 E(e)-.198 E(\(min-char)72 607.8 Q(-descent)-.407 E F2(font)4.583 E -F1 273.637(\)p)C -.198(ro)462.244 607.8 S(cedur).198 E(e)-.198 E F0 .506 -(These functions return the minimum metrics o)72 626.4 R -.165(ve)-.165 G 3.256 -(ra).165 G .506(ll characters in the speci\214ed font.)300.987 626.4 R .505 -(Each func-)6.005 F(tion returns an inte)72 641.4 Q(ger)-.165 E(.)-.605 E F1 -(\(f)72 671.4 Q(ont-pr)-.275 E(operties)-.198 E F2(font)4.583 E F1 284.703(\)p) -C -.198(ro)462.244 671.4 S(cedur).198 E(e)-.198 E F0 .362(Returns a v)72 690 R -.363(ector of font properties; each element of the v)-.165 F .363 -(ector is a pair consisting of the property)-.165 F -(name \(an atom\) and an unsigned inte)72 705 Q(ger \(the v)-.165 E -(alue of the property\).)-.275 E EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(7-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(f)72 87 Q(ont-pr)-.275 E(operty)-.198 E/F2 -11/Times-Italic@0 SF(font pr)4.583 E(operty-name)-.495 E F1 223.796(\)p)C -.198 -(ro)462.244 87 S(cedur).198 E(e)-.198 E F0 .406(Returns the v)72 105.6 R .405 -(alue of the speci\214ed property associated with the speci\214ed font.)-.275 F -F2(pr)5.905 E(operty-name)-.495 E F0 .405(is a)3.155 F(string or a symbol.)72 -120.6 Q F1(\(f)72 150.6 Q(ont-path)-.275 E F2(display)4.583 E F1 296.715(\)p)C --.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0(See)72 169.2 Q F2(XGetF)2.75 -E(ontP)-1.155 E(ath)-.88 E F0 5.5(.R)C(eturns the current font path as a v) -168.349 169.2 Q(ector of strings.)-.165 E F1(\(set-f)72 199.2 Q(ont-path!)-.275 -E F2(display path)4.583 E F1 254.255(\)p)C -.198(ro)462.244 199.2 S(cedur).198 -E(e)-.198 E F0(See)72 217.8 Q F2(XSetF)2.75 E(ontP)-1.155 E(ath)-.88 E F0(.)A -F2(path)5.5 E F0(is a list; each element is a string or a symbol.)2.75 E F1 -2.75(11. T)72 247.8 R(ext Metrics and T)-1.012 E(ext Drawing Functions)-1.012 E -(\(text-width)72 277.8 Q F2(font te)4.583 E(xt format)-.22 E F1 256.334(\)p)C --.198(ro)462.244 277.8 S(cedur).198 E(e)-.198 E F0(See)72 296.4 Q F2(XT)3.654 E --.22(ex)-1.012 G(tW).22 E(idth)-.605 E F0(,)A F2(XT)3.655 E -.22(ex)-1.012 G -(tW).22 E(idth16)-.605 E F0(.)A F2(format)6.405 E F0 .905 -(indicates whether 8-bit or 16-bit te)3.655 F .905(xt is used; it is either) --.165 F 1.051(the symbol)72 311.4 R/F3 11/Courier@0 SF(1-byte)3.801 E F0 1.051 -(or the symbol)3.801 F F3(2-byte)3.801 E F0(.)A F2(te)6.551 E(xt)-.22 E F0 -1.051(is a v)3.801 F 1.051(ector of inte)-.165 F 1.051(gers; the inte)-.165 F -1.051(gers must not)-.165 F -.165(ex)72 326.4 S -(ceed the size indicated by the format.).165 E F1(\(extents-lbearing)72 356.4 Q -F2(font te)4.583 E(xt format)-.22 E F1 228.834(\)p)C -.198(ro)462.244 356.4 S -(cedur).198 E(e)-.198 E(\(extents-rbearing)72 371.4 Q F2(font te)4.583 E -(xt format)-.22 E F1 227.008(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e) --.198 E(\(extents-width)72 386.4 Q F2(font te)4.583 E(xt format)-.22 E F1 -241.055(\)p)C -.198(ro)462.244 386.4 S(cedur).198 E(e)-.198 E(\(extents-ascent) -72 401.4 Q F2(font te)4.583 E(xt format)-.22 E F1 238.624(\)p)C -.198(ro) -462.244 401.4 S(cedur).198 E(e)-.198 E(\(extents-descent)72 416.4 Q F2(font te) -4.583 E(xt format)-.22 E F1 233.124(\)p)C -.198(ro)462.244 416.4 S(cedur).198 E -(e)-.198 E F0(See)72 435 Q F2(XT)3.107 E -.22(ex)-1.012 G(tExtents).22 E F0(,)A -F2(XT)3.107 E -.22(ex)-1.012 G(tExtents16).22 E F0 5.857(.T)C .358 -(hese functions are used to compute the o)236.806 435 R -.165(ve)-.165 G .358 -(rall metrics of an).165 F .699(8-bit or 16-bit character string.)72 450 R .699 -(Each function returns an inte)6.199 F(ger)-.165 E 6.199(.F)-.605 G .699 -(or the format of)374.384 450 R F2(te)3.449 E(xt)-.22 E F0(and)3.449 E F2(for) -3.449 E(-)-.22 E(mat)72 465 Q F0(see)2.75 E F2(te)2.75 E(xt-width)-.22 E F0 -(abo)2.75 E -.165(ve)-.165 G(.).165 E F1(\(draw-image-text)72 495 Q F2(dr)4.583 -E(awable gconte)-.165 E(xt x y te)-.22 E(xt format)-.22 E F1 147.676(\)p)C --.198(ro)462.244 495 S(cedur).198 E(e)-.198 E F0(See)72 513.6 Q F2(XDr)2.75 E -(awIma)-.165 E -.11(ge)-.11 G(String).11 E F0(,)A F2(XDr)2.75 E(awIma)-.165 E --.11(ge)-.11 G(String16).11 E F0 5.5(.S)C(ee)293.056 513.6 Q F2(te)2.75 E -(xt-width)-.22 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1(\(draw-poly-text)72 -543.6 Q F2(dr)4.583 E(awable gconte)-.165 E(xt x y te)-.22 E(xt format)-.22 E -F1 155.607(\)p)C -.198(ro)462.244 543.6 S(cedur).198 E(e)-.198 E F0(See)72 -562.2 Q F2(XDr)3.155 E(awT)-.165 E -.22(ex)-1.012 G(t).22 E F0(,)A F2(XDr)3.156 -E(awT)-.165 E -.22(ex)-1.012 G(t16).22 E F0 5.906(.S)C(ee)221.365 562.2 Q F2 -(te)3.156 E(xt-width)-.22 E F0(abo)3.156 E -.165(ve)-.165 G(.).165 E F2(te) -5.906 E(xt)-.22 E F0 .406(is a v)3.156 F .406(ector of inte)-.165 F .406 -(gers with intermix)-.165 F(ed)-.165 E(objects of type)72 577.2 Q F2(font)2.75 -E F0(.)A F1(\(translate-text)72 607.2 Q F2(string)4.583 E F1 283.625(\)p)C --.198(ro)462.244 607.2 S(cedur).198 E(e)-.198 E F0(Con)72 625.8 Q -.165(ve)-.44 -G .008(rts the string into a representation suitable as an ar).165 F .007 -(gument to)-.198 F F2(te)2.757 E(xt-width)-.22 E F0(,)A F2(dr)2.757 E(aw-ima) --.165 E -.11(ge)-.11 G(-te).11 E(xt)-.22 E F0 2.757(,o)C(r)500.337 625.8 Q F2 -(dr)72 640.8 Q(aw-poly-te)-.165 E(xt)-.22 E F0 .886(\(a v)3.636 F .886 -(ector of inte)-.165 F .886(gers obtained by applying)-.165 F F2 -.165(ch)3.637 -G(ar).165 E/F4 11/Symbol SF(-)A F2(>inte)A -.11(ge)-.44 G(r).11 E F0 .887 -(to the characters of the)3.637 F(string ar)72 655.8 Q(gument\).)-.198 E EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(8-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(12. Cursor)72 87 R(Functions)2.75 E -(\(cursor?)72 117 Q/F2 11/Times-Italic@0 SF(x)4.583 E F1 331.288(\)p)C -.198 -(ro)462.244 117 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 135.6 Q(f)-.275 E -F2(x)2.75 E F0(is an object of type)2.75 E F2(cur)2.75 E(sor)-.11 E F0(.)A F1 -(\(cursor)72 165.6 Q(-display)-.407 E F2(cur)4.583 E(sor)-.11 E F1 276.178(\)p) -C -.198(ro)462.244 165.6 S(cedur).198 E(e)-.198 E F0 -(Returns the display associated with the gi)72 184.2 Q -.165(ve)-.275 G 2.75 -(nc).165 G(ursor)277.788 184.2 Q(.)-.605 E F1(\(fr)72 214.2 Q -.917 -(ee-cursor \))-.198 F(pr)456.128 214.2 Q(ocedur)-.198 E(e)-.198 E F0(See)72 -232.8 Q F2(XF)2.75 E -.407(re)-.605 G(eCur).407 E(sor)-.11 E F0(.)A F1(\(cr)72 -262.8 Q(eate-cursor)-.198 E F2(sr)4.583 E 2.75(cm)-.407 G(ask x y for)166.684 -262.8 Q -.44(eg)-.407 G -.495(ro).44 G(und bac).495 E(kgr)-.22 E(ound)-.495 E -F1 150.36(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E(e)-.198 E F0(See)72 281.4 -Q F2(XCr)2.75 E(eatePixmapCur)-.407 E(sor)-.11 E F0(.)A F2(sr)5.5 E(c)-.407 E -F0(and)2.75 E F2(mask)2.75 E F0(are pixmaps.)2.75 E F2(mask)5.5 E F0 -(can be the symbol)2.75 E/F3 11/Courier@0 SF(none)2.75 E F0(.)A F1(\(cr)72 -311.4 Q(eate-glyph-cursor)-.198 E F2(sr)4.583 E 2.75(cs)-.407 G -.407(rc) -192.974 311.4 S(-c).407 E(har mask mask-c)-.165 E(har for)-.165 E -.44(eg)-.407 -G -.495(ro).44 G(und bac).495 E(kgr)-.22 E(ound)-.495 E F1 47.213(\)p)C -.198 -(ro)462.244 311.4 S(cedur).198 E(e)-.198 E F0(See)72 330 Q F2(XCr)2.783 E -(eateGlyphCur)-.407 E(sor)-.11 E F0(.)A F2(sr)5.533 E(c)-.407 E F0(and)2.783 E -F2(mask)2.783 E F0 .033(are fonts.)2.783 F F2(mask)5.533 E F0 .033 -(can be the symbol)2.783 F F3(none)2.783 E F0 5.532(.T)C .032(he display is) -448.936 330 R(obtained from)72 345 Q F2(sr)2.75 E(c)-.407 E F0(.)A F2(sr)5.5 E -(c-c)-.407 E(har)-.165 E F0(and)2.75 E F2(mask-c)2.75 E(har)-.165 E F0 -(are inte)2.75 E(gers.)-.165 E F1(\(cr)72 375 Q(eate-f)-.198 E(ont-cursor)-.275 -E F2(display sr)4.583 E(c-c)-.407 E(har)-.165 E F1 215.953(\)p)C -.198(ro) -462.244 375 S(cedur).198 E(e)-.198 E F0(See)72 393.6 Q F2(XCr)3.047 E -(eateGlyphCur)-.407 E(sor)-.11 E F0 5.797(.C)C(alls)201.019 393.6 Q F2(cr)3.048 -E(eate-glyph-cur)-.407 E(sor)-.11 E F0 .298(with the font named `)3.048 F -(`cursor')-.814 E .298(', the speci\214ed)-.814 F F2(sr)72 408.6 Q(c-c)-.407 E -(har)-.165 E F0 2.75(,a)C F2(mask-c)A(har)-.165 E F0(of)2.75 E F3 -(\(1+ src-char\))2.75 E F0 2.75(,b)C(lack fore)279.559 408.6 Q -(ground, and white background.)-.165 E F1(\(r)72 438.6 Q(ecolor)-.198 E -(-cursor)-.407 E F2(cur)4.583 E(sor for)-.11 E -.44(eg)-.407 G -.495(ro).44 G -(und bac).495 E(kgr)-.22 E(ound)-.495 E F1 170.919(\)p)C -.198(ro)462.244 438.6 -S(cedur).198 E(e)-.198 E F0(See)72 457.2 Q F2(XRecolorCur)2.75 E(sor)-.11 E F1 -(\(de\214ne-cursor)72 487.2 Q F2(window cur)4.583 E(sor)-.11 E F1 244.3(\)p)C --.198(ro)462.244 487.2 S(cedur).198 E(e)-.198 E F0(Synon)72 505.8 Q(ym for) --.165 E F3(\(set-window-cursor! window cursor\))2.75 E F0(.)A F1 -(\(unde\214ne-cursor)72 535.8 Q F2(window)4.583 E F1 263.429(\)p)C -.198(ro) -462.244 535.8 S(cedur).198 E(e)-.198 E F0(Synon)72 554.4 Q(ym for)-.165 E F3 -(\(set-window-cursor! window 'none\))2.75 E F0(.)A F1 2.75(13. Grab)72 584.4 R -(Functions)2.75 E(\(grab-pointer)72 614.4 Q F2(window owner? e)4.583 E -(vents ptr)-.165 E(-sync? kbd-sync? con\214ne-to cur)-.22 E(sor time)-.11 E F1 -21.066(\)p)C -.198(ro)462.244 614.4 S(cedur).198 E(e)-.198 E F0(See)72 633 Q F2 -(XGr)3.367 E(abP)-.165 E(ointer)-.88 E F0(.)A F2(window)6.117 E F0(and)3.367 E -F2(con\214ne-to)3.367 E F0 .617(are windo)3.367 F(ws.)-.275 E F2 -.165(ev)6.117 -G(ents).165 E F0 .616(is a list of symbols \(e)3.367 F -.165(ve)-.275 G .616 -(nt mask).165 F 1.999(names, such as)72 648 R F3(enter-window)4.749 E F0(,)A F3 -(pointer-motion)4.749 E F0 4.749(,e)C(tc.\).)337.91 648 Q F2(ptr)7.499 E -(-sync?)-.22 E F0(and)4.749 E F2(kbd-sync?)4.75 E F0(deter)4.75 E(-)-.22 E -1.233(mine whether synchronous or asynchronous grab mode is to be used.)72 663 -R F2(time)6.733 E F0 1.233(is an inte)3.983 F 1.233(ger or the)-.165 F(symbol) -72 678 Q F3(now)4.431 E F0(\(for)4.431 E F2(Curr)4.431 E(entT)-.407 E(ime)-.605 -E F0(\).)A F2(gr)7.181 E(ab-pointer)-.165 E F0 1.682(returns a symbol \()4.431 -F F3(success)A F0(,)A F3(not-viewable)4.432 E F0(,)A F3(already-grabbed)72 693 -Q F0(,)A F3(frozen)2.75 E F0 2.75(,o)C(r)227.1 693 Q F3(invalid-time)2.75 E F0 -(\).)A EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(9-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(ungrab-pointer)72 87 Q/F2 11/Times-Italic@0 -SF(display time)4.583 E F1 246.632(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e) --.198 E F0(See)72 105.6 Q F2(XUngr)2.75 E(abP)-.165 E(ointer)-.88 E F0(.)A F1 -(\(grab-b)72 135.6 Q(utton)-.22 E F2(win b)4.583 E(utton mod owner? e)-.22 E -(vents ptr)-.165 E(-sync? kbd-sync? con\214ne-to cur)-.22 E(sor)-.11 E F1 -12.024(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q -F2(XGr)3.155 E(abButton)-.165 E F0(.)A F2 -.22(bu)5.905 G(tton).22 E F0 .405 -(is a symbol \()3.155 F/F3 11/Courier@0 SF(button1)A F0(...)3.155 E F3(button5) -3.155 E F0 3.155(,o)C(r)365.968 154.2 Q F3(any-button)3.155 E F0(\).)A F3(mod) -5.905 E F0(\(modi-)3.154 E .184(\214ers\) is a list of symbols \()72 169.2 R F3 -(shift)A F0(,)A F3(lock)2.934 E F0(,)A F3(control)2.934 E F0(,)A F3(mod1)2.934 -E F0(...)2.934 E F3(mod5)2.934 E F0(,)A F3(button1)2.934 E F0(...)2.934 E F3 -(button5)2.934 E F0 2.934(,o)C(r)500.337 169.2 Q F3(any-modifier)72 184.2 Q F0 -2.75(\). F)B(or the other ar)-.165 E(guments see)-.198 E F2(gr)2.75 E -(ab-pointer)-.165 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1(\(ungrab-b)72 -214.2 Q(utton)-.22 E F2(window b)4.583 E(utton modi\214er)-.22 E(s)-.11 E F1 -194.91(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 E F0(See)72 232.8 Q -F2(XUngr)2.75 E(abButton)-.165 E F0 5.5(.S)C(ee)175.114 232.8 Q F2(gr)2.75 E -(ab-b)-.165 E(utton)-.22 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1 -(\(change-acti)72 262.8 Q -.11(ve)-.11 G(-pointer).11 E(-grab)-.407 E F2 -(display e)4.583 E(vents cur)-.165 E(sor time)-.11 E F1 130.241(\)p)C -.198(ro) -462.244 262.8 S(cedur).198 E(e)-.198 E F0(See)72 281.4 Q F2(XChang)2.941 E -(eActiveP)-.11 E(ointerGr)-.88 E(ab)-.165 E F0(.)A F2 -.165(ev)5.691 G(ents) -.165 E F0 .191(is a list of symbols \(e)2.941 F -.165(ve)-.275 G .191 -(nt mask names, such as).165 F F3(enter-)2.941 E(window)72 296.4 Q F0(,)A F3 -(pointer-motion)2.75 E F0 2.75(,e)C(tc.\).)219.884 296.4 Q F1(\(grab-k)72 326.4 -Q(eyboard)-.11 E F2(window owner? pointer)4.583 E(-sync? k)-.22 E -.33(ey)-.11 -G(boar).33 E(d-sync? time)-.407 E F1 75.813(\)p)C -.198(ro)462.244 326.4 S -(cedur).198 E(e)-.198 E F0(See)72 345 Q F2(XGr)4.016 E(abK)-.165 E -.33(ey) --.385 G(boar).33 E(d)-.407 E F0 6.766(.F)C 1.266(or a description of the ar) -179.406 345 R 1.267(guments and the return v)-.198 F 1.267(alue see)-.275 F F2 -(gr)4.017 E(ab-pointer)-.165 E F0(abo)72 360 Q -.165(ve)-.165 G(.).165 E F1 -(\(ungrab-k)72 390 Q(eyboard)-.11 E F2(display time)4.583 E F1 236.347(\)p)C --.198(ro)462.244 390 S(cedur).198 E(e)-.198 E F0(See)72 408.6 Q F2(XUngr)2.75 E -(abK)-.165 E -.33(ey)-.385 G(boar).33 E(d)-.407 E F0(.)A F1(\(grab-k)72 438.6 Q -(ey)-.11 E F2(window k)4.583 E .66 -.33(ey m)-.11 H(odi\214er).33 E 2.75(so) --.11 G(wner? pointer)225.325 438.6 Q(-sync? k)-.22 E -.33(ey)-.11 G(boar).33 E -(d-sync?)-.407 E F1 65.077(\)p)C -.198(ro)462.244 438.6 S(cedur).198 E(e)-.198 -E F0(See)72 457.2 Q F2(XGr)3.901 E(abK)-.165 E -.33(ey)-.385 G F0(.).33 E F2 --.11(ke)6.651 G(y)-.22 E F0 1.151(is a k)3.901 F -.165(ey)-.11 G 1.151 -(code \(an inte).165 F 1.151(ger\) or the symbol)-.165 F F3(any)3.901 E F0 6.65 -(.F)C 1.15(or the other ar)383.515 457.2 R 1.15(guments see)-.198 F F2(gr)72 -472.2 Q(ab-pointer)-.165 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1 -(\(ungrab-k)72 502.2 Q(ey)-.11 E F2(window k)4.583 E .66 -.33(ey m)-.11 H -(odi\214er).33 E(s)-.11 E F1 223.158(\)p)C -.198(ro)462.244 502.2 S(cedur).198 -E(e)-.198 E F0(See)72 520.8 Q F2(XUngr)2.75 E(abK)-.165 E -.33(ey)-.385 G F0 -5.5(.S).33 G(ee)162.167 520.8 Q F2(gr)2.75 E(ab-k)-.165 E -.33(ey)-.11 G F0 -(abo)3.08 E -.165(ve)-.165 G(.).165 E F1(\(allo)72 550.8 Q(w-e)-.11 E -.11(ve) --.165 G(nts).11 E F2(display mode time)4.583 E F1 234.51(\)p)C -.198(ro)462.244 -550.8 S(cedur).198 E(e)-.198 E F0(See)72 569.4 Q F2(XAllowEvents)7.511 E F0(.)A -F2(mode)170.127 569.4 Q F0 4.761(is a symbol \()7.511 F F3(async-pointer)A F0 -(,)A F3(sync-pointer)7.512 E F0(,)A F3(replay-)7.512 E(pointer)72 584.4 Q F0(,) -A F3(async-keyboard)3.938 E F0(,)A F3(sync-keyboard)3.938 E F0(,)A F3 -(replay-keyboard)3.937 E F0(,)A F3(async-both)3.937 E F0 3.937(,o)C(r)500.337 -584.4 Q F3(sync-both)72 599.4 Q F0(\).)A F1(\(grab-ser)72 629.4 Q -.11(ve)-.11 -G(r).11 E F2(display)4.583 E F1 285.682(\)p)C -.198(ro)462.244 629.4 S(cedur) -.198 E(e)-.198 E F0(See)72 648 Q F2(XGr)2.75 E(abServer)-.165 E F0(.)A F1 -(\(ungrab-ser)72 678 Q -.11(ve)-.11 G(r).11 E F2(display)4.583 E F1 273.45(\)p) -C -.198(ro)462.244 678 S(cedur).198 E(e)-.198 E F0(See)72 696.6 Q F2(XUngr)2.75 -E(abServer)-.165 E F0(.)A EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(with-ser)72 87 Q -.11(ve)-.11 G -.407(r-) -.11 G(grab).407 E(bed)-.11 E/F2 11/Times-Italic@0 SF(display . body-forms)4.583 -E F1 203.6(\)s)C(yntax)477.721 87 Q F0 1.344(This macro performs a)72 105.6 R -F2(gr)4.094 E(ab-server)-.165 E F0 1.344(on the speci\214ed display)4.094 F -4.094(,e)-.715 G -.275(va)354.223 105.6 S 1.345(luates the).275 F F2 -(body-forms)4.095 E F0 1.345(in order)4.095 F(,)-.44 E 1.158 -(and then ungrabs the serv)72 120.6 R(er)-.165 E 6.658(.T)-.605 G 1.158 -(he macro body is guarded by a)212.958 120.6 R F2(dynamic-wind)3.907 E F0 1.157 -(to ensure that the)3.907 F F2(ungr)72 135.6 Q(ab-server)-.165 E F0 .11(is per\ -formed when a body-form calls a continuation created outside the macro, and) -2.859 F .563(that it is grabbed ag)72 150.6 R .563 -(ain when the body is re-entered at a later point in time.)-.055 F F2 -(with-server)6.062 E(-gr)-.22 E(abbed)-.165 E F0(returns the v)72 165.6 Q -(alue of the last body-form.)-.275 E F1 2.75(14. W)72 195.6 R(indo)-.198 E 2.75 -(wM)-.11 G(anager Functions)143.808 195.6 Q(\(r)72 225.6 Q(epar)-.198 E -(ent-windo)-.198 E(w)-.11 E F2(window par)4.583 E(ent-window x y)-.407 E F1 -172.998(\)p)C -.198(ro)462.244 225.6 S(cedur).198 E(e)-.198 E F0(See)72 244.2 Q -F2(XRepar)2.75 E(entW)-.407 E(indow)-.605 E F0(.)A F1(\(install-colormap)72 -274.2 Q F2(colormap)4.583 E F1 253.056(\)p)C -.198(ro)462.244 274.2 S(cedur) -.198 E(e)-.198 E F0(See)72 292.8 Q F2(XInstallColormap)2.75 E F0(.)A F1 -(\(uninstall-colormap)72 322.8 Q F2(colormap)4.583 E F1 240.824(\)p)C -.198(ro) -462.244 322.8 S(cedur).198 E(e)-.198 E F0(See)72 341.4 Q F2(XUninstallColormap) -2.75 E F0(.)A F1(\(list-installed-colormaps)72 371.4 Q F2(window)4.583 E F1 -227.987(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e)-.198 E F0(See)72 390 Q -F2(XListInstalledColormaps)2.75 E F0 5.5(.R)C(eturns a v)216.848 390 Q -(ector of colormaps.)-.165 E F1(\(set-input-f)72 420 Q(ocus)-.275 E F2 -(display window r)4.583 E -.165(ev)-.407 G(ert-to time).165 E F1 171.711(\)p)C --.198(ro)462.244 420 S(cedur).198 E(e)-.198 E F0(See)72 438.6 Q F2(XSetInputF) -2.978 E(ocus)-1.155 E F0(.)A F2(window)5.728 E F0 .228(can be the symbol)2.978 -F/F3 11/Courier@0 SF(pointer-root)2.978 E F0(.)A F2 -2.101 -.407(re v)5.728 H -(ert-to).407 E F0 .228(is a symbol \()2.978 F F3(none)A F0(,)A F3(pointer-root) -72 453.6 Q F0 2.75(,o)C(r)162.2 453.6 Q F3(parent)2.75 E F0(\).)A F2(time)5.5 E -F0(is an inte)2.75 E(ger or the symbol)-.165 E F3(now)2.75 E F0(.)A F1 -(\(input-f)72 483.6 Q(ocus)-.275 E F2(display)4.583 E F1 287.541(\)p)C -.198 -(ro)462.244 483.6 S(cedur).198 E(e)-.198 E F0(See)72 502.2 Q F2(XGetInputF) -2.762 E(ocus)-1.155 E F0 5.512(.R)C .012 -(eturns a pair the car of which is a windo)177.8 502.2 R 1.441 -.715(w, a)-.275 -H .011(nd the cdr is a symbol \().715 F F3(none)A F0(,)A F3(pointer-root)72 -517.2 Q F0 2.75(,o)C(r)162.2 517.2 Q F3(parent)2.75 E F0(\).)A F1 -(\(general-war)72 547.2 Q(p-pointer)-.11 E F2(display dst-win dst-x dst-y sr) -4.583 E(c-win sr)-.407 E(c-x sr)-.407 E(c-y sr)-.407 E(c-width sr)-.407 E -(c-height)-.407 E F1 -18.534(\)p)C -.198(ro)462.244 547.2 S(cedur).198 E(e) --.198 E F0(See)72 565.8 Q F2(XW)2.75 E(arpP)-1.012 E(ointer)-.88 E F0(.)A F1 -(\(war)72 595.8 Q(p-pointer)-.11 E F2(dst-window dst-x dst-y)4.583 E F1 211.003 -(\)p)C -.198(ro)462.244 595.8 S(cedur).198 E(e)-.198 E F0(See)72 614.4 Q F2(XW) -5.974 E(arpP)-1.012 E(ointer)-.88 E F0 8.725(.I)C -2.09 -.44(nv o)171.267 614.4 -T -.11(ke).44 G(s).11 E F2 -.11(ge)5.975 G(ner).11 E(al-warp-pointer)-.165 E F0 -3.225(with the display associated with the)5.975 F F2(dst-)5.975 E(window)72 -629.4 Q F0 4.276(,t)C(he)116.316 629.4 Q F2(dst-window)4.276 E F0(,)A F2(dst-x) -4.276 E F0(,)A F2(dst-y)4.276 E F0 4.276(,a)C F2(sr)-.001 E(c-window)-.407 E F0 -(of)4.275 E F3(none)4.275 E F0 4.275(,a)C 1.525(nd zero source coordinates and) -361.665 629.4 R(dimensions.)72 644.4 Q F1(\(war)72 674.4 Q(p-pointer)-.11 E(-r) --.407 E(elati)-.198 E -.11(ve)-.11 G F2(display x-of)4.693 E(fset y-of)-.198 E -(fset)-.198 E F1 170.083(\)p)C -.198(ro)462.244 674.4 S(cedur).198 E(e)-.198 E -F0(See)72 693 Q F2(XW)4.782 E(arpP)-1.012 E(ointer)-.88 E F0 7.532(.I)C -2.09 --.44(nv o)168.882 693 T -.11(ke).44 G(s).11 E F2 -.11(ge)4.782 G(ner).11 E -(al-warp-pointer)-.165 E F0 2.032(with the speci\214ed)4.782 F F2(display)4.783 -E F0 4.783(,a)C F2(dst-window)A F0(of)4.783 E F3(none)72 708 Q F0(,)A F2(x-of) -2.75 E(fset)-.198 E F0(,)A F2(y-of)2.75 E(fset)-.198 E F0 2.75(,a)C F2(sr)A -(c-window)-.407 E F0(of)2.75 E F3(none)2.75 E F0 2.75(,a)C -(nd zero source coordinates and dimensions.)289.283 708 Q EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(bell)72 87 Q/F2 11/Times-Italic@0 SF -(display . per)4.583 E(cent)-.407 E F1 282.492(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XBell)2.75 E F0(.)A F2(per)5.5 E -(cent)-.407 E F0(is an inte)2.75 E(ger between -100 and 100.)-.165 E(If)5.5 E -F2(per)2.75 E(cent)-.407 E F0(is omitted, 0 is used.)2.75 E F1 -(\(set-access-contr)72 135.6 Q(ol)-.198 E F2(display enable?)4.583 E F1 220.595 -(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2 -(XSetAccessContr)2.75 E(ol)-.495 E F0(.)A F1(\(change-sa)72 184.2 Q -.11(ve) --.275 G(-set).11 E F2(window mode)4.583 E F1 238.481(\)p)C -.198(ro)462.244 -184.2 S(cedur).198 E(e)-.198 E F0(See)72 202.8 Q F2(XChang)2.75 E(eSaveSet)-.11 -E F0(.)A F2(mode)5.5 E F0(is a symbol \()2.75 E/F3 11/Courier@0 SF(insert)A F0 -(or)2.75 E F3(delete)2.75 E F0(\).)A F1(\(set-close-do)72 232.8 Q(wn-mode)-.11 -E F2(display mode)4.583 E F1 216.217(\)p)C -.198(ro)462.244 232.8 S(cedur).198 -E(e)-.198 E F0(See)72 251.4 Q F2(XSetCloseDownMode)6.138 E F0(.)A F2(mode)8.888 -E F0 3.388(is a symbol \()6.138 F F3(destroy-all)A F0(,)A F3(retain-permanent) -6.137 E F0 6.137(,o)C(r)500.337 251.4 Q F3(retain-temporary)72 266.4 Q F0(\).)A -F1(\(get-pointer)72 296.4 Q(-mapping)-.407 E F2(display)4.583 E F1 243.684(\)p) -C -.198(ro)462.244 296.4 S(cedur).198 E(e)-.198 E F0(See)72 315 Q F2(XGetP)2.75 -E(ointerMapping)-.88 E F0 5.5(.R)C(eturns a v)200.667 315 Q(ector of 256 inte) --.165 E(gers.)-.165 E F1(\(set-pointer)72 345 Q(-mapping)-.407 E F2 -(display mapping)4.583 E F1 203.655(\)p)C -.198(ro)462.244 345 S(cedur).198 E -(e)-.198 E F0(See)72 363.6 Q F2(XSetP)4.521 E(ointerMapping)-.88 E F0(.)A F2 -(mapping)7.271 E F0 1.772(is a v)4.521 F 1.772(ector of inte)-.165 F 4.522 -(gers. Returns)-.165 F 1.772(#t if)4.522 F F2(XSetP)4.522 E(ointerMapping)-.88 -E F0(succeeds, #f otherwise.)72 378.6 Q F1 2.75(15. Ev)72 408.6 R -(ent Handling Functions)-.11 E(\(e)72 438.6 Q -.11(ve)-.165 G(nt-listen).11 E -F2(display wait?)4.583 E F1 259.744(\)p)C -.198(ro)462.244 438.6 S(cedur).198 E -(e)-.198 E F0(See)72 457.2 Q F2(XP)2.87 E(ending)-.88 E F0(,)A F2(XP)2.87 E -(eekEvent)-.88 E F0 5.62(.R)C .12(eturns the size of the display')206.846 457.2 -R 2.869(se)-.605 G -.165(ve)347.825 457.2 S .119(nt queue.).165 F(If)5.619 E F2 -(wait?)2.869 E F0 .119(is true and the)2.869 F -2.365 -.275(ev e)72 472.2 T -.832(nt queue is empty).275 F(,)-.715 E F2 -.165(ev)3.582 G(ent-listen).165 E -F0 .832(\215ushes the output b)3.582 F(uf)-.22 E .832 -(fer and blocks until an e)-.275 F -.165(ve)-.275 G .833(nt is recei).165 F --.165(ve)-.275 G(d).165 E(from the serv)72 487.2 Q(er)-.165 E(.)-.605 E F1 -(\(get-motion-e)72 517.2 Q -.11(ve)-.165 G(nts).11 E F2(window fr)4.583 E -(om-time to-time)-.495 E F1 175.011(\)p)C -.198(ro)462.244 517.2 S(cedur).198 E -(e)-.198 E F0(See)72 535.8 Q F2(XGetMotionEvents)5.215 E F0(.)A F2(fr)7.965 E -(om-time)-.495 E F0(and)5.215 E F2(to-time)5.215 E F0 2.465(are inte)5.215 F -2.465(gers or the symbol)-.165 F F3(now)5.214 E F0(.)A F2 -.11(ge)7.964 G -(t-motion-).11 E -.165(ev)72 550.8 S(ents).165 E F0 1.094(returns a v)3.844 F -1.094(ector of lists of three elements: a time stamp \(an inte)-.165 F 1.094 -(ger or the symbol)-.165 F F3(now)3.844 E F0(\),)A -(and the x and y coordinates \(inte)72 565.8 Q(gers\).)-.165 E F1(\(handle-e)72 -595.8 Q -.11(ve)-.165 G(nts).11 E F2(display discar)4.583 E(d? peek? . clauses) --.407 E F1 183.371(\)s)C(yntax)477.721 595.8 Q F0(See)72 614.4 Q F2(XNe)4.836 E -(xtEvent)-.22 E F0(,)A F2(XP)4.836 E(eekEvent)-.88 E F0(,)A F2(XIfEvent)4.836 E -F0(,)A F2(XP)4.835 E(eekIfEvent)-.88 E F0(.)A F2(handle-e)7.585 E(vents)-.165 E -F0 2.085(is a special form.)4.835 F(Each)7.585 E F2(clause)72 629.4 Q F0 2.037 -(is of the form)4.787 F F2(\(guar)4.787 E 4.787(df)-.407 G(unction\))212.746 -629.4 Q F0(;)A F2(guar)4.787 E(d)-.407 E F0 2.037(is either an e)4.787 F -.165 -(ve)-.275 G 2.037(nt name \(a symbol, e.).165 F(g.)1.833 E F3(key-)4.788 E -(press)72 644.4 Q F0(or)3.408 E F3(exposure)3.408 E F0 .658(\), a list of e)B --.165(ve)-.275 G .658(nt names, or the symbol).165 F F3(else)3.407 E F0(.)A F2 -(handle-e)6.157 E(vents)-.165 E F0 .657(gets the ne)3.407 F(xt)-.165 E -2.365 --.275(ev e)72 659.4 T .247(nt from the speci\214ed display).275 F 5.747(.T) --.715 G .247(hen the e)227.587 659.4 R -.165(ve)-.275 G .247 -(nt type is matched ag).165 F .248(ainst each e)-.055 F -.165(ve)-.275 G .248 -(nt name in each).165 F .145(guard in order)72 674.4 R 5.645(.W)-.605 G .145 -(hen a match occurs, the corresponding function is in)152.779 674.4 R -.22(vo) --.44 G -.11(ke).22 G 2.895(dw).11 G .145(ith the name of the)420.933 674.4 R --2.365 -.275(ev e)72 689.4 T 1.738(nt being dispatched \(a symbol\) and other) -.275 F 4.489(,e)-.44 G -.165(ve)288.306 689.4 S 1.739(nt speci\214c ar).165 F -1.739(guments \(see belo)-.198 F 4.489(w\). When)-.275 F(no)4.489 E .615 -(clause matches and an)72 704.4 R F3(else)3.365 E F0 .614 -(clause is present, the function from this clause is in)3.365 F -.22(vo)-.44 G --.11(ke).22 G(d.).11 E F2(handle-)6.114 E -.165(ev)72 719.4 S(ents).165 E F0 -.935(loops until a function returns a v)3.684 F .935 -(alue not equal to #f in which case handle-e)-.275 F -.165(ve)-.275 G .935 -(nts returns).165 F(this v)72 734.4 Q(alue.)-.275 E EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(If)72 87 Q/F1 11/Times-Italic@0 SF(discar)3.124 E(d?)-.407 E F0 -.374(is true, unprocessed e)3.124 F -.165(ve)-.275 G .373(nts \(i.).165 F .373 -(e. e)1.833 F -.165(ve)-.275 G .373 -(nts for which no matching clause has been found\)).165 F 1.17(are remo)72 102 -R -.165(ve)-.165 G 3.92(df).165 G 1.17(rom the e)135.093 102 R -.165(ve)-.275 G -1.17(nt queue, otherwise the).165 F 3.921(ya)-.165 G 1.171(re left in place.) -308.611 102 R(If)6.671 E F1(peek?)3.921 E F0 1.171(is true, processed)3.921 F --2.365 -.275(ev e)72 117 T(nts are not remo).275 E -.165(ve)-.165 G 2.75(df) -.165 G(rom the e)179.976 117 Q -.165(ve)-.275 G(nt queue.).165 E 1.172 -(The follo)72 135.6 R 1.172(wing list gi)-.275 F -.165(ve)-.275 G 3.922(sa).165 -G 1.172(ll e)188.415 135.6 R -.165(ve)-.275 G 1.172(nt speci\214c ar).165 F -1.172(guments for each e)-.198 F -.165(ve)-.275 G 1.171(nt type.).165 F 1.171 -(The \214rst ar)6.671 F 1.171(gument is)-.198 F(al)72 150.6 Q -.11(wa)-.11 G -(ys the e).11 E -.165(ve)-.275 G(nt type \(a symbol\).).165 E 1.066 -(In the follo)72 169.2 R 1.066(wing list, ar)-.275 F 1.067 -(guments with names of the form)-.198 F F1(something-window)3.817 E F0 1.067 -(\(or simply)3.817 F F1(window)3.817 E F0(\))A .553(are al)72 184.2 R -.11(wa) --.11 G .553(ys of type).11 F F1(window)3.303 E F0 3.303(;a)C -.198(rg)202.552 -184.2 S .553(uments with names of the form).198 F F1(something-atom)3.303 E F0 -.553(\(or simply)3.303 F F1(atom)3.302 E F0(\))A .331(are al)72 199.2 R -.11 -(wa)-.11 G .331(ys of type).11 F F1(atom)3.081 E F0(.)A F1(time)5.832 E F0 .332 -(is an inte)3.082 F .332(ger or the symbol)-.165 F/F2 11/Courier@0 SF(now)3.082 -E F0(.)A F1(x)5.832 E F0(,)A F1(y)3.082 E F0(,)A F1(width)3.082 E F0(,)A F1 -(height)3.082 E F0(,)A F1(bor)3.082 E(der)-.407 E(-width)-.22 E F0(,)A F1(x-r) -72 214.2 Q(oot)-.495 E F0(,)A F1(y-r)3.094 E(oot)-.495 E F0(,)A F1(count)3.094 -E F0(,)A F1(major)3.093 E(-code)-.22 E F0(,)A F1(minor)3.093 E(-code)-.22 E F0 -3.093(,a)C(nd)284.301 214.2 Q F1 -.11(ke)3.093 G(ycode)-.22 E F0 .343(are inte) -3.093 F(gers.)-.165 E F1(state)5.843 E F0 .343(is a list of symbols)3.093 F(\() -72 229.2 Q F2(shift)A F0(,)A F2(lock)3.225 E F0(,)A F2(control)3.225 E F0(,)A -F2(mod1)3.225 E F0(...)3.225 E F2(mod5)3.225 E F0(,)A F2(button1)3.225 E F0 -(...)3.225 E F2(button5)3.225 E F0(\).)A F1 -.22(bu)5.975 G(tton).22 E F0 .475 -(is one of the sym-)3.225 F(bols)72 244.2 Q F2(button1)3.297 E F0(...)3.297 E -F2(button5)3.297 E F0(,)A F1 -.22(bu)3.297 G(tton-mask).22 E F0 .547 -(is a list of one or more of these symbols.)3.297 F F1(cr)6.046 E(oss-mode) --.495 E F0(is a symbol \()72 259.2 Q F2(normal)A F0(,)A F2(grab)2.75 E F0(,)A -F2(ungrab)2.75 E F0(\).)A F1(place)5.5 E F0(is a symbol \()2.75 E F2(top)A F0 -(or)2.75 E F2(bottom)2.75 E F0(\).)A/F3 11/Times-Bold@0 SF -.11(ke)72 277.8 S -(y-pr).11 E(ess, k)-.198 E(ey-r)-.11 E(elease:)-.198 E F1(window)97 292.8 Q F0 -(,)A F1 -.495(ro)2.75 G(ot-window).495 E F0(,)A F1(sub-window)2.75 E F0(,)A F1 -(time)2.75 E F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E F0(,)A F1(x-r)2.75 E(oot) --.495 E F0(,)A F1(y-r)2.75 E(oot)-.495 E F0(,)A F1(state)2.75 E F0(,)A F1 -.11 -(ke)2.75 G(ycode)-.22 E F0(,)A F1(same-scr)2.75 E(een?)-.407 E F0(.)A F3 -.22 -(bu)72 311.4 S(tton-pr).22 E(ess, b)-.198 E(utton-r)-.22 E(elease:)-.198 E F1 -(window)97 326.4 Q F0(,)A F1 -.495(ro)2.75 G(ot-window).495 E F0(,)A F1 -(sub-window)2.75 E F0(,)A F1(time)2.75 E F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E -F0(,)A F1(x-r)2.75 E(oot)-.495 E F0(,)A F1(y-r)2.75 E(oot)-.495 E F0(,)A F1 -(state)2.75 E F0(,)A F1 -.22(bu)2.75 G(tton).22 E F0(,)A F1(same-scr)2.75 E -(een?)-.407 E F0(.)A F3(motion-notify:)72 345 Q F1(window)97 360 Q F0(,)A F1 --.495(ro)2.75 G(ot-window).495 E F0(,)A F1(sub-window)2.75 E F0(,)A F1(time) -2.75 E F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E F0(,)A F1(x-r)2.75 E(oot)-.495 E -F0(,)A F1(y-r)2.75 E(oot)-.495 E F0(,)A F1(state)2.75 E F0(,)A F1(is-hint?)2.75 -E F0(,)A F1(same-scr)2.75 E(een?)-.407 E F0(.)A F3(enter)72 378.6 Q(-notify) --.407 E 2.75(,l)-.605 G(ea)135.14 378.6 Q -.11(ve)-.275 G(-notify:).11 E F1 -(window)97 393.6 Q F0(,)A F1 -.495(ro)3.641 G(ot-window).495 E F0(,)A F1 -(sub-window)3.641 E F0(,)A F1(time)3.641 E F0(,)A F1(x)3.641 E F0(,)A F1(y) -3.641 E F0(,)A F1(x-r)3.641 E(oot)-.495 E F0(,)A F1(y-r)3.641 E(oot)-.495 E F0 -(,)A F1(cr)3.641 E(oss-mode)-.495 E F0(,)A F1(cr)3.641 E(oss-detail)-.495 E F0 -(\(one)3.641 E 5.753(of the symbols)97 408.6 R F2(ancestor)8.503 E F0(,)A F2 -(virtual)8.503 E F0(,)A F2(inferior)8.503 E F0(,)A F2(nonlinear)8.503 E F0(,)A -F2(nonlinear-)8.503 E(virtual)97 423.6 Q F0(\),)A F1(same-scr)2.75 E(een?)-.407 -E F0(,)A F1(focus?)2.75 E F0(,)A F1 -.22(bu)2.75 G(tton-mask).22 E F0(.)A F3 --.275(fo)72 442.2 S(cus-in, f).275 E(ocus-out:)-.275 E F1(window)97 457.2 Q F0 -(,)A F1(cr)2.915 E(oss-mode)-.495 E F0(,)A F1(focus-detail)2.915 E F0 .165 -(\(one of the symbols)2.915 F F2(ancestor)2.915 E F0(,)A F2(virtual)2.915 E F0 -(,)A F2(inferior)2.915 E F0(,)A F2(nonlinear)97 472.2 Q F0(,)A F2 -(nonlinear-virtual)2.75 E F0(,)A F2(pointer)2.75 E F0(,)A F2(pointer-root)2.75 -E F0(,)A F2(none)2.75 E F0(\).)A F3 -.11(ke)72 490.8 S(ymap-notify:).11 E F1 -(window)97 505.8 Q F0(,)A F1 -.11(ke)2.75 G(ymap)-.22 E F0 -(\(a string of length 32\).)2.75 E F3(expose:)72 524.4 Q F1(window)97 539.4 Q -F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E F0(,)A F1(width)2.75 E F0(,)A F1(height) -2.75 E F0(,)A F1(count)2.75 E F0(.)A F3(graphics-expose:)72 558 Q F1(window)97 -573 Q F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E F0(,)A F1(width)2.75 E F0(,)A F1 -(height)2.75 E F0(,)A F1(count)2.75 E F0(,)A F1(major)2.75 E(-code)-.22 E F0(,) -A F1(minor)2.75 E(-code)-.22 E F0(.)A F3(no-expose:)72 591.6 Q F1(window)97 -606.6 Q F0(,)A F1(major)2.75 E(-code)-.22 E F0(,)A F1(minor)2.75 E(-code)-.22 E -F0(.)A F3(visibility-notify:)72 625.2 Q F1(window)97 640.2 Q F0(,)A F1 -(visibility-state)5.508 E F0 2.758(\(one of the symbols)5.508 F F2(unobscured) -5.508 E F0(,)A F2(partially-obscured)5.507 E F0(,)A F2(fully-obscured)97 655.2 -Q F0(\).)A F3(cr)72 673.8 Q(eate-notify:)-.198 E F1(par)97 688.8 Q(ent-window) --.407 E F0(,)A F1(window)2.75 E F0(,)A F1(x)2.75 E F0(,)A F1(y)2.75 E F0(,)A F1 -(width)2.75 E F0(,)A F1(height)2.75 E F0(,)A F1(bor)2.75 E(der)-.407 E(-width) --.22 E F0(,)A F1 -.11(ov)2.75 G(erride-r).11 E(edir)-.407 E(ect?)-.407 E F0(.)A -F3(destr)72 707.4 Q(oy-notify:)-.198 E F1 -.165(ev)97 722.4 S(ent-window).165 E -F0(,)A F1(window)2.75 E F0(.)A EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(unmap-notify:)72 87 Q/F2 11/Times-Italic@0 SF --.165(ev)97 102 S(ent-window).165 E F0(,)A F2(window)2.75 E F0(,)A F2(fr)2.75 E -(om-con\214gur)-.495 E(e)-.407 E F0(.)A F1(map-notify:)72 120.6 Q F2 -.165(ev) -97 135.6 S(ent-window).165 E F0(,)A F2(window)2.75 E F0(,)A F2 -.11(ov)2.75 G -(erride-r).11 E(edir)-.407 E(ect)-.407 E F0(.)A F1(map-r)72 154.2 Q(equest:) --.198 E F2(par)97 169.2 Q(ent-window)-.407 E F0(,)A F2(window)2.75 E F0(.)A F1 --.198(re)72 187.8 S(par).198 E(ent-notify:)-.198 E F2 -.165(ev)97 202.8 S -(ent-window).165 E F0(,)A F2(par)2.75 E(ent-window)-.407 E F0(,)A F2(window) -2.75 E F0(,)A F2(x)2.75 E F0(,)A F2(y)2.75 E F0(,)A F2 -.11(ov)2.75 G(erride-r) -.11 E(edir)-.407 E(ect)-.407 E F0(.)A F1(con\214gur)72 221.4 Q(e-notify:)-.198 -E F2 -.165(ev)97 236.4 S(ent-window).165 E F0(,)A F2(window)2.942 E F0(,)A F2 -(x)2.942 E F0(,)A F2(y)2.942 E F0(,)A F2(width)2.942 E F0(,)A F2(height)2.943 E -F0(,)A F2(bor)2.943 E(der)-.407 E(-width)-.22 E F0(,)A F2(abo)2.943 E -(ve-window)-.11 E F0(,)A F2 -.11(ov)2.943 G(erride-r).11 E(edir)-.407 E(ect?) --.407 E F0(.)A F1(con\214gur)72 255 Q(e-r)-.198 E(equest:)-.198 E F2(par)97 270 -Q(ent-window)-.407 E F0(,)A F2(window)3.753 E F0(,)A F2(x)3.753 E F0(,)A F2(y) -3.752 E F0(,)A F2(width)3.752 E F0(,)A F2(height)3.752 E F0(,)A F2(bor)3.752 E -(der)-.407 E(-width)-.22 E F0(,)A F2(abo)3.752 E(ve-window)-.11 E F0(,)A F2 -(stac)3.752 E(k-mode)-.22 E F0(\(see)3.752 E F2(set-window-stac)97 285 Q -(k-mode!)-.22 E F0(abo)2.75 E -.165(ve)-.165 G(\),).165 E F2(value-mask)2.75 E -F0(\(an inte)2.75 E(ger\).)-.165 E F1(gra)72 303.6 Q(vity-notify:)-.275 E F2 --.165(ev)97 318.6 S(ent-window).165 E F0(,)A F2(window)2.75 E F0(,)A F2(x)2.75 -E F0(,)A F2(y)2.75 E F0(.)A F1 -.198(re)72 337.2 S(size-r).198 E(equest:)-.198 -E F2(window)97 352.2 Q F0(,)A F2(width)2.75 E F0(,)A F2(height)2.75 E F0(.)A F1 -(cir)72 370.8 Q(culate-notify:)-.198 E F2 -.165(ev)97 385.8 S(ent-window).165 E -F0(,)A F2(window)2.75 E F0(,)A F2(place)2.75 E F0(.)A F1(cir)72 404.4 Q -(culate-r)-.198 E(equest:)-.198 E F2(par)97 419.4 Q(ent-window)-.407 E F0(,)A -F2(window)2.75 E F0(,)A F2(place)2.75 E F0(.)A F1(pr)72 438 Q(operty-notify:) --.198 E F2(window)97 453 Q F0(,)A F2(atom)2.75 E F0(,)A F2(time)2.75 E F0(,)A -F2(pr)2.75 E(operty-state)-.495 E F0(\(one of the symbols)2.75 E/F3 11 -/Courier@0 SF(new-value)2.75 E F0(,)A F3(deleted)2.75 E F0(\).)A F1 -(selection-clear:)72 471.6 Q F2(window)97 486.6 Q F0(,)A F2(selection-atom)2.75 -E F0(,)A F2(time)2.75 E F0(.)A F1(selection-r)72 505.2 Q(equest:)-.198 E F2 -(owner)97 520.2 Q(-window)-.22 E F0(,)A F2 -.407(re)2.75 G(questor).407 E -(-window)-.22 E F0(,)A F2(selection-atom)2.75 E F0(,)A F2(tar)2.75 E -.11(ge) --.407 G(t-atom).11 E F0(,)A F2(pr)2.75 E(operty-atom)-.495 E F0(,)A F2(time) -2.75 E F0(.)A F1(selection-notify:)72 538.8 Q F2 -.407(re)97 553.8 S(questor) -.407 E(-window)-.22 E F0(,)A F2(selection-atom)2.75 E F0(,)A F2(tar)2.75 E -.11 -(ge)-.407 G(t-atom).11 E F0(,)A F2(pr)2.75 E(operty-atom)-.495 E F0(,)A F2 -(time)2.75 E F0(.)A F1(colormap-notify:)72 572.4 Q F2(window)97 587.4 Q F0(,)A -F2(colormap)2.75 E F0(,)A F2(ne)2.75 E(w?)-.165 E F0(,)A F2 -(colormap-installed?)2.75 E F0(.)A F1(client-message:)72 606 Q F2(window)97 621 -Q F0(,)A F2(messa)3.075 E .545 -.11(ge t)-.11 H(ype).11 E F0 .325(\(an atom\),) -3.075 F F2(messa)3.075 E .546 -.11(ge d)-.11 H(ata).11 E F0 .326 -(\(a string of length 20, or a v)3.076 F .326(ector of 10 or 5)-.165 F(inte)97 -636 Q(ger numbers, or)-.165 E 2.75(,i)-.44 G 2.75(ft)190.797 636 S -(he format \214eld of the e)200.268 636 Q -.165(ve)-.275 G -(nt is wrong, the format as a number\).).165 E F1(mapping-notify:)72 654.6 Q F2 -(window)97 669.6 Q F0(,)A F2 -.407(re)3.058 G(quest).407 E F0 .308 -(\(one of the symbols)3.058 F F3(modifier)3.058 E F0(,)A F3(keyboard)3.058 E F0 -(,)A F3(pointer)3.058 E F0(\),)A F2 -.11(ke)3.058 G(ycode)-.22 E F0(,)A F2 -(count)3.058 E F0(.)A EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(16. Inter)72 87 R -(-Client Communication Functions)-.407 E(\(iconify-windo)72 117 Q(w)-.11 E/F2 -11/Times-Italic@0 SF(window scr)4.583 E(een-number)-.407 E F1 197.66(\)p)C --.198(ro)462.244 117 S(cedur).198 E(e)-.198 E F0(See)72 135.6 Q F2(XIconifyW) -2.75 E(indow)-.605 E F0(.)A F1(\(withdraw-windo)72 165.6 Q(w)-.11 E F2 -(window scr)4.583 E(een-number)-.407 E F1 184.218(\)p)C -.198(ro)462.244 165.6 -S(cedur).198 E(e)-.198 E F0(See)72 184.2 Q F2(XW)2.75 E(ithdr)-.605 E(awW)-.165 -E(indow)-.605 E F0(.)A F1(\(r)72 214.2 Q(econ\214gur)-.198 E(e-wm-windo)-.198 E -(w)-.11 E F2 2.75(.a)4.583 G -.407(rg)205.613 214.2 S(s).407 E F1 233.201(\)p)C --.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 E F0(See)72 232.8 Q F2 -(XRecon\214gur)2.75 E(eWMW)-.407 E(indow)-.605 E F0(.)A -.165(Fo)72 251.4 S -3.298(rt).165 G .549(he format of the ar)93.47 251.4 R .549(guments see)-.198 F -F2(cr)3.299 E(eate-window)-.407 E F0(abo)3.299 E -.165(ve)-.165 G 6.049(.M).165 -G .549(andatory attrib)348.046 251.4 R .549(utes are)-.22 F F2(window)3.299 E -F0(and)3.299 E F2(scr)72 266.4 Q(een-number)-.407 E F0 1.618(\(an inte)4.368 F -4.368(ger\). Optional)-.165 F(attrib)4.368 E 1.618(utes are)-.22 F F2(x)4.368 E -F0(,)A F2(y)4.368 E F0(,)A F2(width)4.368 E F0(,)A F2 1.617(height bor)4.367 F -(der)-.407 E(-width)-.22 E F0(\(inte)4.367 E(gers\),)-.165 E F2(sibling)72 -281.4 Q F0 .676(\(a windo)3.426 F .676(w\), and)-.275 F F2(stac)3.426 E(k-mode) --.22 E F0 .676(\(a symbol; one of)3.426 F/F3 11/Courier@0 SF(above)3.426 E F0 -(,)A F3(below)3.427 E F0(,)A F3(top-if)3.427 E F0(,)A F3(bottom-if)3.427 E F0 -(,)A F3(opposite)72 296.4 Q F0(\).)A F1(\(get-text-pr)72 326.4 Q(operty)-.198 E -F2(window atom)4.583 E F1 232.805(\)p)C -.198(ro)462.244 326.4 S(cedur).198 E -(e)-.198 E F0(See)72 345 Q F2(XGetT)3.633 E -.22(ex)-1.012 G(tPr).22 E(operty) --.495 E F0 6.383(.R)C .883(eturns a te)186.912 345 R .882 -(xt property as a list of strings or #f if the speci\214ed property)-.165 F -(does not e)72 360 Q(xist.)-.165 E F1(\(set-text-pr)72 390 Q(operty!)-.198 E F2 -(window value atom)4.583 E F1 203.787(\)p)C -.198(ro)462.244 390 S(cedur).198 E -(e)-.198 E F0(See)72 408.6 Q F2(XSetT)2.75 E -.22(ex)-1.012 G(tPr).22 E(operty) --.495 E F0(.)A F2(value)5.5 E F0(is a list holding the items of the te)2.75 E -(xt property \(strings or symbols\).)-.165 E F1(\(wm-pr)72 438.6 Q(otocols) --.198 E F2(window)4.583 E F1 274.033(\)p)C -.198(ro)462.244 438.6 S(cedur).198 -E(e)-.198 E F0(See)72 457.2 Q F2(XGetWMPr)2.75 E(otocols)-.495 E F0 5.5(.R)C -(eturns a v)189.436 457.2 Q(ector of atoms.)-.165 E F1(\(set-wm-pr)72 487.2 Q -(otocols!)-.198 E F2(window pr)4.583 E(otocols)-.495 E F1 210.068(\)p)C -.198 -(ro)462.244 487.2 S(cedur).198 E(e)-.198 E F0(See)72 505.8 Q F2(XSetWMPr)2.75 E -(otocols)-.495 E F0(.)A F2(pr)5.5 E(otocols)-.495 E F0(is a v)2.75 E -(ector of atoms.)-.165 E F1(\(wm-name)72 535.8 Q F2(window)4.583 E F1 291.556 -(\)p)C -.198(ro)462.244 535.8 S(cedur).198 E(e)-.198 E F0(See)72 554.4 Q F2 -(XGetT)3.607 E -.22(ex)-1.012 G(tPr).22 E(operty)-.495 E F0 6.357(.R)C .857 -(eturns the WM_N)186.86 554.4 R .857 -(AME property as a list of strings or #f if it does not)-.385 F -.165(ex)72 -569.4 S(ist.).165 E F1(\(set-wm-name!)72 599.4 Q F2(window name)4.583 E F1 -244.828(\)p)C -.198(ro)462.244 599.4 S(cedur).198 E(e)-.198 E F0(See)72 618 Q -F2(XSetT)2.75 E -.22(ex)-1.012 G(tPr).22 E(operty)-.495 E F0(.)A F2(name)5.5 E -F0(is a list of strings or symbols.)2.75 E F1(\(wm-icon-name)72 648 Q F2 -(window)4.583 E F1 268.335(\)p)C -.198(ro)462.244 648 S(cedur).198 E(e)-.198 E -F0(See)72 666.6 Q F2(XGetT)4.254 E -.22(ex)-1.012 G(tPr).22 E(operty)-.495 E F0 -7.004(.R)C 1.504(eturns the WM_ICON_N)188.154 666.6 R 1.504 -(AME property as a list of strings or #f if it)-.385 F(does not e)72 681.6 Q -(xist.)-.165 E EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(set-wm-icon-name!)72 87 Q/F2 11 -/Times-Italic@0 SF(window name)4.583 E F1 221.607(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XSetT)2.75 E -.22(ex)-1.012 G(tPr) -.22 E(operty)-.495 E F0(.)A F2(name)5.5 E F0(is a list of strings or symbols.) -2.75 E F1(\(wm-client-machine)72 135.6 Q F2(window)4.583 E F1 248.172(\)p)C --.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2(XGetT) -2.784 E -.22(ex)-1.012 G(tPr).22 E(operty)-.495 E F0(,)A F2(XGetWMClientMac) -2.784 E(hine)-.165 E F0 5.534(.R)C .034(eturns the WM_CLIENT_MA)296.898 154.2 R -.035(CHINE property)-.44 F(as a list of strings or #f if it does not e)72 169.2 -Q(xist.)-.165 E F1(\(set-wm-client-machine!)72 199.2 Q F2(window value)4.583 E -F1 201.444(\)p)C -.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 E F0(See)72 -217.8 Q F2(XSetT)2.75 E -.22(ex)-1.012 G(tPr).22 E(operty)-.495 E F0(,)A F2 -(XSetWMClientMac)2.75 E(hine)-.165 E F0(.)A F2(value)5.5 E F0 -(is a list of strings or symbols.)2.75 E F1(\(wm-class)72 247.8 Q F2(window) -4.583 E F1 295.219(\)p)C -.198(ro)462.244 247.8 S(cedur).198 E(e)-.198 E F0 -(See)72 266.4 Q F2(XGetClassHint)3.465 E F0 6.214(.R)C .714 -(eturns a pair \(name and class\) each component of which is either a string) -174.266 266.4 R(or #f.)72 281.4 Q F1(\(set-wm-class!)72 311.4 Q F2 -(window name class)4.583 E F1 223.741(\)p)C -.198(ro)462.244 311.4 S(cedur).198 -E(e)-.198 E F0(See)72 330 Q F2(XSetClassHint)2.75 E F0(.)A F2(name)5.5 E F0 -(and)2.75 E F2(class)2.75 E F0(are strings or symbols.)2.75 E F1(\(wm-command) -72 360 Q F2(window)4.583 E F1 270.777(\)p)C -.198(ro)462.244 360 S(cedur).198 E -(e)-.198 E F0(See)72 378.6 Q F2(XGetCommand)7.989 E F0 5.239 -(\(in X11 Release 4 or ne)7.989 F 5.239(wer releases\).)-.275 F 5.239 -(Returns the v)378.223 378.6 R 5.24(alue of the)-.275 F -(WM_COMMAND property of the gi)72 393.6 Q -.165(ve)-.275 G 2.75(nw).165 G(indo) -261.893 393.6 Q 2.75(wa)-.275 G 2.75(sal)296.752 393.6 S(ist of strings.) -314.473 393.6 Q F1(\(set-wm-command!)72 423.6 Q F2(window command)4.583 E F1 -205.107(\)p)C -.198(ro)462.244 423.6 S(cedur).198 E(e)-.198 E F0(See)72 442.2 Q -F2(XSetCommand)2.75 E F0(.)A F2(command)5.5 E F0 -(is a list; each element is either a string or a symbol.)2.75 E F1 -(\(transient-f)72 472.2 Q(or)-.275 E F2(window)4.583 E F1 278.389(\)p)C -.198 -(ro)462.244 472.2 S(cedur).198 E(e)-.198 E F0(See)72 490.8 Q F2(XGetT)2.75 E --.165(ra)-.605 G(nsientF).165 E(orHint)-1.155 E F0 5.5(.R)C(eturns a windo) -205.133 490.8 Q -.715(w.)-.275 G F1(\(set-transient-f)72 520.8 Q(or!)-.275 E F2 -(window pr)4.583 E(operty-window)-.495 E F1 180.203(\)p)C -.198(ro)462.244 -520.8 S(cedur).198 E(e)-.198 E F0(See)72 539.4 Q F2(XSetT)2.75 E -.165(ra)-.605 -G(nsientF).165 E(orHint)-1.155 E F0(.)A F1(\(wm-normal-hints)72 569.4 Q F2 -(window)4.583 E F1 256.103(\)p)C -.198(ro)462.244 569.4 S(cedur).198 E(e)-.198 -E F0(See)72 588 Q F2(XGetWMSizeHints)3.163 E F0 5.913(.R)C .413 -(eturns a list of hints.)189.536 588 R .412 -(Each element is set to the empty list if the corre-)5.913 F -(sponding hint has not been set for the speci\214ed windo)72 603 Q -.715(w.) --.275 G .841(The elements of the list correspond to the follo)72 621.6 R .842 -(wing hints \(in this order\):)-.275 F F2(x)3.592 E F0(,)A F2(y)3.592 E F0(,)A -F2(width)3.592 E F0 3.592(,a)C(nd)461.908 621.6 Q F2(height)3.592 E F0 .305 -(\(program speci\214ed\);)72 636.6 R F2(x)3.055 E F0(,)A F2(y)3.055 E F0(,)A F2 -(width)3.055 E F0(and)3.055 E F2(height)3.055 E F0 .305(\(user speci\214ed\);) -3.055 F F2(min-width)3.055 E F0(and)3.055 E F2(min-height)3.055 E F0(;)A F2 -(max-width)3.055 E F0(and)72 651.6 Q F2(max-height)4.757 E F0(;)A F2(width-inc) -4.757 E F0(and)4.758 E F2(height-inc)4.758 E F0(;)A F2(min-aspect-x)4.758 E F0 -(,)A F2(min-aspect-y)4.758 E F0(,)A F2(max-aspect-x)4.758 E F0(and)4.758 E F2 -(max-)4.758 E(aspect-y)72 666.6 Q F0(;)A F2(base-width)3.211 E F0(and)3.211 E -F2(base-height)3.211 E F0 3.211(;a)C(nd)247.985 666.6 Q F2(gr)3.211 E(avity) --.165 E F0 5.961(.A)C .461(ll elements are inte)309.847 666.6 R .461(gers e) --.165 F .461(xcept for the v)-.165 F(alue)-.275 E(of)72 681.6 Q F2(gr)2.75 E -(avity)-.165 E F0(which is a symbol \(see the)2.75 E F2(window-gr)2.75 E(avity) --.165 E F0(procedure abo)2.75 E -.165(ve)-.165 G(\).).165 E EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(set-wm-normal-hints!)72 87 Q/F2 11 -/Times-Italic@0 SF 2.75(.a)4.583 G -.407(rg)193.282 87 S(s).407 E F1 245.532 -(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2 -(XSetWMSizeHints)3.065 E F0 5.815(.F)C .315(or the format of the ar)185.512 -105.6 R .315(guments see)-.198 F F2(cr)3.065 E(eate-window)-.407 E F0(abo)3.065 -E -.165(ve)-.165 G 5.815(.A).165 G(ttrib)451.665 105.6 Q .316(utes are)-.22 F -F2(window)72 120.6 Q F0(\(mandatory\) and the names of the hints listed under) -2.75 E F2(wm-normal-hints)2.75 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1 -(\(wm-hints)72 150.6 Q F2(window)4.583 E F1 293.987(\)p)C -.198(ro)462.244 -150.6 S(cedur).198 E(e)-.198 E F0(See)72 169.2 Q F2(XGetWMHints)4.206 E F0 -6.955(.R)C 1.455(eturns a list of hints.)173.9 169.2 R 1.455 -(Each element is set to the empty list if the corre-)6.955 F -(sponding hint has not been set for the speci\214ed windo)72 184.2 Q -.715(w.) --.275 G 1.719(The elements of the list correspond to the follo)72 202.8 R 1.719 -(wing hints \(in this order\):)-.275 F F2(input?)4.469 E F0(,)A F2 -(initial-state)4.469 E F0(,)A F2(icon-pixmap)72 217.8 Q F0(,)A F2(icon-window) -3.264 E F0(,)A F2(icon-x)3.264 E F0(,)A F2(icon-y)3.264 E F0(,)A F2(icon-mask) -3.264 E F0 3.264(,a)C(nd)318.968 217.8 Q F2(window-gr)3.264 E(oup)-.495 E F0 -6.014(.T)C .514(he v)412.396 217.8 R .513(alue of)-.275 F F2(input?)3.263 E F0 -(is)3.263 E 2.973(ab)72 232.8 S(oolean.)85.357 232.8 Q F2(initial-state)5.723 E -F0 .224(is a symbol \()2.973 F/F3 11/Courier@0 SF(dont-care)A F0(,)A F3(normal) -2.974 E F0(,)A F3(zoom)2.974 E F0(,)A F3(iconic)2.974 E F0(,)A F3(inactive) -2.974 E F0 2.974(\). The)B -.275(va)72 247.8 S .04(lues of).275 F F2 -(icon-pixmap)2.79 E F0(and)2.79 E F2(icon-mask)2.79 E F0 .04(are pixmaps.)2.79 -F F2(icon-window)5.54 E F0(and)2.79 E F2(window-gr)2.789 E(oup)-.495 E F0 .039 -(are windo)2.789 F(ws.)-.275 E F2(icon-x)72 262.8 Q F0(and)2.75 E F2(icon-y) -2.75 E F0(are inte)2.75 E(gers.)-.165 E F1(\(set-wm-hints!)72 292.8 Q F2 2.75 -(.a)4.583 G -.407(rg)155.398 292.8 S(s).407 E F1 283.416(\)p)C -.198(ro)462.244 -292.8 S(cedur).198 E(e)-.198 E F0(See)72 311.4 Q F2(XSetWMHints)4.541 E F0 -7.291(.F)C 1.792(or the format of the ar)170.743 311.4 R 1.792(guments see) --.198 F F2(cr)4.542 E(eate-window)-.407 E F0(abo)4.542 E -.165(ve)-.165 G 7.292 -(.A).165 G(ttrib)450.189 311.4 Q 1.792(utes are)-.22 F F2(window)72 326.4 Q F0 -(\(mandatory\) and the names of the hints listed under)2.75 E F2(wm-hints)2.75 -E F0(abo)2.75 E -.165(ve)-.165 G(.).165 E F1(\(icon-sizes)72 356.4 Q F2(window) -4.583 E F1 293.382(\)p)C -.198(ro)462.244 356.4 S(cedur).198 E(e)-.198 E F0 -(See)72 375 Q F2(XGetIconSizes)3.821 E F0 6.571(.R)C 1.071(eturns a v)172.515 -375 R 1.07(ector of lists of six inte)-.165 F 1.07(gers \()-.165 F F2 -(min-width)A F0(,)A F2(min-height)3.82 E F0(,)A F2(max-width)3.82 E F0(,)A F2 -(max-height)72 390 Q F0(,)A F2(width-inc)2.75 E F0 2.75(,a)C(nd)178.931 390 Q -F2(height-inc)2.75 E F0(\).)A F1(\(set-icon-sizes!)72 420 Q F2 -(window icon-sizes)4.583 E F1 227.096(\)p)C -.198(ro)462.244 420 S(cedur).198 E -(e)-.198 E F0(See)72 438.6 Q F2(XSetIconSizes)2.75 E F0(.)A F2(icon-sizes)5.5 E -F0(is a v)2.75 E(ector of lists of six inte)-.165 E(gers \(see)-.165 E F2 -(icon-sizes)2.75 E F0(abo)2.75 E -.165(ve)-.165 G(\).).165 E F1 2.75(17. K)72 -468.6 R(eyboard Utility Functions)-.275 E(\(display-min-k)72 498.6 Q(eycode) --.11 E F2(display)4.583 E F1 243.376(\)p)C -.198(ro)462.244 498.6 S(cedur).198 -E(e)-.198 E(\(display-max-k)72 513.6 Q(eycode)-.11 E F2(display)4.583 E F1 -241.55(\)p)C -.198(ro)462.244 513.6 S(cedur).198 E(e)-.198 E F0 -(Returns the minimum/maximum k)72 532.2 Q -.165(ey)-.11 G(code \(an inte).165 E -(ger\) for the gi)-.165 E -.165(ve)-.275 G 2.75(nd).165 G(isplay)375.116 532.2 -Q(.)-.715 E F1(\(display-k)72 562.2 Q(eysyms-per)-.11 E(-k)-.407 E(eycode)-.11 -E F2(display)4.583 E F1 202.962(\)p)C -.198(ro)462.244 562.2 S(cedur).198 E(e) --.198 E(Retur)72 577.2 Q(ns the number of k)-.165 E(eysyms per k)-.11 E -(eycode f)-.11 E(or the gi)-.275 E -.11(ve)-.11 G 2.75(nd).11 G(isplay)350.982 -577.2 Q(.)-.77 E(\(string)72 607.2 Q/F4 11/Symbol SF(-)A F1(>k)A(eysym)-.11 E -F2(string)4.583 E F1 271.404(\)p)C -.198(ro)462.244 607.2 S(cedur).198 E(e) --.198 E F0(See)72 625.8 Q F2(XStringT)2.875 E(oK)-1.012 E -.33(ey)-.385 G(sym) -.33 E F0(.)A F2(string)5.625 E F0 .125(is a string or a symbol.)2.875 F .126 -(Returns an inte)5.626 F .126(ger if)-.165 F F2(XStringT)2.876 E(oK)-1.012 E --.33(ey)-.385 G(sym).33 E F0(suc-)2.876 E(ceeds, #f otherwise.)72 640.8 Q F1 -(\(k)72 670.8 Q(eysym)-.11 E F4(-)A F1(>string)A F2 -.11(ke)4.583 G(ysym)-.22 E -F1 265.761(\)p)C -.198(ro)462.244 670.8 S(cedur).198 E(e)-.198 E F0(See)72 -689.4 Q F2(XK)2.75 E -.33(ey)-.385 G(symT).33 E(oString)-1.012 E F0(.)A F2 -.11 -(ke)5.5 G(ysym)-.22 E F0(is an inte)2.75 E(ger)-.165 E 5.5(.R)-.605 G -(eturns #f if)279.251 689.4 Q F2(XK)2.75 E -.33(ey)-.385 G(symT).33 E(oString) --1.012 E F0 -.11(fa)2.75 G(ils.).11 E EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(7-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(k)72 87 Q(eycode)-.11 E/F2 11/Symbol SF(-)A -F1(>k)A(eysym)-.11 E/F3 11/Times-Italic@0 SF(display k)4.583 E -.33(ey)-.11 G -(code inde).33 E(x)-.22 E F1 190.939(\)p)C -.198(ro)462.244 87 S(cedur).198 E -(e)-.198 E F0(See)72 105.6 Q F3(XK)2.75 E -.33(ey)-.385 G(codeT).33 E(oK)-1.012 -E -.33(ey)-.385 G(sym).33 E F0(.)A F3 -.11(ke)5.5 G(ycode)-.22 E F0(and)2.75 E -F3(inde)2.75 E(x)-.22 E F0(are inte)2.75 E(gers.)-.165 E F1(\(k)72 135.6 Q -(eysym)-.11 E F2(-)A F1(>k)A(eycode)-.11 E F3(display k)4.583 E -.33(ey)-.11 G -(sym).33 E F1 220.958(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0 -(See)72 154.2 Q F3(XK)2.75 E -.33(ey)-.385 G(symT).33 E(oK)-1.012 E -.33(ey) --.385 G(code).33 E F0(.)A F3 -.11(ke)5.5 G(ysym)-.22 E F0(is an inte)2.75 E -(ger)-.165 E(.)-.605 E F1(\(lookup-string)72 184.2 Q F3(display k)4.583 E -.33 -(ey)-.11 G(code mask).33 E F1 213.786(\)p)C -.198(ro)462.244 184.2 S(cedur).198 -E(e)-.198 E F0(See)72 202.8 Q F3(XLookupString)3.171 E F0(.)A F3 -.11(ke)5.921 -G(ycode)-.22 E F0 .421(is an inte)3.171 F(ger)-.165 E(.)-.605 E F3(mask)5.921 E -F0 .421(is a list of symbols \()3.171 F/F4 11/Courier@0 SF(shift)A F0(,)A F4 -(lock)3.171 E F0(,)A F4(control)3.17 E F0(,)A F4(mod1)72 217.8 Q F0(...)2.75 E -F4(mod5)2.75 E F0(,)A F4(button1)2.75 E F0(...)2.75 E F4(button5)2.75 E F0 2.75 -(,o)C(r)261.2 217.8 Q F4(any-modifier)2.75 E F0(\).)A F1(\(r)72 247.8 Q -(ebind-k)-.198 E(eysym)-.11 E F3(display k)4.583 E -.33(ey)-.11 G -(sym modi\214er).33 E 2.75(ss)-.11 G(tring)266.674 247.8 Q F1 164.396(\)p)C --.198(ro)462.244 247.8 S(cedur).198 E(e)-.198 E F0(See)72 266.4 Q F3(XRebindK) -2.75 E -.33(ey)-.385 G(sym).33 E F0(.)A F3 -.11(ke)5.5 G(ysym)-.22 E F0 -(is an inte)2.75 E(ger)-.165 E(.)-.605 E F3(modi\214er)5.5 E(s)-.11 E F0 -(is a v)2.75 E(ector of inte)-.165 E(gers.)-.165 E F1(\(r)72 296.4 Q(efr)-.198 -E(esh-k)-.198 E(eyboard-mapping)-.11 E F3(window type)4.583 E F1 190.312(\)p)C --.198(ro)462.244 296.4 S(cedur).198 E(e)-.198 E F0(See)72 315 Q F3(XRefr)5.47 E -(eshK)-.407 E -.33(ey)-.385 G(boar).33 E(dMapping)-.407 E F0(.)A F3(type)8.22 E -F0 2.72(is a symbol \()5.47 F F4(modifier)A F0(,)A F4(keyboard)5.471 E F0 5.471 -(,o)C(r)442.253 315 Q F4(pointer)5.471 E F0(\).)A(In)72 330 Q -.22(vo)-.44 G --.11(ke).22 G(s).11 E F3(XRefr)4.419 E(eshK)-.407 E -.33(ey)-.385 G(boar).33 E -(dMapping)-.407 E F0 1.669(with a f)4.419 F(ak)-.11 E 1.668(ed e)-.11 F -.165 -(ve)-.275 G 1.668(nt structure holding the speci\214ed windo).165 F(w)-.275 E -(and request type.)72 345 Q F1 2.75(18. Other)72 375 R(Utility Functions)2.75 E -(\(xlib-r)72 405 Q(elease-4-or)-.198 E -.917(-later? \))-.407 F(pr)456.128 405 -Q(ocedur)-.198 E(e)-.198 E F0(Returns al)72 423.6 Q -.11(wa)-.11 G(ys #t.).11 E -F1(\(xlib-r)72 453.6 Q(elease-5-or)-.198 E -.917(-later? \))-.407 F(pr)456.128 -453.6 Q(ocedur)-.198 E(e)-.198 E F0 .598(Returns #t if)72 472.2 R 3.348(ft) --.275 G .598(he Xlib e)137.99 472.2 R .598(xtension is link)-.165 F .599 -(ed together with the X11 Release 5 Xlib or later v)-.11 F(ersions)-.165 E -(of the Xlib)72 487.2 Q(.)-.44 E F1(\(xlib-r)72 517.2 Q(elease-6-or)-.198 E --.917(-later? \))-.407 F(pr)456.128 517.2 Q(ocedur)-.198 E(e)-.198 E F0 .599 -(Returns #t if)72 535.8 R 3.349(ft)-.275 G .599(he Xlib e)137.993 535.8 R .599 -(xtension is link)-.165 F .598 -(ed together with the X11 Release 6 Xlib or later v)-.11 F(ersions)-.165 E -(of the Xlib)72 550.8 Q(.)-.44 E F1(\(get-default)72 580.8 Q F3(display pr) -4.583 E -.11(og)-.495 G -.165(ra).11 G 2.75(mo).165 G(ption)211.465 580.8 Q F1 -218.384(\)p)C -.198(ro)462.244 580.8 S(cedur).198 E(e)-.198 E F0(See)72 599.4 Q -F3(XGetDefault)3.025 E F0(.)A F3(pr)5.775 E -.11(og)-.495 G -.165(ra).11 G(m) -.165 E F0(and)3.025 E F3(option)3.025 E F0 .275(are strings or symbols.)3.025 F -.276(Returns a string of #f if the option)5.776 F(does not e)72 614.4 Q -(xist for the speci\214ed program.)-.165 E F1(\(r)72 644.4 Q(esour)-.198 E -(ce-manager)-.198 E(-string)-.407 E F3(display)4.583 E F1 224.555(\)p)C -.198 -(ro)462.244 644.4 S(cedur).198 E(e)-.198 E F0(See)72 663 Q F3(XResour)3.872 E -(ceMana)-.407 E -.11(ge)-.11 G(rString).11 E F0 6.622(.R)C 1.122 -(eturns a string or #f if the RESOURCE_MAN)222.711 663 R -.44(AG)-.385 G 1.121 -(ER property).44 F(does not e)72 678 Q(xist on the root windo)-.165 E -.715(w.) --.275 G EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(8-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(parse-geometry)72 87 Q/F2 11/Times-Italic@0 -SF(string)4.583 E F1 273.241(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E -F0(See)72 105.6 Q F2(XP)3.658 E(ar)-.88 E(seGeometry)-.11 E F0 6.408(.R)C .908 -(eturns a list of six elements: tw)182.804 105.6 R 3.658(ob)-.11 G .909 -(ooleans indicating whether x or or y)339.684 105.6 R .105(are ne)72 120.6 R --.055(ga)-.165 G(ti).055 E .435 -.165(ve a)-.275 H .105(nd four inte).165 F -.105(gers \(x, y)-.165 F 2.855(,w)-.715 G .105(idth, and height\).)238.285 -120.6 R .105(Each of the elements can be #f to indicate)5.605 F -(that the respecti)72 135.6 Q .33 -.165(ve v)-.275 H(alue w)-.11 E -(as not found in the string.)-.11 E F1(\(parse-color)72 165.6 Q F2 -(colormap string)4.583 E F1 248.48(\)p)C -.198(ro)462.244 165.6 S(cedur).198 E -(e)-.198 E F0(See)72 184.2 Q F2(XP)2.75 E(ar)-.88 E(seColor)-.11 E F0 5.5(.R)C -(eturns an object of type)163.289 184.2 Q F2(color)2.75 E F0(or #f if)2.75 E F2 -(XP)2.75 E(ar)-.88 E(seColor)-.11 E F0 -.11(fa)2.75 G(ils.).11 E F1(\(stor)72 -214.2 Q(e-b)-.198 E(uffer)-.22 E F2(display bytes b)4.583 E(uf)-.22 E(fer)-.198 -E F1 230.693(\)p)C -.198(ro)462.244 214.2 S(cedur).198 E(e)-.198 E F0(See)72 -232.8 Q F2(XStor)2.75 E(eBuf)-.407 E(fer)-.198 E F0(.)A F2(bytes)5.5 E F0 -(is a string;)2.75 E F2 -.22(bu)2.75 G -.198(ff).22 G(er).198 E F0(is an inte) -2.75 E(ger between 0 and 7.)-.165 E F1(\(stor)72 262.8 Q(e-bytes)-.198 E F2 -(display bytes)4.583 E F1 263.968(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E -(e)-.198 E F0(See)72 281.4 Q F2(XStor)2.75 E(eBytes)-.407 E F0(.)A F2(bytes)5.5 -E F0(is a string.)2.75 E F1(\(fetch-b)72 311.4 Q(uffer)-.22 E F2(display b) -4.583 E(uf)-.22 E(fer)-.198 E F1 255.85(\)p)C -.198(ro)462.244 311.4 S(cedur) -.198 E(e)-.198 E F0(See)72 330 Q F2(XF)2.75 E(etc)-.825 E(hBuf)-.165 E(fer) --.198 E F0(.)A F2 -.22(bu)5.5 G -.198(ff).22 G(er).198 E F0(is an inte)2.75 E -(ger between 0 and 7.)-.165 E(Returns a string.)5.5 E F1(\(fetch-bytes)72 360 Q -F2(display)4.583 E F1 289.125(\)p)C -.198(ro)462.244 360 S(cedur).198 E(e)-.198 -E F0(See)72 378.6 Q F2(XF)2.75 E(etc)-.825 E(hBytes)-.165 E F0 5.5(.R)C -(eturns a string.)160.825 378.6 Q F1(\(r)72 408.6 Q(otate-b)-.198 E(uffers)-.22 -E F2(display delta)4.583 E F1 250.746(\)p)C -.198(ro)462.244 408.6 S(cedur).198 -E(e)-.198 E F0(See)72 427.2 Q F2(XRotateBuf)2.75 E(fer)-.198 E(s)-.11 E F0(.)A -F2(delta)5.5 E F0(is an inte)2.75 E(ger \(the amount to rotate the b)-.165 E -(uf)-.22 E(fers\).)-.275 E F1(\(with)72 457.2 Q F2(object . body-forms)4.583 E -F1 283.515(\)s)C(yntax)477.721 457.2 Q F2(with)72 475.8 Q F0 1.16(is a macro.) -3.91 F F2(object)6.66 E F0 1.16(must be a dra)3.91 F -.11(wa)-.165 G 1.16 -(ble, a graphics conte).11 F 1.16(xt, or a font.)-.165 F(The)6.66 E F2 -(body-forms)3.91 E F0(are)3.91 E -.275(eva)72 490.8 S(luated in order;).275 E -F2(with)2.75 E F0(returns the v)2.75 E(alue of the last body-form.)-.275 E -.44 -(Wi)72 509.4 S .271(thin the scope of the).44 F F2(with)3.021 E F0 3.021(,t)C -.271(he \214rst call to an accessor function accessing)206.099 509.4 R F2 -(object)3.021 E F0 .271(\(such as)3.021 F/F3 11/Courier@0 SF(win-)3.02 E(dow-) -72 524.4 Q F2(attrib)A(ute)-.22 E F0(or)4.76 E F3(font-)4.761 E F2(attrib)A -(ute)-.22 E F0 4.761(\)c)C 2.011 -(auses the result of the corresponding Xlib function to be)238.742 524.4 R .406 -(retained in a cache; subsequent calls just return the v)72 539.4 R .406 -(alue from the cache.)-.275 F(Lik)5.906 E -.275(ew)-.11 G .406 -(ise, calls to Xlib).275 F 3.987(functions for mutator functions modifying)72 -554.4 R F2(object)6.738 E F0 3.988(\(such as)6.738 F F3(set-window-)6.738 E F2 -(attrib)A(ute)-.22 E F3(!)A F0 9.488(\)a)C(re)495.453 554.4 Q .554 -(delayed until e)72 569.4 R .554(xit of the)-.165 F F2(with)3.304 E F0 .553 -(body or until an accessor function is called and the cached data for)3.304 F -(this accessor function has been in)72 584.4 Q -.275(va)-.44 G -(lidated by the call to a mutator function.).275 E F1 2.75(19. Ser)72 614.4 R --.11(ve)-.11 G 2.75(rE).11 G(xtension Functions)132.269 614.4 Q -(\(list-extensions)72 644.4 Q F2(display)4.583 E F1 274.44(\)p)C -.198(ro) -462.244 644.4 S(cedur).198 E(e)-.198 E F0(See)72 663 Q F2(XListExtensions)2.75 -E F0 5.5(.R)C(eturns a v)177.116 663 Q(ector of strings.)-.165 E EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2)276.087 51 S 2.75(9-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(query-extension)72 87 Q/F2 11 -/Times-Italic@0 SF(display name)4.583 E F1 238.701(\)p)C -.198(ro)462.244 87 S -(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XQueryExtension)3.437 E F0(.)A F2 -(name)6.187 E F0 .687(is a string or a symbol.)3.437 F .688 -(Returns a list of three elements: the major)6.187 F .335(opcode \(an inte)72 -120.6 R .334(ger\) or #f if the e)-.165 F .334 -(xtension has no major opcode, the base e)-.165 F -.165(ve)-.275 G .334 -(nt type code \(an inte-).165 F .268(ger\) of #f if the e)72 135.6 R .268 -(xtension has no additional e)-.165 F -.165(ve)-.275 G .269 -(nt types, and the base error code \(an inte).165 F .269(ger\) of #f)-.165 F -.959(if the e)72 150.6 R .959(xtension has no additional error codes.)-.165 F -F2(query-e)6.458 E(xtension)-.22 E F0 .958(returns #f if the speci\214ed e) -3.708 F(xten-)-.165 E(sion is not present.)72 165.6 Q F1 2.75(20. Err)72 195.6 -R(or Handling)-.198 E(x-err)72 225.6 Q(or)-.198 E 316.929(-handler v)-.407 F -(ariable)-.11 E F0(See)72 244.2 Q F2(XSetErr)4.18 E(orHandler)-.495 E F0 6.93 -(.I)C 4.18(fa)186.796 244.2 S 4.18(ne)199.523 244.2 S 1.43(rror e)214.087 244.2 -R -.165(ve)-.275 G 1.431(nt is recei).165 F -.165(ve)-.275 G 4.181(da).165 G -1.431(nd the global v)319.723 244.2 R(ariable)-.275 E F2(x-err)4.181 E(or)-.495 -E(-handler)-.22 E F0(is)4.181 E .853 -(bound to a compound procedure, this procedure is in)72 259.2 R -.22(vo)-.44 G --.11(ke).22 G 3.602(dw).11 G .852(ith the follo)348.358 259.2 R .852(wing ar) --.275 F .852(guments: a dis-)-.198 F(play)72 274.2 Q 2.818(,t)-.715 G .068 -(he serial number of the f)98.853 274.2 R .068(ailed request \(an inte)-.11 F -.068(ger\), the error code \(either an inte)-.165 F .069(ger or one of)-.165 F -.812(the symbols)72 289.2 R/F3 11/Courier@0 SF(bad-request)3.562 E F0(,)A F3 -(bad-value)3.562 E F0(,)A F3(bad-window)3.562 E F0(,)A F3(bad-pixmap)3.562 E F0 -(,)A F3(bad-atom)3.562 E F0(,)A F3(bad-)3.562 E(cursor)72 304.2 Q F0(,)A F3 -(bad-font)5.45 E F0(,)A F3(bad-match)5.45 E F0(,)A F3(bad-drawable)5.45 E F0(,) -A F3(bad-access)5.45 E F0(,)A F3(bad-alloc)5.45 E F0(,)A F3(bad-)5.45 E(color) -72 319.2 Q F0(,)A F3(bad-gcontext)118.732 319.2 Q F0(,)A F3(bad-id-choice) -211.663 319.2 Q F0(,)A F3(bad-name)311.194 319.2 Q F0(,)A F3(bad-length)377.725 -319.2 Q F0 10.981(,o)C(r)462.956 319.2 Q F3(bad-)477.6 319.2 Q(implementation) -72 334.2 Q F0 3.223(\), the major and minor op-code of the f)B 3.223 -(ailed request \(inte)-.11 F 3.223(gers\), and a)-.165 F(resource-ID \(an inte) -72 349.2 Q(ger\).)-.165 E 1.364(If an error e)72 367.8 R -.165(ve)-.275 G 1.364 -(nt is recei).165 F -.165(ve)-.275 G 4.114(da).165 G 1.364(nd this v)208.191 -367.8 R 1.364(ariable is not bound to a compound procedure, the Xlib)-.275 F -(def)72 382.8 Q(ault error handler is in)-.11 E -.22(vo)-.44 G -.11(ke).22 G -2.75(d. The).11 F(initial v)2.75 E(alue of this v)-.275 E -(ariable is the empty list.)-.275 E F1(x-fatal-err)72 412.8 Q(or)-.198 E -291.882(-handler v)-.407 F(ariable)-.11 E F0(See)72 431.4 Q F2(XSetIOErr)3.039 -E(orHandler)-.495 E F0 5.789(.I)C 3.039(faf)196.119 431.4 S .29 -(atal I/O error occurs and the global v)214.297 431.4 R(ariable)-.275 E F2 -(x-fatal-err)3.04 E(or)-.495 E(-handler)-.22 E F0 1.206 -(is bound to a compound procedure, this procedure is in)72 446.4 R -.22(vo)-.44 -G -.11(ke).22 G 3.955(dw).11 G 1.205(ith a display as ar)362.829 446.4 R 3.955 -(gument. The)-.198 F .711(procedure must in)72 461.4 R -.22(vo)-.44 G -.11(ke) -.22 G F2 -.22(ex)3.571 G(it).22 E F0 6.211(.I)C 3.461(faf)205.216 461.4 S .712 -(atal error occurs and this v)224.238 461.4 R .712 -(ariable is not bound to a compound)-.275 F .156 -(procedure, or if the procedure returns, the Xlib def)72 476.4 R .156(ault f) --.11 F .156(atal error handler is in)-.11 F -.22(vo)-.44 G -.11(ke).22 G 2.906 -(da).11 G .155(nd the inter)450.142 476.4 R(-)-.22 E -(preter terminates with an e)72 491.4 Q(xit code of 1.)-.165 E(The initial v) -5.5 E(alue of this v)-.275 E(ariable is the empty list.)-.275 E F1 2.75 -(21. Interaction)72 521.4 R(with the Garbage Collector)2.75 E F0 2.28 -(The Scheme g)97 540 R 2.28(arbage collector destro)-.055 F 2.28 -(ys objects of type)-.11 F F2(colormap)5.03 E F0(,)A F2(cur)5.03 E(sor)-.11 E -F0(,)A F2(display)5.03 E F0(,)A F2(font)5.03 E F0(,)A F2(gconte)72 555 Q(xt) --.22 E F0(,)A F2(pixmap)4.554 E F0 4.554(,o)C(r)161.54 555 Q F2(window)4.554 E -F0 1.804(that are not longer accessible from within the Scheme program.)4.554 F -.874(This is done by in)72 570 R -.22(vo)-.44 G .875(king the function).22 F F2 -(fr)3.625 E(ee-colormap)-.407 E F0(,)A F2(fr)3.625 E(ee-cur)-.407 E(sor)-.11 E -F0(,)A F2(close-display)3.625 E F0(,)A F2(close-font)3.625 E F0(,)A F2(fr)3.625 -E(ee-)-.407 E(gconte)72 585 Q(xt)-.22 E F0(,)A F2(fr)2.787 E(ee-pixmap)-.407 E -F0 2.787(,o)C(r)178.367 585 Q F2(destr)2.786 E(oy-window)-.495 E F0 2.786(,r)C -(especti)263.799 585 Q -.165(ve)-.275 G(ly).165 E 2.786(,w)-.715 G .036 -(ith the object to be destro)325.611 585 R .036(yed as an ar)-.11 F(gu-)-.198 E -(ment.)72 600 Q 1.154(The g)97 618.6 R 1.154(arbage collector only destro)-.055 -F 1.154(ys objects that ha)-.11 F 1.484 -.165(ve b)-.22 H 1.154 -(een created from with the Scheme).165 F .078(program \(by functions lik)72 -633.6 R(e)-.11 E F2(cr)2.828 E(eate-pixmap)-.407 E F0(or)2.828 E F2 -(open-display)2.828 E F0 2.828(\). Objects)B .077(that ha)2.828 F .407 -.165 -(ve b)-.22 H .077(een obtained from).165 F 1.024 -(the Xlib through functions lik)72 648.6 R(e)-.11 E F2 -(display-default-colormap)3.774 E F0 1.025(\(and are o)3.775 F 1.025 -(wned by the Xlib internals\),)-.275 F(are ignored by the g)72 663.6 Q -(arbage collector)-.055 E(.)-.605 E .342(Programmers must mak)97 682.2 R 3.092 -(es)-.11 G .342(ure that an object is accessible during the object')214.934 -682.2 R 3.091(se)-.605 G .341(ntire lifetime,)443.775 682.2 R 1.119 -(otherwise future runs of the g)72 697.2 R 1.12 -(arbage collector can result in undesired termination of the object.)-.055 F -.518(One must be especially careful when results of functions that create ne)72 -712.2 R 3.267(wo)-.275 G .517(bjects \(such as)404.802 712.2 R F2(cr)3.267 E -(eate-)-.407 E(window)72 727.2 Q F0 2.75(\)a)C -(re ignored or assigned to local v)117.529 727.2 Q(ariables as in)-.275 E EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(define dpy \(open-display\)\))100.346 94.503 Q -(\(define root \(display-root-window dpy\)\))100.346 108.503 Q -(\(do \(\(x 0 \(+ x 10\)\) \(y 0 \(+ y 10\)\)\) \(\(= x 50\)\))100.346 129.503 -Q(\(let \(\(win)112.346 143.503 Q -(\(create-window 'parent root 'x x 'y y 'width 20 'height 20\)\)\))160.346 -157.503 Q(\(manage-window win\)\)\))124.346 171.503 Q F0 2.028(In this e)97 -197.103 R 2.028(xample, after termination of the do-loop, the g)-.165 F 2.029 -(arbage collector will destro)-.055 F 4.779(yt)-.11 G(he)493.616 197.103 Q(ne) -72 212.103 Q .161(wly created windo)-.275 F .161(ws, as the)-.275 F 2.911(ya) --.165 G .161(re not accessible from within the program.)219.941 212.103 R .16 -(If this is not desired,)5.66 F .013(the windo)72 227.103 R .013 -(ws could be put into a v)-.275 F .013(ariable \(for instance, be)-.275 F/F2 11 -/Times-Italic@0 SF(consed)2.763 E F0 .014 -(into a list\) that is de\214ned outside)2.763 F(of the body of the loop.)72 -242.103 Q EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(A)72 174 Q F0(after)72 -204 Q(-function,)-.22 E/F2 12/Times-Bold@0 SF(4)2.75 E F0(alloc-color)72 219 Q -(,)-.44 E F2(9)2.75 E F0(alloc-named-color)72 234 Q(,)-.44 E F2(9)2.75 E F0 -(allo)72 249 Q(w-e)-.275 E -.165(ve)-.275 G(nts,).165 E F2(19)2.75 E F0 -(atom-name,)72 264 Q F2(8)2.75 E F0(atom?,)72 279 Q F2(7)2.75 E F1(B)72 309 Q -F0(bell,)72 339 Q F2(21)2.75 E F0(black-pix)72 354 Q(el,)-.165 E F2(10)2.75 E -F1(C)72 384 Q F0(change-acti)72 414 Q -.165(ve)-.275 G(-pointer).165 E(-grab,) --.22 E F2(19)2.75 E F0(change-property)72 429 Q(,)-.715 E F2(8)2.75 E F0 -(change-sa)72 444 Q -.165(ve)-.22 G(-set,).165 E F2(21)2.75 E F0(char)72 459 Q -(-ascent,)-.22 E F2(16)2.75 E F0(char)72 474 Q(-descent,)-.22 E F2(16)2.75 E F0 -(char)72 489 Q(-lbearing,)-.22 E F2(16)2.75 E F0(char)72 504 Q(-rbearing,)-.22 -E F2(16)2.75 E F0(char)72 519 Q(-width,)-.22 E F2(16)2.75 E F0 -(circulate-subwindo)72 534 Q(ws,)-.275 E F2(7)2.75 E F0(clear)72 549 Q(-area,) --.22 E F2(13)2.75 E F0(clear)72 564 Q(-windo)-.22 E -.715(w,)-.275 G F2(7)3.465 -E F0(close-display)72 579 Q(,)-.715 E F2(2)2.75 E F0(close-font,)72 594 Q F2 -(15)2.75 E F0(color)72 609 Q(-r)-.22 E(gb-v)-.198 E(alues,)-.275 E F2(9)2.75 E -F0(color?,)72 624 Q F2(9)2.75 E F0(colormap-display)72 639 Q(,)-.715 E F2(10) -2.75 E F0(colormap?,)72 654 Q F2(9)2.75 E F0(con)72 669 Q -.165(ve)-.44 G -(rt-selection,).165 E F2(9)2.75 E F0(cop)72 684 Q(y-area,)-.11 E F2(13)2.75 E -F0(cop)72 699 Q(y-gconte)-.11 E(xt,)-.165 E F2(11)2.75 E F0(cop)72 714 Q -(y-plane,)-.11 E F2(14)2.75 E F0(create-bitmap-from-data,)72 729 Q F2(10)2.75 E -F0(create-cursor)302.4 174 Q(,)-.44 E F2(18)2.75 E F0(create-font-cursor)302.4 -189 Q(,)-.44 E F2(18)2.75 E F0(create-gconte)302.4 204 Q(xt,)-.165 E F2(11)2.75 -E F0(create-glyph-cursor)302.4 219 Q(,)-.44 E F2(18)2.75 E F0(create-pixmap,) -302.4 234 Q F2(10)2.75 E F0(create-pixmap-from-bitmap-data,)302.4 249 Q F2(10) -2.75 E F0(create-windo)302.4 264 Q -.715(w,)-.275 G F2(4)3.465 E F0 2.75(,2)C -(4, 26)389.272 264 Q(cursor)302.4 279 Q(-display)-.22 E(,)-.715 E F2(18)2.75 E -F0(cursor?,)302.4 294 Q F2(18)2.75 E F1(D)302.4 324 Q F0(de\214ne-cursor)302.4 -354 Q(,)-.44 E F2(18)2.75 E F0(delete-property)302.4 369 Q(,)-.715 E F2(8)2.75 -E F0(destro)302.4 384 Q(y-subwindo)-.11 E(ws,)-.275 E F2(6)2.75 E F0(destro) -302.4 399 Q(y-windo)-.11 E -.715(w,)-.275 G F2(6)3.465 E F0 -(display-bitmap-bit-order)302.4 414 Q(,)-.44 E F2(3)2.75 E F0 -(display-bitmap-pad,)302.4 429 Q F2(3)2.75 E F0(display-bitmap-unit,)302.4 444 -Q F2(3)2.75 E F0(display-cells,)302.4 459 Q F2(2)2.75 E F0(display-colormap,) -302.4 474 Q F2(2)2.75 E F0(display-def)302.4 489 Q(ault-colormap,)-.11 E F2(2) -2.75 E F0(display-def)302.4 504 Q(ault-depth,)-.11 E F2(2)2.75 E F0 -(display-def)302.4 519 Q(ault-gconte)-.11 E(xt,)-.165 E F2(2)2.75 E F0 -(display-def)302.4 534 Q(ault-root-windo)-.11 E -.715(w,)-.275 G F2(2)3.465 E -F0(display-def)302.4 549 Q(ault-screen-number)-.11 E(,)-.44 E F2(2)2.75 E F0 -(display-\215ush-output,)302.4 564 Q F2(3)2.75 E F0(display-height,)302.4 579 Q -F2(3)2.75 E F0(display-height-mm,)302.4 594 Q F2(3)2.75 E F0 -(display-image-byte-order)302.4 609 Q(,)-.44 E F2(3)2.75 E F0(display-k)302.4 -624 Q -.165(ey)-.11 G(syms-per).165 E(-k)-.22 E -.165(ey)-.11 G(code,).165 E F2 -(26)2.75 E F0(display-max-k)302.4 639 Q -.165(ey)-.11 G(code,).165 E F2(26)2.75 -E F0(display-min-k)302.4 654 Q -.165(ey)-.11 G(code,).165 E F2(26)2.75 E F0 -(display-motion-b)302.4 669 Q(uf)-.22 E(fer)-.275 E(-size,)-.22 E F2(3)2.75 E -F0(display-planes,)302.4 684 Q F2(2)2.75 E F0(display-protocol-v)302.4 699 Q -(ersion,)-.165 E F2(2)2.75 E F0(display-root-windo)302.4 714 Q -.715(w,)-.275 G -F2(2)3.465 E F0(display-screen-count,)302.4 729 Q F2(2)2.75 E EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(display-string,)72 87 Q/F1 12/Times-Bold@0 SF(2)2.75 E F0 -(display-v)72 102 Q(endor)-.165 E(,)-.44 E F1(2)2.75 E F0(display-w)72 117 Q -(ait-output,)-.11 E F1(3)2.75 E F0(display-width,)72 132 Q F1(3)2.75 E F0 -(display-width-mm,)72 147 Q F1(3)2.75 E F0(display?,)72 162 Q F1(1)2.75 E F0 -(dra)72 177 Q(w-arc,)-.165 E F1(14)2.75 E F0(dra)72 192 Q(w-arcs,)-.165 E F1 -(15)2.75 E F0(dra)72 207 Q(w-image-te)-.165 E(xt,)-.165 E F1(17)2.75 E F0(dra) -72 222 Q(w-line,)-.165 E F1(14)2.75 E F0(dra)72 237 Q(w-lines,)-.165 E F1(14) -2.75 E F0(dra)72 252 Q(w-point,)-.165 E F1(14)2.75 E F0(dra)72 267 Q(w-points,) --.165 E F1(14)2.75 E F0 2.75(,1)C(5)152.882 267 Q(dra)72 282 Q(w-poly-te)-.165 -E(xt,)-.165 E F1(17)2.75 E F0(dra)72 297 Q(w-rectangle,)-.165 E F1(14)2.75 E F0 -(dra)72 312 Q(w-rectangles,)-.165 E F1(14)2.75 E F0(dra)72 327 Q(w-se)-.165 E -(gments,)-.165 E F1(14)2.75 E F0(dra)72 342 Q -.11(wa)-.165 G(ble-border).11 E -(-width,)-.22 E F1(6)2.75 E F0(dra)72 357 Q -.11(wa)-.165 G(ble-depth,).11 E F1 -(6)2.75 E F0(dra)72 372 Q -.11(wa)-.165 G(ble-height,).11 E F1(6)2.75 E F0(dra) -72 387 Q -.11(wa)-.165 G(ble-root,).11 E F1(6)2.75 E F0(dra)72 402 Q -.11(wa) --.165 G(ble-width,).11 E F1(6)2.75 E F0(dra)72 417 Q -.11(wa)-.165 G(ble-x,).11 -E F1(6)2.75 E F0(dra)72 432 Q -.11(wa)-.165 G(ble-y).11 E(,)-.715 E F1(6)2.75 E -F0(dra)72 447 Q -.11(wa)-.165 G(ble?,).11 E F1(4)2.75 E/F2 13/Times-Bold@0 SF -(E)72 477 Q F0(Ev)72 507 Q(ent types#)-.165 E -.22(bu)80.25 522 S -(tton-press, 22).22 E -.22(bu)80.25 537 S(tton-release, 22).22 E -(circulate-notify)80.25 552 Q 2.75(,2)-.715 G(3)158.35 552 Q -(circulate-request, 23)80.25 567 Q(client-message, 23)80.25 582 Q -(colormap-notify)80.25 597 Q 2.75(,2)-.715 G(3)162.024 597 Q -(con\214gure-notify)80.25 612 Q 2.75(,2)-.715 G(3)162.024 612 Q -(con\214gure-request, 23)80.25 627 Q(create-notify)80.25 642 Q 2.75(,2)-.715 G -(2)146.734 642 Q(destro)80.25 657 Q(y-notify)-.11 E 2.75(,2)-.715 G(2)152.751 -657 Q(enter)80.25 672 Q(-notify)-.22 E 2.75(,2)-.715 G(2)142.246 672 Q -.165 -(ex)80.25 687 S(pose, 22).165 E(focus-in, 22)80.25 702 Q(focus-out, 22)80.25 -717 Q(graphics-e)80.25 732 Q(xpose, 22)-.165 E(gra)310.65 87 Q(vity-notify)-.22 -E 2.75(,2)-.715 G(3)381.82 87 Q -.11(ke)310.65 102 S(y-press, 22)-.055 E -.11 -(ke)310.65 117 S(y-release, 22)-.055 E -.11(ke)310.65 132 S(ymap-notify)-.055 E -2.75(,2)-.715 G(2)385.428 132 Q(lea)310.65 147 Q -.165(ve)-.22 G(-notify).165 E -2.75(,2)-.715 G(2)373.702 147 Q(map-notify)310.65 162 Q 2.75(,2)-.715 G(3) -369.819 162 Q(map-request, 23)310.65 177 Q(mapping-notify)310.65 192 Q 2.75(,2) --.715 G(3)389.377 192 Q(motion-notify)310.65 207 Q 2.75(,2)-.715 G(2)382.051 -207 Q(no-e)310.65 222 Q(xpose, 22)-.165 E(property-notify)310.65 237 Q 2.75(,2) --.715 G(3)388.145 237 Q(reparent-notify)310.65 252 Q 2.75(,2)-.715 G(3)386.913 -252 Q(resize-request, 23)310.65 267 Q(selection-clear)310.65 282 Q 2.75(,2)-.44 -G(3)385.351 282 Q(selection-notify)310.65 297 Q 2.75(,2)-.715 G(3)389.982 297 Q -(selection-request, 23)310.65 312 Q(unmap-notify)310.65 327 Q 2.75(,2)-.715 G -(3)380.819 327 Q(visibility-notify)310.65 342 Q 2.75(,2)-.715 G(2)390.004 342 Q --2.365 -.275(ev e)302.4 357 T(nt-listen,).275 E F1(21)2.75 E F0 -.165(ex)302.4 -372 S(tents-ascent,).165 E F1(17)2.75 E F0 -.165(ex)302.4 387 S(tents-descent,) -.165 E F1(17)2.75 E F0 -.165(ex)302.4 402 S(tents-lbearing,).165 E F1(17)2.75 E -F0 -.165(ex)302.4 417 S(tents-rbearing,).165 E F1(17)2.75 E F0 -.165(ex)302.4 -432 S(tents-width,).165 E F1(17)2.75 E F2(F)302.4 462 Q F0(fetch-b)302.4 492 Q -(uf)-.22 E(fer)-.275 E(,)-.44 E F1(28)2.75 E F0(fetch-bytes,)302.4 507 Q F1(28) -2.75 E F0(\214ll-arc,)302.4 522 Q F1(14)2.75 E F0(\214ll-arcs,)302.4 537 Q F1 -(15)2.75 E F0(\214ll-polygon,)302.4 552 Q F1(15)2.75 E F0(\214ll-rectangle,) -302.4 567 Q F1(14)2.75 E F0(\214ll-rectangles,)302.4 582 Q F1(14)2.75 E F0 -(\214nd-atom,)302.4 597 Q F1(8)2.75 E F0(font-all-chars-e)302.4 612 Q(xist?,) --.165 E F1(16)2.75 E F0(font-ascent,)302.4 627 Q F1(16)2.75 E F0(font-def)302.4 -642 Q(ault-char)-.11 E(,)-.44 E F1(16)2.75 E F0(font-descent,)302.4 657 Q F1 -(16)2.75 E F0(font-direction,)302.4 672 Q F1(16)2.75 E F0(font-display)302.4 -687 Q(,)-.715 E F1(15)2.75 E F0(font-max-byte1,)302.4 702 Q F1(16)2.75 E F0 -(font-max-byte2,)302.4 717 Q F1(16)2.75 E F0(font-min-byte1,)302.4 732 Q F1(16) -2.75 E EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(3-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(font-min-byte2,)72 87 Q/F1 12/Times-Bold@0 SF(16)2.75 E F0 -(font-name,)72 102 Q F1(15)2.75 E F0(font-path,)72 117 Q F1(17)2.75 E F0 -(font-properties,)72 132 Q F1(16)2.75 E F0(font-property)72 147 Q(,)-.715 E F1 -(17)2.75 E F0(font?,)72 162 Q F1(15)2.75 E F0(free-colormap,)72 177 Q F1(10) -2.75 E F0(free-cursor)72 192 Q(,)-.44 E F1(18)2.75 E F0(free-gconte)72 207 Q -(xt,)-.165 E F1(11)2.75 E F0(free-pixmap,)72 222 Q F1(10)2.75 E/F2 13 -/Times-Bold@0 SF(G)72 252 Q F0 -.055(ga)72 282 S(rbage collector).055 E 2.75 -(,2)-.44 G(9)158.559 282 Q(gconte)72 297 Q(xt-arc-mode,)-.165 E F1(12)2.75 E F0 -(gconte)72 312 Q(xt-background,)-.165 E F1(12)2.75 E F0(gconte)72 327 Q -(xt-cap-style,)-.165 E F1(12)2.75 E F0(gconte)72 342 Q(xt-clip-x,)-.165 E F1 -(12)2.75 E F0(gconte)72 357 Q(xt-clip-y)-.165 E(,)-.715 E F1(12)2.75 E F0 -(gconte)72 372 Q(xt-dash-of)-.165 E(fset,)-.275 E F1(12)2.75 E F0(gconte)72 387 -Q(xt-display)-.165 E(,)-.715 E F1(11)2.75 E F0(gconte)72 402 Q(xt-e)-.165 E -(xposures,)-.165 E F1(12)2.75 E F0(gconte)72 417 Q(xt-\214ll-rule,)-.165 E F1 -(12)2.75 E F0(gconte)72 432 Q(xt-\214ll-style,)-.165 E F1(12)2.75 E F0(gconte) -72 447 Q(xt-font,)-.165 E F1(15)2.75 E F0(gconte)72 462 Q(xt-fore)-.165 E -(ground,)-.165 E F1(12)2.75 E F0(gconte)72 477 Q(xt-function,)-.165 E F1(12) -2.75 E F0(gconte)72 492 Q(xt-join-style,)-.165 E F1(12)2.75 E F0(gconte)72 507 -Q(xt-line-style,)-.165 E F1(12)2.75 E F0(gconte)72 522 Q(xt-line-width,)-.165 E -F1(12)2.75 E F0(gconte)72 537 Q(xt-plane-mask,)-.165 E F1(12)2.75 E F0(gconte) -72 552 Q(xt-stipple,)-.165 E F1(12)2.75 E F0(gconte)72 567 Q(xt-subwindo)-.165 -E(w-mode,)-.275 E F1(12)2.75 E F0(gconte)72 582 Q(xt-tile,)-.165 E F1(12)2.75 E -F0(gconte)72 597 Q(xt-ts-x,)-.165 E F1(12)2.75 E F0(gconte)72 612 Q(xt-ts-y) --.165 E(,)-.715 E F1(12)2.75 E F0(gconte)72 627 Q(xt?,)-.165 E F1(11)2.75 E F0 -(general-w)72 642 Q(arp-pointer)-.11 E(,)-.44 E F1(20)2.75 E F0(get-def)72 657 -Q(ault,)-.11 E F1(27)2.75 E F0(get-motion-e)72 672 Q -.165(ve)-.275 G(nts,).165 -E F1(21)2.75 E F0(get-pointer)72 687 Q(-mapping,)-.22 E F1(21)2.75 E F0 -(get-property)72 702 Q(,)-.715 E F1(8)2.75 E F0(get-te)72 717 Q(xt-property) --.165 E(,)-.715 E F1(24)2.75 E F0(grab-b)72 732 Q(utton, 7,)-.22 E F1(19)2.75 E -F0(grab-k)302.4 87 Q -.165(ey)-.11 G(,)-.55 E F1(19)2.75 E F0(grab-k)302.4 102 -Q -.165(ey)-.11 G(board,).165 E F1(19)2.75 E F0(grab-pointer)302.4 117 Q(,)-.44 -E F1(18)2.75 E F0 2.75(,1)C(9)384.833 117 Q(grab-serv)302.4 132 Q(er)-.165 E(,) --.44 E F1(19)2.75 E F2(H)302.4 162 Q F0(handle-e)302.4 192 Q -.165(ve)-.275 G -(nts,).165 E F1(21)2.75 E F2(I)302.4 222 Q F0(icon-sizes,)302.4 252 Q F1(26) -2.75 E F0(iconify-windo)302.4 267 Q -.715(w,)-.275 G F1(24)3.465 E F0 -(input-focus,)302.4 282 Q F1(20)2.75 E F0(install-colormap,)302.4 297 Q F1(20) -2.75 E F0(intern-atom,)302.4 312 Q F1(8)2.75 E F2(K)302.4 342 Q F0 -.11(ke) -302.4 372 S(ycode)-.055 E/F3 11/Symbol SF(-)A F0(>k)A -.165(ey)-.11 G(sym,).165 -E F1(27)2.75 E F0 -.11(ke)302.4 387 S(ysym)-.055 E F3(-)A F0(>k)A -.165(ey)-.11 -G(code,).165 E F1(27)2.75 E F0 -.11(ke)302.4 402 S(ysym)-.055 E F3(-)A F0 -(>string,)A F1(26)2.75 E F2(L)302.4 432 Q F0(list-depths,)302.4 462 Q F1(3)2.75 -E F0(list-e)302.4 477 Q(xtensions,)-.165 E F1(28)2.75 E F0(list-font-names,) -302.4 492 Q F1(15)2.75 E F0(list-fonts,)302.4 507 Q F1(15)2.75 E F0 -(list-installed-colormaps,)302.4 522 Q F1(20)2.75 E F0(list-pixmap-formats,) -302.4 537 Q F1(3)2.75 E F0(list-properties,)302.4 552 Q F1(8)2.75 E F0 -(lookup-color)302.4 567 Q(,)-.44 E F1(9)2.75 E F0(lookup-string,)302.4 582 Q F1 -(27)2.75 E F0(lo)302.4 597 Q(wer)-.275 E(-windo)-.22 E -.715(w,)-.275 G F1(7) -3.465 E F2(M)302.4 627 Q F0(mak)302.4 657 Q(e-atom,)-.11 E F1(8)2.75 E F0(mak) -302.4 672 Q(e-color)-.11 E(,)-.44 E F1(9)2.75 E F0(map-subwindo)302.4 687 Q -(ws,)-.275 E F1(7)2.75 E F0(map-windo)302.4 702 Q -.715(w,)-.275 G F1(6)3.465 E -F0(max-char)302.4 717 Q(-ascent,)-.22 E F1(16)2.75 E F0(max-char)302.4 732 Q -(-descent,)-.22 E F1(16)2.75 E EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(4-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(max-char)72 87 Q(-lbearing,)-.22 E/F1 12/Times-Bold@0 SF(16)2.75 E -F0(max-char)72 102 Q(-rbearing,)-.22 E F1(16)2.75 E F0(max-char)72 117 Q -(-width,)-.22 E F1(16)2.75 E F0(min-char)72 132 Q(-ascent,)-.22 E F1(16)2.75 E -F0(min-char)72 147 Q(-descent,)-.22 E F1(16)2.75 E F0(min-char)72 162 Q -(-lbearing,)-.22 E F1(16)2.75 E F0(min-char)72 177 Q(-rbearing,)-.22 E F1(16) -2.75 E F0(min-char)72 192 Q(-width,)-.22 E F1(16)2.75 E F0(multiple-v)72 207 Q -(alue-bind, 1)-.275 E/F2 13/Times-Bold@0 SF(N)72 237 Q F0(no-op,)72 267 Q F1(3) -2.75 E F2(O)72 297 Q F0(open-display)72 327 Q(,)-.715 E F1(1)2.75 E F0 -(open-font,)72 342 Q F1(15)2.75 E F2(P)72 372 Q F0(parse-color)72 402 Q(,)-.44 -E F1(28)2.75 E F0(parse-geometry)72 417 Q(,)-.715 E F1(28)2.75 E F0(pix)72 432 -Q(el-v)-.165 E(alue,)-.275 E F1(10)2.75 E F0(pix)72 447 Q(el?,)-.165 E F1(10) -2.75 E F0(pixmap-display)72 462 Q(,)-.715 E F1(10)2.75 E F0(pixmap?,)72 477 Q -F1(10)2.75 E F2(Q)72 507 Q F0(query-best-cursor)72 537 Q(,)-.44 E F1(11)2.75 E -F0(query-best-size,)72 552 Q F1(11)2.75 E F0(query-best-stipple,)72 567 Q F1 -(11)2.75 E F0(query-best-tile,)72 582 Q F1(11)2.75 E F0(query-color)72 597 Q(,) --.44 E F1(9)2.75 E F0(query-colors,)72 612 Q F1(9)2.75 E F0(query-e)72 627 Q -(xtension,)-.165 E F1(29)2.75 E F0(query-pointer)72 642 Q(,)-.44 E F1(7)2.75 E -F0(query-tree,)72 657 Q F1(7)2.75 E F2(R)72 687 Q F0(raise-windo)72 717 Q -.715 -(w,)-.275 G F1(7)3.465 E F0(read-bitmap-\214le,)72 732 Q F1(11)2.75 E F0 -(rebind-k)302.4 87 Q -.165(ey)-.11 G(sym,).165 E F1(27)2.75 E F0(recolor)302.4 -102 Q(-cursor)-.22 E(,)-.44 E F1(18)2.75 E F0(recon\214gure-wm-windo)302.4 117 -Q -.715(w,)-.275 G F1(24)3.465 E F0(refresh-k)302.4 132 Q -.165(ey)-.11 G -(board-mapping,).165 E F1(27)2.75 E F0(reparent-windo)302.4 147 Q -.715(w,) --.275 G F1(20)3.465 E F0(resource-manager)302.4 162 Q(-string,)-.22 E F1(27) -2.75 E F0(restack-windo)302.4 177 Q(ws,)-.275 E F1(7)2.75 E F0(rotate-b)302.4 -192 Q(uf)-.22 E(fers,)-.275 E F1(28)2.75 E F0(rotate-properties,)302.4 207 Q F1 -(8)2.75 E F2(S)302.4 237 Q F0(selection-o)302.4 267 Q(wner)-.275 E(,)-.44 E F1 -(9)2.75 E F0(set-access-control,)302.4 282 Q F1(21)2.75 E F0(set-after)302.4 -297 Q(-function!,)-.22 E F1(4)2.75 E F0(set-close-do)302.4 312 Q(wn-mode,)-.275 -E F1(21)2.75 E F0(set-font-path!,)302.4 327 Q F1(17)2.75 E F0(set-gconte)302.4 -342 Q(xt-arc-mode!,)-.165 E F1(13)2.75 E F0(set-gconte)302.4 357 Q -(xt-background!,)-.165 E F1(12)2.75 E F0(set-gconte)302.4 372 Q(xt-cap-style!,) --.165 E F1(13)2.75 E F0(set-gconte)302.4 387 Q(xt-clip-mask!,)-.165 E F1(13) -2.75 E F0(set-gconte)302.4 402 Q(xt-clip-rectangles!,)-.165 E F1(13)2.75 E F0 -(set-gconte)302.4 417 Q(xt-clip-x!,)-.165 E F1(13)2.75 E F0(set-gconte)302.4 -432 Q(xt-clip-y!,)-.165 E F1(13)2.75 E F0(set-gconte)302.4 447 Q(xt-dash-of) --.165 E(fset!,)-.275 E F1(13)2.75 E F0(set-gconte)302.4 462 Q(xt-dashlist!,) --.165 E F1(13)2.75 E F0(set-gconte)302.4 477 Q(xt-e)-.165 E(xposures!,)-.165 E -F1(13)2.75 E F0(set-gconte)302.4 492 Q(xt-\214ll-rule!,)-.165 E F1(13)2.75 E F0 -(set-gconte)302.4 507 Q(xt-\214ll-style!,)-.165 E F1(13)2.75 E F0(set-gconte) -302.4 522 Q(xt-font!,)-.165 E F1(13)2.75 E F0(set-gconte)302.4 537 Q(xt-fore) --.165 E(ground!,)-.165 E F1(12)2.75 E F0(set-gconte)302.4 552 Q(xt-function!,) --.165 E F1(12)2.75 E F0(set-gconte)302.4 567 Q(xt-join-style!,)-.165 E F1(13) -2.75 E F0(set-gconte)302.4 582 Q(xt-line-style!,)-.165 E F1(13)2.75 E F0 -(set-gconte)302.4 597 Q(xt-line-width!,)-.165 E F1(13)2.75 E F0(set-gconte) -302.4 612 Q(xt-plane-mask!,)-.165 E F1(12)2.75 E F0(set-gconte)302.4 627 Q -(xt-stipple!,)-.165 E F1(13)2.75 E F0(set-gconte)302.4 642 Q(xt-subwindo)-.165 -E(w-mode!,)-.275 E F1(13)2.75 E F0(set-gconte)302.4 657 Q(xt-tile!,)-.165 E F1 -(13)2.75 E F0(set-gconte)302.4 672 Q(xt-ts-x!,)-.165 E F1(13)2.75 E F0 -(set-gconte)302.4 687 Q(xt-ts-y!,)-.165 E F1(13)2.75 E F0(set-icon-sizes!,) -302.4 702 Q F1(26)2.75 E F0(set-input-focus,)302.4 717 Q F1(20)2.75 E F0 -(set-pointer)302.4 732 Q(-mapping,)-.22 E F1(21)2.75 E EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(5-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(set-selection-o)72 87 Q(wner!,)-.275 E/F1 12/Times-Bold@0 SF(8)2.75 -E F0(set-te)72 102 Q(xt-property!,)-.165 E F1(24)2.75 E F0(set-transient-for!,) -72 117 Q F1(25)2.75 E F0(set-windo)72 132 Q(w-background-pix)-.275 E(el!,)-.165 -E F1(4)2.75 E F0(set-windo)72 147 Q(w-background-pixmap!,)-.275 E F1(4)2.75 E -F0(set-windo)72 162 Q(w-backing-pix)-.275 E(el!,)-.165 E F1(5)2.75 E F0 -(set-windo)72 177 Q(w-backing-planes!,)-.275 E F1(5)2.75 E F0(set-windo)72 192 -Q(w-backing-store!,)-.275 E F1(5)2.75 E F0(set-windo)72 207 Q(w-bit-gra)-.275 E -(vity!,)-.22 E F1(5)2.75 E F0(set-windo)72 222 Q(w-border)-.275 E(-pix)-.22 E -(el!,)-.165 E F1(5)2.75 E F0(set-windo)72 237 Q(w-border)-.275 E(-pixmap!,)-.22 -E F1(4)2.75 E F0(set-windo)72 252 Q(w-border)-.275 E(-width!,)-.22 E F1(4)2.75 -E F0(set-windo)72 267 Q(w-colormap!,)-.275 E F1(5)2.75 E F0(set-windo)72 282 Q -(w-cursor!,)-.275 E F1(5)2.75 E F0(set-windo)72 297 Q(w-do-not-propag)-.275 E -(ate-mask!,)-.055 E F1(5)2.75 E F0(set-windo)72 312 Q(w-e)-.275 E -.165(ve) --.275 G(nt-mask!,).165 E F1(5)2.75 E F0(set-windo)72 327 Q(w-gra)-.275 E -(vity!,)-.22 E F1(5)2.75 E F0(set-windo)72 342 Q(w-height!,)-.275 E F1(4)2.75 E -F0(set-windo)72 357 Q(w-o)-.275 E -.165(ve)-.165 G(rride-redirect!,).165 E F1 -(5)2.75 E F0(set-windo)72 372 Q(w-sa)-.275 E -.165(ve)-.22 G(-under!,).165 E F1 -(5)2.75 E F0(set-windo)72 387 Q(w-sibling!,)-.275 E F1(4)2.75 E F0(set-windo)72 -402 Q(w-stack-mode!,)-.275 E F1(4)2.75 E F0(set-windo)72 417 Q(w-width!,)-.275 -E F1(4)2.75 E F0(set-windo)72 432 Q(w-x!,)-.275 E F1(4)2.75 E F0(set-windo)72 -447 Q(w-y!,)-.275 E F1(4)2.75 E F0(set-wm-class!,)72 462 Q F1(25)2.75 E F0 -(set-wm-client-machine!,)72 477 Q F1(25)2.75 E F0(set-wm-command!,)72 492 Q F1 -(25)2.75 E F0(set-wm-hints!,)72 507 Q F1(26)2.75 E F0(set-wm-icon-name!,)72 522 -Q F1(25)2.75 E F0(set-wm-name!,)72 537 Q F1(24)2.75 E F0(set-wm-normal-hints!,) -72 552 Q F1(26)2.75 E F0(set-wm-protocols!,)72 567 Q F1(24)2.75 E F0(store-b)72 -582 Q(uf)-.22 E(fer)-.275 E(,)-.44 E F1(28)2.75 E F0(store-bytes,)72 597 Q F1 -(28)2.75 E F0(string)72 612 Q/F2 11/Symbol SF(-)A F0(>k)A -.165(ey)-.11 G(sym,) -.165 E F1(26)2.75 E F0(synchronize,)72 627 Q F1(4)2.75 E/F3 13/Times-Bold@0 SF -(T)72 657 Q F0(te)72 687 Q(xt-width,)-.165 E F1(17)2.75 E F0(transient-for)72 -702 Q(,)-.44 E F1(25)2.75 E F0(translate-coordinates,)72 717 Q F1(7)2.75 E F0 -(translate-te)302.4 87 Q(xt,)-.165 E F1(17)2.75 E F3(U)302.4 117 Q F0 -(unde\214ne-cursor)302.4 147 Q(,)-.44 E F1(18)2.75 E F0(ungrab-b)302.4 162 Q -(utton,)-.22 E F1(19)2.75 E F0(ungrab-k)302.4 177 Q -.165(ey)-.11 G(,)-.55 E F1 -(19)2.75 E F0(ungrab-k)302.4 192 Q -.165(ey)-.11 G(board,).165 E F1(19)2.75 E -F0(ungrab-pointer)302.4 207 Q(,)-.44 E F1(19)2.75 E F0(ungrab-serv)302.4 222 Q -(er)-.165 E(,)-.44 E F1(19)2.75 E F0(uninstall-colormap,)302.4 237 Q F1(20)2.75 -E F0(unmap-subwindo)302.4 252 Q(ws,)-.275 E F1(7)2.75 E F0(unmap-windo)302.4 -267 Q -.715(w,)-.275 G F1(6)3.465 E F3(W)302.4 297 Q F0 -.11(wa)302.4 327 S -(rp-pointer).11 E(,)-.44 E F1(20)2.75 E F0 -.11(wa)302.4 342 S(rp-pointer).11 E -(-relati)-.22 E -.165(ve)-.275 G(,).165 E F1(20)2.75 E F0(white-pix)302.4 357 Q -(el,)-.165 E F1(10)2.75 E F0(windo)302.4 372 Q(w-all-e)-.275 E -.165(ve)-.275 G -(nt-masks,).165 E F1(5)2.75 E F0(windo)302.4 387 Q(w-backing-pix)-.275 E(el,) --.165 E F1(5)2.75 E F0(windo)302.4 402 Q(w-backing-planes,)-.275 E F1(5)2.75 E -F0(windo)302.4 417 Q(w-backing-store,)-.275 E F1(5)2.75 E F0(windo)302.4 432 Q -(w-bit-gra)-.275 E(vity)-.22 E(,)-.715 E F1(5)2.75 E F0(windo)302.4 447 Q -(w-border)-.275 E(-width,)-.22 E F1(5)2.75 E F0(windo)302.4 462 Q(w-class,) --.275 E F1(5)2.75 E F0(windo)302.4 477 Q(w-colormap,)-.275 E F1(5)2.75 E F0 -(windo)302.4 492 Q(w-depth,)-.275 E F1(5)2.75 E F0(windo)302.4 507 Q(w-display) --.275 E(,)-.715 E F1(4)2.75 E F0(windo)302.4 522 Q(w-do-not-propag)-.275 E -(ate-mask,)-.055 E F1(5)2.75 E F0(windo)302.4 537 Q(w-gra)-.275 E(vity)-.22 E -(,)-.715 E F1(5)2.75 E F0 2.75(,2)C(5)393.958 537 Q(windo)302.4 552 Q -(w-height,)-.275 E F1(5)2.75 E F0(windo)302.4 567 Q(w-map-installed,)-.275 E F1 -(5)2.75 E F0(windo)302.4 582 Q(w-map-state,)-.275 E F1(5)2.75 E F0(windo)302.4 -597 Q(w-o)-.275 E -.165(ve)-.165 G(rride-redirect,).165 E F1(5)2.75 E F0(windo) -302.4 612 Q(w-root,)-.275 E F1(5)2.75 E F0(windo)302.4 627 Q(w-sa)-.275 E -.165 -(ve)-.22 G(-under).165 E(,)-.44 E F1(5)2.75 E F0(windo)302.4 642 Q(w-screen,) --.275 E F1(6)2.75 E F0(windo)302.4 657 Q(w-visual,)-.275 E F1(5)2.75 E F0 -(windo)302.4 672 Q(w-width,)-.275 E F1(5)2.75 E F0(windo)302.4 687 Q(w-x,)-.275 -E F1(5)2.75 E F0(windo)302.4 702 Q(w-y)-.275 E(,)-.715 E F1(5)2.75 E F0(windo) -302.4 717 Q(w-your)-.275 E(-e)-.22 E -.165(ve)-.275 G(nt-mask,).165 E F1(5)2.75 -E F0(windo)302.4 732 Q(w?,)-.275 E F1(4)2.75 E EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3)276.087 51 S 2.75(6-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(with,)72 87 Q/F1 12/Times-Bold@0 SF(28)2.75 E F0(with-serv)72 102 Q -(er)-.165 E(-grabbed,)-.22 E F1(20)2.75 E F0(withdra)72 117 Q(w-windo)-.165 E --.715(w,)-.275 G F1(24)3.465 E F0(wm-class,)72 132 Q F1(25)2.75 E F0 -(wm-client-machine,)72 147 Q F1(25)2.75 E F0(wm-command,)72 162 Q F1(25)2.75 E -F0(wm-hints,)72 177 Q F1(26)2.75 E F0(wm-icon-name,)72 192 Q F1(24)2.75 E F0 -(wm-name,)72 207 Q F1(24)2.75 E F0(wm-normal-hints,)72 222 Q F1(25)2.75 E F0 -2.75(,2)C(6)176.884 222 Q(wm-protocols,)72 237 Q F1(24)2.75 E F0 -(write-bitmap-\214le,)72 252 Q F1(11)2.75 E/F2 13/Times-Bold@0 SF(X)72 282 Q F0 -(x-error)72 312 Q(-handler)-.22 E(,)-.44 E F1(29)2.75 E F0(x-f)72 327 Q -(atal-error)-.11 E(-handler)-.22 E(,)-.44 E F1(29)2.75 E F0(xlib, 1)72 342 Q -(xlib-release-4-or)72 357 Q(-later?,)-.22 E F1(27)2.75 E F0(xlib-release-5-or) -72 372 Q(-later?,)-.22 E F1(27)2.75 E F0(xlib-release-6-or)72 387 Q(-later?,) --.22 E F1(27)2.75 E EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q(Display Functions)72 196.2 Q 19.25(.........\ -..............................................................................\ -............................. 1)5.134 F -.44(Wi)72 214.8 S(ndo).44 E 2.75(wF) --.275 G 2.186(unctions .......................................................\ -............................................................)118.035 214.8 R(4) -498.5 214.8 Q -.44(Wi)72 233.4 S(ndo).44 E 2.75(wP)-.275 G -(roperty and Selection Functions)118.035 233.4 Q 19.25(.......................\ -....................................................... 7)3.726 F -(Colormap Functions)72 252 Q 19.25(...........................................\ -...................................................................... 9)3.605 -F(Pix)72 270.6 Q(el Functions)-.165 E 13.75(..................................\ -..............................................................................\ -......... 10)3.154 F(Pixmap Functions)72 289.2 Q 13.75(.......................\ -..............................................................................\ -................ 10)2.989 F(Graphics Conte)72 307.8 Q(xt Functions)-.165 E -13.75(........................................................................\ -............................. 11)3.473 F(Graphics Functions)72 326.4 Q 13.75(.\ -..............................................................................\ -................................... 13)5.145 F -.165(Fo)72 345 S(nt Functions) -.165 E 13.75(.................................................................\ -......................................................... 15)2.846 F -1.375 --.77(Te x)72 363.6 T 2.75(tM).77 G(etrics and T)103.757 363.6 Q -.165(ex)-.77 G -2.75(tD).165 G(ra)178.887 363.6 Q(wing Functions)-.165 E 13.75(...............\ -................................................................ 17)3.836 F -(Cursor Functions)72 382.2 Q 13.75(...........................................\ -........................................................................... 18) -3.913 F(Grab Functions)72 400.8 Q 13.75(......................................\ -..............................................................................\ -..... 18)3.616 F -.44(Wi)72 419.4 S(ndo).44 E 2.75(wM)-.275 G(anager Functions) -121.698 419.4 Q 13.75(........................................................\ -............................................ 20)4.342 F(Ev)72 438 Q -(ent Handling Functions)-.165 E 13.75(........................................\ -................................................................ 21)3.165 F -(Inter)72 456.6 Q(-Client Communication Functions)-.22 E 13.75(...............\ -.................................................................... 24)5.354 F --2.365 -.275(Ke y)72 475.2 T(board Utility Functions).275 E 13.75(............\ -..............................................................................\ -............ 26)3.44 F(Other Utility Functions)72 493.8 Q 13.75(..............\ -..............................................................................\ -................ 27)4.826 F(Serv)72 512.4 Q(er Extension Functions)-.165 E -13.75(........................................................................\ -............................. 28)5.31 F(Error Handling)72 531 Q 13.75(........\ -..............................................................................\ -................................... 29)4.848 F -(Interaction with the Garbage Collector)72 549.6 Q 13.75(.....................\ -............................................................... 29)3.649 F -(Inde)72 568.2 Q 2.868(x.)-.165 G 13.75(......................................\ -..............................................................................\ -.................... 31)102.5 568.2 R EP -%%Trailer -end -%%EOF diff --git a/doc/xt/Makefile.am b/doc/xt/Makefile.am index 8983147..2db4db1 100644 --- a/doc/xt/Makefile.am +++ b/doc/xt/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST = xt.ms xt.ps +EXTRA_DIST = xt.ms + +if HAVE_GROFF +doc_DATA = xt.ps +docdir = $(datadir)/doc/@PACKAGE@ +endif + +MANUAL= xt +TROFF= groff -ms -t +UNROFF= unroff -ms + +xt.ps: xt.ms index.ms + (cat xt.ms ../util/tmac.index index.ms; echo ".Tc")\ + | $(TROFF) 2> /dev/null > xt.ps + +xt.html: xt.ms + (cat $?; echo ".Tc") | $(UNROFF) document=xt + +index.ms: xt.ms index.raw + sort -f -t'#' +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\ + | awk -f ../util/block.awk >index.ms + +index.raw: xt.ms + $(TROFF) xt.ms 2> index.raw >/dev/null + +check: + checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] xt.ms |\ + grep -v "Empty command" + +clean: + rm -f index.raw index.ms xt.ps xt.html diff --git a/doc/xt/xt.ps b/doc/xt/xt.ps deleted file mode 100644 index 3a55121..0000000 --- a/doc/xt/xt.ps +++ /dev/null @@ -1,1067 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 13 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron -/zcaron/Ydieresis/trademark/quotesingle/.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/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Elk/Xt Refer)222.45 120 Q(ence Manual)-.216 E/F1 10 -/Times-Italic@0 SF(Oliver Laumann)255.085 144 Q/F2 11/Times-Bold@0 SF 2.75 -(1. Intr)72 216 R(oduction)-.198 E/F3 11/Times-Roman@0 SF 2.118 -(This manual describes the functions, special forms, and v)97 234.6 R 2.118 -(ariables de\214ned by the Xt \(X)-.275 F -.88(To)72 249.6 S 1.058 -(olkit Intrinsics\) e).88 F 1.058(xtension included in the Elk distrib)-.165 F -3.808(ution. Most)-.22 F 1.059(of the functions are directly)3.808 F(equi)72 -264.6 Q -.275(va)-.275 G .19(lent to a function of the X toolkit C library).275 -F 2.939(,s)-.715 G 2.939(ot)299.032 264.6 S .189 -(hat the description need not be repeated.)310.529 264.6 R(In)5.689 E .29 -(such cases, only the name of the corresponding Xt function is mentioned.)72 -279.6 R .291(Thus, you should ha)5.79 F -.165(ve)-.22 G(the)72 294.6 Q/F4 11 -/Times-Italic@0 SF 3.792(XT)3.792 G 1.042(oolkit Intrinsics \255 C Langua) -104.851 294.6 R 1.262 -.11(ge I)-.11 H(nterface).11 E F3 1.041 -(manual within reach when using this reference)3.792 F(manual.)72 309.6 Q -(The functions listed in this document are loaded when the e)97 328.2 Q -(xpression)-.165 E/F5 11/Courier@0 SF(\(require 'xwidgets\))108 349.2 Q F3 .476 -(is e)72 370.2 R -.275(va)-.275 G .476(luated or).275 F 3.226(,w)-.44 G .476 -(hen the OSF/Motif softw)150.032 370.2 R .476 -(are has been installed on your system and you w)-.11 F .477(ant to)-.11 F -(use Motif widgets from within Scheme, when)72 385.2 Q F5(\(require 'motif\)) -108 406.2 Q F3 1.216(is e)72 427.2 R -.275(va)-.275 G 1.216 -(luated in the interpreter').275 F 3.966(st)-.605 G 1.216(op le)218.979 427.2 R --.165(ve)-.275 G 3.966(lo).165 G 3.966(ri)264.355 427.2 S 3.966(naS)275.042 -427.2 S 1.216(cheme program.)299.474 427.2 R 1.216(If you only w)6.716 F 1.216 -(ant to use the)-.11 F(toolkit functionality \(and no widgets\), e)72 442.2 Q --.275(va)-.275 G(luate).275 E F5(\(require 'xt\).)108 463.2 Q F3 -(Note that all of the abo)72 484.2 Q .33 -.165(ve f)-.165 H -(orms cause the Elk/Xlib functions to be loaded as well.).165 E(Indi)72 502.8 Q -(vidual widgets are loaded by e)-.275 E -.275(va)-.275 G(luating).275 E F5 -(\(load-widgets .)108 523.8 Q F4(widg)6.6 E(et-names)-.11 E F5(\))A F3(Each)72 -548.4 Q F4(widg)2.75 E(et-name)-.11 E F3(is a symbol \(not quoted, since)2.75 E -F4(load-widg)2.75 E(ets)-.11 E F3(is a macro\).)2.75 E 6.324 -(The widgets are loaded from subdirectories of `)97 567 R -(`$install_dir/runtime/obj')-.814 E 9.074('\()-.814 G(where)477.127 567 Q -($install_dir is the directory where you ha)72 582 Q .33 -.165(ve i)-.22 H -(nstalled Elk on your system\).).165 E .17(In the follo)97 600.6 R .17 -(wing, the types of ar)-.275 F .169 -(guments of the listed procedures are not speci\214ed when the)-.198 F(y)-.165 -E 2.05(are ob)72 615.6 R 2.05(vious from the conte)-.165 F 2.05 -(xt or from the name.)-.165 F -.165(Fo)7.55 G 4.8(ri).165 G 2.05 -(nstance, an ar)326.635 615.6 R 2.051(gument named)-.198 F F4(widg)4.801 E(et) --.11 E F3(is)4.801 E(al)72 630.6 Q -.11(wa)-.11 G .759(ys of type).11 F F4 -(widg)3.509 E(et)-.11 E F3 3.509(,a)C 3.509(na)181.329 630.6 S -.198(rg)195.222 -630.6 S .759(ument named).198 F F4(conte)3.509 E(xt)-.22 E F3 .759 -(is an object of type)3.509 F F4(conte)3.508 E(xt)-.22 E F3 .758 -(\(application con-)3.508 F(te)72 645.6 Q(xt\), etc.)-.165 E(Ar)5.5 E -(guments the names of which end in `)-.198 E(`?')-.814 E 2.75('a)-.814 G(re al) -314.088 645.6 Q -.11(wa)-.11 G(ys of type).11 E F4(boolean)2.75 E F3(.)A .612 -(In the follo)97 664.2 R .612 -(wing, each description of a procedure, special form, or v)-.275 F .613 -(ariable lists the kind of)-.275 F .736(object in boldf)72 679.2 R 3.485 -(ace. Here,)-.11 F F2(pr)3.485 E(ocedur)-.198 E(e)-.198 E F3 .735 -(denotes either a primiti)3.485 F 1.065 -.165(ve p)-.275 H .735 -(rocedure or a compound proce-).165 F(dure,)72 694.2 Q F2(syntax)3.616 E F3 -.866(denotes a special form or a macro, and)3.616 F F2 -.11(va)3.616 G(riable) -.11 E F3 .866(denotes a global v)3.616 F .866(ariable that has)-.275 F -(some initial v)72 709.2 Q(alue and can be re-assigned a ne)-.275 E 2.75(wv) --.275 G(alue by the user \(by means of)288.986 709.2 Q F4(set!)2.75 E F3(or) -2.75 E F4(\215uid-let)2.75 E F3(\).)A EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(2. W)72 87 R(idget Classes)-.198 E -(\(class?)72 117 Q/F2 11/Times-Italic@0 SF(x)4.583 E F1 339.835(\)p)C -.198(ro) -462.244 117 S(cedur).198 E(e)-.198 E F0(Returns #t if)72 135.6 Q(f)-.275 E F2 -(x)2.75 E F0(is an object of type)2.75 E F2(class)2.75 E F0(\(widget class\).) -2.75 E F1(\(\214nd-class)72 165.6 Q F2(name-of-class)4.583 E F1 266.498(\)p)C --.198(ro)462.244 165.6 S(cedur).198 E(e)-.198 E F0 .268 -(Returns the widget class of the speci\214ed name \(an object of type)72 184.2 -R F2(class)3.018 E F0(\).)A F2(name-of-class)5.768 E F0 .268(is a string)3.018 -F(or a symbol.)72 199.2 Q F1(\(class-r)72 229.2 Q(esour)-.198 E(ces)-.198 E F2 -(widg)4.583 E(et-class)-.11 E F1 247.468(\)p)C -.198(ro)462.244 229.2 S(cedur) -.198 E(e)-.198 E F0(See)72 247.8 Q F2(XtGetResour)3.463 E(ceList)-.407 E F0 -6.214(.R)C .714(eturns the resource list of the speci\214ed widget class.) -190.346 247.8 R .714(Each element of)6.214 F(the list is a list of three symbo\ -ls \255 the resource name, the resource class, and the resource type.)72 262.8 -Q F1(\(class-constraint-r)72 292.8 Q(esour)-.198 E(ces)-.198 E F2(widg)4.583 E -(et-class)-.11 E F1 196.142(\)p)C -.198(ro)462.244 292.8 S(cedur).198 E(e)-.198 -E F0(See)72 311.4 Q F2(XtGetConstr)4.107 E(aintRespour)-.165 E(ceList)-.407 E -F0 6.857(.R)C 1.357 -(eturns the list of constraint resources that are de\214ned for)244.037 311.4 R -.182(the speci\214ed widget class.)72 326.4 R .182 -(Each element of the list is a list of three symbols \255 the resource name,) -5.682 F(the resource class, and the resource type.)72 341.4 Q F1(\(class-sub-r) -72 371.4 Q(esour)-.198 E(ces)-.198 E F2(widg)4.583 E(et-class)-.11 E F1 227.294 -(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e)-.198 E F0 2.315 -(Returns the list of sub-resources \(if there are an)72 390 R 2.315 -(y\) of the speci\214ed widget class.)-.165 F(See)7.815 E F2(class-)5.064 E --.407(re)72 405 S(sour).407 E(ces)-.407 E F0(abo)2.75 E -.165(ve)-.165 G(.).165 -E F1(\(class-exists?)72 435 Q F2(name-of-class)4.583 E F1 253.683(\)p)C -.198 -(ro)462.244 435 S(cedur).198 E(e)-.198 E F0 1.271(Returns #t if)72 453.6 R -4.021(faw)-.275 G 1.272(idget class of the gi)153.798 453.6 R -.165(ve)-.275 G -4.022(nn).165 G 1.272(ame e)269.399 453.6 R 1.272(xists \(i.)-.165 F 1.272 -(e. has been loaded by means of)1.833 F F2(load-)4.022 E(widg)72 468.6 Q(ets) --.11 E F0(\).)A F2(name-of-class)5.5 E F0(is a string or a symbol.)2.75 E F1 -2.75(3. W)72 498.6 R(idget Functions)-.198 E(\(widget?)72 528.6 Q F2(x)4.583 E -F1 330.672(\)p)C -.198(ro)462.244 528.6 S(cedur).198 E(e)-.198 E F0 -(Returns #t if)72 547.2 Q(f)-.275 E F2(x)2.75 E F0(is an object of type)2.75 E -F2(widg)2.75 E(et)-.11 E F0(.)A F1(\(destr)72 577.2 Q(oy-widget)-.198 E F2 -(widg)4.583 E(et)-.11 E F1 273.538(\)p)C -.198(ro)462.244 577.2 S(cedur).198 E -(e)-.198 E F0(See)72 595.8 Q F2(XtDestr)2.75 E(oyW)-.495 E(idg)-.605 E(et)-.11 -E F0(.)A F1(\(cr)72 625.8 Q(eate-shell)-.198 E F2 -(application-name application-class par)4.583 E(ent display . ar)-.407 E(gs) --.407 E F1 69.532(\)p)C -.198(ro)462.244 625.8 S(cedur).198 E(e)-.198 E F0(See) -72 644.4 Q F2(XtAppCr)5.539 E(eateShell)-.407 E F0(.)A F2(application-name) -8.289 E F0(and)5.538 E F2(application-class)5.538 E F0 2.788 -(are strings or symbols or #f)5.538 F .404 -(\(NULL is used in the latter case\).)72 659.4 R F2(par)5.904 E(ent)-.407 E F0 -.404(is a widget.)3.154 F .404(The number of)5.904 F F2(ar)3.154 E(gs)-.407 E -F0 .404(must be e)3.154 F -.165(ve)-.275 G .404(n, the 1st,).165 F 1.203 -(3rd, etc. ar)72 674.4 R 1.203(gument is the name of a resource to be set \(a \ -string or a symbol\), the 2nd, 4th, etc.)-.198 F(ar)72 689.4 Q -(gument is the corresponding v)-.198 E(alue.)-.275 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(cr)72 87 Q(eate-widget)-.198 E/F2 11 -/Times-Italic@0 SF(widg)4.583 E(et-class par)-.11 E(ent . ar)-.407 E(gs)-.407 E -F1 195.537(\)p)C -.198(ro)462.244 87 S(cedur).198 E(e)-.198 E(\(cr)72 102 Q -(eate-widget)-.198 E F2(widg)4.583 E(et-name widg)-.11 E(et-class par)-.11 E -(ent . ar)-.407 E(gs)-.407 E F1 136.071(\)p)C -.198(ro)462.244 102 S(cedur).198 -E(e)-.198 E F0(See)72 120.6 Q F2(XtCr)3.089 E(eateW)-.407 E(idg)-.605 E(et)-.11 -E F0(.)A F2(widg)5.839 E(et-name)-.11 E F0 .339(is a string or a symbol;)3.089 -F F2(par)3.089 E(ent)-.407 E F0 .34(is a widget.)3.089 F .34(If no)5.84 F F2 -(widg)3.09 E(et-name)-.11 E F0 .141(is gi)72 135.6 R -.165(ve)-.275 G .141 -(n, the name of the widget class is used.).165 F .141(The number of)5.641 F F2 -(ar)2.891 E(gs)-.407 E F0 .14(must be e)2.89 F -.165(ve)-.275 G .14 -(n, the 1st, 3rd, etc.).165 F(ar)72 150.6 Q .418(gument is the name of a resou\ -rce to be set \(a string or a symbol\), the 2nd, 4th, etc. ar)-.198 F .418 -(gument is)-.198 F(the corresponding v)72 165.6 Q(alue.)-.275 E F1(\(cr)72 -195.6 Q(eate-managed-widget)-.198 E F2 2.75(.a)4.583 G -.407(rg)201.015 195.6 S -(s).407 E F1 237.799(\)p)C -.198(ro)462.244 195.6 S(cedur).198 E(e)-.198 E F0 -(Applies)72 214.2 Q F2(cr)3.351 E(eate-widg)-.407 E(et)-.11 E F0 .601 -(to the ar)3.351 F .601(guments and then calls)-.198 F F2(mana)3.35 E -.11(ge) --.11 G(-c).11 E(hild)-.165 E F0 .6(with the ne)3.35 F .6(wly created wid-)-.275 -F(get.)72 229.2 Q F1(\(r)72 259.2 Q(ealize-widget)-.198 E F2(widg)4.583 E(et) --.11 E F1 277.212(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E(e)-.198 E F0(See) -72 277.8 Q F2(XtRealizeW)2.75 E(idg)-.605 E(et)-.11 E F0(.)A F1(\(unr)72 307.8 -Q(ealize-widget)-.198 E F2(widg)4.583 E(et)-.11 E F1 264.98(\)p)C -.198(ro) -462.244 307.8 S(cedur).198 E(e)-.198 E F0(See)72 326.4 Q F2(XtUnr)2.75 E -(ealizeW)-.407 E(idg)-.605 E(et)-.11 E F0(.)A F1(\(widget-r)72 356.4 Q -(ealized?)-.198 E F2(widg)4.583 E(et)-.11 E F1 265.596(\)p)C -.198(ro)462.244 -356.4 S(cedur).198 E(e)-.198 E F0(See)72 375 Q F2(XtIsRealized)2.75 E F0(.)A F1 -(\(widget-display)72 405 Q F2(widg)4.583 E(et)-.11 E F1 274.539(\)p)C -.198(ro) -462.244 405 S(cedur).198 E(e)-.198 E F0(See)72 423.6 Q F2(XtDisplay)2.75 E F0 -5.5(.R)C(eturns an object of type)150.221 423.6 Q F2(display)2.75 E F0(.)A F1 -(\(widget-par)72 453.6 Q(ent)-.198 E F2(widg)4.583 E(et)-.11 E F1 277.201(\)p)C --.198(ro)462.244 453.6 S(cedur).198 E(e)-.198 E F0(See)72 472.2 Q F2(XtP)2.75 E -(ar)-.88 E(ent)-.407 E F0(.)A F1(\(widget-name)72 502.2 Q F2(widg)4.583 E(et) --.11 E F1 282.503(\)p)C -.198(ro)462.244 502.2 S(cedur).198 E(e)-.198 E F0(See) -72 520.8 Q F2(XtName)2.75 E F0 5.5(.R)C -(eturns the name of a widget as a string.)141.663 520.8 Q F1(\(widget)72 550.8 -Q/F3 11/Symbol SF(-)A F1(>windo)A(w)-.11 E F2(widg)4.583 E(et)-.11 E F1 262.956 -(\)p)C -.198(ro)462.244 550.8 S(cedur).198 E(e)-.198 E(\(widget-windo)72 565.8 -Q(w)-.11 E F2(widg)4.583 E(et)-.11 E F1 271.602(\)p)C -.198(ro)462.244 565.8 S -(cedur).198 E(e)-.198 E F0(See)72 584.4 Q F2(XtW)2.75 E(indow)-.605 E F0 5.5 -(.R)C(eturns an object of type)151.453 584.4 Q F2(window)2.75 E F0(.)A F1 -(\(widget-composite?)72 614.4 Q F2(widg)4.583 E(et)-.11 E F1 255.619(\)p)C --.198(ro)462.244 614.4 S(cedur).198 E(e)-.198 E F0(See)72 633 Q F2 -(XtIsComposite)2.75 E F0(.)A F1(\(manage-childr)72 663 Q(en)-.198 E F2 2.75(.w) -4.583 G(idg)172.327 663 Q(ets)-.11 E F1 253.969(\)p)C -.198(ro)462.244 663 S -(cedur).198 E(e)-.198 E F0(See)72 681.6 Q F2(XtMana)2.75 E -.11(ge)-.11 G -(Childr).11 E(en)-.407 E F0(.)A EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(manage-child)72 87 Q/F2 11/Times-Italic@0 -SF(widg)4.583 E(et)-.11 E F1 279.434(\)p)C -.198(ro)462.244 87 S(cedur).198 E -(e)-.198 E F0(Calls)72 105.6 Q F2(mana)2.75 E -.11(ge)-.11 G(-c).11 E(hildr) --.165 E(en)-.407 E F0(with the speci\214ed widget.)2.75 E F1(\(unmanage-childr) -72 135.6 Q(en)-.198 E F2 2.75(.w)4.583 G(idg)184.559 135.6 Q(ets)-.11 E F1 -241.737(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q -F2(XtUnmana)2.75 E -.11(ge)-.11 G(Childr).11 E(en)-.407 E F0(.)A F1 -(\(unmanage-child)72 184.2 Q F2(widg)4.583 E(et)-.11 E F1 267.202(\)p)C -.198 -(ro)462.244 184.2 S(cedur).198 E(e)-.198 E F0(Calls)72 202.8 Q F2(unmana)2.75 E --.11(ge)-.11 G(-c).11 E(hildr)-.165 E(en)-.407 E F0 -(with the speci\214ed widget.)2.75 E F1(\(widget-managed?)72 232.8 Q F2(widg) -4.583 E(et)-.11 E F1 259.887(\)p)C -.198(ro)462.244 232.8 S(cedur).198 E(e) --.198 E F0(See)72 251.4 Q F2(XtIsMana)2.75 E -.11(ge)-.11 G(d).11 E F0(.)A F1 -(\(widget-class)72 281.4 Q F2(widg)4.583 E(et)-.11 E F1 286.166(\)p)C -.198(ro) -462.244 281.4 S(cedur).198 E(e)-.198 E F0(See)72 300 Q F2(XtClass)2.75 E F0 5.5 -(.R)C(eturns an object of type)140.453 300 Q F2(class)2.75 E F0(.)A F1 -(\(widget-super)72 330 Q(class)-.198 E F2(widg)4.583 E(et)-.11 E F1 260.085 -(\)p)C -.198(ro)462.244 330 S(cedur).198 E(e)-.198 E F0(See)72 348.6 Q F2 -(XtSuper)3.643 E(class)-.407 E F0 6.393(.R)C .893(eturns an object of type) -165.042 348.6 R F2(class)3.644 E F0 .894(or the symbol)3.644 F/F3 11/Courier@0 -SF(none)3.644 E F0 .894(when the widget')3.644 F 3.644(sc)-.605 G(lass)487.5 -348.6 Q(does not ha)72 363.6 Q .33 -.165(ve a s)-.22 H(uper).165 E(-class.)-.22 -E F1(\(widget-subclass?)72 393.6 Q F2(widg)4.583 E(et class)-.11 E F1 239.405 -(\)p)C -.198(ro)462.244 393.6 S(cedur).198 E(e)-.198 E F0(See)72 412.2 Q F2 -(XtIsSubclass)2.75 E F0(.)A F1(\(set-mapped-when-managed!)72 442.2 Q F2(widg) -4.583 E(et mana)-.11 E -.11(ge)-.11 G(d?).11 E F1 161.426(\)p)C -.198(ro) -462.244 442.2 S(cedur).198 E(e)-.198 E F0(See)72 460.8 Q F2 -(XtSetMappedWhenMana)2.75 E -.11(ge)-.11 G(d).11 E F0(.)A F1(\(map-widget)72 -490.8 Q F2(widg)4.583 E(et)-.11 E F1 287.387(\)p)C -.198(ro)462.244 490.8 S -(cedur).198 E(e)-.198 E F0(See)72 509.4 Q F2(XtMapW)2.75 E(idg)-.605 E(et)-.11 -E F0(.)A F1(\(unmap-widget)72 539.4 Q F2(widg)4.583 E(et)-.11 E F1 275.155(\)p) -C -.198(ro)462.244 539.4 S(cedur).198 E(e)-.198 E F0(See)72 558 Q F2(XtUnmapW) -2.75 E(idg)-.605 E(et)-.11 E F0(.)A F1(\(set-v)72 588 Q(alues!)-.11 E F2(widg) -4.583 E(et . ar)-.11 E(gs)-.407 E F1 266.212(\)p)C -.198(ro)462.244 588 S -(cedur).198 E(e)-.198 E F0(See)72 606.6 Q F2(XtSetV)3.488 E(alues)-1.221 E F0 -6.238(.T)C .738(he number of)159.023 606.6 R F2(ar)3.488 E(gs)-.407 E F0 .738 -(must be e)3.488 F -.165(ve)-.275 G .737(n, the 1st, 3rd, etc. ar).165 F .737 -(gument is the name of a)-.198 F -(resource to be set \(a string or a symbol\), the 2nd, 4th, etc. ar)72 621.6 Q -(gument is the corresponding v)-.198 E(alue.)-.275 E F1(\(get-v)72 651.6 Q -(alues)-.11 E F2(widg)4.583 E(et . ar)-.11 E(gs)-.407 E F1 268.654(\)p)C -.198 -(ro)462.244 651.6 S(cedur).198 E(e)-.198 E F0(See)72 670.2 Q F2(XtGetV)3.109 E -(alues)-1.221 E F0 5.86(.E)C(ach)160.708 670.2 Q F2(ar)3.11 E(g)-.407 E F0 .36 -(is the name of a resource \(a string or a symbol\).)3.11 F .36 -(Returns a list of the)5.86 F -.275(va)72 685.2 S -(lues of the speci\214ed resources.).275 E EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(widget-context)72 87 Q/F2 11/Times-Italic@0 -SF(widg)4.583 E(et)-.11 E F1 273.956(\)p)C -.198(ro)462.244 87 S(cedur).198 E -(e)-.198 E F0(See)72 105.6 Q F2(XtW)2.75 E(idg)-.605 E(etT)-.11 E -(oApplicationConte)-1.012 E(xt)-.22 E F0 5.5(.R)C(eturns an object of type) -242.39 105.6 Q F2(conte)2.75 E(xt)-.22 E F0(.)A F1(\(set-sensiti)72 135.6 Q --.11(ve)-.11 G(!).11 E F2(widg)4.583 E(et sensitive?)-.11 E F1 237.205(\)p)C --.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E F0(See)72 154.2 Q F2 -(XtSetSensitive)2.75 E F0(.)A F1(\(widget-sensiti)72 184.2 Q -.11(ve)-.11 G(?) -.11 E F2(widg)4.583 E(et)-.11 E F1 263.165(\)p)C -.198(ro)462.244 184.2 S -(cedur).198 E(e)-.198 E F0(See)72 202.8 Q F2(XtIsSensitive)2.75 E F0(.)A F1 -(\(windo)72 232.8 Q(w)-.11 E/F3 11/Symbol SF(-)A F1(>widget)A F2(window)4.583 E -F1 257.951(\)p)C -.198(ro)462.244 232.8 S(cedur).198 E(e)-.198 E F0(See)72 -251.4 Q F2(XtW)2.75 E(indowT)-.605 E(oW)-1.012 E(idg)-.605 E(et)-.11 E F0(.)A -F1(\(name)72 281.4 Q F3(-)A F1(>widget)A F2 -.495(ro)4.583 G(ot-widg).495 E -(et name)-.11 E F1 225.776(\)p)C -.198(ro)462.244 281.4 S(cedur).198 E(e)-.198 -E F0(See)72 300 Q F2(XtNameT)2.75 E(oW)-1.012 E(idg)-.605 E(et)-.11 E F0(.)A F2 -(name)5.5 E F0(is a string or a symbol.)2.75 E F1 -(\(widget-translate-coordinates)72 330 Q F2(widg)4.583 E(et x y)-.11 E F1 -193.304(\)p)C -.198(ro)462.244 330 S(cedur).198 E(e)-.198 E F0(See)72 348.6 Q -F2(XtT)2.75 E -.165(ra)-.605 G(nslateCoor).165 E(ds)-.407 E F0 5.5(.R)C -(eturns the root-relati)189.392 348.6 Q .33 -.165(ve x a)-.275 H -(nd y coordinates as a pair of inte).165 E(gers.)-.165 E F1 2.75(4. Callback)72 -378.6 R(Functions)2.75 E(\(add-callbacks)72 408.6 Q F2(widg)4.583 E(et callbac) --.11 E(k-name . callbac)-.22 E(k-functions)-.22 E F1 121.617(\)p)C -.198(ro) -462.244 408.6 S(cedur).198 E(e)-.198 E F0(See)72 427.2 Q F2(XtAddCallbac)2.808 -E(ks)-.22 E F0 5.558(.A)C .057 -(dds the functions to a callback list of the speci\214ed widget.)178.222 427.2 -R F2(callbac)5.557 E(k-name)-.22 E F0 1.092(is a string or a symbol.)72 442.2 R -1.093(Each callback function will be called with at least one ar)6.592 F 1.093 -(gument \255 the)-.198 F(widget to which the function has been attached.)72 -457.2 Q F1(\(add-callback)72 487.2 Q F2(widg)4.583 E(et callbac)-.11 E -(k-name callbac)-.22 E(k-function)-.22 E F1 135.675(\)p)C -.198(ro)462.244 -487.2 S(cedur).198 E(e)-.198 E F0(Calls)72 505.8 Q F2(add-callbac)2.75 E(ks) --.22 E F0(with the speci\214ed function.)2.75 E F1 2.75(5. P)72 535.8 R -(opup Shells)-.22 E(\(cr)72 565.8 Q(eate-popup-shell)-.198 E F2(widg)4.583 E -(et-class par)-.11 E(ent-widg)-.407 E(et . ar)-.11 E(gs)-.407 E F1 138.788(\)p) -C -.198(ro)462.244 565.8 S(cedur).198 E(e)-.198 E(\(cr)72 580.8 Q -(eate-popup-shell)-.198 E F2(widg)4.583 E(et-name widg)-.11 E(et-class par)-.11 -E(ent-widg)-.407 E(et . ar)-.11 E(gs)-.407 E F1 79.322(\)p)C -.198(ro)462.244 -580.8 S(cedur).198 E(e)-.198 E F0(See)72 599.4 Q F2(XtCr)3.727 E(eateP)-.407 E -(opupShell)-.88 E F0(.)A F2(widg)6.477 E(et-name)-.11 E F0 .977 -(is a string or a symbol.)3.727 F .976(If no widget name is gi)6.477 F -.165 -(ve)-.275 G .976(n, the).165 F .714(name of the shell class is used.)72 614.4 R -.714(The number of)6.214 F F2(ar)3.464 E(gs)-.407 E F0 .714(must be e)3.464 F --.165(ve)-.275 G .715(n, the 1st, 3rd, etc. ar).165 F .715(gument is)-.198 F -.867(the name of a resource to be set \(a string or a symbol\), the 2nd, 4th, \ -etc. ar)72 629.4 R .867(gument is the corre-)-.198 F(sponding v)72 644.4 Q -(alue.)-.275 E F1(\(popup)72 674.4 Q F2(shell-widg)4.583 E(et gr)-.11 E -(ab-kind)-.165 E F1 242.617(\)p)C -.198(ro)462.244 674.4 S(cedur).198 E(e)-.198 -E F0(See)72 693 Q F2(XtP)6.915 E(opup)-.88 E F0(.)A F2(gr)9.665 E(ab-kind)-.165 -E F0 4.165(is a symbol \()6.915 F/F4 11/Courier@0 SF(grab-once)A F0(,)A F4 -(grab-nonexclusive)6.915 E F0 6.915(,o)C(r)460.422 693 Q F4(grab-)6.915 E -(exclusive)72 708 Q F0(\).)A EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(popdo)72 87 Q(wn)-.11 E/F2 11 -/Times-Italic@0 SF(shell-widg)4.583 E(et)-.11 E F1 275.254(\)p)C -.198(ro) -462.244 87 S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XtP)2.75 E(opdown)-.88 -E F0(.)A F1 2.75(6. A)72 135.6 R(pplication Contexts)-.275 E(\(context?)72 -165.6 Q F2(x)4.583 E F1 327.625(\)p)C -.198(ro)462.244 165.6 S(cedur).198 E(e) --.198 E F0(Returns #t if)72 184.2 Q(f)-.275 E F2(x)2.75 E F0 -(is an object of type)2.75 E F2(conte)2.75 E(xt)-.22 E F0(\(application conte) -2.75 E(xt\).)-.165 E F1(\(cr)72 214.2 Q -.917(eate-context \))-.198 F(pr) -456.128 214.2 Q(ocedur)-.198 E(e)-.198 E F0(See)72 232.8 Q F2(XtCr)2.75 E -(eateApplicationConte)-.407 E(xt)-.22 E F0(.)A F1(\(destr)72 262.8 Q -(oy-context)-.198 E F2(conte)4.583 E(xt)-.22 E F1 268.17(\)p)C -.198(ro)462.244 -262.8 S(cedur).198 E(e)-.198 E F0(See)72 281.4 Q F2(XtDestr)2.75 E -(oyApplicationConte)-.495 E(xt)-.22 E F0(.)A F1(\(initialize-display)72 311.4 Q -F2(conte)4.583 E(xt display application-name application-class)-.22 E F1 69.631 -(\)p)C -.198(ro)462.244 311.4 S(cedur).198 E(e)-.198 E F0(See)72 330 Q F2 -(XtDisplayInitialize)3.275 E F0(,)A F2(XtOpenDisplay)3.275 E F0 6.025(.I)C(f) -260.564 330 Q F2(display)3.275 E F0 .525(is an object of type)3.275 F F2 -(display)3.274 E F0(,)A F2(XtDisplayInitial-)3.274 E(ize)72 345 Q F0 1.001 -(is called.)3.751 F(If)6.501 E F2(display)3.751 E F0 1.001 -(is a display name \(a string or a symbol\) or #f,)3.751 F F2(XtOpenDisplay) -3.752 E F0 1.002(is called)3.752 F .59 -(\(with a NULL display in the latter case\), and the ne)72 360 R .589 -(wly opened display is returned.)-.275 F F2(application-)6.089 E(name)72 375 Q -F0(and)3.284 E F2(application-class)3.284 E F0 .535 -(are strings or symbols or #f \(NULL and the empty string are used in)3.284 F -(the latter case\).)72 390 Q F1(\(application-initialize)72 420 Q F2 -(name . fallbac)4.583 E(k-r)-.22 E(esour)-.407 E(ces)-.407 E F1 162.735(\)p)C --.198(ro)462.244 420 S(cedur).198 E(e)-.198 E F0 4.228(Ac)72 438.6 S(on)89.054 -438.6 Q -.165(ve)-.44 G 1.478 -(nience function that creates an application conte).165 F 1.478 -(xt by a call to)-.165 F F2(cr)4.227 E(eate-conte)-.407 E(xt)-.22 E F0 4.227 -(,s)C 1.477(ets the)474.11 438.6 R -.11(fa)72 453.6 S .696 -(llback resources \(if an).11 F .696(y\), initializes the display by a call to) --.165 F F2(initialize-display)3.446 E F0 .696(with the speci\214ed)3.446 F F2 -(name)72 468.6 Q F0 .257 -(and a class of #f, and creates and returns an application shell with the name) -3.008 F F2(name)3.007 E F0 .257(and class)3.007 F(#f.)72 483.6 Q(Calling)72 -502.2 Q F2(application-initialize)2.863 E F0 .113 -(more than once may cause the application conte)2.863 F .114 -(xts and displays that)-.165 F -(were created by earlier calls to be closed during a future g)72 517.2 Q -(arbage collection.)-.055 E F1(\(display)72 547.2 Q/F3 11/Symbol SF(-)A F1 -(>context)A F2(display)4.583 E F1 260.294(\)p)C -.198(ro)462.244 547.2 S(cedur) -.198 E(e)-.198 E F0(See)72 565.8 Q F2(XtDisplayT)2.75 E(oApplicationConte) --1.012 E(xt)-.22 E F0(.)A F1(\(set-context-fallback-r)72 595.8 Q(esour)-.198 E -(ces!)-.198 E F2(conte)4.583 E(xt . r)-.22 E(esour)-.407 E(ces)-.407 E F1 -146.686(\)p)C -.198(ro)462.244 595.8 S(cedur).198 E(e)-.198 E F0(See)72 614.4 Q -F2(XtAppSetF)2.75 E(allbac)-.825 E(kResour)-.22 E(ces)-.407 E F0 5.5(.E)C(ach) -229.41 614.4 Q F2 -.407(re)2.75 G(sour).407 E(ce)-.407 E F0(is a string.)2.75 E -F1(\(context-main-loop)72 644.4 Q F2(conte)4.583 E(xt)-.22 E F1 255.124(\)p)C --.198(ro)462.244 644.4 S(cedur).198 E(e)-.198 E F0(See)72 663 Q F2 -(XtAppMainLoop)2.75 E F0(.)A EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-7-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF(\(context-pending)72 87 Q/F2 11 -/Times-Italic@0 SF(conte)4.583 E(xt)-.22 E F1 264.892(\)p)C -.198(ro)462.244 87 -S(cedur).198 E(e)-.198 E F0(See)72 105.6 Q F2(XtAppP)2.75 E(ending)-.88 E F0 -5.5(.R)C(eturns a list of symbols \()169.504 105.6 Q/F3 11/Courier@0 SF -(x-event)A F0(,)A F3(timer)2.75 E F0(,)A F3(alternate-input)2.75 E F0(\).)A F1 -(\(context-pr)72 135.6 Q(ocess-e)-.198 E -.11(ve)-.165 G(nt).11 E F2(conte) -4.583 E(xt . mask)-.22 E F1 208.88(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E -(e)-.198 E F0(See)72 154.2 Q F2(XtPr)5.373 E(ocessEvent)-.495 E F0 8.123(.T)C -2.623(he optional ar)180.008 154.2 R(gument)-.198 E F2(mask)5.372 E F0 2.622 -(is a list of symbols \(see)5.372 F F2(conte)5.372 E(xt-pending)-.22 E F0(abo) -72 169.2 Q -.165(ve)-.165 G(\).).165 E F2(XtIMAll)5.5 E F0(is used if the)2.75 -E F2(mask)2.75 E F0(ar)2.75 E(gument is omitted)-.198 E F1(\(context-add-w)72 -199.2 Q(ork-pr)-.11 E(oc)-.198 E F2(conte)4.583 E(xt pr)-.22 E(ocedur)-.495 E -(e)-.407 E F1 185.164(\)p)C -.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 E F0 -(See)72 217.8 Q F2(XtAppAddW)3.416 E(orkPr)-1.012 E(oc)-.495 E F0 6.166(.R)C -.666(eturns an)196.477 217.8 R F2(identi\214er)3.416 E F0 .667 -(that can be used as an ar)3.416 F .667(gument to)-.198 F F2 -.407(re)3.417 G -(mo).407 E(ve-work-)-.11 E(pr)72 232.8 Q(oc)-.495 E F0(.)A F2(pr)5.5 E(ocedur) --.495 E(e)-.407 E F0(is a procedure with no ar)2.75 E(guments.)-.198 E F1(\(r) -72 262.8 Q(emo)-.198 E -.11(ve)-.11 G(-w).11 E(ork-pr)-.11 E(oc)-.198 E F2 -(identi\214er)4.583 E F1 245.257(\)p)C -.198(ro)462.244 262.8 S(cedur).198 E(e) --.198 E F0(See)72 281.4 Q F2(XtRemo)4.323 E(veW)-.11 E(orkPr)-1.012 E(oc)-.495 -E F0(.)A F2(identi\214er)7.073 E F0 1.573(must be the return v)4.323 F 1.573 -(alue of a pre)-.275 F 1.572(vious call to)-.275 F F2(conte)4.322 E(xt-add-) --.22 E(work-pr)72 296.4 Q(oc)-.495 E F0 5.5(.E)C(ach such)132.302 296.4 Q F2 -(identi\214er)2.75 E F0(can be used as an ar)2.75 E(gument for)-.198 E F2 -.407 -(re)2.75 G(mo).407 E(ve-work-pr)-.11 E(oc)-.495 E F0(only once.)2.75 E F1 -(\(context-add-timeout)72 326.4 Q F2(conte)4.583 E(xt timer)-.22 E(-value pr) --.22 E(ocedur)-.495 E(e)-.407 E F1 145.058(\)p)C -.198(ro)462.244 326.4 S -(cedur).198 E(e)-.198 E F0(See)72 345 Q F2(XtAppAddT)4.13 E(imeOut)-.605 E F0 -(.)A F2(timer)6.88 E(-value)-.22 E F0 1.38(is an inte)4.13 F(ger)-.165 E 6.88 -(.R)-.605 G 1.38(eturns an)312.105 345 R F2(identi\214er)4.13 E F0 1.381 -(that can be used as an)4.13 F(ar)72 360 Q .355(gument to)-.198 F F2 -.407(re) -3.105 G(mo).407 E(ve-timeout)-.11 E F0 5.855(.T)C .354 -(he time-out procedure will be called with one ar)211.962 360 R .354 -(gument, the iden-)-.198 F .081(ti\214er returned by the call to)72 375 R F2 -(conte)2.831 E(xt-add-timeout)-.22 E F0 -.917(\(i. e.)2.831 F .081 -(the object that uniquely identi\214es the timer\).)2.831 F F1(\(r)72 405 Q -(emo)-.198 E -.11(ve)-.11 G(-timeout).11 E F2(identi\214er)4.583 E F1 258.391 -(\)p)C -.198(ro)462.244 405 S(cedur).198 E(e)-.198 E F0(See)72 423.6 Q F2 -(XtRemo)4.77 E(veT)-.11 E(imeOut)-.605 E F0(.)A F2(identi\214er)7.52 E F0 2.02 -(must be the return v)4.77 F 2.019(alue of a pre)-.275 F 2.019(vious call to) --.275 F F2(conte)4.769 E(xt-add-)-.22 E(timeout)72 438.6 Q F0 5.5(.E)C -(ach such)119.971 438.6 Q F2(identi\214er)2.75 E F0(can be used as an ar)2.75 E -(gument for)-.198 E F2 -.407(re)2.75 G(mo).407 E(ve-timeout)-.11 E F0 -(only once.)2.75 E F1(\(context-add-input)72 468.6 Q F2(conte)4.583 E(xt sour) --.22 E(ce pr)-.407 E(ocedur)-.495 E 2.75(e.m)-.407 G(ask)291.05 468.6 Q F1 -146.752(\)p)C -.198(ro)462.244 468.6 S(cedur).198 E(e)-.198 E F0(See)72 487.2 Q -F2(XtAppAddInput)2.803 E F0(.)A F2(sour)5.553 E(ce)-.407 E F0 .053 -(is a \214le port.)2.803 F .053(Returns an)5.553 F F2(identi\214er)2.804 E F0 -.054(that can be used as an ar)2.804 F .054(gument to)-.198 F F2(conte)72 502.2 -Q(xt-r)-.22 E(emo)-.407 E(ve-input)-.11 E F0 6.076(.T)C(he)180.893 502.2 Q F2 -(pr)3.326 E(ocedur)-.495 E(e)-.407 E F0 .575(will be called with tw)3.325 F -3.325(oa)-.11 G -.198(rg)353.461 502.2 S .575(uments \255).198 F F2(sour)3.325 -E(ce)-.407 E F0 .575(and the identi-)3.325 F(\214er returned by the call to)72 -517.2 Q F2(conte)2.75 E(xt-add-input)-.22 E F0(.)A .317(The optional)72 535.8 R -F2(mask)3.067 E F0(ar)3.067 E .317 -(gument is a list of one or more of the symbols)-.198 F F2 -.407(re)3.067 G(ad) -.407 E F0(,)A F2(write)3.067 E F0 3.067(,a)C(nd)432.713 535.8 Q F2 -.22(ex) -3.067 G(ception).22 E F0 5.817(.I)C(t)500.942 535.8 Q .276 -(speci\214es the condition on which the procedure will be called.)72 550.8 R -.276(If no)5.776 F F2(mask)3.026 E F0(ar)3.026 E .276(gument is gi)-.198 F --.165(ve)-.275 G(n,).165 E F2 -.407(re)3.026 G(ad).407 E F0 .807(is used if)72 -565.8 R F2(sour)3.557 E(ce)-.407 E F0 .807(is an input-port,)3.557 F F2(write) -3.557 E F0 .808(if it is an output-port, and both)3.557 F F2 -.407(re)3.558 G -(ad).407 E F0(and)3.558 E F2(write)3.558 E F0 .808(if it is an)3.558 F -(input-output-port.)72 580.8 Q F1(\(r)72 610.8 Q(emo)-.198 E -.11(ve)-.11 G -(-input).11 E F2(identi\214er)4.583 E F1 269.369(\)p)C -.198(ro)462.244 610.8 S -(cedur).198 E(e)-.198 E F0(See)72 629.4 Q F2(XtRemo)3.948 E(veInput)-.11 E F0 -(.)A F2(identi\214er)6.697 E F0 1.197(must be the return v)3.947 F 1.197 -(alue of a pre)-.275 F 1.197(vious call to)-.275 F F2(conte)3.947 E -(xt-add-input)-.22 E F0(.)A(Each such)72 644.4 Q F2(identi\214er)2.75 E F0 -(can be used as an ar)2.75 E(gument for)-.198 E F2 -.407(re)2.75 G(mo).407 E -(ve-input)-.11 E F0(only once.)2.75 E F1(\(identi\214er?)72 674.4 Q F2(x)4.583 -E F1 319.056(\)p)C -.198(ro)462.244 674.4 S(cedur).198 E(e)-.198 E F0 -(Returns #t if)72 693 Q(f)-.275 E F2(x)2.75 E F0(is an)2.75 E F2(identi\214er) -2.75 E F0(\(an object returned by functions lik)2.75 E(e)-.11 E F2(conte)2.75 E -(xt-add-timeout)-.22 E F0(\).)A EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-8-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(7. T)72 87 R -(ranslations Management Functions)-.814 E(\(context-add-action)72 117 Q/F2 11 -/Times-Italic@0 SF(conte)4.583 E(xt name pr)-.22 E(ocedur)-.495 E(e)-.407 E F1 -179.048(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e)-.198 E F0(See)72 135.6 Q -F2(XtAppAddActions)3.323 E F0(.)A F2(name)6.073 E F0 .574 -(is the name of the action \(a string or a symbol\).)3.324 F .574 -(The action proce-)6.074 F .638(dure will be in)72 150.6 R -.22(vo)-.44 G -.11 -(ke).22 G 3.388(dw).11 G .638(ith three ar)175.213 150.6 R .638 -(guments: a widget, a list of e)-.198 F -.165(ve)-.275 G .637(nt-speci\214c ar) -.165 F .637(guments \(see)-.198 F F2(han-)3.387 E(dle-e)72 165.6 Q(vents)-.165 -E F0 2.75(\)a)C(nd a list of strings \(the action ar)127.726 165.6 Q -(guments\).)-.198 E F1(\(augment-translations)72 195.6 Q F2(widg)4.583 E(et tr) --.11 E(anslation-table)-.165 E F1 166.233(\)p)C -.198(ro)462.244 195.6 S(cedur) -.198 E(e)-.198 E F0(See)72 214.2 Q F2(XtA)3.957 E(ugmentT)-.22 E -.165(ra)-.605 -G(nslations).165 E F0(.)A F2(tr)6.707 E(anslation-table)-.165 E F0 1.207 -(is a string;)3.957 F F2(XtP)3.957 E(ar)-.88 E(seT)-.11 E -.165(ra)-.605 G -(nslationT).165 E(able)-1.012 E F0 1.208(is applied to)3.957 F(it.)72 229.2 Q -F1(\(o)72 259.2 Q -.11(ve)-.11 G(rride-translations).11 E F2(widg)4.583 E -(et tr)-.11 E(anslation-table)-.165 E F1 167.685(\)p)C -.198(ro)462.244 259.2 S -(cedur).198 E(e)-.198 E F0(See)72 277.8 Q F2(XtOverrideT)3.866 E -.165(ra)-.605 -G(nslations).165 E F0(.)A F2(tr)6.616 E(anslation-table)-.165 E F0 1.116 -(is a string;)3.866 F F2(XtP)3.865 E(ar)-.88 E(seT)-.11 E -.165(ra)-.605 G -(nslationT).165 E(able)-1.012 E F0 1.115(is applied to)3.865 F(it.)72 292.8 Q -F1(\(uninstall-translations)72 322.8 Q F2(widg)4.583 E(et)-.11 E F1 242.749 -(\)p)C -.198(ro)462.244 322.8 S(cedur).198 E(e)-.198 E F0(See)72 341.4 Q F2 -(XtUninstallT)2.75 E -.165(ra)-.605 G(nslations).165 E F0(.)A F1 -(\(install-accelerators)72 371.4 Q F2(dst-widg)4.583 E(et sr)-.11 E(c-widg) --.407 E(et)-.11 E F1 188.618(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e) --.198 E F0(See)72 390 Q F2(XtInstallAcceler)2.75 E(ator)-.165 E(s)-.11 E F0(.)A -F1(\(install-all-accelerators)72 420 Q F2(dst-widg)4.583 E(et sr)-.11 E(c-widg) --.407 E(et)-.11 E F1 173.339(\)p)C -.198(ro)462.244 420 S(cedur).198 E(e)-.198 -E F0(See)72 438.6 Q F2(XtInstallAllAcceler)2.75 E(ator)-.165 E(s)-.11 E F0(.)A -F1(\(multi-click-time)72 468.6 Q F2(display)4.583 E F1 265.288(\)p)C -.198(ro) -462.244 468.6 S(cedur).198 E(e)-.198 E F0(See)72 487.2 Q F2(XtGetMultiClic)2.75 -E(kT)-.22 E(ime)-.605 E F0 5.5(.R)C(eturns an inte)200.117 487.2 Q(ger)-.165 E -(.)-.605 E F1(\(set-multi-click-time!)72 517.2 Q F2(display time)4.583 E F1 -223.444(\)p)C -.198(ro)462.244 517.2 S(cedur).198 E(e)-.198 E F0(See)72 535.8 Q -F2(XtSetMultiClic)2.75 E(kT)-.22 E(ime)-.605 E F0(.)A F2(time)5.5 E F0 -(is an inte)2.75 E(ger)-.165 E(.)-.605 E F1 2.75(8. Err)72 565.8 R(or Handling) --.198 E(xt-war)72 595.8 Q 298.746(ning-handler v)-.165 F(ariable)-.11 E F0(See) -72 614.4 Q F2(XtSetW)3.089 E(arningHandler)-1.012 E F0 5.839(.W)C .339(hen a w) -207.318 614.4 R .339 -(arning message is to be printed by the Xt intrinsics and the)-.11 F .571 -(global v)72 629.4 R(ariable)-.275 E F2(xt-warning-handler)3.321 E F0 .571 -(is bound to a compound procedure, this procedure is in)3.321 F -.22(vo)-.44 G --.11(ke).22 G(d).11 E .226(with the error message \(a string\) as an ar)72 -644.4 R 2.976(gument. When)-.198 F .226(this v)2.976 F .227 -(ariable is not bound to a compound)-.275 F .644 -(procedure, the message is sent to the current output port.)72 659.4 R .644 -(The initial v)6.144 F .643(alue of this v)-.275 F .643(ariable is the)-.275 F -(empty list.)72 674.4 Q .215(This interf)72 693 R .215 -(ace is bogus and will be replaced by a more useful mechanism in future v)-.11 -F .216(ersions of the)-.165 F(softw)72 708 Q(are.)-.11 E EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-9-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57 -75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL -108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130 -57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57 -146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57 -168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57 -190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57 -212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(9. Miscellaneous)72 87 R(Functions)2.75 -E(\(xt-r)72 117 Q(elease-4-or)-.198 E -.917(-later? \))-.407 F(pr)456.128 117 Q -(ocedur)-.198 E(e)-.198 E F0(Returns al)72 135.6 Q -.11(wa)-.11 G(ys #t.).11 E -F1(\(xt-r)72 165.6 Q(elease-5-or)-.198 E -.917(-later? \))-.407 F(pr)456.128 -165.6 Q(ocedur)-.198 E(e)-.198 E F0 .337(Returns #t if)72 184.2 R 3.087(ft) --.275 G .337(he Xt e)137.207 184.2 R .336(xtension is link)-.165 F .336 -(ed together with the X11 Release 5 toolkit intrinsics or later)-.11 F -.165 -(ve)72 199.2 S(rsions of the intrinsics.).165 E F1(\(xt-r)72 229.2 Q -(elease-6-or)-.198 E -.917(-later? \))-.407 F(pr)456.128 229.2 Q(ocedur)-.198 E -(e)-.198 E F0 .336(Returns #t if)72 247.8 R 3.086(ft)-.275 G .336(he Xt e) -137.204 247.8 R .336(xtension is link)-.165 F .336 -(ed together with the X11 Release 6 toolkit intrinsics or later)-.11 F -.165 -(ve)72 262.8 S(rsions of the intrinsics.).165 E F1 2.75(10. Interaction)72 -292.8 R(with the Garbage Collector)2.75 E F0 .391(The Scheme g)97 311.4 R .391 -(arbage collector destro)-.055 F .391(ys objects of type)-.11 F/F2 11 -/Times-Italic@0 SF(conte)3.14 E(xt)-.22 E F0(or)3.14 E F2(widg)3.14 E(et)-.11 E -F0 .39(that are not longer)3.14 F 2.133 -(accessible from within the Scheme program.)72 326.4 R 2.133 -(This is done by in)7.633 F -.22(vo)-.44 G 2.133(king the function).22 F F2 -(destr)4.883 E(oy-)-.495 E(conte)72 341.4 Q(xt)-.22 E F0(or)2.75 E F2(destr) -2.75 E(oy-widg)-.495 E(et)-.11 E F0 2.75(,r)C(especti)192.153 341.4 Q -.165(ve) --.275 G(ly).165 E 2.75(,w)-.715 G(ith the unreferenced object as an ar)253.929 -341.4 Q(gument.)-.198 E 1.155(The g)97 360 R 1.154 -(arbage collector only destro)-.055 F 1.154(ys objects that ha)-.11 F 1.484 --.165(ve b)-.22 H 1.154(een created from with the Scheme).165 F 2.068 -(program \(by functions lik)72 375 R(e)-.11 E F2(cr)4.819 E(eate-conte)-.407 E -(xt)-.22 E F0(or)4.819 E F2(cr)4.819 E(eate-widg)-.407 E(et)-.11 E F0 4.819 -(\). Objects)B 2.069(that ha)4.819 F 2.399 -.165(ve b)-.22 H 2.069 -(een obtained).165 F .172(from Xt through functions lik)72 390 R(e)-.11 E F2 -(widg)2.922 E(et-conte)-.11 E(xt)-.22 E F0 .171(\(and are o)2.922 F .171 -(wned by the Xt internals\), are ignored by)-.275 F(the g)72 405 Q -(arbage collector)-.055 E(.)-.605 E .341(Programmers must mak)97 423.6 R 3.092 -(es)-.11 G .342(ure that an object is accessible during the object')214.932 -423.6 R 3.092(se)-.605 G .342(ntire lifetime,)443.774 423.6 R 1.12 -(otherwise future runs of the g)72 438.6 R 1.119 -(arbage collector can result in undesired termination of the object.)-.055 F -.517(One must be especially careful when results of functions that create ne)72 -453.6 R 3.268(wo)-.275 G .518(bjects \(such as)404.799 453.6 R F2(cr)3.268 E -(eate-)-.407 E(conte)72 468.6 Q(xt)-.22 E F0 2.75(\)a)C -(re ignored or assigned to local v)114.845 468.6 Q(ariables as in)-.275 E/F3 10 -/Courier@0 SF(\(define \(initialize\))100.346 491.103 Q -(\(let* \(\(con \(create-context\)\))112.346 505.103 Q -(\(dpy \(initialize-display con #f 'Test #f\)\)\))160.346 519.103 Q -(\(create-shell 'Test #f \(find-class 'application-shell\) dpy\)\)\)\))124.346 -533.103 Q F0 1.841(In this e)97 558.703 R 1.84 -(xample, after termination of the function, the g)-.165 F 1.84 -(arbage collector will destro)-.055 F 4.59(yt)-.11 G(he)493.616 558.703 Q 1.691 -(application conte)72 573.703 R 1.691(xt created by the call to)-.165 F F2(cr) -4.442 E(eate-conte)-.407 E(xt)-.22 E F0 1.692(as well as the display)4.442 F -4.442(,a)-.715 G 4.442(st)443.187 573.703 S(he)454.966 573.703 Q 4.442(ya)-.165 -G 1.692(re no)480.011 573.703 R .141 -(longer directly accessible from within the program.)72 588.703 R .141 -(Bugs lik)5.641 F 2.891(et)-.11 G .14(his are often hard to \214nd, since \(in) -352.097 588.703 R .725(the abo)72 603.703 R 1.055 -.165(ve ex)-.165 H .725 -(ample\) the shell widget returned by).165 F F2(initialize)3.475 E F0 .725 -(can still be used, although its applica-)3.475 F(tion conte)72 618.703 Q -(xt and the display associated with the application conte)-.165 E(xt ha)-.165 E -.33 -.165(ve a)-.22 H(lready been destro).165 E(yed.)-.11 E -(The problem can be solv)97 637.303 Q(ed by re-writing the abo)-.165 E .33 --.165(ve f)-.165 H(unction lik).165 E 2.75(et)-.11 G(his:)385.706 637.303 Q EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(0-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 10/Courier@0 SF(\(define initialize #f\))100.346 94.503 Q -(\(let \(\(con\) \(dpy\)\))100.346 115.503 Q(\(set! initialize)112.346 129.503 -Q(\(lambda \(\))124.346 143.503 Q(\(set! con \(create-context\)\))136.346 -157.503 Q(\(set! dpy \(initialize-display con #f 'Test #f\)\))136.346 171.503 Q -(\(create-shell 'Test #f \(find-class 'application-shell\) dpy\)\)\)\))136.346 -185.503 Q F0 .35(An alternati)97 211.103 R .68 -.165(ve s)-.275 H .35 -(olution is to place the application conte).165 F .349 -(xt and display into a global v)-.165 F(ariable,)-.275 E(so that the)72 226.103 -Q 2.75(yc)-.165 G(an be terminated e)130.19 226.103 Q -(xplicitly by the program when desired.)-.165 E EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(1-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(A)72 174 Q F0 -(add-callback,)72 204 Q/F2 12/Times-Bold@0 SF(5)2.75 E F0(add-callbacks,)72 219 -Q F2(5)2.75 E F0(application-initialize,)72 234 Q F2(6)2.75 E F0 -(augment-translations,)72 249 Q F2(8)2.75 E F1(C)72 279 Q F0 -(class-constraint-resources,)72 309 Q F2(2)2.75 E F0(class-e)72 324 Q(xists?,) --.165 E F2(2)2.75 E F0(class-resources,)72 339 Q F2(2)2.75 E F0 -(class-sub-resources,)72 354 Q F2(2)2.75 E F0(class?,)72 369 Q F2(2)2.75 E F0 -(conte)72 384 Q(xt-add-action,)-.165 E F2(8)2.75 E F0(conte)72 399 Q -(xt-add-input,)-.165 E F2(7)2.75 E F0(conte)72 414 Q(xt-add-timeout,)-.165 E F2 -(7)2.75 E F0(conte)72 429 Q(xt-add-w)-.165 E(ork-proc,)-.11 E F2(7)2.75 E F0 -(conte)72 444 Q(xt-main-loop,)-.165 E F2(6)2.75 E F0(conte)72 459 Q -(xt-pending,)-.165 E F2(7)2.75 E F0(conte)72 474 Q(xt-process-e)-.165 E -.165 -(ve)-.275 G(nt,).165 E F2(7)2.75 E F0(conte)72 489 Q(xt?,)-.165 E F2(6)2.75 E -F0(create-conte)72 504 Q(xt,)-.165 E F2(6)2.75 E F0(create-managed-widget,)72 -519 Q F2(3)2.75 E F0(create-popup-shell,)72 534 Q F2(5)2.75 E F0(create-shell,) -72 549 Q F2(2)2.75 E F0(create-widget,)72 564 Q F2(3)2.75 E F1(D)72 594 Q F0 -(destro)72 624 Q(y-conte)-.11 E(xt,)-.165 E F2(6)2.75 E F0(destro)72 639 Q -(y-widget,)-.11 E F2(2)2.75 E F0(display)72 654 Q/F3 11/Symbol SF(-)A F0 -(>conte)A(xt,)-.165 E F2(6)2.75 E F1(F)72 684 Q F0(\214nd-class,)302.4 174 Q F2 -(2)2.75 E F1(G)302.4 204 Q F0 -.055(ga)302.4 234 S(rbage collector).055 E 2.75 -(,9)-.44 G(get-v)302.4 249 Q(alues,)-.275 E F2(4)2.75 E F1(I)302.4 279 Q F0 -(identi\214er?,)302.4 309 Q F2(7)2.75 E F0(initialize-display)302.4 324 Q(,) --.715 E F2(6)2.75 E F0(install-accelerators,)302.4 339 Q F2(8)2.75 E F0 -(install-all-accelerators,)302.4 354 Q F2(8)2.75 E F1(L)302.4 384 Q F0 -(load-widgets,)302.4 414 Q F2(1)2.75 E F1(M)302.4 444 Q F0(manage-child,)302.4 -474 Q F2(4)2.75 E F0(manage-children,)302.4 489 Q F2(3)2.75 E F0(map-widget,) -302.4 504 Q F2(4)2.75 E F0(motif, 1)302.4 519 Q(multi-click-time,)302.4 534 Q -F2(8)2.75 E F1(N)302.4 564 Q F0(name)302.4 594 Q F3(-)A F0(>widget,)A F2(5)2.75 -E F1(O)302.4 624 Q F0 -.165(ove)302.4 654 S(rride-translations,).165 E F2(8) -2.75 E F1(P)302.4 684 Q F0(popdo)302.4 714 Q(wn,)-.275 E F2(6)2.75 E EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 11/Times-Roman@0 SF 2.75(-1)276.087 51 S 2.75(2-)288 51 S .44 LW 77.5 57 72 -57 DL 80.5 57 75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 -57 97 57 DL 108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 -119 57 DL 130 57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 -57 DL 152 57 146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 -DL 174 57 168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL -196 57 190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 -57 212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57 -234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57 -256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57 -278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57 -300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57 -322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57 -344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57 -366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57 -388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57 -410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57 -432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57 -454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57 -476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57 -498.5 57 DL(popup,)72 87 Q/F1 12/Times-Bold@0 SF(5)2.75 E/F2 13/Times-Bold@0 SF -(R)72 117 Q F0(realize-widget,)72 147 Q F1(3)2.75 E F0(remo)72 162 Q -.165(ve) --.165 G(-input,).165 E F1(7)2.75 E F0(remo)72 177 Q -.165(ve)-.165 G(-timeout,) -.165 E F1(7)2.75 E F0(remo)72 192 Q -.165(ve)-.165 G(-w).165 E(ork-proc,)-.11 E -F1(7)2.75 E F2(S)72 222 Q F0(set-conte)72 252 Q(xt-f)-.165 E -(allback-resources!,)-.11 E F1(6)2.75 E F0(set-mapped-when-managed!,)72 267 Q -F1(4)2.75 E F0(set-multi-click-time!,)72 282 Q F1(8)2.75 E F0(set-sensiti)72 -297 Q -.165(ve)-.275 G(!,).165 E F1(5)2.75 E F0(set-v)72 312 Q(alues!,)-.275 E -F1(4)2.75 E F2(U)72 342 Q F0(uninstall-translations,)72 372 Q F1(8)2.75 E F0 -(unmanage-child,)72 387 Q F1(4)2.75 E F0(unmanage-children,)72 402 Q F1(4)2.75 -E F0(unmap-widget,)72 417 Q F1(4)2.75 E F0(unrealize-widget,)72 432 Q F1(3)2.75 -E F2(W)72 462 Q F0(widget-class,)72 492 Q F1(4)2.75 E F0(widget-composite?,)72 -507 Q F1(3)2.75 E F0(widget-conte)72 522 Q(xt,)-.165 E F1(5)2.75 E F0 -(widget-display)72 537 Q(,)-.715 E F1(3)2.75 E F0(widget-managed?,)72 552 Q F1 -(4)2.75 E F0(widget-name,)72 567 Q F1(3)2.75 E F0(widget-parent,)72 582 Q F1(3) -2.75 E F0(widget-realized?,)72 597 Q F1(3)2.75 E F0(widget-sensiti)72 612 Q --.165(ve)-.275 G(?,).165 E F1(5)2.75 E F0(widget-subclass?,)72 627 Q F1(4)2.75 -E F0(widget-superclass,)72 642 Q F1(4)2.75 E F0(widget-translate-coordinates,) -72 657 Q F1(5)2.75 E F0(widget-windo)72 672 Q -.715(w,)-.275 G F1(3)3.465 E F0 -(widget?,)72 687 Q F1(2)2.75 E F0(widget)72 702 Q/F3 11/Symbol SF(-)A F0 -(>windo)A -.715(w,)-.275 G F1(3)3.465 E F0(windo)302.4 87 Q(w)-.275 E F3(-)A F0 -(>widget,)A F1(5)2.75 E F2(X)302.4 117 Q F0(xt, 1)302.4 147 Q(xt-release-4-or) -302.4 162 Q(-later?,)-.22 E F1(9)2.75 E F0(xt-release-5-or)302.4 177 Q -(-later?,)-.22 E F1(9)2.75 E F0(xt-release-6-or)302.4 192 Q(-later?,)-.22 E F1 -(9)2.75 E F0(xt-w)302.4 207 Q(arning-handler)-.11 E(,)-.44 E F1(8)2.75 E F0 -(xwidgets, 1)302.4 222 Q EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11 -/Times-Roman@0 SF .866(Introduction ..........................................\ -..............................................................................\ -......)72 177.6 R(1)498.5 177.6 Q -.44(Wi)72 196.2 S(dget Classes).44 E 19.25(\ -..............................................................................\ -........................................... 2)4.056 F -.44(Wi)72 214.8 S -(dget Functions).44 E 19.25(..................................................\ -................................................................... 2)4.661 F -(Callback Functions)72 233.4 Q 19.25(.........................................\ -.......................................................................... 5)3 -F(Popup Shells)72 252 Q 19.25(................................................\ -............................................................................. \ -5)2.989 F(Application Conte)72 270.6 Q .107(xts ..............................\ -..............................................................................\ -....)-.165 F(6)498.5 270.6 Q -.385(Tr)72 289.2 S -(anslations Management Functions).385 E 19.25(................................\ -....................................................... 8)4.925 F -(Error Handling)72 307.8 Q 19.25(.............................................\ -............................................................................ 8) -4.848 F(Miscellaneous Functions)72 326.4 Q 19.25(.............................\ -............................................................................. \ -9)3.308 F(Interaction with the Garbage Collector)72 345 Q 19.25(..............\ -...................................................................... 9)3.649 -F(Inde)72 363.6 Q 2.868(x.)-.165 G 13.75(.....................................\ -..............................................................................\ -..................... 11)102.5 363.6 R EP -%%Trailer -end -%%EOF