From 2934fd1bb59f33e96c3257cf67cf84ac33c4d6da Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 22 Dec 2007 01:20:20 -0500 Subject: [PATCH] Pre-0.27 'b' snapshot. (This is a retrospective comment.) --- BUGS.txt | 5 +- MANIFEST.txt | 264 +- Makefile | 175 - Makefile.in | 156 +- NEWS.txt | 120 +- README.txt | 89 +- config.cache | 46 - config.in | 6 +- config.log | 127 - config.sh | 6865 +++++++++++++++++++++++++------- config.status | 284 -- configdj.sh | 2080 ++++++++++ doc/Makefile | 175 +- doc/convickt.1 | 77 + doc/fixtoc.pl | 5 +- doc/gpl-2-0.txi | 389 -- doc/ick.1 | 132 + doc/ick.log | 244 ++ doc/ick.txi | 8581 ++++++++++++++++++++++++---------------- doc/ickwhile.txt | 73 - doc/t.t | 210 - doc/tempnote.txt | 9 - doc/tidy.cfg | 51 + etc/ctrlmfix.bat | 1 + etc/ctrlmfix.sh | 1 + etc/intercal.el | 44 +- include/abcess.h | 187 - include/fiddle.h | 23 - include/lose.h | 238 -- include/syslib.3i | 323 -- include/syslib.4i | 354 -- include/syslib.5i | 355 -- include/syslib.6i | 373 -- include/syslib.7i | 402 -- include/syslib.i | 289 -- include/yuk.h | 127 - pit/CATALOG | 16 +- pit/tests/ignorret.doc | 43 + pit/tests/ignorret.i | 9 + pit/unlambda.doc | 928 +++++ pit/unlambda.i | 855 ++++ src/abcess.h | 1 + src/atari.bin | Bin 0 -> 143 bytes src/baudot.bin | Bin 0 -> 142 bytes src/bin2c.c | 47 + src/cesspool.c | 130 +- src/clc-cset.c | 384 ++ src/convickt.c | 113 + src/ebcdic.bin | Bin 0 -> 271 bytes src/ick-wrap.c | 4 +- src/idiotism.oil | 94 +- src/latin1.bin | Bin 0 -> 271 bytes src/lexer.l | 13 +- src/lose.h | 3 + src/oil.y | 75 +- src/parser.y | 12 +- src/perpet.c | 82 +- src/pick1.h | 4 +- src/pick2.h | 10 - src/uncommon.c | 2 +- src/yuk.c | 4 +- 61 files changed, 16506 insertions(+), 9203 deletions(-) delete mode 100644 Makefile delete mode 100644 config.cache delete mode 100644 config.log delete mode 100755 config.status create mode 100755 configdj.sh create mode 100644 doc/convickt.1 delete mode 100644 doc/gpl-2-0.txi create mode 100644 doc/ick.1 create mode 100644 doc/ick.log delete mode 100644 doc/ickwhile.txt delete mode 100644 doc/t.t delete mode 100644 doc/tempnote.txt create mode 100644 doc/tidy.cfg delete mode 100644 include/abcess.h delete mode 100644 include/fiddle.h delete mode 100644 include/lose.h delete mode 100644 include/syslib.3i delete mode 100644 include/syslib.4i delete mode 100644 include/syslib.5i delete mode 100644 include/syslib.6i delete mode 100644 include/syslib.7i delete mode 100644 include/syslib.i delete mode 100644 include/yuk.h create mode 100644 pit/tests/ignorret.doc create mode 100644 pit/tests/ignorret.i create mode 100644 pit/unlambda.doc create mode 100644 pit/unlambda.i create mode 100644 src/atari.bin create mode 100644 src/baudot.bin create mode 100644 src/bin2c.c create mode 100644 src/clc-cset.c create mode 100644 src/convickt.c create mode 100644 src/ebcdic.bin create mode 100644 src/latin1.bin diff --git a/BUGS.txt b/BUGS.txt index a31eb4f..d480309 100644 --- a/BUGS.txt +++ b/BUGS.txt @@ -50,8 +50,9 @@ AIS = Alex Smith 4) (AIS) Reverse assignments (those with the expression on the left) are very unlikely to work in bases other than 2. -5) (AIS) Most of the features new in 0.26, and many in 0.25, haven't - been documented. (This is partly because I can't get groff to work.) +5) (AIS) Some of the newer features in intercal.el are not yet fully + implemented and have a tendency to print 'Unimplemented' rather + than doing anything useful. TO DO diff --git a/MANIFEST.txt b/MANIFEST.txt index 8148bf4..1a47f99 100644 --- a/MANIFEST.txt +++ b/MANIFEST.txt @@ -1,15 +1,12 @@ .: -BUGS.txt -COPYING.txt -MANIFEST.txt -Makefile.in -NEWS.txt -README.txt bin +BUGS.txt cleanick.bat cleanick.sh +configdj.sh config.in config.sh +COPYING.txt districk.bat districk.sh doc @@ -18,21 +15,227 @@ ickspec ickspec.in include lib +Makefile.in makeick.bat makeick.sh +MANIFEST.txt +NEWS.txt pit +README.txt src temp ./bin: ./doc: +chipspec.txt +convickt.1 +fdl-1-2.txi +fix83.pl +fixtoc.pl +html +ick.1 +ick.htm +ick.inf +ick.log +ick.pdf +ickstyle.css +ick.txi +ick.txt +intercal.mm Makefile READ.ME -THEORY -chip.spec -intercal.mm -oil.txt +THEORY.txt +tidy.cfg + +./doc/html: +04da4hr1.htm +08o38r8l.htm +0m336jq8.htm +0rgfsbmr.htm +13b3jcc4.htm +13h0hapa.htm +15mchq6n.htm +18t1hk8l.htm +1n7ehqdd.htm +1nul775u.htm +1tufhapa.htm +1vvgha4g.htm +248nqjv8.htm +2ml5ggf3.htm +2vqh8b1f.htm +32t6jibe.htm +3bqefiau.htm +3k86t9cc.htm +3rvnnnr9.htm +3s0anns1.htm +3t0rhabe.htm +4d1d6pdt.htm +4k3q6pdt.htm +4nqaord5.htm +53f3dqoq.htm +56tonn20.htm +5dt1tp8l.htm +5jj4habu.htm +5l0idqoq.htm +5p7sn7s9.htm +5sulr15u.htm +6bk763qo.htm +6e166j8t.htm +6eme4101.htm +6f1dmjad.htm +6lc68hs1.htm +6t888bcc.htm +70fcdqoq.htm +740gt91f.htm +7hj0nnv0.htm +7qhh7nfj.htm +83c62pr1.htm +86q7ioqg.htm +8fhaqjv8.htm +8hossbik.htm +8isfg01f.htm +9i17dqoq.htm +9qb655s1.htm +9ru1jcqg.htm +9s5cjibe.htm +9snddqoq.htm +a0ufggfj.htm +a6ujqjv8.htm +abo763ji.htm +adquqjam.htm +agshi8q8.htm +akrbsrrp.htm +aq26gg1n.htm +aqc6sbs1.htm +atvm81sp.htm +b0t1js8l.htm +b8rnhapa.htm +bbt3n7hs.htm +bo2khai4.htm +boebhabe.htm +bqufn7k3.htm +c4pasrec.htm +c8c6mjr1.htm +cav26jj2.htm +cjdi4hrh.htm +coiec6r1.htm +dlbvn76f.htm +dljbn7hs.htm +dolfhqkr.htm +drm7ha4g.htm +duo8tvae.htm +e4lpmjad.htm +ecc1mjad.htm +eltnmjad.htm +evc6g6s1.htm +f3cgnns1.htm +f6t3n7k3.htm +fck7h4qo.htm +fee5nnau.htm +ffq8hap2.htm +fj7515vo.htm +fl90ha01.htm +fmc6jis1.htm +fpqqfiau.htm +g3oc8bck.htm +g9afmjad.htm +h4c6dqr1.htm +h4i0ha48.htm +hcf9nn38.htm +hd04dqoq.htm +hh8677cc.htm +hjsfr11f.htm +hrlmfiau.htm +hs9shapa.htm +i16tsrkr.htm +i1tvsrau.htm +icjg8rjq.htm +ig7981ed.htm +index.htm +io61sroi.htm +irb641s1.htm +j1nbdqoq.htm +j4cchabu.htm +j613t95u.htm +jc3onn38.htm +jd9s55lr.htm +jipmfiau.htm +jpult95u.htm +jr26rh1n.htm +jrc67ds1.htm +jvn3h4qg.htm +jvsehapa.htm +kjp56j8t.htm +kqe5mjad.htm +kqm2qjam.htm +krgt4hvo.htm +l2nfjccs.htm +l7kohq6f.htm +l8cpnnr9.htm +l982r11n.htm +l9c61lr1.htm +ljqupfkr.htm +lmmbnnvo.htm +lq3rn7sh.htm +lqa2habu.htm +m0c6orr1.htm +m1qagml3.htm +m51hqjv8.htm +mf106pau.htm +mk4hsl17.htm +msp0qjv8.htm +nb1mhapa.htm +nes7jcqo.htm +nj7thqdd.htm +nmoct9ck.htm +nobndqoq.htm +nuulh45u.htm +oe3f81sp.htm +ogabqjv8.htm +oinh4hr9.htm +onc6ies1.htm +ov88i8cc.htm +phogjc5m.htm +pje377ja.htm +pq9mhqdd.htm +q5c6cmr1.htm +q8bvg601.htm +qe466pd5.htm +qi64obs9.htm +qk5q4hrh.htm +qn4663ji.htm +r1fl55lr.htm +rbq9tvae.htm +rgnvnn38.htm +rk2755lr.htm +rliah4q0.htm +rme6rhja.htm +rsb6f2s1.htm +s08usrlj.htm +sbrhi81f.htm +shejmjad.htm +siocs5ck.htm +sj34631n.htm +skaa81sp.htm +slousrd5.htm +t9vopfl3.htm +thuljc5u.htm +tigcnnv0.htm +u1dog601.htm +u372s5qg.htm +unoh4hr9.htm +uohhslfj.htm +us46i8ji.htm +v0qahaik.htm +v3ca55s9.htm +v5smhq6n.htm +v8acnnvg.htm +vad7rh8t.htm +vbrshqhs.htm +vd89dqoq.htm +vdobpfkr.htm +vmq7hapa.htm ./etc: ctrlmfix.bat @@ -44,13 +247,12 @@ intercal.el ./lib: ./pit: -CATALOG -Makefile beer.doc beer.i blinkers bubble.doc bubble.i +CATALOG change.doc change.i delta.fft @@ -63,16 +265,17 @@ gun hail_mary.3i hail_mary.doc icat.i -iching.doc iching1.i iching2.i +iching.doc ins.doc ins.i lib -life.doc -life.i life2.doc life2.i +life.doc +life.i +Makefile pass.i pi.doc pi.i @@ -80,21 +283,23 @@ pow.i primes.doc primes.i quine.i +random2.i random.doc random.i -random2.i -rot13.doc -rot13.i rot13b.doc rot13b.i +rot13.doc +rot13.i sample.i sort.i syslib.i -t_tet tests tophat.fft tpk.doc tpk.i +t_tet +unlambda.doc +unlambda.i yapp.doc yapp.i @@ -107,7 +312,7 @@ lib2.i numio.doc numio.i plus.i -syslib-orig.i +syslib3-7.doc syslib.3i syslib.4i syslib.5i @@ -115,7 +320,7 @@ syslib.6i syslib.7i syslib.doc syslib.i -syslib3-7.doc +syslib-orig.i ./pit/tests: ais1.i @@ -126,6 +331,8 @@ compucome.i count.3i count.doc hello.i +ignorret.doc +ignorret.i iogerunds.doc iogerunds.i knuth.i @@ -137,8 +344,8 @@ permute.i pictest.i sink.doc sink.i -test1.i test16bit.i +test1.i test2.i testarray.i testcf.i @@ -155,18 +362,25 @@ whileadd.i ./src: abcess.h arrgghh.c +atari.bin +baudot.bin +bin2c.c cesspool.c +clc-cset.c configdj.h configh.in +convickt.c cooptsh.in dekludge.c -feh.h +ebcdic.bin feh2.c +feh.h fiddle.c fiddle.h -ick-wrap.c ick.h +ick-wrap.c idiotism.oil +latin1.bin lexer.l lose.c lose.h @@ -178,6 +392,8 @@ pick1.h pick2.h pickwrap.c sizes.h +uncommon.c +uncommon.h unravel.c yuk.c yuk.h diff --git a/Makefile b/Makefile deleted file mode 100644 index ed50649..0000000 --- a/Makefile +++ /dev/null @@ -1,175 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# -# Productions for the INTERCAL distribution -# -VERSION=0.27 - -# Common prefix for machine-independent installed files. -prefix = /dev/env/DJDIR -# Common prefix for machine-dependent installed files. -exec_prefix = ${prefix} - -# Directory in which to install binaries. -bindir = ${exec_prefix}/bin -# Directory in which to install libraries. -libdir = ${exec_prefix}/lib -# Directory to install data files. -datadir = ${prefix}/share/ick-0.27 -# Directory to install the include files in. -incdir = ${prefix}/include/ick-0.27 -# Directory to install Info files in. -infodir = ${prefix}/info - -# This can be overridden from the command line -DESTDIR= - -CC = gcc -CFLAGS = -g -O2 -DICKINCLUDEDIR=\"$(incdir)\" -DICKLIBDIR=\"$(datadir)\" -DICKBINDIR=\"$(bindir)\" -DYYDEBUG -O2 -W -Wall -I./src -I./temp -LDFLAGS = -LEX = flex -LEXFLAGS= -YACC = bison -y -YACCFLAGS = - -LOADLIBS = -lfl - -CSOURCES = src/parser.y src/lexer.l src/feh2.c src/dekludge.c src/lose.c src/fiddle.c src/perpet.c src/unravel.c src/uncommon.c -ISOURCES = src/cesspool.c src/arrgghh.c src/ick-wrap.c src/numerals.c -YSOURCES = src/yuk.c -HEADERS = src/ick.h src/lose.h src/sizes.h src/abcess.h src/fiddle.h src/feh.h src/yuk.h src/uncommon.h -BUILD = Makefile.in config.in config.sh src/configh.in ickspec.in ickspec src/cooptsh.in -MISC = etc/intercal.el src/ctrlmfix.sh src/ctrlmfix.bat -DOCS = BUGS.txt COPYING.txt NEWS.txt README.txt -SOURCES = $(CSOURCES) $(ISOURCES) $(YSOURCES) $(HEADERS) $(BUILD) $(MISC) $(DOCS) pit doc - -all: bin/ick.exe lib/libick.a lib/libickmt.a lib/libyuk.a ial - -ial: src/fiddle.h src/abcess.h src/lose.h src/yuk.h src/ick-wrap.c src/pickwrap.c temp/coopt.sh pit/lib/syslib.i COPYING.txt - -cp src/fiddle.h include/fiddle.h - -cp src/abcess.h include/abcess.h - -cp src/lose.h include/lose.h - -cp src/yuk.h include/yuk.h - -cp pit/lib/syslib.i pit/lib/syslib.?i include - -cp src/ick-wrap.c lib/ick-wrap.c - -cp src/pickwrap.c lib/pickwrap.c - -cp temp/coopt.sh lib/coopt.sh - -cp COPYING.txt lib/COPYING.txt - -bin/ick.exe: temp/parser.o temp/lexer.o temp/feh2.o temp/dekludge.o temp/idiotism.o temp/lose.o temp/fiddle.o temp/perpet.o temp/uncommon.o - $(CC) temp/perpet.o temp/parser.o temp/lexer.o temp/feh2.o temp/dekludge.o temp/idiotism.o temp/lose.o temp/fiddle.o temp/uncommon.o $(LDFLAGS) -o bin/ick.exe - -temp/oil.c: src/oil.y temp/config.h - $(YACC) $(YACCFLAGS) src/oil.y - -rm -f temp/oil.c - mv y.tab.c temp/oil.c - -temp/parser.h temp/parser.c: src/parser.y src/ick.h src/sizes.h src/feh.h src/lose.h temp/config.h - $(YACC) -d $(YACCFLAGS) src/parser.y - -rm -f temp/parser.c - mv y.tab.c temp/parser.c - -rm -f temp/parser.h - mv y.tab.h temp/parser.h - -temp/lexer.c: src/lexer.l src/ick.h src/lose.h temp/config.h - $(LEX) $(LEXFLAGS) src/lexer.l - -rm -f temp/lexer.c - mv lexyy.c temp/lexer.c - -bin/lextest: temp/parser.h src/lexer.c src/ick.h temp/lose.o - $(CC) -DMAIN src/lexer.c src/lose.o -lfl -o bin/lextest - -temp/oil.exe: temp/oil.c temp/config.h - $(CC) $(CFLAGS) -o temp/oil.exe temp/oil.c -temp/parser.o: temp/parser.c src/ick.h src/feh.h src/lose.h src/sizes.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/parser.o temp/parser.c -temp/lexer.o: temp/lexer.c temp/parser.h src/ick.h src/lose.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/lexer.o temp/lexer.c -temp/feh2.o: src/feh2.c src/feh.h temp/parser.h src/ick.h src/fiddle.h src/lose.h src/sizes.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/feh2.o src/feh2.c -temp/idiotism.c: src/idiotism.oil temp/oil.exe - temp/oil.exe < src/idiotism.oil > temp/idiotism.c -temp/idiotism.o: temp/idiotism.c src/feh.h temp/parser.h src/ick.h src/fiddle.h src/lose.h src/sizes.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/idiotism.o temp/idiotism.c -temp/dekludge.o: src/dekludge.c src/feh.h temp/parser.h src/ick.h src/fiddle.h src/lose.h src/sizes.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/dekludge.o src/dekludge.c -temp/perpet.o: src/perpet.c temp/parser.h src/ick.h src/lose.h src/sizes.h src/uncommon.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/perpet.o src/perpet.c -temp/cesspool.o: src/cesspool.c src/abcess.h src/lose.h src/sizes.h - $(CC) $(CFLAGS) -c -o temp/cesspool.o src/cesspool.c -temp/numerals.o: src/numerals.c src/abcess.h src/lose.h src/sizes.h - $(CC) $(CFLAGS) -c -o temp/numerals.o src/numerals.c -temp/unravel.o: src/unravel.c src/abcess.h src/lose.h src/sizes.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/unravel.o src/unravel.c -temp/lose.o: src/lose.c src/lose.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/lose.o src/lose.c -temp/fiddle.o: src/fiddle.c src/fiddle.h src/sizes.h - $(CC) $(CFLAGS) -c -o temp/fiddle.o src/fiddle.c -temp/arrgghh.o: src/arrgghh.c - $(CC) $(CFLAGS) -c -o temp/arrgghh.o src/arrgghh.c -temp/uncommon.o: src/uncommon.c src/uncommon.h - $(CC) $(CFLAGS) -c -o temp/uncommon.o src/uncommon.c -temp/yuk.o: src/yuk.c src/yuk.h src/lose.h src/sizes.h src/abcess.h src/uncommon.h temp/config.h - $(CC) $(CFLAGS) -c -o temp/yuk.o src/yuk.c - -lib/libick.a: temp/cesspool.o temp/numerals.o temp/lose.o temp/fiddle.o temp/arrgghh.o - ar cr lib/libick.a temp/cesspool.o temp/numerals.o temp/lose.o temp/fiddle.o temp/arrgghh.o - ranlib lib/libick.a - -lib/libickmt.a: temp/cesspool.o temp/numerals.o temp/unravel.o temp/lose.o temp/fiddle.o temp/arrgghh.o - ar cr lib/libickmt.a temp/cesspool.o temp/numerals.o temp/unravel.o temp/lose.o temp/fiddle.o temp/arrgghh.o - ranlib lib/libickmt.a - -lib/libyuk.a: temp/yuk.o temp/uncommon.o - ar cr lib/libyuk.a temp/yuk.o temp/uncommon.o - ranlib lib/libyuk.a - -install: all - cp bin/ick.exe $(DESTDIR)$(bindir) - cp lib/libick.a $(DESTDIR)$(libdir) - cp lib/libickmt.a $(DESTDIR)$(libdir) - cp lib/libyuk.a $(DESTDIR)$(libdir) - -mkdir -p $(DESTDIR)$(incdir) - cp src/lose.h src/abcess.h src/fiddle.h src/yuk.h $(DESTDIR)$(incdir) - -mkdir $(DESTDIR)$(datadir) - cp src/ick-wrap.c $(DESTDIR)$(datadir) - cp include/syslib.i include/syslib.?i $(DESTDIR)$(datadir) - cp temp/coopt.sh $(DESTDIR)$(libdir) - cp COPYING.txt $(DESTDIR)$(libdir) - rm -f $(DESTDIR)$(infodir)/ick.info - cp doc/ick.inf $(DESTDIR)$(infodir) - -mv $(DESTDIR)$(infodir)/ick.inf $(DESTDIR)$(infodir)/ick.info -# Note that it's necessary to copy the info file to .inf on an 8.3 system -# and .info otherwise; this is done by copying it to .inf, and then renaming -# to .info; on an 8.3 system, this leaves the extension as .inf because mv -# will signal an (unimportant) error. - -uninstall: - rm -f $(DESTDIR)$(bindir)/ick.exe $(DESTDIR)$(libdir)/libick.a - rm -f $(DESTDIR)$(libdir)/coopt.sh $(DESTDIR)$(libdir)/COPYING.txt - rm -f $(DESTDIR)$(libdir)/libickmt.a $(DESTDIR)$(libdir)/libyuk.a - rm -f ${DESTDIR}${infodir}/ick.inf $(DESTDIR)$(infodir)/ick.info - rm -fr $(DESTDIR)$(incdir) $(DESTDIR)$(datadir) - -TAGS: $(SOURCES) - etags $(SOURCES) - -dist: ick-0.27.tgz - -ick-0.27.tgz: $(SOURCES) - @find $(SOURCES) -type f -print | grep -v RCS | sed s:^:ick-0.27/: >MANIFEST.txt - @(cd ..; ln -s intercal ick-0.27) - (cd ..; tar -czvf intercal/ick-0.27.tgz `cat intercal/MANIFEST.txt`) - @(cd ..; rm ick-0.27) - -clean: - -cp temp/config.h . - -rm -f temp/* bin/* lib/* include/* - mv config.h temp - -distr: - -rm -f temp/*.o temp/parser.h temp/oil.exe temp/idiotism.c - -rm -f bin/* lib/* include/* - -distclean: distr - -rm -f config.status config.cache config.log Makefile - -rm -f temp/config.h temp/coopt.sh diff --git a/Makefile.in b/Makefile.in index 3ab8dbc..c811bef 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,55 +8,105 @@ prefix = @prefix@ # Common prefix for machine-dependent installed files. exec_prefix = @exec_prefix@ +# Debian doesn't like versioned subdirs; give them a way to unversion +# the subdir. + +ick_specific_subdir = ick-@PACKAGE_VERSION@ + +# Modern versions of autoconf use an overridable datarootdir, and this +# doesn't do any harm with older versions. +datarootdir = @datarootdir@ # Directory in which to install binaries. bindir = @bindir@ # Directory in which to install libraries. libdir = @libdir@ # Directory to install data files. -datadir = @datadir@/ick-@PACKAGE_VERSION@ +datadir = @datadir@/$(ick_specific_subdir) # Directory to install the include files in. -incdir = @includedir@/ick-@PACKAGE_VERSION@ +incdir = @includedir@/$(ick_specific_subdir) # Directory to install Info files in. infodir = @infodir@ +# Directory to install manpages in. +mandir = @mandir@ # This can be overridden from the command line DESTDIR= CC = @CC@ -CFLAGS = @CFLAGS@ -DICKINCLUDEDIR=\"$(incdir)\" -DICKLIBDIR=\"$(datadir)\" -DICKBINDIR=\"$(bindir)\" -DYYDEBUG -O2 -W -Wall -I./src -I./temp +CFLAGS = @CFLAGS@ -DICKINCLUDEDIR=\"$(incdir)\" -DICKDATADIR=\"$(datadir)\" -DICKBINDIR=\"$(bindir)\" -DICKLIBDIR=\"$(libdir)\" -DYYDEBUG -O2 -W -Wall -I./src -I./temp LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXFLAGS= YACC = @YACC@ -YACCFLAGS = +YACCFLAGS = LOADLIBS = @LIBS@ @LEXLIB@ -CSOURCES = src/parser.y src/lexer.l src/feh2.c src/dekludge.c src/lose.c src/fiddle.c src/perpet.c src/unravel.c src/uncommon.c -ISOURCES = src/cesspool.c src/arrgghh.c src/ick-wrap.c src/numerals.c +CSOURCES = src/parser.y src/lexer.l src/feh2.c src/dekludge.c src/lose.c src/fiddle.c src/perpet.c src/unravel.c src/uncommon.c src/convickt.c src/clc-cset.c src/bin2c.c +ISOURCES = src/cesspool.c src/arrgghh.c src/ick-wrap.c src/pickwrap.c src/numerals.c YSOURCES = src/yuk.c HEADERS = src/ick.h src/lose.h src/sizes.h src/abcess.h src/fiddle.h src/feh.h src/yuk.h src/uncommon.h BUILD = Makefile.in config.in config.sh src/configh.in ickspec.in ickspec src/cooptsh.in -MISC = etc/intercal.el src/ctrlmfix.sh src/ctrlmfix.bat +MISC = etc/intercal.el src/ctrlmfix.sh src/ctrlmfix.bat src/*.bin DOCS = BUGS.txt COPYING.txt NEWS.txt README.txt SOURCES = $(CSOURCES) $(ISOURCES) $(YSOURCES) $(HEADERS) $(BUILD) $(MISC) $(DOCS) pit doc -all: bin/ick@EXEEXT@ lib/libick.a lib/libickmt.a lib/libyuk.a ial +all: bin/ick@EXEEXT@ bin/convickt@EXEEXT@ lib/libick.a lib/libickmt.a lib/libyuk.a ial -ial: src/fiddle.h src/abcess.h src/lose.h src/yuk.h src/ick-wrap.c src/pickwrap.c temp/coopt.sh pit/lib/syslib.i COPYING.txt +ial: include/fiddle.h include/abcess.h include/lose.h include/yuk.h include/syslib.i include/syslib.3i include/syslib.4i include/syslib.5i include/syslib.6i include/syslib.7i lib/ick-wrap.c lib/pickwrap.c lib/coopt.sh lib/COPYING.txt include/atari.bin include/baudot.bin include/ebcdic.bin include/latin1.bin + +include/fiddle.h: src/fiddle.h -cp src/fiddle.h include/fiddle.h + +include/abcess.h:src/abcess.h -cp src/abcess.h include/abcess.h + +include/lose.h:src/lose.h -cp src/lose.h include/lose.h + +include/yuk.h:src/yuk.h -cp src/yuk.h include/yuk.h - -cp pit/lib/syslib.i pit/lib/syslib.?i include + +include/syslib.i: pit/lib/syslib.i + -cp pit/lib/syslib.i include/syslib.i +include/syslib.3i: pit/lib/syslib.3i + -cp pit/lib/syslib.3i include/syslib.3i +include/syslib.4i: pit/lib/syslib.4i + -cp pit/lib/syslib.4i include/syslib.4i +include/syslib.5i: pit/lib/syslib.5i + -cp pit/lib/syslib.5i include/syslib.5i +include/syslib.6i: pit/lib/syslib.6i + -cp pit/lib/syslib.6i include/syslib.6i +include/syslib.7i: pit/lib/syslib.7i + -cp pit/lib/syslib.7i include/syslib.7i + +lib/ick-wrap.c:src/ick-wrap.c -cp src/ick-wrap.c lib/ick-wrap.c + +lib/pickwrap.c:src/pickwrap.c -cp src/pickwrap.c lib/pickwrap.c + +lib/coopt.sh:temp/coopt.sh -cp temp/coopt.sh lib/coopt.sh + +lib/COPYING.txt:COPYING.txt -cp COPYING.txt lib/COPYING.txt +include/atari.bin:src/atari.bin + -cp src/atari.bin include/atari.bin +include/baudot.bin:src/baudot.bin + -cp src/baudot.bin include/baudot.bin +include/ebcdic.bin:src/ebcdic.bin + -cp src/ebcdic.bin include/ebcdic.bin +include/latin1.bin:src/latin1.bin + -cp src/latin1.bin include/latin1.bin + bin/ick@EXEEXT@: temp/parser.@OBJEXT@ temp/lexer.@OBJEXT@ temp/feh2.@OBJEXT@ temp/dekludge.@OBJEXT@ temp/idiotism.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/perpet.@OBJEXT@ temp/uncommon.@OBJEXT@ $(CC) temp/perpet.@OBJEXT@ temp/parser.@OBJEXT@ temp/lexer.@OBJEXT@ temp/feh2.@OBJEXT@ temp/dekludge.@OBJEXT@ temp/idiotism.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/uncommon.@OBJEXT@ $(LDFLAGS) -o bin/ick@EXEEXT@ +bin/convickt@EXEEXT@: temp/convickt.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/uncommon.@OBJEXT@ + $(CC) temp/convickt.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/uncommon.@OBJEXT@ $(LDFLAGS) -o bin/convickt@EXEEXT@ + temp/oil.c: src/oil.y temp/config.h $(YACC) $(YACCFLAGS) src/oil.y -rm -f temp/oil.c @@ -72,13 +122,15 @@ temp/parser.h temp/parser.c: src/parser.y src/ick.h src/sizes.h src/feh.h src/lo temp/lexer.c: src/lexer.l src/ick.h src/lose.h temp/config.h $(LEX) $(LEXFLAGS) src/lexer.l -rm -f temp/lexer.c - mv @LEX_OUTPUT_ROOT@.c temp/lexer.c + mv @LEX_OUTPUT_ROOT@.c temp/lexer.c bin/lextest: temp/parser.h src/lexer.c src/ick.h temp/lose.@OBJEXT@ $(CC) -DMAIN src/lexer.c src/lose.@OBJEXT@ @LEXLIB@ -o bin/lextest temp/oil@EXEEXT@: temp/oil.c temp/config.h $(CC) $(CFLAGS) -o temp/oil@EXEEXT@ temp/oil.c +temp/bin2c@EXEEXT@: src/bin2c.c + $(CC) $(CFLAGS) -o temp/bin2c@EXEEXT@ src/bin2c.c temp/parser.@OBJEXT@: temp/parser.c src/ick.h src/feh.h src/lose.h src/sizes.h temp/config.h $(CC) $(CFLAGS) -c -o temp/parser.@OBJEXT@ temp/parser.c temp/lexer.@OBJEXT@: temp/lexer.c temp/parser.h src/ick.h src/lose.h temp/config.h @@ -109,45 +161,88 @@ temp/uncommon.@OBJEXT@: src/uncommon.c src/uncommon.h $(CC) $(CFLAGS) -c -o temp/uncommon.@OBJEXT@ src/uncommon.c temp/yuk.@OBJEXT@: src/yuk.c src/yuk.h src/lose.h src/sizes.h src/abcess.h src/uncommon.h temp/config.h $(CC) $(CFLAGS) -c -o temp/yuk.@OBJEXT@ src/yuk.c +temp/clc-cset.@OBJEXT@: src/clc-cset.c src/uncommon.h + $(CC) $(CFLAGS) -c -o temp/clc-cset.@OBJEXT@ src/clc-cset.c +temp/convickt.@OBJEXT@: src/convickt.c + $(CC) $(CFLAGS) -c -o temp/convickt.@OBJEXT@ src/convickt.c + +temp/cset-a.c: temp/bin2c@EXEEXT@ src/atari.bin + temp/bin2c@EXEEXT@ clc_cset_atari < src/atari.bin > temp/cset-a.c +temp/cset-b.c: temp/bin2c@EXEEXT@ src/baudot.bin + temp/bin2c@EXEEXT@ clc_cset_baudot < src/baudot.bin > temp/cset-b.c +temp/cset-e.c: temp/bin2c@EXEEXT@ src/ebcdic.bin + temp/bin2c@EXEEXT@ clc_cset_ebcdic < src/ebcdic.bin > temp/cset-e.c +temp/cset-l.c: temp/bin2c@EXEEXT@ src/latin1.bin + temp/bin2c@EXEEXT@ clc_cset_latin1 < src/latin1.bin > temp/cset-l.c +temp/cset-a.@OBJEXT@: temp/cset-a.c + $(CC) $(CFLAGS) -c -o temp/cset-a.@OBJEXT@ temp/cset-a.c +temp/cset-b.@OBJEXT@: temp/cset-b.c + $(CC) $(CFLAGS) -c -o temp/cset-b.@OBJEXT@ temp/cset-b.c +temp/cset-e.@OBJEXT@: temp/cset-e.c + $(CC) $(CFLAGS) -c -o temp/cset-e.@OBJEXT@ temp/cset-e.c +temp/cset-l.@OBJEXT@: temp/cset-l.c + $(CC) $(CFLAGS) -c -o temp/cset-l.@OBJEXT@ temp/cset-l.c -lib/libick.a: temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ - ar cr lib/libick.a temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ +lib/libick.a: temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/cset-a.@OBJEXT@ temp/cset-b.@OBJEXT@ temp/cset-e.@OBJEXT@ temp/cset-l.@OBJEXT@ temp/uncommon.@OBJEXT@ + ar cr lib/libick.a temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/cset-a.@OBJEXT@ temp/cset-b.@OBJEXT@ temp/cset-e.@OBJEXT@ temp/cset-l.@OBJEXT@ temp/uncommon.@OBJEXT@ @RANLIB@ lib/libick.a -lib/libickmt.a: temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/unravel.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ - ar cr lib/libickmt.a temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/unravel.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ +lib/libickmt.a: temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/unravel.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/cset-a.@OBJEXT@ temp/cset-b.@OBJEXT@ temp/cset-e.@OBJEXT@ temp/cset-l.@OBJEXT@ temp/uncommon.@OBJEXT@ + ar cr lib/libickmt.a temp/cesspool.@OBJEXT@ temp/numerals.@OBJEXT@ temp/unravel.@OBJEXT@ temp/lose.@OBJEXT@ temp/fiddle.@OBJEXT@ temp/arrgghh.@OBJEXT@ temp/clc-cset.@OBJEXT@ temp/cset-a.@OBJEXT@ temp/cset-b.@OBJEXT@ temp/cset-e.@OBJEXT@ temp/cset-l.@OBJEXT@ temp/uncommon.@OBJEXT@ @RANLIB@ lib/libickmt.a -lib/libyuk.a: temp/yuk.@OBJEXT@ temp/uncommon.@OBJEXT@ - ar cr lib/libyuk.a temp/yuk.@OBJEXT@ temp/uncommon.@OBJEXT@ +lib/libyuk.a: temp/yuk.@OBJEXT@ + ar cr lib/libyuk.a temp/yuk.@OBJEXT@ @RANLIB@ lib/libyuk.a -install: all - cp bin/ick@EXEEXT@ $(DESTDIR)$(bindir) +install-common: all + cp bin/ick@EXEEXT@ bin/convickt@EXEEXT@ $(DESTDIR)$(bindir) cp lib/libick.a $(DESTDIR)$(libdir) cp lib/libickmt.a $(DESTDIR)$(libdir) cp lib/libyuk.a $(DESTDIR)$(libdir) -mkdir -p $(DESTDIR)$(incdir) cp src/lose.h src/abcess.h src/fiddle.h src/yuk.h $(DESTDIR)$(incdir) - -mkdir $(DESTDIR)$(datadir) - cp src/ick-wrap.c $(DESTDIR)$(datadir) + -mkdir -p $(DESTDIR)$(datadir) + cp include/*.bin $(DESTDIR)$(datadir) + cp src/ick-wrap.c src/pickwrap.c $(DESTDIR)$(datadir) cp include/syslib.i include/syslib.?i $(DESTDIR)$(datadir) - cp temp/coopt.sh $(DESTDIR)$(libdir) - cp COPYING.txt $(DESTDIR)$(libdir) + cp temp/coopt.sh $(DESTDIR)$(datadir) + cp COPYING.txt $(DESTDIR)$(datadir) + -mkdir -p $(DESTDIR)$(mandir)/man1 + cp doc/ick.1 doc/convickt.1 $(DESTDIR)$(mandir)/man1 + -mkdir -p $(DESTDIR)$(infodir) rm -f $(DESTDIR)$(infodir)/ick.info cp doc/ick.inf $(DESTDIR)$(infodir) - -mv $(DESTDIR)$(infodir)/ick.inf $(DESTDIR)$(infodir)/ick.info + (mv $(DESTDIR)$(infodir)/ick.inf $(DESTDIR)$(infodir)/ick.info && @INSTALLINFO@ --quiet $(DESTDIR)$(infodir)/ick.info) || @INSTALLINFO@ --quiet $(DESTDIR)$(infodir)/ick.inf # Note that it's necessary to copy the info file to .inf on an 8.3 system # and .info otherwise; this is done by copying it to .inf, and then renaming # to .info; on an 8.3 system, this leaves the extension as .inf because mv -# will signal an (unimportant) error. +# will signal an (unimportant) error. Also, the info directory has to +# be created first if it doesn't exist because /usr/local/share/info +# (the default) doesn't exist by default in Debian. + +# install, and gzip the docs after installing. +# The pattern i*[fo] matches ick.info only when uncompressed, even on +# an 8.3 system. +install: install-common + -gzip -9 -f $(DESTDIR)$(infodir)/ick.i*[fo] + -gzip -9 -f $(DESTDIR)$(mandir)/man1/ick.1 + -gzip -9 -f $(DESTDIR)$(mandir)/man1/convickt.1 + @MANDB@ -q + +# install without gzipping the docs +install-nozip: install-common + @MANDB@ -q uninstall: + @INSTALLINFO@ --quiet --remove ick rm -f $(DESTDIR)$(bindir)/ick@EXEEXT@ $(DESTDIR)$(libdir)/libick.a - rm -f $(DESTDIR)$(libdir)/coopt.sh $(DESTDIR)$(libdir)/COPYING.txt rm -f $(DESTDIR)$(libdir)/libickmt.a $(DESTDIR)$(libdir)/libyuk.a - rm -f ${DESTDIR}${infodir}/ick.inf $(DESTDIR)$(infodir)/ick.info + rm -f ${DESTDIR}${infodir}/ick.i* + rm -f $(DESTDIR)$(mandir)/man1/ick.1* + rm -f $(DESTDIR)$(mandir)/man1/convickt.1* rm -fr $(DESTDIR)$(incdir) $(DESTDIR)$(datadir) + @MANDB@ -q TAGS: $(SOURCES) etags $(SOURCES) @@ -161,12 +256,13 @@ ick-@PACKAGE_VERSION@.tgz: $(SOURCES) @(cd ..; rm ick-@PACKAGE_VERSION@) clean: - -cp temp/config.h . + -cp temp/config.h temp/coopt.sh . -rm -f temp/* bin/* lib/* include/* - mv config.h temp + mv config.h coopt.sh temp distr: - -rm -f temp/*.@OBJEXT@ temp/parser.h temp/oil@EXEEXT@ temp/idiotism.c + -rm -f temp/*.@OBJEXT@ temp/parser.h temp/oil@EXEEXT@ + -rm -f temp/idiotism.c temp/bin2c@EXEEXT@ temp/cset-?.c -rm -f bin/* lib/* include/* distclean: distr diff --git a/NEWS.txt b/NEWS.txt index 7a5d2bf..d24b338 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -13,9 +13,11 @@ 2. Rewrote the optimizer in a language (OIL) invented specifically for the purpose; the set of optimizer idioms is now in idiotism.oil, and translated - into C and linked with the rest of the compiler at compile time. It - contains many of the same idioms, but some have been generalised or reduced - into smaller parts and some new ones were added. + into C and linked with the rest of the compiler at metacompile time (that + is, when the compiler itself is being compiled). It contains many of the + same idioms, but some have been generalised or reduced into smaller parts + and some new ones were added. Documentation for OIL has been added as part + of the documentation for the distribution as a whole. 3. Joris Huizer submitted a patch to fix a memory allocation bug which occasionally caused memory corruption when a program had a number of @@ -23,21 +25,22 @@ 4. Completely redid the autoconfiguration. The install should now progress with less user interaction than before. As a bonus, if you have a range of - GNU utilities including make, sed, tr, and bash (and possibly others), - it's now possible to compile using 'sh config.sh' followed by 'make' under + GNU utilities including make, sed, tr, and bash (and possibly others), it's + now possible to compile using 'sh configdj.sh' followed by 'make' under DJGPP. (To be specific, some settings that previously sometimes had to be set by the user, such as whether lex provided yylineno and yyrestart, are now either detected by config.sh or no longer relevant. Other settings that were not previously detected, such as what extension executables have, are - now detected so that config.sh works on DJGPP as well, now. Note that if - config.in is translated to config.sh on a non-DJGPP system, it might cause - the resulting shell script to fail on DJGPP; this is an upstream problem.) - The autoconfigurer now also adapts coopt.sh so that -F works on DJGPP too, - sort of (or else detects that it won't work and disables it). + now detected so that the config script works on DJGPP as well, now; + compiling the config script on a non-DJGPP system seems to result in a + script that fails on DJGPP, and likewise compiling the script on DJGPP + seems to result on a script that fails on other systems, so both scripts + are provided. The autoconfigurer now also adapts coopt.sh so that -F works + on DJGPP too, sort of (or else detects that it won't work and disables it). 5. Improved the action of 'make install', so that it actually installs everything in the right place. It works under DJGPP, now, too, as long as - you have the programs installed that allow config.sh and make to work. + you have the programs installed that allow configdj.sh and make to work. 6. Fixed a bug involving COME FROM in multithreaded programs; now, if a line COMEs FROM itself (either because this is written explicitly or because it @@ -81,7 +84,74 @@ in when creating a temporary file; this was meant to be fixed in 1.26, but the fix didn't actually work. - Release 1.26 (by Alex Smith) [a bugfix of 0.26] +14. Added a new program to the pit: an Unlambda interpreter written by Oerjan + Johansen in 2001, and also a commented version as documentation. + +15. Section 23 of the release notes for version 0.26 is wrong; I was obviously + confused when I wrote them because they were speaking nonsense. For the + record: no, there is nothing special about NEXT in connection with + backtracking. It should have said "NEXT", not "choicepoint". Instead of + rewriting history, this changelog entry is added as a fix. + +16. Added an entirely new set of documentation, the Revamped Manual, which is + available in a wide range of formats and documents recent language changes, + as well as many other things INTERCAL. The Revised Manual has been + preserved, but it seems unlikely to be updated in the near future (it is + still well worth a read anyway). + +17. For compatibility, the COMMENT gerund can now be spelt COMMENTS or + COMMENTING. + +18. Corrected the Emacs INTERCAL mode to work with more recent versions of + Emacs than it previously worked with, hopefully without sacrificing too + much backward compatibility. + +19. Added a conversion program 'convickt'; it can convert between the Latin-1, + Baudot and EBCDIC character sets used by CLC-INTERCAL (Latin-1 is also + accepted by C-INTERCAL, so this gives a practical way to run CLC-INTERCAL + programs in unusual character sets on C-INTERCAL), and can also attempt to + convert into the 'Atari character set' (which uses $ instead of the cent + sign, ? instead of yen, and so on for the other characters that differ + between C-INTERCAL and CLC-INTERCAL). + +20. Reorganised the Makefile and environment variable system for finding + locations to make more logical sense; various definitions and environment + variables now do what their name suggests rather than something completely + different, a situation which confused the programmers previously. The new + version should be better at finding files that it needs, and also cuts + down on the amount of useless copying that the Makefile did (such copying + is now only done if the destination file doesn't already exist or is out + of date). + +21. Fixed some problems in the PIC-INTERCAL code: one problem with finding the + correct location for the skeleton, and some code duplication between the + two header files. Also clarified one of the comments. + +22. Added support for CLC-INTERCAL-style Baudot I/O (generalised array I/O is + currently unimplemented, though). This has a two minor differences to the + CLC-INTERCAL version: unrecognised characters, instead of causing an + error, become 0 when WRITING IN (except that tabs are translated to single + spaces) and ASCII code 26 when READING OUT. (Baudot characters not in + ASCII will be translated to Latin-1; there are more of these than might be + expected, because the CLC-INTERCAL extended Baudot is being used). + +23. The man pages and some fixes for the documentation Makefile from the + Debian package were copied into the main distribution. The man page was + written originally by Mark W. Eichin and later modified by Joey Hess (and + was further modified by me prior to placing it in the distribution); the + Makefile fixes are due to Joey Hess. Strangely, many of the changes I made + to the Makefile for this version have much the same effect as fixes that + the Debian package maintainers had come up with earlier; a new Makefile + variable ick_specific_subdir has been added to hopefully make the Debian + maintainer's job easier (it allows elimination of versioned + subdirectories, replacing them with versionless subdirectories). + +24. Added a new test program to the pit, tests/ignorret.i, that demonstrates + how the interaction between IGNORE and RETRIEVE is different between + C-INTERCAL, CLC-INTERCAL, and J-INTERCAL, and documentation showing the + results on each version. + + Release 1.26 (by Alex Smith) [a bugfix of 0.26] 3 Sep 2007 1. Fixed an optimizer bug (thanks to Joris Huizer for pointing it out), relating to active-bits deduction in some expressions involving select. @@ -113,7 +183,7 @@ (it was getting a little bored stuck at 0). The next major release will be version 0.27. - Release 0.26 (by Alex Smith) + Release 0.26 (by Alex Smith) 1 Apr 2007 1. Fixed a few bugs in the previous release (some bugfixed by Joris Huizer). @@ -209,7 +279,7 @@ 24. Fixed a bug where the yuk debugger accessed unallocated memory. - Release 0.25 (by Alex Smith) + Release 0.25 (by Alex Smith) 21 Jun 2006 1. Added support for computed ABSTAIN and TRY AGAIN. @@ -298,14 +368,14 @@ All the numerous currency symbols of Unicode (ISO 10646) can be used as big-money alternatives in their UTF-8 format. Indeed, a random mixture of Latin-1 and UTF-8 also works fine; this seems very much in the spirit of Intercal. - + 2. Intercal has now been localized for the Ancient Roman as well as the Posix/C locale. You may input numbers in Latin and write Intercal programs using Latin keywords. See lexer.l for a list of equivalences. 3. The Makefile in the pit directory now works like a real Makefile, and won't compile anything that's already been compiled. - + Release 0.19 (by Eric S. Raymond) 16 August 1998 1. Fixed a code-generation error in assignments from tail and hybrid @@ -340,7 +410,7 @@ Incorporates a minor bug fix by Jeff Uphoff . Release 0.16 (by Brian Raiter and Eric S. Raymond) 26 May 1997 -This is the 25th-anniversary release of INTERCAL. This language, conceived +This is the 25th-anniversary release of INTERCAL. This language, conceived in irony a quarter century ago today, has outlasted many more serious and high-minded essays in computer language design. This fact should give us pause to reflect, or possibly frighten the crap out of us. Or both. @@ -390,7 +460,7 @@ pause to reflect, or possibly frighten the crap out of us. Or both. 2. The optimizer now does complete analysis and evaluation of constant expressions at compile time. -3. Added optimization templates for ~, |, &, ^ expressions. Also added +3. Added optimization templates for ~, |, &, ^ expressions. Also added |, &, ^ idioms to the system library, and documented them. (The following changes are due to Brian Raiter) @@ -438,7 +508,7 @@ pause to reflect, or possibly frighten the crap out of us. Or both. Release 0.13 (by Eric S. Raymond) 5 Jun 1996 1. I folded in patches by Brian Raiter that port - this code to Linux, ANSIfies it, and enables it to use flex. Note: This + this code to Linux, ANSIfies it, and enables it to use flex. Note: This version has been tested on Linux and SunOS but not yet elsewhere. 2. Another piece of nontrivial INTERCAL code has been found! (Doubtless @@ -482,13 +552,13 @@ pause to reflect, or possibly frighten the crap out of us. Or both. 3. We fess up to a violation of the INTERCAL-72 standard. That implementation, instead of accepting an entire multiple-digit number per line of input, - expected one digit per *card image* (input line). It is unclear how + expected one digit per *card image* (input line). It is unclear how INTERCAL-72 programs ever managed to input more than one number. 4. Added patches by C.P.Osborne to make the lexer work using flex, for Linux and BSD/386 support. I didn't use his error-reporting patch, though; instead, I changed the parser to catch errors at logical-line - level. I also kept the N in `RESUBNIT'; this is a carefully preserved + level. I also kept the N in `RESUBNIT'; this is a carefully preserved feature of INTERCAL-72. 5. Volapuk digits are now recognized on input. TO DO: Recognize Volapuk @@ -497,15 +567,15 @@ pause to reflect, or possibly frighten the crap out of us. Or both. Release 0.10 (by Eric S. Raymond) 9 Sep 1994 1. It is now possible to undo a line-number abstention with a gerund - reinstatement, or undo a gerund abstention with a line-number + reinstatement, or undo a gerund abstention with a line-number reinstatement. In previous versions, gerund abstention/reinstatements and line-number abstention/reinstatements were independent of each other. 2. After release 0.5, I wrote in the TO DO list as follows: - + 2. (ESR) Input format internationalization -- allow WRITE IN input digits in major languages such as Nahuatl, Tagalog, Sanskrit, and Basque. - + The twisted loons in the alt.folklore.computers crowd loved this idea, and I actually got sent digit lists for Nahuatl, Tagalog, Sanskrit, and Basque -- also, Kwakiutl, Georgian, Ojibwe, and Albanian. I've left @@ -579,7 +649,7 @@ generated programs; [+/-]traditional is a no-op at this point. 1. As a convenience to all you junior birdmen out there, `NINER' is accepted as a synonym for `NINE' in INTERCAL input. -2. The COME FROM statement is now compiled. +2. The COME FROM statement is now compiled. ------------- diff --git a/README.txt b/README.txt index 49b284b..c00c7e0 100644 --- a/README.txt +++ b/README.txt @@ -30,22 +30,30 @@ etc/intercal.el -- elisp for editing INTERCAL code under GNU Emacs doc/READ.ME -- historical notes on the docs doc/ick.txi -- the Revamped Manual sources, a newer manual -doc/gpl-2-0.txi -- the GNU GPL version 2.0 in Texinfo form doc/fdl-1-2.txi -- the GNU FDL version 1.2 in Texinfo form doc/html/*.htm -- the Revamped Manual as an HTML website doc/ick.htm -- the Revamped Manual as one HTML file doc/ick.txt -- the Revamped Manual in plain text form doc/ick.inf -- the Revamped Manual in Info +doc/ick.pdf -- printable version of the Revamped Manual +doc/ickstyle.css -- styling rules for the Revamped Manual in HTML +doc/tidy.cfg -- HTML tidying rules for the Revamped Manual doc/fix83.pl -- script to fixup the HTML output for 8.3 systems doc/intercal.mm -- the old manual in groffable form doc/Makefile -- makefile to build old and new manuals doc/THEORY.txt -- some notes on the internals of the INTERCAL compiler doc/chipspec.txt -- plans for an INTERCAL-based microprocessor +doc/ick.1 -- man page for ick +doc/convickt.1 -- man page for convickt src/abcess.h -- interface to functions linked with programs src/arrgghh.c -- option argument parsing for generated programs +src/bin2c.c -- creates C code representations of binary files src/cesspool.c -- the INTERCAL runtime support code +src/clc-cset.c -- compatibility code for CLC-INTERCAL character sets +src/csetstub.c -- small file to allow convickt to link src/configdj.h -- config.h substitute for DJGPP without config.sh +src/convickt.c -- command line character set converter src/coopt.sh -- script to help out the -F optimizer (POSIX only) src/dekludge.c -- INTERCAL optimizer wrapper and utility functions src/feh.h -- interface to INTERCAL-to-C code generator @@ -67,6 +75,7 @@ src/sizes.h -- variables defining the numeric base src/uncommon.[ch] -- code common to the compiler and debugger src/unravel.c -- multithreading functions src/yuk.[ch] -- INTERCAL debugger and profiler +src/*.bin -- character set definitions for clc-cset and convickt temp/parser.[ch] -- Prebuilt parser (for DJGPP systems without bison) temp/lexer.c -- Prebuilt lexer (for DJGPP systems without flex) @@ -77,7 +86,7 @@ districk.bat -- script to remove files not distributed (DJGPP) cleanick.bat -- script to remove all non-source files (DJGPP) etc/ctrlmfix.bat -- script to remove ^Ms that may have got in by mistake makeick.sh --\ -districk.sh --|the same as above, but in sh format +districk.sh --|the same as above, but in sh format cleanick.sh --|(use .bat under command.com/cmd, and .sh under bash) etc/ctrlmfix.sh --/ @@ -96,12 +105,14 @@ pit/* -- sample INTERCAL code; see pit/CATALOG HOW TO GET STARTED -First, note that there is a much fuller manual than this README file -available. For full information about C-INTERCAL, including extensive -installation and usage instructions, see that one; point a web browser at -doc/html/index.htm, or run `info -f doc/ick.inf', or failing that read the -plain text version at doc/ick.txt. After C-INTERCAL is installed, the manual is -also available with just `info ick'. +First, note that there is a much fuller manual than this file available. For +full information about C-INTERCAL, including extensive installation and usage +instructions, see that one; point a PDF reader at doc/ick.pdf, a web browser +at doc/html/index.htm, or run `info -f doc/ick.inf', or failing that read the +plain text version at doc/ick.txt. After C-INTERCAL is installed, the manual +is also available with just `info ick' for information about running ick, the +compiler, or `info C-INTERCAL' for the available information about ick and +C-INTERCAL. You want a man page? Man pages are for wimps. To compile an INTERCAL program `foo.i' to executable code, just do @@ -157,13 +168,13 @@ There is an INTERCAL Resource Page at http://www.catb.org/intercal The latest version of INTERCAL is also kept available at the Retrocomputing Museun, http://www.catb.org/retro. -(Note that the above paragraph appears to be out of date. Looking through the -alt.lang.intercal archives is usually the best way to find out what the latest -version of C-INTERCAL (and you'll find out how to get its rival too, for that -matter) is nowadays; they tend to pop up in various unusual places, so giving -a URL might be misleading. Note also that contact details, and even who to -contact, often end up out of date; the newsgroup is also a good way to find out -who to contact.) +(Note that the above paragraph appears to be out of date; last I checked, that +version wasn't the most recent. Looking through the alt.lang.intercal archives +is usually the best way to find out what the latest version of C-INTERCAL (and +you'll find out how to get its rival too, for that matter) is nowadays; they +tend to pop up in various unusual places, so giving a URL might be +misleading. Note also that contact details, and even who to contact, often end +up out of date; the newsgroup is also a good way to find out who to contact.) There is, in addition, an occasionally active USENET newsgroup devoted to the language: alt.lang.intercal. @@ -208,30 +219,30 @@ alternatives on some system. This distribution needs prebuilding; you can use the makeick.bat or makeick.sh file provided to compile the program if you can't compile using the usual -POSIX methods via config.sh and make. (Unlike previous releases of C-INTERCAL, -the configure/make process can work under DJGPP; invoke config.sh as 'sh -config.sh' (without the sparks), and run make as normal. However, this -requires that you've installed quite a few utilities in addition to just gcc, -including at least bash, sed, tr and make, but possibly other things I -missed.) Once the implementation has been built, you can install it by adding -the \bin subdirectory to your PATH environment variable (at either end), or by -using 'make install' (again without the sparks) if you got config.sh and make -to work (which will copy the INTERCAL compiler into your main DJGPP -installation direcrtories). The temporary output from bison and flex is -included in the distribution (for those people who don't have bison and flex, -makeick will give error messages, but succeed anyway using the prebuilt -versions). The districk.bat file will remove all generated files that weren't -in the distribution, and the cleanick.bat file will remove all files that -aren't needed for a build (including the temporary bison/flex output). Note -that makeick.bat and makeick.sh produce DJGPP-specific output; and if you're -running DJGPP under bash under Windows XP, you may need to either set your -default command interpreter for batch files to cmd rather than command.com (by -setting your SHELL environment variable, or use some better workaround that I -don't know about. (command.com seems to have problems with the PATH -environment variable under Windows XP when running under bash.) Also try to -make sure that you use the .sh versions of the makeick.* scripts when running -under bash or a similar ported shell, and the .bat versions when running under -a DOS shell. +POSIX methods via configure and make. (Unlike some previous releases of +C-INTERCAL, the configure/make process can work under DJGPP; invoke the +configure script as 'sh configdj.sh' (without the sparks), and run make as +normal. However, this requires that you've installed quite a few utilities in +addition to just gcc, including at least bash, perl, sed, tr and make, but +possibly other things I missed.) Once the implementation has been built, you +can install it by adding the \bin subdirectory to your PATH environment +variable (at either end), or by using 'make install' (again without the +sparks) if you got config.sh and make to work (which will copy the INTERCAL +compiler into your main DJGPP installation direcrtories). The temporary output +from bison and flex is included in the distribution (for those people who +don't have bison and flex, makeick will give error messages, but succeed +anyway using the prebuilt versions). The districk.bat file will remove all +generated files that weren't in the distribution, and the cleanick.bat file +will remove all files that aren't needed for a build (including the temporary +bison/flex output). Note that makeick.bat and makeick.sh produce +DJGPP-specific output; and if you're running DJGPP under bash under Windows +XP, you may need to either set your default command interpreter for batch +files to cmd rather than command.com (by setting your SHELL environment +variable, or use some better workaround that I don't know about. (command.com +seems to have problems with the PATH environment variable under Windows XP +when running under bash.) Also try to make sure that you use the .sh versions +of the makeick.* scripts when running under bash or a similar ported shell, +and the .bat versions when running under a DOS shell. Some distributions of DJGPP have a bug where they complain that they can't find 'm4.exe' (or maybe my PATH is still wrong...). You can solve this problem by diff --git a/config.cache b/config.cache deleted file mode 100644 index c6e97c5..0000000 --- a/config.cache +++ /dev/null @@ -1,46 +0,0 @@ -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -ac_cv_c_const=${ac_cv_c_const=yes} -ac_cv_cygwin=${ac_cv_cygwin=no} -ac_cv_exeext=${ac_cv_exeext=.exe} -ac_cv_func_gethrtime=${ac_cv_func_gethrtime=no} -ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes} -ac_cv_func_strdup=${ac_cv_func_strdup=yes} -ac_cv_func_strtol=${ac_cv_func_strtol=yes} -ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} -ac_cv_header_stdc=${ac_cv_header_stdc=yes} -ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes} -ac_cv_header_time=${ac_cv_header_time=yes} -ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes} -ac_cv_lib_fl_yywrap=${ac_cv_lib_fl_yywrap=yes} -ac_cv_mingw32=${ac_cv_mingw32=no} -ac_cv_objext=${ac_cv_objext=o} -ac_cv_prog_CC=${ac_cv_prog_CC=gcc} -ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'} -ac_cv_prog_LEX=${ac_cv_prog_LEX=flex} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='cp -p'} -ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} -ac_cv_prog_YACC=${ac_cv_prog_YACC='bison -y'} -ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no} -ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes} -ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes} -ac_cv_prog_gcc=${ac_cv_prog_gcc=yes} -ac_cv_prog_lex_root=${ac_cv_prog_lex_root=lexyy} -ac_cv_prog_lex_yytext_pointer=${ac_cv_prog_lex_yytext_pointer=yes} -ac_cv_sizeof__Bool=${ac_cv_sizeof__Bool=1} -ac_cv_sizeof_long_long_int=${ac_cv_sizeof_long_long_int=8} -ac_cv_sys_interpreter=${ac_cv_sys_interpreter=yes} -ac_cv_type_signal=${ac_cv_type_signal=void} -lt_cv_sys_max_cmd_len=${lt_cv_sys_max_cmd_len=12288} diff --git a/config.in b/config.in index 7f69726..670bcb3 100644 --- a/config.in +++ b/config.in @@ -8,8 +8,10 @@ PACKAGE_VERSION=0.27 dnl Checks for programs. AC_PROG_YACC AC_PROG_CC -AC_PROG_LEX +dnl AC_PROG_LEX is checked by AC_DECL_YYTEXT below AC_PROG_RANLIB +AC_CHECK_PROGS(INSTALLINFO,install-info,:) +AC_CHECK_PROGS(MANDB,mandb,:) dnl Checks for libraries. @@ -55,3 +57,5 @@ AC_CHECK_FUNCS(gettimeofday gethrtime strdup strtol strtoul) AC_SUBST(PACKAGE_VERSION) AC_OUTPUT(Makefile temp/coopt.sh:src/cooptsh.in) +dnl After the output, chmod coopt.sh to be executable. +chmod a+x temp/coopt.sh \ No newline at end of file diff --git a/config.log b/config.log deleted file mode 100644 index a9c190f..0000000 --- a/config.log +++ /dev/null @@ -1,127 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -configure:534: checking for bison -configure:572: checking for gcc -configure:700: checking whether the C compiler (gcc ) works -configure:716: gcc -o conftest conftest.c 1>&5 -configure:742: checking whether the C compiler (gcc ) is a cross-compiler -configure:747: checking whether we are using GNU C -configure:756: gcc -E conftest.c -configure:775: checking whether gcc accepts -g -configure:809: checking for flex -configure:848: checking for yywrap in -lfl -configure:867: gcc -o conftest -g -O2 conftest.c -lfl 1>&5 -configure:892: checking for ranlib -configure:927: checking how to run the C preprocessor -configure:948: gcc -E conftest.c >/dev/null 2>conftest.out -configure:1007: checking for ANSI C header files -configure:1020: gcc -E conftest.c >/dev/null 2>conftest.out -configure:1087: gcc -o conftest -g -O2 conftest.c 1>&5 -configure: In function 'main': -configure:1082: warning: incompatible implicit declaration of built-in function 'exit' -configure:1114: checking for sys/time.h -configure:1124: gcc -E conftest.c >/dev/null 2>conftest.out -configure:1114: checking for unistd.h -configure:1124: gcc -E conftest.c >/dev/null 2>conftest.out -configure:1152: checking for working const -configure:1206: gcc -c -g -O2 conftest.c 1>&5 -configure:1227: checking size of long long int -configure:1246: gcc -o conftest -g -O2 conftest.c 1>&5 -configure: In function 'main': -configure:1240: warning: incompatible implicit declaration of built-in function 'exit' -configure:1266: checking size of _Bool -configure:1285: gcc -o conftest -g -O2 conftest.c 1>&5 -configure: In function 'main': -configure:1279: warning: incompatible implicit declaration of built-in function 'exit' -configure:1305: checking whether time.h and sys/time.h may both be included -configure:1319: gcc -c -g -O2 conftest.c 1>&5 -configure:1340: checking for Cygwin environment -configure:1356: gcc -c -g -O2 conftest.c 1>&5 -configure: In function 'main': -configure:1352: error: '__CYGWIN32__' undeclared (first use in this function) -configure:1352: error: (Each undeclared identifier is reported only once -configure:1352: error: for each function it appears in.) -configure: failed program was: -#line 1345 "configure" -#include "confdefs.h" - -int main() { - -#ifndef __CYGWIN__ -#define __CYGWIN__ __CYGWIN32__ -#endif -return __CYGWIN__; -; return 0; } -configure:1373: checking for mingw32 environment -configure:1385: gcc -c -g -O2 conftest.c 1>&5 -configure: In function 'main': -configure:1381: error: '__MINGW32__' undeclared (first use in this function) -configure:1381: error: (Each undeclared identifier is reported only once -configure:1381: error: for each function it appears in.) -configure: failed program was: -#line 1378 "configure" -#include "confdefs.h" - -int main() { -return __MINGW32__; -; return 0; } -configure:1404: checking for executable suffix -configure:1414: gcc -o conftest -g -O2 conftest.c 1>&5 -configure:1435: checking for object suffix -configure:1441: gcc -c -g -O2 conftest.c 1>&5 -configure:1459: checking lex output file root -configure:1480: checking whether yytext is a pointer -configure:1499: gcc -o conftest.exe -g -O2 conftest.c -lfl 1>&5 -configure:1523: checking whether #! works in shell scripts -configure:1545: checking whether yyrestart() is needed -configure:1559: gcc -c -g -O2 conftest.c 1>&5 -In file included from configure:1552: -:3: error: conflicting types for 'yyrestart' -lexyy.c:1064: error: previous definition of 'yyrestart' was here -configure: failed program was: -#line 1551 "configure" -#include "confdefs.h" -#include "lexyy.c" - -int main() { -exit(0); -; return 0; } -configure:1587: checking return type of signal handlers -configure:1609: gcc -c -g -O2 conftest.c 1>&5 -configure:1630: checking for gettimeofday -configure:1658: gcc -o conftest.exe -g -O2 conftest.c 1>&5 -configure:1630: checking for gethrtime -configure:1658: gcc -o conftest.exe -g -O2 conftest.c 1>&5 -c:\djgpp\tmp/ccgmBLT8.o: In function `main': -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/configure:1652: undefined reference to `_gethrtime' -collect2: ld returned 1 exit status -configure: failed program was: -#line 1635 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethrtime(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethrtime(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethrtime) || defined (__stub___gethrtime) -choke me -#else -gethrtime(); -#endif - -; return 0; } -configure:1630: checking for strdup -configure:1658: gcc -o conftest.exe -g -O2 conftest.c 1>&5 -configure:1630: checking for strtol -configure:1658: gcc -o conftest.exe -g -O2 conftest.c 1>&5 -configure:1630: checking for strtoul -configure:1658: gcc -o conftest.exe -g -O2 conftest.c 1>&5 diff --git a/config.sh b/config.sh index 04ebb4c..050b252 100755 --- a/config.sh +++ b/config.sh @@ -1,26 +1,697 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.61. # +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi -# Defaults: -ac_help= +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="src/abcess.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +YACC +YFLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +RANLIB +INSTALLINFO +MANDB +CPP +GREP +EGREP +LEX +LEX_OUTPUT_ROOT +LEXLIB +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +YACC +YFLAGS +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,94 +700,117 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,116 +819,77 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -248,26 +903,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +939,17 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +959,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +970,53 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -367,427 +1027,1496 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done +test "$silent" = yes && exec 6>/dev/null -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=src/abcess.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} done -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi +Usage: $0 [OPTION]... [VAR=VALUE]... +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. +Defaults for the options are specified in brackets. +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Some influential environment variables: + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -PACKAGE_VERSION=0.27 + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_config_headers="$ac_config_headers temp/config.h:src/configh.in" + + +PACKAGE_VERSION=0.27 for ac_prog in 'bison -y' byacc do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:534: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" +done +done +IFS=$as_save_IFS + fi fi -YACC="$ac_cv_prog_YACC" +YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -test -n "$YACC" && break + + test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" -# Extract the first word of "gcc", so it can be a program name with args. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:572: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +done +done +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + + fi +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:607: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +done +done +IFS=$as_save_IFS + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:663: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +done +done +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - ;; - esac + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 711 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" else - ac_cv_prog_cc_cross=yes + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + ac_file='' fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:747: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done else - ac_cv_prog_gcc=no + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes else - GCC= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:775: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -801,247 +2530,771 @@ else CFLAGS= fi fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:809: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - ac_cv_prog_LEX="flex" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" +done +done +IFS=$as_save_IFS + fi fi -LEX="$ac_cv_prog_LEX" -if test -n "$LEX"; then - echo "$ac_t""$LEX" 1>&6 +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +for ac_prog in install-info +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_INSTALLINFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$INSTALLINFO"; then + ac_cv_prog_INSTALLINFO="$INSTALLINFO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_INSTALLINFO="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +INSTALLINFO=$ac_cv_prog_INSTALLINFO +if test -n "$INSTALLINFO"; then + { echo "$as_me:$LINENO: result: $INSTALLINFO" >&5 +echo "${ECHO_T}$INSTALLINFO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$INSTALLINFO" && break +done +test -n "$INSTALLINFO" || INSTALLINFO=":" + +for ac_prog in mandb +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_MANDB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$MANDB"; then + ac_cv_prog_MANDB="$MANDB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANDB="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MANDB=$ac_cv_prog_MANDB +if test -n "$MANDB"; then + { echo "$as_me:$LINENO: result: $MANDB" >&5 +echo "${ECHO_T}$MANDB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$MANDB" && break +done +test -n "$MANDB" || MANDB=":" + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue else - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -if test -z "$LEXLIB" -then - case "$LEX" in - flex*) ac_lib=fl ;; - *) ac_lib=l ;; - esac - echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:848: checking for yywrap in -l$ac_lib" >&5 -ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-l$ac_lib $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + fi -rm -f conftest* -LIBS="$ac_save_LIBS" +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LEXLIB="-l$ac_lib" + else - echo "$ac_t""no" 1>&6 + ac_cv_path_GREP=$GREP fi + fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:892: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_test_flag="-f" - if ! test -z "$COMSPEC$ComSpec"; then - ac_test_flag="-x" - IFS="${PATH_SEPARATOR-;}" - fi - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test $ac_test_flag $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:927: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi - CPP="$ac_cv_prog_CPP" + else - ac_cv_prog_CPP="$CPP" + ac_cv_path_EGREP=$EGREP fi -echo "$ac_t""$CPP" 1>&6 -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1007: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1050,16 +3303,19 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1068,466 +3324,1489 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi -for ac_hdr in sys/time.h unistd.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1114: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in sys/time.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1152: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for long long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long long int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; } -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long long int" >&5 +echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; } -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; } -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; } +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi -; return 0; } -EOF -if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` fi -echo $ac_n "checking size of long long int""... $ac_c" 1>&6 -echo "configure:1227: checking size of long long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_long_long_int=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long_int=0 + fi ;; +esac else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef long long int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long int)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; } -EOF -if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_long_int=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long_int=`cat conftest.val` else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long_int=0 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_long_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long_int=0 + fi fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - +rm -f conftest.val fi -echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int -EOF +_ACEOF + + +{ echo "$as_me:$LINENO: checking for _Bool" >&5 +echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } +if test "${ac_cv_type__Bool+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef _Bool ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type__Bool=no +fi -echo $ac_n "checking size of _Bool""... $ac_c" 1>&6 -echo "configure:1266: checking size of _Bool" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof__Bool'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +echo "${ECHO_T}$ac_cv_type__Bool" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of _Bool" >&5 +echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; } +if test "${ac_cv_sizeof__Bool+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - ac_cv_sizeof__Bool=0 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(_Bool)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; } -EOF -if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof__Bool=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof__Bool=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -fr conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof__Bool=$ac_lo;; +'') if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (_Bool) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof__Bool=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef _Bool ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof__Bool=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (_Bool) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof__Bool=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -echo "$ac_t""$ac_cv_sizeof__Bool" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } + + + +cat >>confdefs.h <<_ACEOF #define SIZEOF__BOOL $ac_cv_sizeof__Bool -EOF +_ACEOF -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1305: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no fi -echo "$ac_t""$ac_cv_header_time" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 -EOF +_ACEOF fi -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1340: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1373: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi -rm -f conftest* -rm -f conftest* +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1404: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ (ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } fi fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1435: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS -echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:1459: checking lex output file root" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # The minimal lex program is just a single line: %%. But some broken lexes -# (Solaris, I think it was) want two %% lines, so accommodate them. -echo '%% -%%' | $LEX -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi -echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:1480: checking whether yytext is a pointer" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since +# default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -ac_save_LIBS="$LIBS" -LIBS="$LIBS $LEXLIB" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` -int main() { - -; return 0; } -EOF -if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_prog_lex_yytext_pointer=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -LIBS="$ac_save_LIBS" -rm -f "${LEX_OUTPUT_ROOT}.c" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 -EOF +_ACEOF fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c -# Pull the hash mark out of the macro call to avoid m4 problems. -ac_msg="whether #! works in shell scripts" -echo $ac_n "checking $ac_msg""... $ac_c" 1>&6 -echo "configure:1523: checking $ac_msg" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +{ echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 +echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6; } +if test "${ac_cv_sys_interpreter+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else echo '#! /bin/cat exit 69 -' > conftest +' >conftest chmod u+x conftest -(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1) if test $? -ne 69; then ac_cv_sys_interpreter=yes else @@ -1535,505 +4814,1335 @@ else fi rm -f conftest fi - -echo "$ac_t""$ac_cv_sys_interpreter" 1>&6 -interpval="$ac_cv_sys_interpreter" +{ echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 +echo "${ECHO_T}$ac_cv_sys_interpreter" >&6; } +interpval=$ac_cv_sys_interpreter -echo $ac_n "checking whether yyrestart() is needed""... $ac_c" 1>&6 -echo "configure:1545: checking whether yyrestart() is needed" >&5 +{ echo "$as_me:$LINENO: checking whether yyrestart() is needed" >&5 +echo $ECHO_N "checking whether yyrestart() is needed... $ECHO_C" >&6; } # Write a lex program that will cause an error if yyrestart exists. echo '%% %% float yyrestart(int, ...);' | $LEX -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "${LEX_OUTPUT_ROOT}.c" -int main() { +int +main () +{ exit(0); -; return 0; } -EOF -if { (eval echo configure:1559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >>confdefs.h <<\_ACEOF #define NEED_YYRESTART 1 -EOF +_ACEOF -echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f ${LEX_OUTPUT_ROOT}.c if test "$interpval" != "no"; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_INTERPRETER 1 -EOF +_ACEOF fi -cat >> confdefs.h <>confdefs.h <<_ACEOF #define EXEEXT "$EXEEXT" -EOF +_ACEOF -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1587: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF + + + + + for ac_func in gettimeofday gethrtime strdup strtol strtoul do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1630: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -int main() { +#undef $ac_func +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -trap '' 1 2 15 -cat > confcache <<\EOF +ac_config_files="$ac_config_files Makefile temp/coopt.sh:src/cooptsh.in" + +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi +DEFS=-DHAVE_CONFIG_H -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -DEFS=-DHAVE_CONFIG_H +LTLIBOBJS=$ac_ltlibobjs -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +fi -ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile temp/coopt.sh:src/cooptsh.in temp/config.h:src/configh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@YACC@%$YACC%g -s%@CC@%$CC%g -s%@LEX@%$LEX%g -s%@LEXLIB@%$LEXLIB%g -s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g -s%@EXEEXT@%$EXEEXT%g -s%@OBJEXT@%$OBJEXT%g -s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g -s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + PATH_SEPARATOR=: fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L else - ac_dir_suffix= ac_dots= + as_ls_L_option= fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + shift +done + +ac_configure_extra_args= +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "temp/config.h") CONFIG_HEADERS="$CONFIG_HEADERS temp/config.h:src/configh.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "temp/coopt.sh") CONFIG_FILES="$CONFIG_FILES temp/coopt.sh:src/cooptsh.in" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. # -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +RANLIB!$RANLIB$ac_delim +INSTALLINFO!$INSTALLINFO$ac_delim +MANDB!$MANDB$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LEX!$LEX$ac_delim +LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 57; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' -rm -f conftest.tail while : do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file fi - rm -f $ac_file - mv conftest.h $ac_file + else + echo "/* $configure_input */" + cat "$ac_result" fi -fi; done + rm -f "$tmp/out12" + ;; -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + esac + +done # for ac_tag -exit 0 -EOF + +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +chmod a+x temp/coopt.sh diff --git a/config.status b/config.status deleted file mode 100755 index 5c8efdd..0000000 --- a/config.status +++ /dev/null @@ -1,284 +0,0 @@ -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host : -# -# config.sh -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" -for ac_option -do - case "$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running ${CONFIG_SHELL-/bin/sh} config.sh --no-create --no-recursion" - exec ${CONFIG_SHELL-/bin/sh} config.sh --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "./config.status generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "$ac_cs_usage"; exit 0 ;; - *) echo "$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=. - -trap 'rm -fr Makefile temp/coopt.sh temp/config.h conftest*; exit 1' 1 2 15 - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF -/^[ ]*VPATH[ ]*=[^:]*$/d - -s%@SHELL@%/dev/env/DJDIR/bin/sh.exe%g -s%@CFLAGS@%-g -O2%g -s%@CPPFLAGS@%%g -s%@CXXFLAGS@%%g -s%@FFLAGS@%%g -s%@DEFS@%-DHAVE_CONFIG_H%g -s%@LDFLAGS@%%g -s%@LIBS@%%g -s%@exec_prefix@%${prefix}%g -s%@prefix@%/dev/env/DJDIR%g -s%@program_transform_name@%s,x,x,%g -s%@bindir@%${exec_prefix}/bin%g -s%@sbindir@%${exec_prefix}/sbin%g -s%@libexecdir@%${exec_prefix}/libexec%g -s%@datadir@%${prefix}/share%g -s%@sysconfdir@%${prefix}/etc%g -s%@sharedstatedir@%${prefix}/com%g -s%@localstatedir@%${prefix}/var%g -s%@libdir@%${exec_prefix}/lib%g -s%@includedir@%${prefix}/include%g -s%@oldincludedir@%/usr/include%g -s%@infodir@%${prefix}/info%g -s%@mandir@%${prefix}/man%g -s%@YACC@%bison -y%g -s%@CC@%gcc%g -s%@LEX@%flex%g -s%@LEXLIB@%-lfl%g -s%@RANLIB@%ranlib%g -s%@CPP@%gcc -E%g -s%@EXEEXT@%.exe%g -s%@OBJEXT@%o%g -s%@LEX_OUTPUT_ROOT@%lexyy%g -s%@PACKAGE_VERSION@%0.27%g - -CEOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi - -CONFIG_FILES=${CONFIG_FILES-"Makefile temp/coopt.sh:src/cooptsh.in"} -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then - CONFIG_HEADERS="temp/config.h:src/configh.in" -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - - cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - - - -exit 0 diff --git a/configdj.sh b/configdj.sh new file mode 100755 index 0000000..6a7bd2a --- /dev/null +++ b/configdj.sh @@ -0,0 +1,2080 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/abcess.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + +PACKAGE_VERSION=0.27 + +for ac_prog in 'bison -y' byacc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:534: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +YACC="$ac_cv_prog_YACC" +if test -n "$YACC"; then + echo "$ac_t""$YACC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:572: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:607: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:663: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 711 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:747: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:775: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:809: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +for ac_prog in install-info +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:846: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_INSTALLINFO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$INSTALLINFO"; then + ac_cv_prog_INSTALLINFO="$INSTALLINFO" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_INSTALLINFO="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +INSTALLINFO="$ac_cv_prog_INSTALLINFO" +if test -n "$INSTALLINFO"; then + echo "$ac_t""$INSTALLINFO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$INSTALLINFO" && break +done +test -n "$INSTALLINFO" || INSTALLINFO=":" + + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:884: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:964: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +for ac_hdr in sys/time.h unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1071: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1109: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking size of long long int""... $ac_c" 1>&6 +echo "configure:1184: checking size of long long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long_long_int=0 +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long int)); + exit(0); +} +EOF +if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1223: checking size of _Bool" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof__Bool'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof__Bool=0 +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(_Bool)); + exit(0); +} +EOF +if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof__Bool=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof__Bool=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof__Bool" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1262: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:1297: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1330: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1361: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:1392: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1418: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_test_flag="-f" + if ! test -z "$COMSPEC$ComSpec"; then + ac_test_flag="-x" + IFS="${PATH_SEPARATOR-;}" + fi + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test $ac_test_flag $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$LEXLIB" +then + case "$LEX" in + flex*) ac_lib=fl ;; + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +echo "configure:1457: checking for yywrap in -l$ac_lib" >&5 +ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$ac_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LEXLIB="-l$ac_lib" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +echo "configure:1499: checking lex output file root" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } +fi +fi + +echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +echo "configure:1520: checking whether yytext is a pointer" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS="$LIBS" +LIBS="$LIBS $LEXLIB" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi + +echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + cat >> confdefs.h <<\EOF +#define YYTEXT_POINTER 1 +EOF + +fi + +# Pull the hash mark out of the macro call to avoid m4 problems. +ac_msg="whether #! works in shell scripts" +echo $ac_n "checking $ac_msg""... $ac_c" 1>&6 +echo "configure:1563: checking $ac_msg" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo '#! /bin/cat +exit 69 +' > conftest +chmod u+x conftest +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) +if test $? -ne 69; then + ac_cv_sys_interpreter=yes +else + ac_cv_sys_interpreter=no +fi +rm -f conftest +fi + +echo "$ac_t""$ac_cv_sys_interpreter" 1>&6 +interpval="$ac_cv_sys_interpreter" + + +echo $ac_n "checking whether yyrestart() is needed""... $ac_c" 1>&6 +echo "configure:1585: checking whether yyrestart() is needed" >&5 +# Write a lex program that will cause an error if yyrestart exists. +echo '%% +%% +float yyrestart(int, ...);' | $LEX +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""no" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define NEED_YYRESTART 1 +EOF + +echo "$ac_t""yes" 1>&6 +fi +rm -f conftest* +rm -f ${LEX_OUTPUT_ROOT}.c + +if test "$interpval" != "no"; then +cat >> confdefs.h <<\EOF +#define HAVE_SYS_INTERPRETER 1 +EOF + +fi +cat >> confdefs.h <&6 +echo "configure:1627: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1670: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "Makefile temp/coopt.sh:src/cooptsh.in temp/config.h:src/configh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@YACC@%$YACC%g +s%@CC@%$CC%g +s%@RANLIB@%$RANLIB%g +s%@INSTALLINFO@%$INSTALLINFO%g +s%@CPP@%$CPP%g +s%@EXEEXT@%$EXEEXT%g +s%@OBJEXT@%$OBJEXT%g +s%@LEX@%$LEX%g +s%@LEXLIB@%$LEXLIB%g +s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g +s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/doc/Makefile b/doc/Makefile index bb7e830..1f39f72 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,83 +1,92 @@ -# -# Makefile for the Intercal documentation -# - -# Making the original manual: -# To see the Revised Manual, generate intercal.txt or intercal.ps -# To see the original INTERCAL-72 manual, generate original.txt or original.ps. - -# Making the Revamped Manual: -# generate ick.inf, ickhtml (will be placed into a directory), -# ick.htm (all in one file), or ick.txt. - -# We make two passes in order to resolve SETR/GETNH references. -# The sed hackery strips the trailing dots from level 1 section references. - -x.txt: x.mm - groff -dc=y -Tascii -p -t -mm x.mm >x.txt - - -all: allorig allnew - -allorig: intercal.ps intercal.txt original.ps original.txt - -allnew: ick.inf ickhtml ick.htm ick.txt - -intercal.ps: intercal.mm - groff -dc=y -Tps -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=y -Tps -p -t -mm intercal.mm >intercal.ps - rm intercal.refs.qrf - -original.ps: intercal.mm - groff -dc=n -Tps -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=n -Tps -p -t -mm intercal.mm >original.ps - rm intercal.refs.qrf - -intercal.txt: intercal.mm - groff -dc=y -Tascii -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=y -Tascii -p -t -mm intercal.mm >intercal.txt - rm intercal.refs.qrf - -original.txt: intercal.mm - groff -dc=n -Tascii -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=n -Tascii -p -t -mm intercal.mm >original.txt - rm intercal.refs.qrf - -clean: - rm -f *.ps *.txt *.refs* ick.info ick.txt - rm -rf html - -ick.inf: ick.txi gpl-2-0.txi fdl-1-2.txi - -makeinfo --force -o ick.inf ick.txi - -# The --css-include is skipped here because it seems to cause makeinfo -# to leak open file space, and it fails with an EMFILE error. Instead, -# fix83.pl (which changes filenames to 8.3 format, among other things) -# is used to add the styling. -ickhtml: ick.txi ickstyle.css gpl-2-0.txi fdl-1-2.txi - rm -rf html - -makeinfo --force --html -o html ick.txi - ls -1 html | perl -w fix83.pl | sh - perl -i.tmp -w fix83.pl html/*.htm - rm html/*.tmp - -# fixtoc.pl is used here to reformat the TOC to look good under the -# multiple-part system (which makeinfo doesn't really know about). -ick.htm: ick.txi ickstyle.css gpl-2-0.txi fdl-1-2.txi - -makeinfo --force --html --no-split --no-header --css-include=ickstyle.css -D notsplit -o ick.htm ick.txi - -perl -i.tmp -w fixtoc.pl ick.htm - rm ick*.tmp - chmod u+w ick.htm -# For some reason, ick.htm comes out of this readonly sometimes, which -# is why the chmod seems to be needed. No idea why, though. - -ick.txt: ick.txi gpl-2-0.txi fdl-1-2.txi - -makeinfo --force --plaintext -D notsplit -o ick.txt ick.txi +# +# Makefile for the Intercal documentation +# + +# Making the original manual: +# To see the Revised Manual, generate intercal.txt or intercal.ps +# To see the original INTERCAL-72 manual, generate original.txt or original.ps. + +# Making the Revamped Manual: +# generate ick.inf, ickhtml (will be placed into a directory), +# ick.htm (all in one file), ick.pdf, or ick.txt. + +# We make two passes in order to resolve SETR/GETNH references. +# The sed hackery strips the trailing dots from level 1 section references. + +x.txt: x.mm + groff -dc=y -Tascii -p -t -mm x.mm >x.txt + +all: allorig allnew + +allorig: intercal.ps intercal.txt original.ps original.txt + +allnew: ick.inf ickhtml ick.htm ick.txt ick.pdf + +intercal.ps: intercal.mm + groff -dc=y -Tps -p -t -mm intercal.mm >intercal.refs.tmp + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=y -Tps -p -t -mm intercal.mm >intercal.ps + -rm intercal.refs.qrf + +original.ps: intercal.mm + groff -dc=n -Tps -p -t -mm intercal.mm >intercal.refs.tmp + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=n -Tps -p -t -mm intercal.mm >original.ps + -rm intercal.refs.qrf + +intercal.txt: intercal.mm + groff -dc=y -Tascii -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + GROFF_NO_SGR=1 groff -dc=y -Tascii -p -t -mm intercal.mm >intercal.txt + -rm intercal.refs.qrf + +original.txt: intercal.mm + groff -dc=n -Tascii -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + GROFF_NO_SGR=1 groff -dc=n -Tascii -p -t -mm intercal.mm >original.txt + -rm intercal.refs.qrf + +clean: + rm -f *.ps *.txt *.refs* ick.inf ick.txt ick.htm ick.pdf + rm -rf html + +ick.inf: ick.txi fdl-1-2.txi + makeinfo -o ick.inf ick.txi + +# The --css-include is skipped here because it seems to cause makeinfo +# to leak open file space, and it fails with an EMFILE error. Instead, +# fix83.pl (which changes filenames to 8.3 format, among other things) +# is used to add the styling. Tidy is run to clean up the output if +# available, but if it isn't, that isn't a problem; there will just be +# a harmless warning. +ickhtml:html/index.htm + +html/index.htm: ick.txi ickstyle.css fdl-1-2.txi tidy.cfg + rm -rf html + makeinfo --html -o html ick.txi + ls -1 html | perl -w fix83.pl | sh + perl -i.tmp -w fix83.pl html/*.htm + chmod u+w html/*.htm + -tidy -config tidy.cfg -m html/*.htm || : + rm html/*.tmp + +# fixtoc.pl is used here to reformat the TOC to look good under the +# multiple-part system (which makeinfo doesn't really know about). +ick.htm: ick.txi ickstyle.css fdl-1-2.txi tidy.cfg + makeinfo --html --no-split --no-header --css-include=ickstyle.css -D notsplit -o ick.htm ick.txi + -perl -i.tmp -w fixtoc.pl ick.htm + rm ick*.tmp + chmod u+w ick.htm + -tidy -config tidy.cfg -m ick.htm || : + +# For some reason, ick.htm comes out of this readonly sometimes, which +# is why the chmod seems to be needed. No idea why, though. + +ick.txt: ick.txi fdl-1-2.txi + makeinfo --plaintext -D notsplit -o ick.txt ick.txi +ick.pdf: ick.txi fdl-1-2.txi + -texi2dvi -b -c -e -p -q ick.txi diff --git a/doc/convickt.1 b/doc/convickt.1 new file mode 100644 index 0000000..f052ac8 --- /dev/null +++ b/doc/convickt.1 @@ -0,0 +1,77 @@ +.TH CONVICKT 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.\" +.\" Created by Alex Smith; licensed under GNU GPL v2 or later. +.SH NAME +convickt \- convert INTERCAL files between formats +.SH SYNOPSIS +.B convickt +.I "incharset outcharset [paddingrule]" +.SH "DESCRIPTION" +This manual page describes the +.BR convickt +command. +Fuller documentation is available via the command +.B info convickt +. +.PP +.B convickt +converts INTERCAL programs from one character set to another; it takes +input from standard input and sends its output to standard output. +.SH OPTIONS +For +.I incharset +and +.I outcharset +.TP +.B atari +Interpret the input as being ASCII-7 Atari syntax INTERCAL, as is used +by the Atari INTERCAL-72 compiler, J-INTERCAL, and C-INTERCAL default +syntax, or output in that syntax. +.TP +.B baudot +Interpret the input as being in CLC-INTERCAL's extended Baudot +syntax, or output in that syntax. +.TP +.B ebcdic +Interpret the input as being in the CLC-INTERCAL dialect of EBCDIC, or +output in that syntax. +.TP +.B latin1 +Interpret the input as being Latin-1 Princeton syntax INTERCAL, as is +used by default by CLC-INTERCAL and also readable by C-INTERCAL with +the +.B \-X +switch, or output in that syntax. +.PP +For +.I paddingrule +.TP +.B zero +Pad the irrelevant bits in ASCII-7 and Baudot output with zeros. +.TP +.B printable +Set the values of the irrelevant bits in ASCII-7 and Baudot output to +try to cause the output to stay within character range 32-126. This +option is the default. (Note that +.I paddingrule +is irrelevant for 8-bit character sets like Latin-1 and EBCDIC). +.TP +.B random +Pad the irrelevant bits in ASCII-7 and Baudot output with random data, +except that outputing an all-bits-zero octet is avoided. +.SH CAVEATS +Not all conversions are possible, due to the character sets having +different characters available. In most cases, an unconvertible or +invalid character will be converted to a 0 (padded appropriately); the +exception is that if a tab cannot be converted, it will instead be +converted to a single space (so that INTERCAL programs still run if +converted to Baudot). Using +.B atari +as an input or output character set will literally convert characters +which differ between Atari and Princeton syntax without checking to +see whether they are being used as operators or not. +.SH AUTHOR +.B convickt +and this manual page were written by Alex Smith. diff --git a/doc/fixtoc.pl b/doc/fixtoc.pl index 51ef879..1eadd40 100755 --- a/doc/fixtoc.pl +++ b/doc/fixtoc.pl @@ -4,14 +4,13 @@ # H2 entry. my $f=1; -my $g=1; while(<>) { $f and /
    / and do{$f=0; next;}; /^
  • ]*>C-INTERCAL / and next; - s%^
  • ]*>(PART .*?)%($g?($g=0,''):"
")."

$1

    "%e; - last if $_ eq "\n"; + s%^
  • ]*>(PART .*?)%

$1

    %; print; + last if $_ eq "\n"; } while(<>) {print;} diff --git a/doc/gpl-2-0.txi b/doc/gpl-2-0.txi deleted file mode 100644 index 8391c38..0000000 --- a/doc/gpl-2-0.txi +++ /dev/null @@ -1,389 +0,0 @@ -@c The GNU General Public License. -@center Version 2, June 1991 - -@c This file is intended to be included within another document, -@c hence no sectioning command or @node. - -@display -Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. -@end display - -@heading Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software---to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - -@heading TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -@enumerate 0 -@item -This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The ``Program'', below, -refers to any such program or work, and a ``work based on the Program'' -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term ``modification''.) Each licensee is addressed as ``you''. - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -@item -You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -@item -You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -@enumerate a -@item -You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -@item -You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -@item -If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) -@end enumerate - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -@item -You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -@enumerate a -@item -Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -@item -Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -@item -Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) -@end enumerate - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -@item -You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -@item -You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -@item -Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -@item -If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -@item -If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -@item -The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and ``any -later version'', you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -@item -If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - -@iftex -@heading NO WARRANTY -@end iftex -@ifinfo -@center NO WARRANTY - -@end ifinfo - -@item -BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -@item -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. -@end enumerate - -@iftex -@heading END OF TERMS AND CONDITIONS -@end iftex -@ifinfo -@center END OF TERMS AND CONDITIONS - -@end ifinfo - -@page -@heading Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the ``copyright'' line and a pointer to where the full notice is found. - -@smallexample -@var{one line to give the program's name and a brief idea of what it does.} -Copyright (C) @var{yyyy} @var{name of author} - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -@end smallexample - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -@smallexample -Gnomovision version 69, Copyright (C) @var{year} @var{name of author} -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. -@end smallexample - -The hypothetical commands @samp{show w} and @samp{show c} should show -the appropriate parts of the General Public License. Of course, the -commands you use may be called something other than @samp{show w} and -@samp{show c}; they could even be mouse-clicks or menu items---whatever -suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a ``copyright disclaimer'' for the program, if -necessary. Here is a sample; alter the names: - -@example -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -@var{signature of Ty Coon}, 1 April 1989 -Ty Coon, President of Vice -@end example - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/doc/ick.1 b/doc/ick.1 new file mode 100644 index 0000000..3a0c7a6 --- /dev/null +++ b/doc/ick.1 @@ -0,0 +1,132 @@ +.TH ICK 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.\" +.\" Modified by Alex Smith under the terms of the GPL. +.SH NAME +ick \- INTERCAL compiler +.SH SYNOPSIS +.B ick +.I "[options] file" +.SH "DESCRIPTION" +This manual page documents briefly the +.BR ick +command. +This manual page was originally written for the Debian GNU/Linux +distribution (but may be used by others), because the original program +did not have a manual page, and was then added back to the main +distribution. +Fuller documentation is available via the command +.B info ick +(for the +.B ick +command itself; even fuller documentation is available via +.B info C-INTERCAL +(which contains the documentation for both the compiler and the +INTERCAL language)). +.\"Comment this back in on Debian: +.\"There is also other documentation in +.\".B /usr/share/doc/intercal +.\"and +.\".B /usr/share/doc/intercal/examples +.\"as one would expect on a Debian system. +.PP +.B ick +takes INTERCAL programs and generates code from them (by running gcc). +.PP +Note that the base in which a program is written is deduced from its +extension; INTERCAL programs in base 2 must have the extension .i, +INTERCAL programs in bases from 3 to 7 must have an extension from .3i +to .7i respectively. +.SH OPTIONS +.TP +.B \-c +Compile INTERCAL to C, but don't compile the resulting C. +.TP +.B \-d +Print yacc debugging information (implies -c). +.TP +.B \-t +Requires strict INTERCAL-72 compliance (rejecting COME FROM, the extensions +for bases other than two, and other features not found in INTERCAL-72). +.TP +.B \-b +Disables the INTERCAL-72 random-bug feature. +.TP +.B \-O +Attempt to optimize expressions in the generated code. +.TP +.B \-C +Clockface output (using IIII rather than IV in Roman numerals). +.TP +.B \-f +Optimize control flow in generated code (prevents -yp). +.TP +.B \-F +Optimize everything in generated code for +speed, regardless of how slow the compiler becomes or how +large the object file becomes. Implies -fO, prevents -cdghpyH. +.TP +.B \-h +Print optimizer debugging information (implies -cO). +.TP +.B \-H +Print verbose optimizer debugging information (implies -cO). +.TP +.B \-hH +Print optimizer debugging information in a different form (implies -cO). +.TP +.B \-y +Run the yuk debugger on the code (prevents -fm). +.TP +.B \-p +Run the yuk profiler on the code (prevents -fm). +.TP +.B \-m +Allow multithreading and backtracking (prevents -yp). +.TP +.B \-v +Allow anything on the left of an assignment, and turn off the +protection that constants otherwise have against being assigned to +(prevents -fFOP). +.TP +.B \-P +Compile PIC-INTERCAL rather than INTERCAL (prevents -mFvx, implies -cfO). +.TP +.B \-o +Output to stdout rather than .c (implies -c). +.TP +.B \-X +Interpret ambiguous syntax such as ? and @ with Princeton meanings (as +used by CLC-INTERCAL), rather than with the default Atari meanings. +.TP +.B \-x +Use CLC-INTERCAL rules for text I/O and for abstaining from a GIVE UP +by label (prevents -P). +.TP +.B \-u +Print a message whenever the compiler tries to open a file. +.TP +.B \-U +Dump core on E778 as well as printing an error. +.TP +.B \-g +Leave the generated C in place, and make the output executable +debuggable. +.TP +.B \-l +Attempt to report likely bugs and nonportabilities (implies -O). +.SH "SEE ALSO" +The newsgroup +.B alt.lang.intercal +is where INTERCAL compilers are announced, and INTERCAL itself is +discussed; the website +.B http://intercal.freeshell.org +is where the most recent versions of C-INTERCAL (and also +CLC-INTERCAL) are currently hosted. +. +.SH AUTHOR +.B ick +was written by Eric S. Raymond. +This manual page was originally written by Mark W. Eichin +, for the Debian GNU/Linux system. diff --git a/doc/ick.log b/doc/ick.log new file mode 100644 index 0000000..6a6616d --- /dev/null +++ b/doc/ick.log @@ -0,0 +1,244 @@ +This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdfetex 2007.12.14) 20 DEC 2007 21:59 +entering extended mode + file:line:error style messages enabled. + %&-line parsing enabled. +**\nonstopmode \input /tmp/t2d16537/src/ick.txi +(/tmp/t2d16537/src/ick.txi (/usr/share/texmf/tex/texinfo/texinfo.tex +Loading texinfo [version 2006-02-13.16]: Basics, +\bindingoffset=\dimen16 +\normaloffset=\dimen17 +\pagewidth=\dimen18 +\pageheight=\dimen19 +\outerhsize=\dimen20 +\outervsize=\dimen21 +\cornerlong=\dimen22 +\cornerthick=\dimen23 +\topandbottommargin=\dimen24 +\headlinebox=\box16 +\footlinebox=\box17 +\margin=\insert252 +\EMsimple=\toks13 +\groupbox=\box18 +\groupinvalidhelp=\toks14 +\mil=\dimen25 +\exdentamount=\skip18 +\inmarginspacing=\skip19 + pdf, +\tempnum=\count27 +\lnkcount=\count28 +\filename=\toks15 +\filenamelength=\count29 +\pgn=\count30 +\toksA=\toks16 +\toksB=\toks17 +\toksC=\toks18 +\toksD=\toks19 +\boxA=\box19 +\countA=\count31 + +(/usr/share/texmf-texlive/tex/plain/misc/pdfcolor.tex) fonts, +\sffam=\fam8 +\textleading=\dimen26 +\fontdepth=\count32 + page headings, +\titlepagetopglue=\skip20 +\titlepagebottomglue=\skip21 +\evenheadline=\toks20 +\oddheadline=\toks21 +\evenfootline=\toks22 +\oddfootline=\toks23 + +tables, +\tableindent=\dimen27 +\itemindent=\dimen28 +\itemmargin=\dimen29 +\itemmax=\dimen30 +\itemno=\count33 +\multitableparskip=\skip22 +\multitableparindent=\skip23 +\multitablecolspace=\dimen31 +\multitablelinespace=\skip24 +\colcount=\count34 +\everytab=\toks24 + conditionals, +\doignorecount=\count35 + indexing, +\secondaryindent=\skip25 +\partialpage=\box20 +\doublecolumnhsize=\dimen32 + sectioning, +\unnumberedno=\count36 +\chapno=\count37 +\secno=\count38 +\subsecno=\count39 +\subsubsecno=\count40 +\appendixno=\count41 +\absseclevel=\count42 +\secbase=\count43 +\chapheadingskip=\skip26 +\secheadingskip=\skip27 +\subsecheadingskip=\skip28 + toc, +\tocfile=\write0 +\contentsrightmargin=\skip29 +\savepageno=\count44 +\lastnegativepageno=\count45 +\tocindent=\dimen33 + environments, +\errorbox=\box21 +\lispnarrowing=\skip30 +\envskipamount=\skip31 +\circthick=\dimen34 +\cartouter=\dimen35 +\cartinner=\dimen36 +\normbskip=\skip32 +\normpskip=\skip33 +\normlskip=\skip34 +\lskip=\skip35 +\rskip=\skip36 +\tabw=\dimen37 + defuns, +\defbodyindent=\skip37 +\defargsindent=\skip38 +\deflastargmargin=\skip39 +\parencount=\count46 +\brackcount=\count47 + macros, +\paramno=\count48 +\macname=\toks25 + +cross references, +\auxfile=\write1 +\savesfregister=\count49 + insertions, +\footnoteno=\count50 +\SAVEfootins=\box22 +\SAVEmargin=\box23 +\noepsfhelp=\toks26 + localization, +\nolanghelp=\toks27 +\defaultparindent=\dimen38 + +and turning on texinfo input format.) +\openout1 = `ick.aux'. + +@cpindfile=@write2 +@fnindfile=@write3 +@vrindfile=@write4 +@tpindfile=@write5 +@kyindfile=@write6 +@pgindfile=@write7 + (/usr/share/texmf/tex/texinfo/txi-en.tex) +@opindfile=@write8 +@erindfile=@write9 +[1 +\openout2 = `ick.cp'. + +\openout3 = `ick.fn'. + +\openout4 = `ick.vr'. + +\openout5 = `ick.tp'. + +\openout6 = `ick.ky'. + +\openout7 = `ick.pg'. + +\openout8 = `ick.op'. + +\openout9 = `ick.er'. + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [-1] +(@xeatspaces {PART I: THE @cic {} COMPILER}) +\openout0 = `ick.toc'. + + Chapter 1 [1] [2] +Cross reference values unknown; you must run TeX again. [3] [4] [5] [6] +[7] +Underfull \hbox (badness 10000) in paragraph at lines 706--710 + []@textrm If cre-at-ing the dis-tri-bu-tion un-der DJGPP, run @texttt etc/ctrl +mfix.bat[] @textrm or + +@hbox(7.60416+2.12917)x433.62, glue set 5.52025 +.@glue(@leftskip) 21.68121 +.@hbox(7.05666+0.0)x0.0, glue set - 15.74411fil +..@glue 0.0 plus 1.0fil minus 1.0fil +..@textrm 8 +..@textrm . +..@kern 7.22743 +.@textrm I +.@textrm f +.@glue 3.65 plus 1.825 minus 1.21666 +.etc. + + +Underfull \hbox (badness 5345) in paragraph at lines 706--710 + @texttt etc/ctrlmfix.sh[]@textrm , even if you man-aged to con-fig-ure; this w +ill sort out + +@hbox(7.60416+2.12917)x433.62, glue set 3.77089 +.@glue(@leftskip) 21.68121 +.@texttt e +.@texttt t +.@texttt c +.@texttt / +.etc. + +Chapter 2 [8] [9] [10] [11] [12] [13] Chapter 3 [14] [15] +Underfull \hbox (badness 2189) in paragraph at lines 1430--1431 + []@textrm SAYING 'ABRA-CADABRA' WITH-OUT A MAGIC WAND + +@hbox(7.60416+0.0)x433.62, glue set 2.80086 +.@glue(@leftskip) 86.72375 +.@hbox(0.0+0.0)x0.0 +.@textrm S +.@textrm A +.@kern-0.91252 +.etc. + +[16] +/tmp/t2d16537/src/ick.txi:1569: Undefined control sequence. +l.1569 @ienachor + E252 +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. + +[17] [18] [19] [20] [21] [22] [23] Chapter 4 [24] [25] +(@xeatspaces {PART II: THE @ical {} LANGUAGE}) [26] [27] Chapter 5 [28] +[29] [30] [31] Chapter 6 [32] [33] [34] [35] [36] [37] [38] Chapter 7 [39] +[40] [41] [42] [43] [44] [45] [46] +(@xeatspaces {PART III: @ical {} DIALECTS AND EXTENSIONS}) [47] Chapter 8 +[48] Chapter 9 [49] Chapter 10 [50] Chapter 11 [51] Chapter 12 [52] +(@xeatspaces {PART IV: APPENDICES AND INDICES}) [53] Appendix A [54] [55] +Appendix B [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] Appendix C +[66] [67] [68] [69] [70] [71] [72] [73] (Index) [74] [75] ) +Here is how much of TeX's memory you used: + 2029 strings out of 97159 + 21166 string characters out of 1208395 + 49281 words of memory out of 1500000 + 2941 multiletter control sequences out of 10000+50000 + 32127 words of font info for 112 fonts, out of 1200000 for 2000 + 51 hyphenation exceptions out of 8191 + 19i,7n,17p,269b,482s stack positions out of 5000i,500n,6000p,200000b,5000s +pdfTeX warning (dest +): name{MAYBE} has been referenced but does not exist, replaced by a fixed one + + +Output written on ick.pdf (78 pages, 353479 bytes). +PDF statistics: + 711 PDF objects out of 1000 (max. 8388607) + 252 named destinations out of 1000 (max. 131072) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/doc/ick.txi b/doc/ick.txi index f37544e..1919aa3 100644 --- a/doc/ick.txi +++ b/doc/ick.txi @@ -1,3465 +1,5116 @@ -\input texinfo @c -*- texinfo -*- -@c %**start of header -@setfilename ick.info -@set VERSION 0.27 -@set VERSIONDASH 0-27 -@settitle C-INTERCAL @value{VERSION} Revamped Instruction Manual -@paragraphindent 0 -@documentlanguage en -@documentencoding ISO-8859-1 - -@c Command line option index. -@defcodeindex op -@c Error index -@defindex er -@c Commands and language features are in the predefined fnindex. -@c Things generally are in the predefined cpindex. - -@c Combining indices. -@syncodeindex fn cp -@syncodeindex op cp -@synindex er cp - -@c Adding to the main documentation tree. -@dircategory INTERCAL compilers -@direntry -* C-INTERCAL: (ick). The C-INTERCAL language and compiler. -* ick: (ick) Invoking ick. Invoking the C-INTERCAL compiler. -@end direntry - -@c Some macros to ease writing and updating. (The VERSION is set above because -@c it's needed to set the title.) -@macro cic{} -@abbr{C-INTERCAL} -@end macro -@macro clcic{} -@abbr{CLC-INTERCAL} -@end macro -@macro icst{} -@abbr{INTERCAL-72} -@end macro -@macro ical{} -@acronym{INTERCAL} -@end macro - -@c Part headings for unsplit output -@macro partheading{arg} -@html -

    \arg\

    -@end html -@c -@end macro - -@c 'Portability' boxes -@macro portability{st,c,clc} -@multitable @columnfractions .25 .25 .25 -@headitem @icst{} @tab @cic{} @tab @clcic{} -@item \st\ @tab \c\ @tab \clc\ -@end multitable -@c -@end macro - -@c Generating items and anchors together is also helpful. -@macro ianchor{arg} -@item \arg\ -@anchor{\arg\} -@c -@end macro -@macro ianchorc{arg} -@item \arg\ -@anchor{\arg\+} -@c -@end macro -@macro ieanchor{arg} -@item \arg\ -@anchor{\arg\} -@erindex \arg\ -@c -@end macro -@macro ianchorpm{arg} -@item +\arg\ -@itemx -\arg\ -@anchor{+\arg\} -@anchor{-\arg\} -@c -@end macro - -@c Some fixes for HTML. -@ifhtml -@c Examples are styled in CSS; don't do it with hardcoded whitespace! -@exampleindent 0 -@end ifhtml -@c %**end of header - -@copying -This manual is for @cic{} version @value{VERSION}. It does not replace -the old groff manual, nor is it designed to be read in conjunction with -it; instead, it serves a different purpose, of providing information -useful to users of @cic{} (unlike the other manual, it is not derived -from the original @icst{} manual). - -Copyright @copyright{} 2007 Alex Smith. - -@quotation -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with the -Invariant Sections being ``GNU General Public License'', with no -Front-Cover Texts, and with no Back-Cover Texts. A copy of the license -is included in the section entitled ``GNU Free Documentation License.'' - -As a special exception, you may create a Modified Version of this -document (with the definition of ``Modified Version'' given in the GNU -Free Documentation License) in which the Invariant Section ``GNU General -Public License'' has been deleted entirely, as long as all of that -license is complied with apart from the requirement to preserve that -Invariant Section. (This means that that section must be either -entirely preserved or entirely deleted in any copies or Modified -Versions of this document.) -@end quotation -@end copying - -@titlepage -@ifset notsplit -@title C-INTERCAL Revamped Instruction Manual -@subtitle (this version distributed with version @value{VERSION} of C-INTERCAL) - -@page -@vskip 0pt plus 1filll -@insertcopying - -@end ifset -@end titlepage - -@ifset notsplit -@contents -@end ifset - -@ifnottex -@node Top -@top C-INTERCAL @value{VERSION} - -@insertcopying - -@menu - -The @cic{} compiler -* Installation:: How to install @cic{} @value{VERSION} -* Invoking ick:: Options to give to the compiler ick -* Errors and Warnings:: Error messages, and what to do about them -* The yuk debugger:: How to use the runtime debugger - -Basic @ical{} features -* Syntax:: Holding statements together -* Expressions:: Operators, operands, and grouping -* Statements:: What an @ical{} statement can do - -@ical{} dialects and extensions -* TriINTERCAL:: @ical{} in non-binary bases -* Multithreading and Backtracking:: Running @ical{} programs in parallel -* Operand Overloading:: Where one expression stands for another -* PIC-INTERCAL:: @ical{} on embedded systems -* Differences to Other Compilers:: @cic{} vs. @clcic{} - -Appendices and indices -* Optimizer Idiom Language:: The syntax to specify optimizer idioms -* Copying:: License information for the code and manual -* Main Index:: An index of all the pages in this manual - -@end menu -@end ifnottex -@ifset notsplit -@partheading PART I: THE @cic{} COMPILER -@end ifset -@node Installation -@chapter Installation -@cindex installation -@cindex @command{ick}, installing - -The @cic{} distribution is distributed in source code form; this means -that before using it, you first have to compile it. Don't worry: if you -have the right software, it's not at all difficult. Most Linux-based -and UNIX-based computers are likely to have the software needed already; -the software needed to compile source-distributed packages is also -readily available for free for other operating systems. The following -instructions will help you install the distribution in a method -appropriate for your system. - -@menu -* Obtaining:: How to get a @cic{} distribution to install -* Unpacking:: What to do with the distribution file -* Simple Installation:: Normally you can just do things the easy way -* DOS/Windows Install:: For users of DOS or of Microsoft Windows -* Not Installing:: You can use the software without installing it -* Uninstalling:: If you don't want to use the software -* Reporting Bugs:: If it doesn't work or you know how to fix it -* Distributing:: How to make your own @cic{} distribution -@end menu - -@node Obtaining -@section Obtaining -@cindex obtaining C-INTERCAL -@cindex C-INTERCAL, obtaining a copy - -@cic{} distributions have been stored in many different places over -time; it can sometimes be hard to make sure that you are finding the -most recent version. In order to make sure that you have the most -recent version, the easiest way is to look at the -@uref{news:alt.lang.intercal,,alt.lang.intercal newsgroup}; all releases -of the @cic{} compiler ought to be announced there. (If you are -interested in what other @ical{} compilers are available, it may also be -worth looking there.) If you don't have access to a newsreader, your -newsreader doesn't cover that newsgroup, or the distance between -releases has been too large for your news server to keep the message, -it's likely that you can find the announcement in an archive on the -World Wide Web; at the time of writing (2007), the archives of the -newsgroup are stored by @uref{http://groups.google.com,Google Groups}, -and a search for @samp{alt.lang.intercal} there should tell you where to -find a copy. - -If you're looking for the latest version, note that the number after the -dot represents the major version number; you want to maximise this in -favour of the number before the dot, which is the bugfix level within a -major version. (Major versions are released as version 0.whatever; if a -new version comes out that fixes bugs but adds no new features, nowadays -its number will be of the form 1.whatever, with the same major number. -This has not always been the case, though.) - -@node Unpacking -@section Unpacking -@cindex C-INTERCAL, unzipping -@cindex C-INTERCAL, unpacking -@cindex unzipping C-INTERCAL -@cindex unpacking C-INTERCAL -@cindex ick-@value{VERSIONDASH}.tgz - -The distribution is likely to be a single file with extension -@samp{.tgz}; this refers to a gzipped tar file. Most computer systems -can extract files in this format (nowadays even many computers running -Windows have the appropriate software). - -It doesn't matter where you extract the distribution file to: it's best -if you don't put it anywhere special. If you aren't an administrator, -you should extract the file to somewhere in your home directory (Linux -or UNIX-like systems) or to your My Documents directory (recent versions -of Windows; if you're using an older version, then you @emph{are} an -administrator, or at least have the same privileges, and can extract it -anywhere). Some commands that you might use to extract it: - -@table @asis - -@item Generic UNIX/Linux - -@example -gunzip ick-@value{VERSIONDASH}.tgz -tar xvf ick-@value{VERSIONDASH}.tar -@end example - -On most UNIX-based and Linux-based systems, @command{tar} will be -available to unpack the installation files once they've been -uncompressed with @command{gunzip}. @command{gunzip} is also likely to -be available; if it isn't, you will need to download a copy from the -Internet. - -@item Using GNU tar - -@example -tar xzvf ick-@value{VERSIONDASH}.tgz -@end example - -If you are using the GNU version of @command{tar} (which is very likely -on Linux), you can combine the two steps into one as shown here. - -@item Using DJGPP - -@example -djtar -x ick-@value{VERSIONDASH}.tgz -@end example - -On a DOS or Windows system, you will have to install DJGPP anyway to be -able to compile the distribution (@pxref{DOS/Windows Install}), and once -you've done that you will be able to use DJGPP's decompressing and -unpacking utility to extract the files needed to install the -distribution. (You will need to type this at the command line; on -Windows 95 and later, try choosing Run...@: from the start menu then -typing @command{cmd} (or @command{command} if that fails) in the dialog -box that opens to get a command prompt, which you can exit by typing -@command{exit}. After typing any command at a command line, press -@key{RET} to tell the shell to execute that command.) - -@item On Windows - -If you're running a Windows system, you could always try double-clicking -on the ick-@value{VERSIONDASH}.tgz file. It's quite possible that -you'll have a program installed that's capable of decompressing and -unpacking it. Unfortunately, I can't guess what program that might be, -so I can't give you any instructions for using it. - -@end table - -Whatever method you use, you should end up with a directory created -called @file{ick-@value{VERSION}}; this is your main installation -directory where all the processing done by the installation will be -carried out. You will need to have that directory as the current -directory during install (at the command prompt in all the operating -systems I know, you can set the current directory by typing @command{cd -ick-@value{VERSION}}). - -@node Simple Installation -@section Simple Installation -@cindex installation, simple -@cindex simple installation -@findex config.sh -@findex make -@findex make install -@cindex compiling, @command{ick} itself -@cindex installation, via autoconf and make -@cindex configuring - -There are scripts included in the distribution to automate the process -of installing, in various ways. The simplest method of installing is to -use the following routine: - -@enumerate - -@item -Configure @cic{}, by typing @command{sh config.sh} - -@item -Compile the source code, with the command @command{make} - -@item -Install the executables and libraries, using @command{make install} - -@end enumerate - -On all systems, it's worth just trying this to see if it works. This -requires a lot of software on your computer to work, but all of it is -standard on Linux and UNIX systems. The first command is a shell-script -which will analyse your system and set settings accordingly; it will -explain what it's doing and what settings it detected, and create -several files in the installation directory to record its results. -(This is a configure script produced by the DJGPP version of GNU -autoconf; its autoconf source code is available in the file -@file{config.in}.) The second command actually compiles the source code -to produce binaries; this takes the longest of any of the steps. You -will see all the commands that it's running as it runs them. (The most -time-consuming one is the compilation of @file{idiotism.c}, by the way; -be prepared for this to take longer than the other compilations.) The -third command will copy the files it's compiled to appropriate shared -locations on your system so that anyone on the system can just use -@command{ick}. - -There may be various factors that prevent this simple installation -method working. On a system not based on UNIX or Linux, you may find -that you don't have some of the software required to run this (for -instance, you may be missing the shell @command{sh}, and don't have the -shell @command{bash} which can emulate it, and so can't run @command{sh -config.sh} that depends on one of those shells being available) and so -this method won't work for you. In such cases, one solution may be to -install all the software required; the GNU project has a version of all -the commands required, for instance, and there may be ports available -for your operating system. However, the only software absolutely -required is a C compiler (@cic{} was designed to work with @command{gcc} -and has only been tested in combination with that compiler, but in -theory it should be possible to adapt it to work with other compilers) -and the associated software needed to compile C files to object files -and executables, combine object files into libraries, etc. - -Another possiblity that might stop this process working is if your -version of the relevant software is incompatible with the GNU versions -that were used for testing. For instance, I have come across -proprietary versions of @command{lex} that need directives in the source -file to say in advance how much memory the lexer-generator needs to -allocate. In such cases, pay attention to the error messages you're -getting; normally they will suggest trivial modifications to the source -files that will cause the compilation to work again. - -If you're trying to do something unusual, you probably want to set some -of the settings yourself rather than letting the compilation process -guess everything. In this case, use @command{sh config.sh --help} to -view the options that you can set on @command{config.sh}; there's a wide -range of settings that you can set available there, and one of them may -be what you want. For the special case of a non-administrator user who -wants to test the @cic{} compiler without having admin rights, or -equivalently any user who wants to test the compiler without installing -it, see @ref{Not Installing}. - -@node DOS/Windows Install -@section DOS/Windows Install -@cindex installation, on DOS or Windows -@cindex DOS -@cindex Windows -@cindex DJGPP -@findex makeick.sh -@findex makeick.bat - -On DOS and Windows, it's possible to install @cic{} by using the C -compiler and utilities provided by DJGPP. (Possibly other environments -also work, but DJGPP is the only C compilation system on which recent -versions of @cic{} have been tested.) If you don't have a copy of DJGPP, -or you're not sure whether you have the most recent version, visit -@uref{http://www.delorie.com/djgpp}. I think it's possible to compile -@cic{} to binaries from only the files in the distribution and the C -compilation parts of DJGPP, but this relies on some prebuilt files -enclosed in the distribution, and I haven't actually tested this, so I -might be wrong. At the other extreme, if you download and install not -only the DJGPP C compiler but also all the DJGPP ports of the GNU -utilities required to run @command{config.sh} and @command{make}, you -can use the simple installation method; see @ref{Simple Installation}. -(This is actually somewhat recommended; doing this will not only allow -you to change source code, recompile, and be guaranteed to have your -changes to the source code affect the executables, and allow you to -install @cic{} without having to fiddle around with the @samp{PATH} -environment variable, but also you may then be able to install other -programs distributed in source form without further hassle.) - -Assuming that you decide not to download all the utilites required to -carry out a simple install, follow the following instructions to compile -and install the @cic{} compiler: - -@enumerate - -@item -If you haven't already installed DJGPP, do that now, following the -instructions given there. - -@item -Open a command prompt if you aren't at one already, unpack the -distribution if you haven't already, and change directory to the main -installation directory (@pxref{Unpacking}). - -@item -Run one of two commands included in the distribution especially for -installing @cic{} under DJGPP. Which one you run depends on the shell -you're using: if you're running under one of the DOS/Windows shells -(@command{cmd.exe} or @command{command.com}), type -@command{makeick.bat}, and if you're running under a port of a UNIX or -Linux shell (such as @command{bash}), type @command{makeick.sh}. - -@item -The distribution should now have been compiled, but it still needs to be -installed. To do this, you will need to edit your @samp{PATH} -environment variable. Under DOS and earlier versions of Windows, you -can do this by editing @file{C:\autoexec.bat}; look for the last command -that sets the @samp{PATH} environment variable (i.@:e.@: that starts -with @samp{set PATH=}), and add another semicolon and the @file{bin} -subdirectory of your main installation directory to it (for instance, if -your installation directory is -@file{C:\stuff\intercal\ick-@value{VERSION}}, you want to add -@samp{;C:\stuff\intercal\ick-@value{VERSION}\bin} to the end of that -line). Under later versions of Windows, this won't work (I'm not sure -exactly where the cutoff is, but I know the other method doesn't work on -Windows XP); instead, go via the Start menu to Settings, Control Panel, -System, Advanced, Environment Variables, and edit either your own or the -system-wide PATH setting (depending on whether you want to install for -yourself or for everyone) to end with the @file{bin} subdirectory of the -main installation directory, the same way as for older versions of -Windows. - -@end enumerate - -To test that the @samp{PATH} setting is set correctly, try changing to -an unrelated directory (for instance, by typing @command{cd \} at a -command prompt), and typing @command{ick -@@}; if you get a usage -message for @command{ick}, then you've set the @samp{PATH} setting -correctly. Note that if things go wrong during compilation, other than -errors about inability to find @command{flex} or @command{bison} (the -compilation process can succeed despite either of these errors), it's -likely that you've messed up your DJGPP installation (maybe by setting -the @samp{PATH} or @samp{DJDIR} environment variables incorrectly for -it). - -@node Not Installing -@section Not Installing -@cindex @command{ick}, using without installation -@cindex @command{ick}, not installating -@cindex trying out @command{ick} -@cindex not installing -@cindex non-root installation -@cindex installation, non-root -@cindex live CD/USB stick -@cindex making a live CD/USB stick - -You don't have to install @cic{} to be able to use it; you can instead -stop any of the other install techniques just after compiling the source -code, before the installation step. (This may be useful if you just -want to try out @cic{}, or if you aren't a root/admin user and therefore -don't have the permissions to install things.) When @cic{} hasn't been -installed, @command{ick} won't be able to find the files it looks for in -the places that they ought to have been installed, so it will look in a -variety of places they might be instead (the installation directory, if -it can figure out where it is; the same directory as the binary; the -current directory). In order for this to work, just don't move any of -the files that were compiled anywhere else. - -Of course, if you haven't installed the compiler, just typing -@command{ick} is unlikely to work, because your computer won't know what -you mean. Instead, you should give a pathname (absolute or relative) to -where @command{ick} is, so that your computer can find it. With any -luck, your computer will communicate the pathname you used to -@command{ick} itself, and if that happens @command{ick} will use it to -figure out where the main installation directory is, and find the files -it needs that way. If you suspect that errors you are getting are due -to inability to find files (such as E127 (@pxref{E127}) or E999 -(@pxref{E999})), try giving the @option{-u} (@pxref{-u}) option to -@command{ick} to see where it's looking. - -You can make a `live' CD or USB-stick version of @cic{} using similar -methods; configure (if possible) and compile it, but instead of -installing it, copy the entire @file{@value{VERSION}} directory to the -CD or USB stick. @ical{} can then be run from there by explicitly giving -a pathname to @file{bin/ick} or @file{bin/ick.exe} - -@node Uninstalling -@section Uninstalling -@cindex uninstalling -@cindex @command{ick}, uninstalling - -It may happen that you decide to uninstall @cic{} after installing it; -this may be useful if you want to test the installation system, or -change the location you install programs, or for some reason you don't -want it on your computer. It's worth uninstalling just before you -install a new version of @cic{} because this will save some disk space; -you cannot install two versions of @cic{} at once (but see @ref{Not -Installing} for information on how you can use @cic{} without installing -it). - -If you installed @cic{} using @command{make install}, you can uninstall -it by using @command{make uninstall} from the installation directory, -assuming that it still exists. If you can't use that method for some -reason, you can uninstall it by deleting the files @file{ick.exe} where -your computer installs binaries, @file{libick.a}, @file{libickmt.a}, -@file{libyuk.a}, @file{COPYING.txt}, and @file{coopt.sh} where your -computer installs libraries, and the subdirectories -@file{ick-@value{VERSION}} in the places where your computer installs -data files and include files, and their contents. - -If you installed @cic{} by changing your @samp{PATH} environment -variable, you can uninstall by changing it back. - -You can go further than uninstalling. Running @command{make distr}, -@command{districk.sh}, or @command{districk.bat} will delete any files -created by compilation; @command{make distclean} will delete those -files, and also any files created by configuring. The distribution -contains prebuilt versions of the parser, lexical analyser and OIL -compiler; doing @command{make clean} (or @command{cleanick.sh} or -@command{cleanick.bat}) will do the same thing as @command{make distr} -and also delete those prebuilt versions. - -@node Reporting Bugs -@section Reporting Bugs -@cindex bugs, reporting -@cindex reporting bugs -@cindex patches, submitting -@cindex submitting patches - -If you can't get @cic{} to install at all, or something goes wrong when -you're using it, reporting a bug is probably a good idea. (This is -still important even if you figure out how to fix it, and the -information isn't in the manual, because the fix can be added to the -source code if possible, or at least to the manual, to benefit future -users.) For general help, you may want to post to the -@uref{news:alt.lang.intercal,,alt.lang.intercal} news group; to report -a bug or submit a patch, email the person who released the most recent -@cic{} version (which you can determine by looking at that newsgroup). - -If you do find a bug (either the compiler not behaving in the way you'd -expect, or if you find a way to cause E778 (@pxref{E778}) without -modifying the source code), it helps a lot if you can submit a bug -report explaining what causes it. If you're not sure, say that; it -helps if you give examples of input, command line options, etc.@: that -cause the bug. There are several debug options (@pxref{Debug Options}) -that you can use to help pin down a bug if you're interested in trying -to solve the problem yourself; looking at the output C code can also -help pin down a bug if the compiler gets that far. - -Information that should be given in a bug report is what you expect to -happen, what actually happens, what input and command line options you -gave to the compiler, what operating system you're using, any ideas you -might have as to what the problem is, and any appropriate debug traces -(for instance, @option{-H} (@pxref{-H+,,-H}) output if you think the bug -is in the optimizer). Core dumps aren't portable between systems, so -don't send those; however, if you're getting an internal error and can -dump core with @option{-U} (@pxref{-U+,,-U}), it helps if you can load a -debugger (such as @command{gdb}) on the core dump, use the debugger to -produce a backtrace, and send that backtrace. - -If you figure out how to solve the bug yourself, and want to submit the -patches to help other users (this also carries the advantage that your -patches will then be maintained along with the rest of the distribution, -and that you won't have to reapply them every time you upgrade to a -newer version of @cic{}), you must first agree to license your code -under the same license as the code that surrounds it (normally, that's -the GNU General Public License, but if you submit a patch to a file with -a different license, like this manual (yes, documentation patches are -useful too), you must agree to that license). You will be credited for -the patch in the source code unless you specifically ask not to be or -you don't give your name (in both these cases, you must license the code -to the public domain so that it can be incorporated without the -attribution requirement). Preferably, patches should be submitted in -the format created by the command @command{diff -u}; this command is -likely to be available on UNIX and Linux systems and versions are also -available for DOS and Windows (including a DJGPP port of the GNU -version). If you can't manage that, just submit your new code with -enough lines of old code around it to show where it's meant to go, and a -description of approximately where in the file it was. Patches should -be submitted by email to the person who most recently released a version -of @cic{}. - -If you have a suggestion for a new feature, it makes sense to first -discuss it on the @uref{news:alt.lang.intercal,,alt.lang.intercal} news -group; other @ical{} compiler maintainers may also want to implement -that feature. If you have developed code to implement that feature in -@cic{}, you can submit it the same way that you would submit a patch for -a bug. - -@node Distributing -@section Distributing -@cindex C-INTERCAL, distributing -@cindex distributing C-INTERCAL -@cindex releasing C-INTERCAL - -Due to the licensing conditions of @cic{}, you are allowed to release -your own version or distribution if you want to. In such cases, it's -recommended that you follow the following guidelines: - -@enumerate - -@item -Make sure the new version is based on the most recent existing version. -Looking at the @uref{news:alt.lang.intercal,,alt.lang.intercal} -newsgroup will normally let you know what version is most recent. - -@item -Increment the version number; if you add any new features, increment the -major version number (after the decimal point) and drop the minor -version number (before the decimal point) to 0, and otherwise increment -the minor version number. You have to update the version number in the -following files: @file{config.in}, @file{config.sh}, and -@file{ick.info}. You also have to rename the installation directory to -reflect the new version number. - -@item -Add an entry to the @file{NEWS.txt} file explaining what's new in the -version that you're releasing, following the same format as the other -entries. - -@item -Update the @file{README.txt} with a description of any new files you may -have added. - -@item -Remove any autosave or backup files that may be littering the -installation directory or its subdirectories. - -@item -Run @command{make distclean}, or @command{districk.sh} or -@command{districk.bat} if you didn't manage to configure; this will -remove all files that shouldn't be in the distribution. - -@item -Update the @file{MANIFEST.txt} file that lists all files in the -distribution; on a Linux or UNIX system, you can do this by typing -@command{ls -R1 > MANIFEST.txt} in the main installation directory. - -@item -If creating the distribution under DJGPP, run @command{etc/ctrlmfix.bat} -or @command{etc/ctrlmfix.sh}, even if you managed to configure; this -will sort out portability problems with newlines. - -@item -Create a gzipped tar file containing the installation directory. Its -filename should be @samp{ick-}, followed by the version number with the -dot replaced by a dash, followed by @samp{.tgz}; this form of filename -is friendly to DOS. - -@item -Place the new version somewhere on the Internet, and announce the -location and the fact that a new version has been released on -@uref{news:alt.lang.intercal,,alt.lang.intercal}. - -@end enumerate - -@node Invoking ick -@chapter Invoking ick -@cindex command line options -@cindex options, to @command{ick} -@cindex @command{ick}, command line options -@cindex @command{ick}, invoking -@cindex @command{ick}, options -@cindex compiling, @ical{} source code - -All operations on @ical{} source code available in @cic{} are currently -carried out by the compiler @command{ick}. - -The syntax is - -@example -ick -options @var{inputfile} -@end example - -@noindent -(Options can be given preceded by separate hyphens, or all in a row -after one hyphen, or a mixture; they're all single characters.) By -default, this compiles one @ical{} program given as the input file -directly to an executable without doing anything fancy; usually you will -want to give options, which are described below. - -@menu -* Language-affecting Options:: Options that specify language dialect -* Debug Options:: Debug your code or ick itself -* Output Options:: Specifying output format and location -* Optimizer Options:: Yes, you can optimize @ical{}! -* Other Options:: Options not covered in other sections -* Options to Generated Programs:: Generated executables allow options too -* Environment Variables:: What environment variables affect ick -@end menu - -@node Language-affecting Options -@section Language-affecting Options -@cindex options, language-affecting -@cindex language-affecting options -@cindex options, dialect -@cindex dialect options - -The following command-line options to @command{ick} affect what dialect -of the @ical{} language is compiled by the compiler; you may need to set -one or more of these options if your input is not the default @cic{} but -instead some other language like @icst{} or @clcic{}, or just because -you like certainty or like being different with respect to your output. -Note that there is no command-line option corresponding to -@abbr{TriINTERCAL} (or the base 4-7 versions); instead, the numeric base -to use is determined by looking at the filename extension (@samp{.i} for -base 2, the default, or @samp{.3i} to @samp{.7i} for the base 3-7 -versions.) - -@table @option -@ianchor -b -@opindex -b -@cindex random bug -@cindex E774, disabling -If this option is @emph{not} given, there is a small chance that a -random bug appears in the compiler, which causes the programs it creates -to manifest a bug that causes error E774 (@pxref{E774}). Giving the -option means that this bug will not happen. (You may wonder why this -bug was preserved; it is in fact a bug that was carefully preserved -since the days of @icst{}, in this case, but the option to turn it off -is available as a workaround. (There are no plans to fix this or any of -the other carefully preserved bugs any time soon, because that would -kind of defeat the point of having preserved them.) Interestingly, the -@icst{} compiler documentation mentions a similar command-line option -that is a workaround for the same bug. - -@ianchor -m -@opindex -m -@cindex multithreading, enabling -@cindex backtracking, enabling -This option needs to be given to allow any multithreading or -backtracking commands or identifiers to be used. (Unlike with other -language features, this is not autodetected because it's legal to have a -program with multiple COME FROM (@pxref{COME FROM}) commands aiming at -the same line even when it isn't multithreaded, in which case the -commands cause error E555 (@pxref{E555}) when that line is encountered -(with the usual caveats about both commands having to be active at the -time).) Attempts to use non-COME FROM multithreading or backtracking -commands without this option produce error E405 (@pxref{E405}). - -@ianchor -t -@opindex -t -@cindex INTERCAL-72 compatibility mode -@cindex compatibility, INTERCAL-72 -This option tells the compiler to treat the source code as @icst{}; as a -result, any language constructs that are used but weren't available in -1972 will trigger error E111 (@pxref{E111}). - -@ianchor -v -@opindex -v -@cindex constants, assigning to -@cindex assigning to constants -It is possible to write @ical{} code sufficiently tortuous that it ends -up assigning to a constant. Generally speaking, this isn't what you -wanted to do, so the compiler will kindly cause an error (E277; -@pxref{E277}) that stops the insanity at that point, but at the cost of -a significant amount of performance you can give this option to tell the -compiler to simply change the constant and keep on going anyway. (Note -that unlike @clcic{}, this only changes uses of the constant preceded by -@code{#} in your program, not things like line numbers; you want -@uref{http://esolangs.org/wiki/Forte,Forte} for that.) - -@ianchorc -C -@opindex -C -@cindex clockface mode -When this option is given, the generated programs will write the number -4 as @samp{IIII} rather than @samp{IV}, in case you're writing a clock -program. - -@ianchorc -P -@opindex -P -@cindex PIC-INTERCAL, command line option -@cindex E256, avoiding -@cindex E652, avoiding -This tells the compiler to treat the input as @abbr{PIC-INTERCAL} -(@pxref{PIC-INTERCAL}) rather than ordinary @cic{} input, and generate -PIC output code accordingly. There are a lot of options that are -incompatible with this, as well as many language features, due to the -limited memory available on a PIC. If you get error E256 -(@pxref{E256}), you have this option given when it shouldn't be; -likewise, if you get error E652 (@pxref{E652}), you should be using this -option but aren't. (A few simple programs are -@cic{}/@abbr{PIC-INTERCAL} polyglots, but such programs are incapable of -doing input or output, meaning that they aren't particularly useful.) - -@ianchorc -X -@opindex -X -@cindex CLC-INTERCAL compatibility mode -@cindex compatibility, CLC-INTERCAL -The @cic{} and @clcic{} compilers use different notation for various -things, sometimes to the extent where the same notation is legal in both -cases but has a different meaning. As this is the @cic{} compiler, it -rather guessably uses its own notation by default; however, the @clcic{} -notation can be used as the default instead using this option. (In most -situations where there isn't an ambiguity about what something means, -you can use the `wrong' syntax freely.) This option also causes some -constructs with subtly different meanings in these two @ical{} -implementations to take on the @clcic{} meaning. (OK, one construct at -present, the abstention of a GIVE UP (@pxref{GIVE UP}) command by line -number, which is possible as long as this switch isn't given; reading -through the @icst{} manual, there are a lot of things that imply that -this probably wasn't intended to be possible, but as far as I can tell -that manual doesn't actually @emph{say} anywhere that this particular -case is disallowed, even though it rules out all other similar cases. -However, I intend to add to this list at some point.) - -@end table - -@node Debug Options -@section Debug Options -@cindex options, debug -@cindex debug options - -Sometimes things will go wrong with your program, or with the way -@command{ick} was installed. There may even be unknown bugs in -@command{ick} itself (if you find one of these, please report it). The -following options are used to debug the whole system on various levels. - -@table @option - -@ianchor -d -@opindex -d -@cindex debugging, parser -@cindex parser, debugging -@cindex debugging, lexical analyser -@cindex lexical analyser, debugging - -If you think that something has gone wrong with the parser, or you want -to see how your program is being parsed, you can give this option on the -command line. All the debug output produced by the parser and lexical -analyser will be output on standard error. - -@ianchor -g -@opindex -g -@cindex debugging, C code -@cindex C code, debugging -@cindex C code, leaving in place - -This option allows debugging of the final executable at the C code -level. Any C code generated will be left in place, and the @option{-g} -option will be given to the C compiler that's used to compile the code, -so all the information needed for a C debugger to be used on the -executable will be present there. - -@item -h -@itemx -H -@itemx -hH -@anchor{-h} -@anchor{-H+} -@anchor{-hH} -@opindex -h -@opindex -H -@opindex -hH -@cindex optimizer, debugging -@cindex debugging, optimizer -@cindex OIL, debugging -@cindex debugging, OIL - -These options allow debugging of the optimiser, or produce output -helpful for understanding how your program has been summarised. -@option{-h} produces a summary of what optimiser rules were used, the -initial expression and what it was optimised to; @option{-H} produces a -more expanded view that shows each intermediate step of optimisation, -and @option{-hH} shows the same output as @option{-H}, but written -completely using C syntax (the other options output in a strange mix of -@ical{} and C). - -@ianchor -l -@opindex -l -@cindex warnings, enabling - -This option turns on generation of warnings (@pxref{Warnings}). To make -sure that they aren't actually useful, or are only marginally useful, -the warning generator is far too sensitive, and there is no way to -decide which warnings are given and which ones aren't; you either get -all of them or none. - -@ianchor -p -@opindex -p -@cindex profiling -@cindex yuk, profiling - -This option causes the program to run immediately after being compiled, -and profiles the resulting program to identify performance bottlenecks, -etc. The usefulness of this depends on the resolution of the timers on -the computer and operating system; DOS, in particular, is really bad -with timer resolution. The output will be saved in a file called -@file{yuk.out} when the program finishes running. It's legal to turn on -both the profiler and the interactive debugger at the same time, but if -you do this the profiler will also identify bottlenecks in the person -typing in commands to step through the program! The profiler will, in -fact, identify all the timings that particular commands in the program -take; so @code{WRITE IN} instructions will often show up as taking a -long time due to their need to wait for input. - -@ianchor -u -@opindex -u -@cindex skeleton file, directory problems -@cindex system library, directory problems -@cindex syslib, directory problems -@cindex directory problems -@cindex E999, debugging -@cindex E127, debugging - -When you are getting problems with finding files -- for instance, the -compiler can't find the skeleton file (@pxref{E999}) or the system -library (@pxref{E127}) -- this option will let you know, on standard -error, where the compiler is looking for files. This may hopefully help -you pin down where the file-finding problems are coming from, and also -offers the option of simply placing copies of the files where the -compiler is looking as a last resort. - -@ianchor -y -@opindex -y -@cindex yuk, command line option - -This is the main debugging option: it loads yuk, an interactive @ical{} -debugger with ability to step through the program, set breakpoints, view -and modify variables, etc. @xref{yuk}. - -@ianchorc -U -@opindex -U -@cindex internal errors, debugging -@cindex debugging, internal errors -@cindex internal errors, dumping core -@cindex dumping core on error -@cindex E778, debugging - -The internal error E778 (@pxref{E778}) should never happen. However, -there are all sorts of potential problems that may come up, and if part -of the code detects something impossible, or more usually when the -operating system detects things have got too insane and segfaults, -normally this error will just be generated and that's that. (I most -often get this when I've been writing a new section of code and have -made a mistake; hopefully, all or at least most of these errors are -fixed before release, though.) If you want more information as to what's -going on, you can give the @option{-U} option, which will cause the -compiler to raise an abort signal when an internal error happens. This -can generally be caught by a debugger that's being run on @command{ick} -itself at the time; on many systems, it will also cause a core dump. - -@end table - -@node Output Options -@section Output Options -@cindex output options -@cindex options, output - -These options allow you to control how far to compile (all the way to an -executable, or only to C, etc.@:), and where the output will be created. -Note that the output options may change depending on the other options -selected; for instance, many of the debug options will prevent the code -being compiled all the way to an executable. - -@table @option - -@ianchor -c -@opindex -c -@cindex code generation, stopping at C code -@cindex C, stopping after C is generated -@cindex output, C only - -By default, the original @ical{} code will be compiled all the way to an -executable, and the intermediate C and object files produced will be -deleted. Giving this option causes the compiler to stop when it has -finished producing the C file, leaving the C file there as the final -output of the compiler. (Its filename is the same as the source file, -but with @samp{.c} as its extension/suffix rather than the source file's -extension.) Without this option, an executable will be produced with the -extension changed to whatever's appropriate for the system you are on -(or omitted entirely if that's appropriate for the system). - -This option also places verbose comments in the output C file. - -@ianchor -o -@opindex -o -@cindex output, to standard output -@cindex standard output - -This option causes the compiler to progress no further than producing -the C output file, but instead of writing it to a file writes it -directly to standard output. This might occasionally be useful when -using @command{ick} as part of a pipe; it can also be useful to see how -far the compiler gets with compiling code before an error happens, when -you're trying to track down an error. - -@end table - -@node Optimizer Options -@section Optimizer Options -@cindex optimizer options -@cindex options, optimizer -@cindex optimization - -There are various command line options that can be used to tell -@command{ick} whether and in what ways to optimize code. - -@table @option - -@ianchor -f -@opindex -f -@cindex flow optimization -@cindex optimization, flow -@cindex optimization, control flow - -This option requests the compiler to attempt to analyse the flow of the -program and optimize accordingly; for instance, it will detect which -commands can't possibly be @code{ABSTAINED} from and refrain from -generating code to check the abstention status of those commands. - -@ianchorc -F -@opindex -F -@cindex optimization, extreme -@cindex extreme optimization - -This option tells the compiler to optimize the output for speed. This -is done to crazy extremes; the compiler may take several hours/days -analysing the program in some cases and still not come up with an -improvement. It turns on all the other optimizer options. Note that -not all systems accept this option, because it sometimes outputs a shell -script disguised as an executable rather than an actual executable. - -@ianchorc -O -@opindex -O -@cindex optimization, idioms -@cindex idiom optimization -@cindex optimization, OIL -@cindex OIL, optimizing code - -This option tells the compiler to apply optimizer idioms to the -expressions in the code given, when appropriate. The list of idioms is -stored in the file @file{src/idiotism.oil}; note that it is compiled -into the compiler, though, so you will have to rebuild and reinstall the -compiler if you change it. For more information about changing the list -of idioms, see @ref{Optimizer Idiom Language}. - -@end table - -@node Other Options -@section Other Options -@cindex other options -@cindex options, other - -Some options just can't be classified. - -@table @option - -@ianchor -@@ -@opindex -@@ -@cindex options, help -@cindex help with options -@cindex usage instructions, printing - -If this option is given, the compiler doesn't run at all, but instead -prints a set of instructions for using it, explaining which options are -available on the system you're on and which options conflict with which -other options. - -@end table - -@node Options to Generated Programs -@section Options to Generated Programs -@cindex generated programs, options -@cindex options, to generated programs - -Once the compiler runs and produces an output executable, that -executable itself will accept a range of options that control the way it -runs. None of these options have to be used; a default value will be -assumed if they aren't. - -@table @option - -@ianchorpm help -@opindex +help -@opindex -help - -Whether @samp{+} or @samp{-} is given at the start of this option, it -will cause the program to print out what options are available and what -state they are in. It will then cause the program to exit via an -internal error. - -@ianchorpm wimpmode -@opindex +wimpmode -@opindex -wimpmode -@cindex wimpmode -@cindex Roman numerals, disabling -@cindex Arabic numberals, enabling -@cindex input, in Arabic numerals -@cindex output, in Arabic numerals - -If the @samp{+} version of this is given (rather than the default -@samp{-}), then the program will print a message explaining that you are -a wimp (the mode itself is known as wimpmode), and for the rest of -execution will input in Arabic numerals (@samp{123} rather than -@samp{ONE TWO THREE}) and likewise will output in Arabic numerals rather -than Roman numerals (such as @samp{CXXIII}). True @ical{} programmers -should rarely have to use this mode. - -@ianchorpm traditional -@opindex +traditional -@opindex -traditional - -This option does not actually appear to do anything. - -@ianchorpm printflow -@opindex +printflow -@opindex -printflow -@cindex flow, printing -@cindex debugging, flow -@cindex debugging, multithreaded programs -@cindex multithreading, debugging -@cindex backtracking, debugging - -The usual debugging methods don't work with multithreaded or -backtracking programs. This option exists to give at least a slim -chance of working out what is going on with them. It causes the program -to print the line number of the command it thinks it may be executing -next (i.e.@: the line number that would be printed if that line had an -error) immediately after executing each command, and also an internal -identifier for the thread that that command was in. It also prints a -trace of what parts of the multithreader are being activated; so for -instance, it will tell you when a thread is being forked into multiple -threads or when a choicepoint has been deleted. - -@ianchorpm mystery -@opindex +mystery -@opindex -mystery - -This option is occasionally capable of doing something, but is -deliberately undocumented. Normally changing it will have no effect, -but changing it is not recommended. - -@end table - -@node Environment Variables -@section Environment Variables -@cindex environment variables - -Various environment variables can be set to affect the operation of -@command{ick}. - -@multitable @columnfractions .3 .7 -@headitem Variable @tab Meaning -@item ICKINCLUDEDIR@*ICKLIBDIR@*ICKBINDIR -@tab -These three environment variables suggest locations in which -@command{ick} should look to find various files that it needs: the -skeleton file, system library, C header files and libraries that it -needs, constant-output optimiser, and the GNU General Public License -(which the debugger needs to be able to display on demand for legal -reasons). -@item CC -@tab -The name of a C compiler to use (defaults to gcc, which is the only -compiler with which @cic{} has been tested recently). This option has -no effect on DJGPP, where gcc is always used. -@item ICKTEMP@*TMPDIR@*TEMP@*TMP -@tab -On DJGPP, @command{ick} creates temporary files to pass options to gcc -as a method of getting around the limit on the length of a command line -that can sometimes affect DOS programs. These four environment -variables are tried (in this order) to determine a location for the -temporary file; if none of them are set, the current directory is used. -@end multitable - -@node Errors and Warnings -@chapter Errors and Warnings -@cindex ick, errors and warnings -@cindex errors and warnings - -Things may go wrong, either during the compilation or the execution of -your program. Note that some things that would be compile-time errors -in many other languages -- such as syntax errors -- are in fact run-time -errors in @ical{}. - -Errors and warnings appear as an error code starting with @samp{ICL}, -followed by a three digit number, followed by @samp{I} for an error or -@samp{W} for a warning. However, they will be notated here as -@samp{E000}, etc.@:, to save space and because consistency was never a -strong point of @ical{}. This is followed by a text description of the -error, and a hint as to the location of the error. This is not the line -on which the error occurred, but rather the line on which the next -command to be executed is. To add to the fun, the calculation of the -next command to be executed is done at compile-time rather than runtime, -so it may be completely wrong due to things like abstention on -@code{COME FROM}s or computed @code{COME FROM}s. The moral of this -story is that, if you really want to know where the error is, use a -debugger. Note also that if the error happens at compile-time, there is -no guarantee that the line number given makes any sense at all. Some -errors don't give next line numbers, mostly those for which it doesn't -make logical sense, such as E633 (@pxref{E633}). After this is a -suggestion to correct (or reconsider) the source code and to resubnit -it. (This typo has been carefully preserved for over a decade.) - -@menu -* Errors:: Error messages that might be produced -* Warnings:: Warnings produced by the @option{-l} option -@end menu - -@node Errors -@section Errors -@cindex errors -@cindex ick, errors - -This is a list of the error messages that might be produced during the -compilation or execution of an @ical{} program. - -@table @asis - -@ieanchor E000 -@cindex syntax error - -This is an unusual error; it's what's printed when a syntax error is -encounted at runtime, in a situation in which it would be executed. (An -@code{ABSTAIN}ed syntax error, for instance, would not be executed; this -is one of the mechanisms available for writing comments.) The text of -the error message is simply the statement that couldn't be decoded. - -@ieanchor E017 -@cindex syntax error, serious -@quotation -DO YOU EXPECT ME TO FIGURE THIS OUT? -@end quotation - -It sometimes happens that a syntax error manages to get the parser so -confused that it can't figure out what to do next; that causes this -error, which happens at compile time. - -@ieanchor E079 -@cindex politesse -@cindex @code{PLEASE}, proportion required -@quotation -PROGRAMMER IS INSUFFICIENTLY POLITE -@end quotation - -The balance between various statement identifiers is important. If less -than approximately one fifth of the statement identifiers used are the -polite versions containing @code{PLEASE}, that causes this error at -compile time. - -@ieanchor E099 -@quotation -PROGRAMMER IS OVERLY POLITE -@end quotation - -Of course, the same problem can happen in the other direction; this -error is caused at compile time if over about one third of the statement -identifiers are the polite form. - -@ieanchor E111 -@quotation -COMMUNIST PLOT DETECTED, COMPILER IS SUICIDING -@end quotation - -This error happens when you give the @option{-t} option (@pxref{-t}) but -you use a language construct that wasn't available in @icst{}. If this -happens, then either there's a mistake in the program that prevents it -being @icst{} or you shouldn't be compiling it as @icst{} in the first -place. - -@ieanchor E123 -@cindex black lagoon -@cindex @code{NEXT}, stack overflow -@cindex stack overflow -@quotation -PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON -@end quotation - -There is a hard limit of 80 @command{NEXT}s at a time; this is to -discourage excessive use of @command{NEXTING} for things like recursion. -(Recursive programs are entirely legal; you simply have to figure out -how to do it with computed @command{COME FROM} instead. (For the -record, it is possible. (Using lots of nested brackets when talking -about recursion is great (yay!@:).))) Another problem with writing the -source code that can cause this error is a failure to properly -@command{FORGET} the entry on the @command{NEXT} stack created when -trying to simulate a goto. - -@ieanchor E127 -@cindex system library, errors -@cindex syslib, errors -@quotation -SAYING 'ABRACADABRA' WITHOUT A MAGIC WAND WON'T DO YOU ANY GOOD -@end quotation -Your program asked to include the system library (by specifying a line -number from 1000 to 1999 inclusive without including a line with that -number), but due to installation problems the copmiler couldn't find the -system library to include. You could try using the @option{-u} -(@pxref{-u}) option to see where the compiler's looking; that may give -you an idea of where you need to copy the system library so that the -compilation will work. This error happens at compile time and doesn't -give a next command line number. - -@ieanchor E129 -@cindex @code{NEXT}, nonexistent target -@quotation -PROGRAM HAS GOTTEN LOST -@end quotation - -This error happens at compile time when the compiler can't figure out -where a @command{NEXT} command is actually aiming (normally due to a -typo in either the line label given or the line label on the line aimed -for). The logic behind this error means that the next line to be -executed is unknown (after all, that's the whole point of the error) and -is therefore not given. - -@ieanchor E139 -@cindex @code{ABSTAIN}, nonexistent target -@cindex @code{REINTSTATE}, nonexistent target -@quotation -I WASN'T PLANNING TO GO THERE ANYWAY -@end quotation - -This error happens at compile time when an @code{ABSTAIN} or -@code{REINSTATE} references a non-existent target line. This generally -happens for much the same reasons as E129 (@pxref{E129}). - -@ieanchor E182 -@cindex line label, duplicate -@cindex duplicate line label -@quotation -YOU MUST LIKE THIS LABEL A LOT! -@end quotation - -At present, it's impossible to have more than one line with the same -line number. That would make @code{NEXT} act too much like @code{COME -FROM} in reverse to be interesting. This error happens at compile time. - -@ieanchor E197 -@cindex line label, illegal value -@cindex illegal line label value -@cindex invalid line label value -@quotation -SO@! 65535 LABELS AREN'T ENOUGH FOR YOU? -@end quotation - -Legal values for line labels are 1 to 65535 (with values from 1000 to -1999 reserved if you want to use the system library). This error comes -up if you use nonpositive or twospot values for a line label. - -@ieanchor E200 -@cindex variable, illegal number -@cindex illegal variable number -@cindex invalid variable number -@quotation -NOTHING VENTURED, NOTHING GAINED -@end quotation - -You used a variable that isn't actually in your program. Failing that -(which would be quite impressive and is probably impossible, at least in -the present version of @cic{}), you specified an illegal number for a -variable (legal numbers are positive and onespot). This error happens -at compile time, at least for illegal variable numbers. - -@ieanchor E222 -@cindex out of memory, during @code{STASH} -@quotation -BUMMER, DUDE! -@end quotation - -In @ical{}, you're allowed to @code{STASH} as much as you like; this -makes the language Turing-complete and allows for unlimited recursion -when combined with computed @code{COME FROM} in the right way. -Unfortunately, real computers aren't so idealised; if you manage to -write a program so memory-intensive that the computer runs out of memory -to store stashes, it causes this error at runtime. To fix this error, -you either have to simplify the program or upgrade your computer's -memory, and even then that will only help to some extent. - -@ieanchor E240 -@cindex array, invalid dimension -@cindex invalid array dimension -@cindex illegal array dimension -@quotation -ERROR HANDLER PRINTED SNIDE REMARK -@end quotation - -Arrays have to be large enough to hold at least one element; you tried -to dimension an array which isn't large enough to hold any data. This -error happens at run time. - -@ieanchor E241 -@cindex array, wrong dimension -@cindex wrong array dimension -@cindex array, out of bounds -@cindex out of bounds -@quotation -VARIABLES MAY NOT BE STORED IN WEST HYPERSPACE -@end quotation - -This error happens at run time when the subscripts given to an array are -inconsistent with the way the array was dimensioned, either because -there were the wrong number of subscripts or because a subscript was too -large to fit in the array. - -@ieanchor E256 -@cindex PIC-INTERCAL, unsupported command -@quotation -THAT'S TOO HARD FOR MY TINY BRAIN -@end quotation - -Some commands simply aren't available in @abbr{PIC-INTERCAL}. I mean, -@acronym{PIC}s generally have less than a kilobyte of memory; you're not -going to be able to use some of the more confusing language features -with that sort of resource limitation. The solution is to replace the -affected command, or to not give the @option{-P} option -(@pxref{-P+,,-P}) if you didn't mean to compile as @abbr{PIC-INTERCAL} -in the first place. - -@ieanchor E275 -@cindex overflow, over onespot -@cindex overflow, over 16 bits -@cindex onespot overflow -@cindex 16 bit overflow -@quotation -DON'T BYTE OFF MORE THAN YOU CAN CHEW -@end quotation - -This error happens when there is an attempt to store a twospot value in -a onespot variable. The actual size of the value is what matters when -counting its spots; so you can store the output of a mingle in a onespot -variable if it happens to be less than or equal to 65535, for instance. -(This is not necessarily the case in versions of @ical{} other than -@cic{}, though, so you have to be careful with portability when doing -this.) - -@ieanchor E277 -@cindex reverse assignment, impossible -@cindex reverse assignment, error -@cindex operand overloading, impossible -@cindex impossible reverse assignment -@quotation -YOU CAN ONLY DISTORT THE LAWS OF MATHEMATICS SO FAR -@end quotation - -Reverse assignments are not always mathematically possible. Also, -sometimes they require changing the value of a constant; this is only -legal if you specifically specified that it was legal by using the -@option{-v} option. In the case of an impossible reverse assignment -(including a situation in which operand overloading causes a reverse -assignment to happen), this error happens at runtime. - -@ieanchor E281 -@cindex spark, nesting limit -@cindex ears, nesting limit -@cindex rabbit-ears, nesting limit -@cindex nesting limit -@findex SENESTMAX -@quotation -THAT MUCH QUOTATION AMOUNTS TO PLAGIARISM -@end quotation - -There is a limit of 256 on the number of nested spark/ears groups -allowed. If you somehow manage to exceed that limit, that will cause -this error. Try breaking the expression up into smaller expressions. -(The limit is trivial to increase by changing @code{SENESTMAX} in -@file{ick.h}; if you ever actually come across a program that hits the -limit but wasn't designed to, just email the maintainer to request a -higher limit.) - -@ieanchor E333 -@cindex variables, limit -@quotation -YOU CAN'T HAVE EVERYTHING, WHERE WOULD YOU PUT IT? -@end quotation - -Your program references so many variables that the compiler couldn't -cope. This error is unlikely to ever happen; if it does, try reducing -the number of variables you use by combining some into arrays. This is -a compile-time error. - -@ieanchor E404 -@cindex @code{GO BACK}, no choicepoint -@cindex @code{GO AHEAD}, no choicepoint -@quotation -I'M ALL OUT OF CHOICES! -@end quotation - -Your program asked that a choicepoint be backtracked to or removed, but -there aren't any choicepoints at the moment. This runtime error usually -indicates a logic mistake in your program. In backtracking programs -translated from other backtracking languages, this indicates that the -program has failed. - -@ieanchor E405 -@cindex multithreading, not enabled -@cindex backtracking, not enabled -@cindex @code{WHILE}, not enabled -@cindex @code{MAYBE}, not enabled -@cindex @code{GO AHEAD}, not enabled -@cindex @code{GO BACK}, not enabled -@quotation -PROGRAM REJECTED FOR MENTAL HEALTH REASONS -@end quotation - -Your program used a construct that only makes sense when multithreading -or backtracking (@code{WHILE}, @code{MAYBE}, @code{GO BACK}, or @code{GO -AHEAD}), but you didn't specify the @option{-m} option (@pxref{-m}). If -you meant to write a multithreaded or backtracking program, just give -that option; if you didn't, be careful what words you use in comments! -This error happens at compile-time. - -@ieanchor E436 -@cindex @code{RETRIEVE}, without stashing -@cindex stash failure -@quotation -THROW STICK BEFORE RETRIEVING! -@end quotation - -In order to @code{RETRIEVE} a variable, it has to be @code{STASH}ed -first; if it isn't, then this error happens at runtime. - -@ieanchor E444 -@cindex @code{COME FROM}, no target -@cindex @code{NEXT FROM}, no target -@quotation -IT CAME FROM BEYOND SPACE -@end quotation - -A @code{COME FROM} aiming at a line label --- as opposed to a computed -@code{COME FROM}, which is allowed to be pointing at a nonexistent line ---- must point to a valid line label. The same applies to @code{NEXT -FROM}. This error happens at compile time if a nonexistent line label is -found in one of these contexts. - -@ieanchor E533 -@cindex overflow, over twospot -@cindex overflow, over 32 bits -@cindex twospot overflow -@cindex 32 bit overflow -@quotation -YOU WANT MAYBE WE SHOULD IMPLEMENT 64-BIT VARIABLES? -@end quotation - -This error is like E275 (@pxref{E275}), but applies when an attempt is -made at runtime to store a threespot value (or even a fourspot or -morespot value) in a twospot variable, or a threespot or greater value -is produced as an intermediate during a calculation (for instance by a -mingle operation). No values above twospot are allowed at any point -during an @ical{} program; if you want to process higher numbers, you -have to figure out a different way of storing them. - -@ieanchor E555 -@cindex @code{COME FROM}, ambiguity -@quotation -FLOW DIAGRAM IS EXCESSIVELY CONNECTED -@end quotation - -Aiming two @code{COME FROM}s at the same line only makes sense in a -multithreaded program. In a non-multithread program, doing that will -cause this error at compile time (if neither @code{COME FROM} is -computed) or at run time (if the command that has just finished running -is simultaneously the target of two or more @code{COME FROM}s). This -either indicates an error in your program or that you've forgotten to -use the @option{-m} option (@pxref{-m}) if you are actually trying to -split the program into two threads. - -@ieanchor E562 -@cindex input, EOF -@cindex EOF -@cindex end of file -@quotation -I DO NOT COMPUTE -@end quotation - -The program asked for input, but for some reason it wasn't available. -(This is a runtime error, obviously.) The error may happen because the -input is being piped in from a command or file which has reached -end-of-file, or because the user typed @kbd{@key{CTRL}-@key{D}} -(UNIX/Linux) or @kbd{@key{CTRL}-@key{Z}} (DOS/Windows) while the program -was trying to @code{WRITE IN} some data. - -@ieanchor E579 -@cindex input, invalid -@quotation -WHAT BASE AND/OR LANGUAGE INCLUDES @var{string}? -@end quotation - -When reading spelt-out-digit input, the input didn't seem to be a valid -digit in English, Sanskrit, Basque, Tagalog, Classical Nahuatl, -Georgian, Kwakiutl, Volap@"uk, or Latin. This seems to have languages -covered pretty well; what on earth were you using, or did you just make -a spelling mistake? - -@ieanchor E621 -@cindex @code{RESUME}, by 0 -@quotation -ERROR TYPE 621 ENCOUNTERED -@end quotation - -The compiler encountered error E621 (@pxref{E621}). This happens at -runtime when the program requests that no entries are removed from the -@code{NEXT} stack (which is possible), but that the last entry removed -should be jumped to (which given the circumstances isn't, because no -entries were removed.) - -@ieanchor E632 -@quotation -THE NEXT STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT! -@end quotation - -When an attempt is made to @code{RESUME} past the end of the @code{NEXT} -stack, the program ends; however, this cause the program to end in a -manner other than via @code{GIVE UP} or @code{DON'T TRY AGAIN}, so an -error message must be printed, and this is that error message. - -@ieanchor E633 -@quotation -PROGRAM FELL OFF THE EDGE -@end quotation - -You can't just let execution run off the end of the program. At least, -that is, if it doesn't end with @code{TRY AGAIN}. An attempt to do that -causes this error at runtime. Note that if your program references the -system library, then it counts as being appended to your program and so -the program will run into the first line of the system library rather -than cause this error. As it happens, the first line of the system -library is a syntax error, so doing this will cause E000 (@pxref{E000}) -with the error text @samp{PLEASE KNOCK BEFORE ENTERING}. There isn't a -next statement to be executed with E633, so the next statement won't be -given in the error message. - -@ieanchor E652 -@cindex @code{PIN}, in a non-PIC program -@quotation -HOW DARE YOU INSULT ME! -@end quotation - -The @code{PIN} command doesn't make much sense for anything bigger than -a @acronym{PIC}; using it in a non-@acronym{PIC} program causes this -error at compile-time. Try using the normal input and output mechanisms -instead. This error may also be a clue that you are trying to compile a -@abbr{PIC-INTERCAL} program without giving the @option{-P} option -(@pxref{-P+,,-P}). - -@ieanchor E666 -@cindex out of memory, during compile -@quotation -COMPILER HAS INDIGESTION -@end quotation - -There isn't a limit on the length of an input program other than your -computer's memory; if your computer does run out of memory during -compilation, it causes this error. - -@ieanchor E774 -@cindex random bug, error message -@quotation -RANDOM COMPILER BUG -@end quotation - -No compiler is perfect; sometimes errors just happen at random. In this -case, the random error is E774. If you don't like the idea that your -program may be shot down by a random compiler bug, or you are doing -something important, you can use the @option{-b} option (@pxref{-b}) to -prevent this bug happening. (You may wonder why this bug is in there at -all if it's so easily prevented. The answer is that such a bug was -present in the original @icst{} compiler, which also had an option to -turn the bug off. It's also a reward for people who actually read the -manual.) - -@ieanchor E777 -@cindex directory problems, source file -@cindex no source file -@quotation -A SOURCE IS A SOURCE, OF COURSE, OF COURSE -@end quotation - -You specified a file to compile on the command line, but the compiler -couldn't find or couldn't open it. This is almost certainly because you -made a typo specifying the file. - -@ieanchor E778 -@cindex internal errors -@quotation -UNEXPLANED COMPILER BUG -@end quotation - -This should never come up, either at compile time or at run time. It -could come up at either when an internal check by the compiler or the -runtime libraries realises that something has gone badly wrong; mistakes -happen, and in such cases the mistake will have been detected. (If this -happens at compile time you can use the @option{-U} option -(@pxref{-U+,,-U}) to cause the compiler to send an abort signal -- which -normally causes a core dump -- when the error happens, to help debug -what's causing it.) More often, this error comes up when the operating -system has noticed something impossible, like an attempt to free -allocated memory twice or to write to a null pointer, and tells the -compiler an error has occured, in which case the same response of -putting up this error happens. The point is that in all cases this -error indicates a bug in the compiler (even if it happens at run time); -in such cases, it would be very helpful if you figure out what caused it -and send a bug report (@pxref{Reporting Bugs}). - -@ieanchor E810 -@cindex yuk, input overflow -@quotation -ARE ONE-CHARACTER COMMANDS TOO SHORT FOR YOU? -@end quotation - -This is a debug-time error caused when you give too much input to the -debugger when all it wanted was to know what you wanted to do next. - -@ieanchor E811 -@cindex yuk, breakpoint overflow -@cindex yuk, too many breakpoints -@cindex breakpoints, too many -@quotation -PROGRAM IS TOO BADLY BROKEN TO RUN -@end quotation - -There's a limit to how many breakpoints you can have in a program; -you've broken the limit and therefore broken the debugger. This is a -debug-time error. - -@ieanchor E888 -@quotation -I HAVE NO FILE AND I MUST SCREAM -@end quotation - -The output file couldn't be written, maybe because the disk is full or -because there's already a read-only file with the same name. This is a -compile-time error. - -@ieanchor E991 -@cindex out of memory, multithreading -@cindex out of memory, backtracking -@cindex multithreading, out of memory -@cindex backtracking, out of memory -@quotation -YOU HAVE TOO MUCH ROPE TO HANG YOURSELF -@end quotation - -There is no limit on the number of threads or choicepoints that you can -have in a multithreaded or backtracking program (in a program that isn't -multithreaded or backtracking, these are obviously limited to 1 and 0 -respectively). However, your computer may not be able to cope; if it -runs out of memory in the multithreader, it will cause this error at -runtime. - -@ieanchor E993 -@cindex @code{TRY AGAIN}, not last -@quotation -I GAVE UP LONG AGO -@end quotation - -@code{TRY AGAIN} has to be the last command in a program, if it's there -at all; you can't even follow it by comments, not even if you know in -advance that they won't be @code{REINSTATE}d. This error happens at -compile time if a command is found after a @code{TRY AGAIN}. - -@ieanchor E995 -@quotation -DO YOU REALLY EXPECT ME TO HAVE IMPLEMENTED THAT? -@end quotation - -Some parts of the code haven't been written yet. There ought to be no -way to cause those to actually run; however, if you do somehow find a -way to cause them to run, they will cause this error at compile time. - -@ieanchor E997 -@cindex whirlpool, in base 2 -@cindex sharkfin, in base 2 -@cindex TriINTERCAL, operators in base 2 -@quotation -ILLEGAL POSSESSION OF A CONTROLLED UNARY OPERATOR -@end quotation - -Some operators (such as whirlpool (@code{@@}) and sharkfin (@code{^})) -only make sense in @abbr{TriINTERCAL} programs, and some have a minimum -base in which they make sense. This error happens at compile-time if -you try to use an operator that conflicts with the base you're in (such -as using @abbr{TriINTERCAL} operators in an @ical{} program in the -default base 2). - -@ieanchor E999 -@cindex skeleton file, errors -@quotation -NO SKELETON IN MY CLOSET, WOE IS ME! -@end quotation - -The skeleton file @file{ick-wrap.c} or @file{pickwrap.c} is needed to be -able to compile @ical{} to C. If the compiler can't find it, it will -give this error message. This indicates a problem with the way the -compiler has been installed; try using the @option{-u} option -(@pxref{-u}) to find out where it's looking (you may be able to place a -copy of the skeleton file in one of those places.) - -@end table - -@node Warnings -@section Warnings -@cindex warnings -@cindex ick, warnings - -This is a list of the warnings stored in the warning database. Warnings -only come up when the @option{-l} (@pxref{-l}) is given; even then, some -of the warnings are not currently implemented and therefore will never -come up. - -@table @asis - -@ieanchor W016 -@quotation -DON'T TYPE THAT SO HASTILY -@end quotation - -The positional precedence rules for unary operators are somewhat -complicated, and it's easy to make a mistake. This warning is meant to -detect such mistakes, but is not currently implemented. - -@ieanchor W018 -@quotation -THAT WAS MEANT TO BE A JOKE -@end quotation - -If an @ical{} expression has been translated from another language such -as C, the optimiser is generally capable of translating it back into -something similar to the original, at least in base 2. When after -optimisation there are still @ical{} operators left in an expression, -then this warning is produced. (Therefore, it's likely to come up quite -a lot if optimisation isn't used@!) The system library produces some of -these warnings (you can tell if a warning has come up in the system -library because you'll get a line number after the end of your program). - -@ieanchor W112 -@cindex warnings, non-INTERCAL-72 -@cindex non-INTERCAL-72 warning -@quotation -THAT RELIES ON THE NEW WORLD ORDER -@end quotation - -This warning comes up whenever the compiler recognises that you've added -some code that didn't exist in @icst{}. This allows you to check -whether your code is valid @icst{} (although @option{-t} (@pxref{-t}) is -more useful for that); it also warns you that code might not be portable -(because @icst{} is implemented by most @ical{} compilers, but more -recent language features may not be). - -@ieanchor W128 -@quotation -SYSLIB IS OPTIMIZED FOR OBUSCATION -@end quotation - -There is an idiom used in the system library that does a right-shift by -selecting alternate bits from a twospot number and then mingling them -the other way round. A rightshift can much more easily be done with a -single rightshift, so this is a silly way to do it, and this warning -warns that this idiom was used. However, the present optimizer is -incapable of recognising whether this problem exists or not, so the -warning is not currently implemented. - -@ieanchor W276 -@cindex onespot, overflow warning -@cindex overflow, warning -@quotation -YOU CAN'T EXPECT ME TO CHECK BACK THAT FAR -@end quotation - -It's an error to assign a twospot value (a value over 65535) to a -onespot variable, or to use it as an argument to a mingle. If the -optimizer can't guarantee at compile time that there won't be an -overflow, it issues this warning. (Note that this doesn't necessarily -mean there's a problem --- for instance, the system library generates -some of these warnings --- only that the optimiser couldn't work out for -sure that there wasn't a problem.) - -@ieanchor W239 -@quotation -WARNING HANDLER PRINTED SNIDE REMARK -@end quotation - -Your code looks like it's trying to assign 0 to an array, giving it no -dimension; this is an error. This warning is produced at compile time -if it looks like a line in your code will cause this error, but it isn't -necessarily an error because that line of code might never be executed. - -@ieanchor W278 -@quotation -FROM A CONTRADICTION, ANYTHING FOLLOWS -@end quotation - -It's sometimes impossible to reverse an assignment (a reverse assignment -can happen if the @option{-v} option (@pxref{-v}) is used and an -expression is placed on the left of an assignment), or in operand -overloading; if the compiler detects that a reversal failure is -inevitable, it will cause this warning. Note that this doesn't always -cause an error, because the relevant code might never be executed. - -@ieanchor W534 -@cindex unary operators, portability -@cindex portability, unary operators -@quotation -KEEP LOOKING AT THE TOP BIT -@end quotation - -@cic{} uses a slightly different typing mechanism to some other @ical{} -compilers; types are calculated at compile time rather than run time. -This only makes a difference in some cases involving unary operators. -It's impossible to detect at compile time for certain whether such a -case has come up or not, but if the compiler or optimizer thinks that -such a case might have come up, it will issue this warning. - -@ieanchor W622 -@quotation -WARNING TYPE 622 ENCOUNTERED -@end quotation - -Your code looks like it's trying to resume by 0; this is an error. This -warning is produced at compile time if it looks like a line in your code -will cause this error, but it isn't necessarily an error because that -line of code might never be executed. - -@end table - -@node The yuk debugger -@chapter The yuk debugger -@cindex yuk -@cindex debugging, yuk -@cindex debugging, runtime -@cindex runtime debugger -@anchor{yuk} - -The @cic{} distribution contains a runtime debugger called `yuk'. -Unlike most other debuggers, it is stored as object code rather than as -an executable, and it is compiled into the code rather than operating on -it. To debug code, add @option{-y} (@pxref{-y}) to the command line of -@command{ick} when invoking it; that tells it to compile the debugger -into the code and then execute the resulting combination. (The -resulting hybrid debugger/input executable is deleted afterwards; this -is to prevent it being run by mistake, and to prevent spreading the -debugger's licence onto the code it was compiled with.) - -yuk can also be used as a profiler using the @option{-p} option -(@pxref{-p}); this produces a file @file{yuk.out} containing information -on how much time was spent running each command in your program, and -does not prompt for debugger commands. - -Note that some command line arguments are incompatible with the -debugger, such as @option{-m} and @option{-f}. In particular, this -means that multithreaded programs and programs that use backtracking -cannot be debugged using this method; the @option{+printflow} option -(@pxref{+printflow}) to a compiled program may or may not be useful for -debugging multithreaded programs. - -When the debugger starts, it will print a copyright message and a -message on how to access online help; then you can enter commands to -run/debug the program. The debugger will show a command prompt, -@samp{yuk007 }, to let you know you can input a command. - -@cindex yuk, commands -Here are the commands available. Commands are single characters -followed by newlines, or followed by a line number (in decimal) and a -newline or a variable name (a @code{.}, @code{,}, @code{:} or @code{;} -followed by a number in decimal; note that some commands only allow -onespot and twospot variables as arguments). - -@multitable @columnfractions .15 .85 -@headitem Command @tab Description -@item a@var{LINE} -@tab -All non-abstained commands on line @var{LINE} become abstained from -once. -@item b@var{LINE} -@tab -A breakpoint is set on line @var{LINE}. The breakpoint causes execution -with @samp{c} to stop when it is reached. -@item c -@tab -The program is run until it ends (which also ends the debugger) or a -breakpoint is reached. -@item d@var{LINE} -@tab -Any breakpoint that may be on line @var{LINE} is removed. -@item e@var{LINE} -@tab -An explanation of the main expression in each command on line @var{LINE} -is printed to the screen. The explanation is in the same format as the -format produced by @option{-h} (@pxref{-h}) and shows what the optimiser -optimised the expression to (or the original expression if the optimiser -wasn't used). -@item f@var{LINE} -@tab -Removes the effect of the @samp{m} command on line @var{LINE}. -@item g@var{LINE} -@tab -Causes the current command to be the first command on @var{LINE} (if not -on that line already) or the next command on @var{LINE}, as if that line -was @code{NEXT}ed to and then that @code{NEXT} stack item was forgotten. -@item h -@tab -Lists 10 lines either side of the current line; if there aren't 10 lines -to one or the other side of the current line, instead more lines will be -shown on the other side to compensate, if available. -@item i@var{VAR} -@tab -Causes variable @var{VAR} to become @code{IGNORE}d, making it read-only. -@item j@var{VAR} -@tab -Causes variable @var{VAR} to become @code{REMEMBER}ed, making it no -longer read-only. -@item k -@tab -Continues executing commands until the @command{NEXT} stack is the same -size or smaller than it was before. In other words, if the current -command is not a @command{NEXT} and doesn't have a @command{NEXT FROM} -aiming at it, one command is executed; but if a @command{NEXT} does -happen, execution will continue until that @command{NEXT} returns or is -forgotten. A breakpoint or the end of the program also end this. -@item l@var{LINE} -@tab -Lists 10 lines of source code either side of line @var{LINE}, the same -way as with @samp{h}, but using a line stated in the command rather than -the current line. -@item m@var{LINE} -@tab -Produces a message onscreen every time a command on line @var{LINE} is -executed, but without interrupting the program. -@item n -@tab -Show the @command{NEXT} stack on the screen. -@item o -@tab -Continue executing commands until the @command{NEXT} stack is smaller -than it was before. If you are using @command{NEXT}s like procedures, -then this effectively means that the procedure will run until it -returns. A breakpoint or the end of the program also end this. -@item p -@tab -Displays the value of all onespot and twospot variables. -@item q -@tab -Aborts the current program and exits the debugger. -@item r@var{LINE} -@tab -Reinstates once all abstained commands on line @var{LINE}. -@item s -@tab -Executes one command. -@item t -@tab -Continues execution until the end of the program or a breakpoint: each -command that executes is displayed while this command is running. -@item u@var{LINE} -@tab -Continues execution of the program until just before a command on line -@var{LINE} is run (or a breakpoint or the end of the program). -@item v@var{VAR} -@tab -Adds a `view' on variable @var{VAR} (which must be onespot or twospot), -causing its value to be displayed on the screen whenever a command is -printed on screen (for instance, because the command has just been -stepped past, or due to the @samp{m} or @samp{t} commands). -@item w -@tab -Displays the current line and current command onscreen. -@item x@var{VAR} -@tab -Removes any view and any action that may be associated with it on -variable @var{VAR} (which must be onespot or twospot). -@item y@var{VAR} -@tab -Adds a view on variable @var{VAR}; also causes a break, as if a -breakpoint was reached, whenever the value of that variable changes. -@item z@var{VAR} -@tab -Adds a view on variable @var{VAR}; also causes a break, as if a -breakpoint was reached, whenever that variable's value becomes 0. -@item @var{VAR} -@tab -A onespot or twospot variable written by itself prints out the value of -that variable. -@item <@var{VAR} -@tab -@command{WRITEs IN} a new value for variable @var{VAR}. Note that input -must be in the normal @samp{ONE TWO THREE} format; input in any other -format will cause error E579 (@pxref{E579}) and as that is a fatal -error, the debugger and program it's debugging will end. -@item * -@tab -Displays the license conditions under which @command{ick} is -distributed. -@item ? -@tab -Displays a summary of what each command does. (@samp{@@} does the same -thing.) -@end multitable - -While the code is executing (for instance, during a @samp{c}, @samp{k}, -@samp{o}, @samp{t} or @samp{u} command), it's possible to interrupt it -with @kbd{@key{CTRL}-@key{C}} (on UNIX/Linux) or -@kbd{@key{CTRL}-@key{BREAK}} (on Windows/DOS); this will cause the -current command to finish running and the debugger prompt to come back -up. - -@ifset notsplit -@partheading PART II: THE @ical{} LANGUAGE -@end ifset -@node Syntax -@chapter Syntax -@cindex syntax, INTERCAL -@cindex INTERCAL, syntax - -@ical{} programs consist of a list of statements. Execution of a -program starts with its first statement; generally speaking each -statement runs after the previous statement, although many situations -can change this. - -Whitespace is generally insignificant in @ical{} programs; it cannot be -added in the middle of a keyword (unless the keyword contains whitespace -itself) or inside a decimal number, but it can be added more or less -anywhere else, and it can be removed from anywhere in the program as -well. - -An @ical{} statement consists of an optional line label, a statement -identifier, an optional execution chance, the statement itself -(@pxref{Statements}), and optionally @code{ONCE} or @code{AGAIN}. - -@menu -* Line Labels:: Allowing lines to be referred to -* Statement Identifiers:: Marking the start of a statement -* Execution Chance:: Statements that might not execute -* ONCE and AGAIN:: Self-abstaining and self-reinstating statements -@end menu - -@node Line Labels -@section Line Labels -@cindex line label -@cindex line number - -@portability{yes, all versions, all versions} - -The first part of an @ical{} statement is a line label that specifies -what its line number is. This is optional; it's allowed to have a -statement without a line number, although that prevents other commands -referring to it by number. Line numbers must be constants, and unique -within the program. However, they do not have to be in order; unlike -some other languages with line numbers, a line with a higher number can -come earlier in the program than a line with a lower number, and the -numbers don't affect the order in which commands are executed. - -A line label is a integer expressed in decimal within a wax/wane pair -(@code{(} and @code{)}). For instance, this is a valid line label: - -@example -(1000) -@end example - -Note that line numbers from 1000 to 1999 are used by the system library, -so using them within your own programs may produce unexpected errors if -the system library is included. Apart from this, line numbers from 1 to -65535 are allowed. - -It has become reasonably customary for people writing @ical{} libraries -to pick a range of 1000 line numbers (for instance, 3000 to 3999) and -stick to that range for all line numbers used in the program (apart from -when calling the system library), so if you want to write an @ical{} -library, it may be a good idea to look at the existing libraries (in the -@file{pit/lib} directory in the @cic{} distribution) and choose a range -of numbers that nobody else has used. If you aren't writing a library, -it may be a good idea to avoid such number ranges (that is, use only -line numbers below 1000 or very high numbers that are unlikely to be -used by libraries in the future), so that you can easily add libraries -to your program without renumbering in the future. - -@node Statement Identifiers -@section Statement Identifiers -@cindex statement identifier -@findex DO -@findex PLEASE -@findex NOT -@findex N'T - -@portability{yes, all versions, all versions} - -After the line label (if a statement has one) comes the statement -identifier, which marks where the statement starts. Either the label or -the statement identifier, whichever one comes first, marks where the -preceding statement finishes. - -@anchor{DO}@anchor{PLEASE} -The main statement identifier is @code{DO}. It also has two synonyms, -@code{PLEASE} and @code{PLEASE DO}; these synonyms are the 'polite' -forms of statement identifiers. Although the three identifiers have the -same meaning, using either polite or non-polite identifiers too much can -cause an error; the correct proportion is approximately 3 non-polite -identifiers for every polite identifier used. None of these identifiers -actually does anything else apart from marking where the statement -starts; they leave the statements in the default `reinstated' state. - -@anchor{NOT}@anchor{N'T} -Adding @code{NOT} or @code{N'T} to the end of any of these identifiers, -to create a statement identifier such as @code{DO NOT} or @code{PLEASE -DON'T}, also creates a valid statement identifier. These differ in -meanings from the previous set of identifiers, though; they cause the -statement they precede to not be executed by default; that is, the -command will be skipped during execution (this is known as the -`abstained' state). This applies even if the command in question is in -fact a syntax error, thus causing this to be a useful method of writing -comments. One common idiom is to write code like this: - -@example -PLEASE NOTE: This is a comment. -@end example - -The statement identifier (@code{PLEASE NOT}) is the only part of this -statement that is valid @ical{}; however, because the statement -identifier is in the negated form that contains @code{NOT}, the syntax -error won't be executed, and therefore this is a valid statement. (In -@ical{}, syntax errors happen at runtime, so a program containing a -statement like @code{DOUBT THIS WILL WORK} will still compile, and will -not end due to the syntax error unless that statement is actually -executed. @xref{E000}.) - -The @code{ABSTAIN} and @code{REINSTATE} statements can override the -@code{NOT} or otherwise on a statement identifier; @xref{ABSTAIN}. - -In backtracking programs, @code{MAYBE} is also a valid statement -identifier; @xref{MAYBE}. It comes before the other keywords in the -statement identifier, and an implicit @code{DO} is added if there wasn't -one already in the statement identifier (so @code{MAYBE}, @code{MAYBE -DO}, @code{MAYBE DON'T}, @code{MAYBE PLEASE}, and so on are all valid -statement identifiers). - -@node Execution Chance -@section Execution Chance -@cindex execution chance -@cindex double-oh-seven -@findex % - -@portability{yes, all versions, all versions} - -It's possible to specify that a command should be run only a certain -proportion of the time, at random. This is a rarely used feature of -@ical{}, although it is the only way to introduce randomness into a -program. (The @cic{} compiler approximates this with pseudorandomness.) -An execution chance specification comes immediately after the statement -identifier, but before the rest of the statement, and consists of a -double-oh-seven (@code{%}) followed by an integer from 1 to 99 -inclusive, written in decimal; this gives the percentage chance of the -statement running. The execution chance only acts to prevent a -statement running when it otherwise would have run; it cannot cause a -statement that would otherwise not have run to run. For instance, the -statement @code{DO %40 WRITE OUT #1} has a 40% chance of writing out -@samp{I}, but the statement @code{DON'T %40 WRITE OUT #1} has no chance -of writing out @code{I} or anything else, because the @code{N'T} -prevents it running and the double-oh-seven cannot override that. - -@node ONCE and AGAIN -@section ONCE and AGAIN -@cindex ABSTAIN, self-abstaining -@cindex REINSTATE, self-reinstating -@cindex self-abstaining -@cindex self-reinstating -@findex ONCE -@findex AGAIN -@anchor{ONCE}@anchor{AGAIN} - -@portability{no, version 0.25+, no} - -The last part of a statement is an optional @code{ONCE} or @code{AGAIN}. -@code{ONCE} specifies that the statement is self-abstaining or -self-reinstating (this will be explained below); @code{AGAIN} specifies -that the statement should behave like it has already self-reinstated or -self-abstained. Whether the behaviour is self-abstention or -self-reinstatement depends on whether the statement was initially -abstained or not; a @code{ONCE} on an initially reinstated statement or -@code{AGAIN} on an initially abstained statement indicates a -self-abstention, and a @code{ONCE} on an initially abstained statement -or @code{AGAIN} on an initially reinstated statement indicates a -self-reinstatement. - -The first time a self-abstaining statement is encountered, it is -executed as normal, but the statement is then abstained from and -therefore will not run in future. Likewise, the first time -self-reinstating statement is encountered, it is not executed (as is -normal for an abstained statement), but then becomes reinstated and will -run in future. In each of these cases, the @code{ONCE} effectively -changes to an @code{AGAIN}; the @code{ONCE} only happens once, as might -be expected. - -@code{REINSTATING} a currently abstained self-abstaining statement or -@code{ABSTAINING} (that is, with the @code{ABSTAIN} or @code{REINSTATE} -commands) a currently reinstated self-reinstating statement causes the -@code{AGAIN} on the statement to change back into a @code{ONCE}, so the -statement will again self-abstain or self-reinstate. Likewise, -@code{REINSTATING} a currently abstained self-reinstating statement or -@code{ABSTAINING} a currently reinstated self-abstaining statement -causes its @code{ONCE} to turn into an @code{AGAIN}. - -Historical note: @code{ONCE} was devised by Malcom Ryan as a method of -allowing synchronisation between threads in a multithreaded program -(@code{ONCE} is atomic with the statement it modifies, that is, there is -no chance that threads will change between the statement and the -@code{ONCE}). @code{AGAIN} was added to Malcom Ryan's Threaded Intercal -standard on the suggestion of Kyle Dean, as a method of adding extra -flexibility (and to allow the @code{ONCE}s to happen multiple times, -which is needed to implement some multithreaded algorithms). - -@node Expressions -@chapter Expressions -@cindex expressions - -Many @ical{} statements take expressions as arguments. Expressions are -made up out of operands and operators between them. Note that there is -no operator precedence in @ical{}; different compilers resolve -ambiguities different ways, and some versions of some compilers -(including the original @icst{} compiler) will cause error messages on -compiling or executing an ambiguous expression, so it's safest to fully -group each expression. - -@menu -* Constants and Variables:: The basic operands that make up expressions -* Grouping Rules:: How to specify grouping in expressions -* Operators:: Joining operands into more complex expressions -@end menu - -@node Constants and Variables -@section Constants and Variables -@cindex constant -@cindex variable -@cindex mesh -@cindex onespot -@cindex twospot -@cindex tail -@cindex hybrid -@findex # -@findex . -@findex : -@findex , -@findex ; - -@portability{yes, all versions, all versions} - -The basic operands in @ical{} are constants and variables. These -together make up what in other languages are known as `lvalues', that -is, operands to which values can be assigned. (Constants can also be -lvalues in @ical{}, but by default @cic{} turns this off because it -carries an efficiency penalty and can be confusing; this can be turned -on with the @option{-v} option (@pxref{-v}).) - -Constants can have any integer value from 0 to 65535 inclusive; higher -values (up to 4294967295) can be generated in programs, but cannot be -specified literally as constants. (The usual way to work around this -limitation is to interleave two constants together; @xref{Mingle}.) A -constant is written as a mesh (@code{#}) followed by a number in -decimal. At the start of the program, all constants have the same value -as the number that identifies them; for instance, @code{#100} has 100 as -its value, and it's strongly advised not to change the value of a -constant during the execution of a program. - -There are four types of variable: 16-bit and 32-bit unsigned integers, -and arrays of 16-bit and 32-bit unsigned integers. These are -represented with a spot, twospot, tail, and hybrid (@code{.}, @code{:}, -@code{,}, and @code{;}) respectively. For this reason, integers within -the range 0 to 65535 inclusive are known as `onespot numbers', and -integers within the range 0 to 4294967295 inclusive are known as -`twospot numbers'; variables with those ranges are known as onespot and -twospot variables. - -Variables are represented with a character representing their data type, -followed by an integer from 1 to 65535 inclusive, written in decimal. -Non-array variables don't need to be declared before they are used; they -automatically exist in any program that uses them. For instance, -@code{.1} and @code{.001} are the same variable, onespot number 1. -Array variables need to be dimensioned before they are used, by -assigning dimensions to them; @xref{Calculate}. - -@node Grouping Rules -@section Grouping Rules -@cindex grouping rules -@cindex positional precedence -@cindex spark -@cindex rabbit-ears -@cindex ears -@findex ' -@findex " - -Because there are no operator precedences in @ical{}, there are various -solutions to specifying what precedences actually are. - -@table @asis - -@item The portable solution - -All known versions of @ical{} accept the @icst{} grouping rules. These -state that it's possible to specify that an operator takes precedence by -grouping it inside sparks (@code{'}) or rabbit-ears (@code{"}), the same -way as wax/wane pairs (parentheses) are used in other programming -languages. @icst{} and earlier @cic{} versions demanded that -expressions were grouped fully like this, and this practice is still -recommended because it leads to portable programs and is easier to -understand. Whether sparks or rabbit-ears (often called just `ears' for -short) are used normally doesn't matter, and programmers can use one or -the other for clarity or for aesthetic appeal. (One common technique is -to use just sparks at the outermost level of grouping, just ears at the -next level, just sparks at the next level, and so on; but expressions -like @code{''#1~#2'~"#3~#4"'~#5} are completely unambiguous, at least to -the compiler.) - -There are, however, some complicated situations involving arrays -subscripting where it is necessary to use sparks and ears at alternate -levels, if you want to write a portable program. This limitation is in -@cic{} to simplify the parsing process; @icst{} has the same limitation, -probably for the same reason. Compare these two statements: - -@example -DO .1 <- ,3SUB",2SUB.1".2 -DO .1 <- ,3SUB",2SUB.1".2~.3"".4 -@end example - -The problem is that in the first statement, the ears close a group, and -in the second statement, the ears open a group, and it's impossible to -tell the difference without unlimited lookahead in the expression. -Therefore, in similar situations (to be precise, in situations where a -group is opened inside an array subscript), it's necessary to use the -other grouping character to the one that opened the current group if you -want a portable program. - -One final comment about sparks and rabbit-ears; if the next character in -the program is a spot, as often happens because onespot variables are -common choices for operands, a spark and the following spot can be -combined into a wow (@code{!}). Unfortunately, none of the character -sets that @cic{} accepts as input (UTF-8, Latin-1, and ASCII-7) contain -the rabbit character, although the Hollerith input format that @clcic{} -can use does. - -@item Positional precedences: @clcic{} rules - -The precedence rules used by @clcic{} for grouping when full grouping -isn't used are simple to explain: the largest part of the input that -looks like an expression is taken to be that expression. The main -practical upshot of this is that binary operators right-associate; that -is, @code{.1~.2~.3} is equivalent to @code{.1~'.2~.3'}. @cic{} versions -0.26 and later also right-associate binary operators so as to produce -the same results as @clcic{} rules in this situation, but as nobody has -yet tried to work out what the other implications of @clcic{} rules are -they are not emulated in @cic{}, except possibly by chance - -@ianchor Prefix and infix unary operators -@cindex unary operator, prefix -@cindex unary operator, infix - -In @icst{} and versions of @cic{} before 0.26, unary operators were -always in the `infix' position. (If you're confused about how you can -have an infix unary operator: they go one character inside a group that -they apply to, or one character after the start of a constant or -variable representation; so for instance, to portably apply the unary -operator @code{&} to the variable @code{:1}, write @code{:&1}, and to -portably apply it to the expression @code{'.1~.2'}, write -@code{'&.1~.2'}.) @clcic{}, and versions of @cic{} from 0.26 onwards, -allow the `prefix' position of a unary operator, which is just before -whatever it applies to (as in @code{&:1}). This leads to ambiguities as -to whether an operator is prefix or infix. The portable solution is, of -course, to use only infix operators and fully group everything, but when -writing for recent versions of @cic{}, it's possible to rely on its -grouping rule, which is: unary operators are interpreted as infix where -possible, but at most one infix operator is allowed to apply to each -variable, constant, or group, and infix operators can't apply to -anything else. So for instance, the @cic{} @code{'&&&.1~.2'} is -equivalent to the portable @code{'&"&.&1"~.2'} (or the more readable -version of this, @code{"&'"&.&1"~.2'"}, which is also portable). If -these rules are counter-intuitive to you, remember that this is @ical{} -we're talking about; note also that this rule is unique to @cic{}, at -least at the time of writing, and in particular @clcic{} is likely to -interpret this expression differently. - -@end table - -@node Operators -@section Operators -@cindex operator - -Operators are used to operate on operands, to produce more complicated -expressions that actually calculate something rather than just fetch -information from memory. There are two types of operators, unary and -binary operators, which operate on one and two arguments respectively. -Binary operators are always written between their two operands; to -portably write a unary operator, it should be in the `infix' position, -one character after the start of its operand; see @ref{Prefix and infix -unary operators} for the full details of how to write unary operators -portably, and how else you can use them if you aren't aiming for -portability. This section only describes @icst{} operators; many -@ical{} extensions add their own operators. - -@menu -* Mingle:: Interleaving bits in two operands -* Select:: Selecting from one operand according to another -* Unary Binary Logic:: Binary logic on adjacent bits of an operand -@end menu - -@node Mingle -@subsection Mingle -@cindex mingle -@cindex interleave -@findex $ - -@portability {yes, all versions, all versions} - -Mingle, or interleave, is one of the two binary operators in @icst{}. -However, different @ical{} compilers represent it in different ways, so -it is impossible to write a mingle in a program completely portably. - -The original @icst{} compiler (the Princeton compiler) used the 'change' -(cent) character for a mingle, represented as @code{c}, backspace, -@code{/}. (By the way, this is still the most portable way to write a -mingle; both @cic{} and @clcic{} accept it, at least if a lowercase -@code{c} is used; @clcic{} also accepts a capital @code{C} before the -backspace and @code{/}, and allows @code{|} rather than @code{/}.) The -Atari compiler, another @icst{} compiler, used a 'big money' character -(@code{$}) as the mingle character. @cic{} originally also used the -@code{$} character for mingle, and this character is the one most -commonly seen in existing @cic{} programs, and most often used when -giving examples of @ical{} on Usenet, because it exists in the ASCII-7 -character set, and because it doesnt contain control characters. From -version 0.18 of @cic{} onwards, various other units of currency (change, -quid, and zlotnik if Latin-1 is used as the input, and euro if Latin-9 -is used as the input) are accepted; from version 0.20 onwards, in -addition to the Latin-1 characters, all the currency symbols in Unicode -are accepted if UTF-8 is used as the input format. @cic{} has always -used the change character (either the Latin-1 version or the version -that contains a backspace) for mingle. In this manual, mingle will be -represented as @code{$}, but it's important to bear in mind that this -character is not the most portable choice. - -The mingle operator should be applied to two operands or expressions. -To be portable, the operands must both be onespot expressions, that is -expressions which have a 16-bit result; @cic{} relaxes this rule -slightly and only requires that the result be in the onespot range. -(This is because the data type of a select operator's value is meant to -be determined at runtime; @cic{} determines all data types at compile -time, so has to guess a 32-bit result for a select with a 32-bit type as -its right operand even when the result might actually turn out to be of -a 16-bit type, and so this behaviour prevents an error when a select -operation returns a value with a 16-bit data type and is used as an -argument to amingle.) The result is a 32-bit value (that is, it is of a -32-bit data type, even if its value fits into the onespot range), which -consists of bits alternated from the two arguments; to be precise, its -most significant bit is the most significant bit of its first argument, -its second most significant bit is the most significant bit of its -second argument, its third most significant bit is the second most -significant bit of its first argument, and so on until its least -significant bit, which is the least significant bit of its second -argument. - -One of the most common uses of interleaving is to create a constant with -a value greater than 65535; for instance, 65536 is @code{#256$#0}. It -is also commonly used in expressions that need to produce 32-bit -results; except in some simple cases, this is usually coded by -calculating separately the odd-numbered and even-numbered bits of the -result, and mingling them together at the end. It is also used in -expressions that need to left-shift values or perform similar -value-increasing operations, as none of the other operators can easily -do this; and mingle results are commonly used as the argument to unary -binary logic operators, because this causes them to behave more like the -binary logic operators found in some other languages. - -@node Select -@subsection Select - -@portablity{yes, all versions, all versions} - -The select operator is one of the two binary operators in @icst{}; -unlike mingle, every known implementation of @ical{} ever has used the -sqiggle character (@code{~}) as the representation of the select -operator, meaning that writing it portably is easy. - -The select operator takes two arguments, which can be of either datatype -(that is, 16- or 32-bit). It returns a value made by selecting certain -bits of its first operand indicated by the second operand, and -right-justifying them. What it does is ignores all the bits of the -first operand where the second operand has a 0 as the corresponding bit, -that is, deletes them from a copy of the operand's value; the bits that -are left are squashed together towards the least-significant end of the -number, and the result is filled with 0s to make it up to 16 or 32 -bits. (In @icst{} the minimum multiple of 16 bits possible that the -result fits into is chosen, although if :1 has the value 131061 (in hex, -1FFFF) the expression @code{#21~:1} produces a 32-bit result because 17 -bits were selected, even though many of the leading bits were zeros; in -@cic{} the data type of the result is the same as of the right operand -of the select, so that it can be determined at run time, and so using a -unary binary logic operator on the result of select when the right -operand has a 32-bit type is nonportable and not recommended.) As an -example, @code{#21~:1} produces 21 as its result if :1 has the value -131061, 10 as its result if :1 has the value 30 (1E in hex; the -least significant bit of 21 is removed because it corresponds to a 0 in -:1), and 7 as its result if :1 has the value 21 (because three bits in -21 are set, and those three bits from 21 are therefore selected by 21). - -Select is used for right-shifts, to select every second bit from a -number (either to produce what will eventually become an argument to -mingle, or to interpret the result of a unary binary logic operator, or -occasionally both), to test if a number is zero or not (by selecting it -from itself and selecting 1 from the result), in some cases as a limited -version of bitwise-and (that only works if the right operand is 1 less -than a power of 2), and for many other purposes. - -@node Unary Binary Logic -@subsection Unary Binary Logic -@cindex unary binary logic -@cindex and -@cindex or -@cindex xor -@cindex exor -@cindex exclusive or -@findex ? -@findex & -@findex V -@cindex what -@cindex ampersand -@cindex book - -@portability{yes, all versions, all versions} - -There are three unary operators in @icst{}, each of which carries out a -binary logic operation on adjacent bits of the number. The operators are -and, or, and exclusive or; and and or are represented by an ampersand -(@code{&}) and book (@code{V}) respectively, and exclusive or has the -same notational problems as mingle. It was represented by a bookworm, -written @code{V}, backspace, @code{-}, in the Princeton @icst{} -implementation, and this is still the most portable way to write it -(@cic{} and @clcic{} accept it). The Atari implementation of @icst{} -wrote it with a what (@code{?}), and this is the representation -originally used by @cic{} (and still accepted), the one most commonly -used on Usenet, and the one used in this manual (although again, it's -worth pointing out that this isn't portable). @clcic{} approximates a -bookworm with the yen character, which being a currency character is one -of the possible representations for mingle in @cic{}; therefore, @cic{} -will only execute a @clcic{} program which contains yen-represented -exclusive ors if the @clcic{} compatibility option @code{-X} is used -(@pxref{-X+,,-X}). (In the same way, @clcic{} has a @cic{} -compatibility option to allow the use of @code{?} for exclusive-or.) - -The operators take each pair of consecutive bits in their arguments -(that is, the least significant with the second least significant, the -second least significant with the third least significant, the third -least significant with the fourth least significant, and so on, with the -pair consisting of the most significant and least significant being used -to calculate the most significant bit of the result), and perform an -appropriate logic operation on them; and sets a bit of the result if and -only if both bits in the pair were set, or sets each bit corresponding to -each pair where either bit was set, and exclusive or sets if and only if -the bits in the pair had different values (that is, one was set, but not -both). So for instance, @code{#&26} is 16 (26 is 1A in hexadecimal or -11010 in binary); @code{#V26} is 31 (11111 in binary), and @code{#?26} -is 23 (10111 in binary). - -The most commonly seen use for these operators is to carry out bitwise -ands, ors, and exclusive ors between two different 16-bit expressions, -by mingling them together, applying a unary binary logic operator, and -selecting every second bit of the result; such code often results due to -people thinking in terms of some other language when writing @ical{}, -but is still often useful. (Historically, the first idiom added to the -optimizer, apart from constant folding, was the mingle/unary/select -sequence.) There are more imaginative uses; one impressive example is -the exclusive or in the test for greater-than from the original @icst{} -system library: - -@example -DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"' - ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$ - #65535'"'~'#0$#65535'" -DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535~ - #65535"'~'#65535$#0'"$#32768'~'#0$#65535'" - $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"' - "$"':5~:5'~#1"'~#1"$#2'~#3 -@end example - -The first statement works out the value of :1 bitwise exclusive or :2; -the second statement then works out whether the most significant set bit -in :5 (that is, the most significant bit that differs between :1 and :2) -corresponds to a set bit in :2 or not. In case that's a bit too -confusing to read, here's the corresponding optimizer idiom (in OIL): - -@example -((_1~:2)~((?(:2~:2))^#2147483648))->(_1>(:2^_1)) -@end example - -(Here, the ^ refers to a bitwise exclusive or, an operation found in OIL -but not in @ical{}, which is why the @ical{} version is so much longer.) -The @ical{} version also has some extra code to check for equality and -to produce 1 or 2 as the output rather than 0 or 1. - -@node Statements -@chapter Statements - -@ifset notsplit -@partheading PART III: @ical{} DIALECTS AND EXTENSIONS -@end ifset -@node TriINTERCAL -@chapter TriINTERCAL - -@c first available in 0.7 - -@node Multithreading and Backtracking -@chapter Multithreading and Backtracking - -@node Operand Overloading -@chapter Operand Overloading - -@node PIC-INTERCAL -@chapter PIC-INTERCAL - -@node Differences to Other Compilers -@chapter Differences to Other Compilers - -@ifset notsplit -@partheading PART IV: APPENDICES AND INDICES -@end ifset -@node Optimizer Idiom Language -@appendix Optimizer Idiom Language -@cindex Optimizer Idiom Language -@cindex OIL - -One file in the @cic{} distribution (@file{src/idiotism.oil}) is written -in Optimizer Idiom Language, a programming language designed especially -for expressing optimizer idioms for @ical{} in an easily editable form -(well, at least it's easier than the unmaintainable set of idioms -hard-coded in C that were used in previous versions of the @ical{} -compiler). - -@menu -* Basics: OIL Basics. The basics of how an OIL program works. -* Syntax: OIL Syntax. How to write comments, idioms, and groups. -* Expressions: OIL Expressions. Expressions are the basis of idioms. -* Patterns: OIL Patterns. Filling in the left hand side of an idiom. -* Replacements: OIL Replacements. Syntax for the right hand side. -* Loops: OIL Loops. Simplifying and shortening programs. -* Tips: OIL Tips. Some tips about using OIL. -* Example: OIL Example. An example of how OIL can work. -@end menu - -@node OIL Basics -@appendixsec OIL Basics -@cindex OIL, basics -@cindex @file{src/idiotism.oil} -@cindex @file{idiotism.oil} -@cindex OIL, execution - -The structure of an @acronym{OIL} file consists of a sequence of idioms. -An optimizer idiom looks for a certain pattern in an expression (which -could be an @ical{} expression, or an expression that has already been -partly optimized and therefore contains some non-@ical{} operators), and -replaces it with a replacement that's `simpler' in some sense (in the -case of @cic{}, `simpler' is interpreted to mean `compiles into a faster -or smaller executable when run through a C compiler'). When an -@acronym{OIL} program acts on an input @ical{} file, it keeps on -matching idioms to simplify expressions, until none of the idioms act -any more (and if a situation occurs where idioms can keep matching -indefinitely, the compiler goes into an infinite loop; so don't allow -that to happen); at present, the idioms are tried from left to right, -from the leaves of an expression to its root, and from the start of the -OIL file to the end; but don't rely on that, because it's subject to -change (and gets confusing when you think about what happens when the -program actually does a replacement). Anyway, the point is that if an -idiom can match an expression, and another idiom doesn't change it -first, then the idiom will be matched against that part of the -expression eventually, and the program won't end until there are no -idioms that match the optimized expression. - -At present, the only place that @acronym{OIL} is used in the @cic{} -compiler is when the @option{-O} option (@pxref{-O+,,-O}) is used in -base 2. (Syntax is planned to extend @acronym{OIL} to higher bases, and -some of this is documented and even implemented, but there's no way to -use it.) The idioms are read from the file @file{src/idiotism.oil} -during the compilation of the @cic{} from sources; you can change the -idioms, but you will then have to recompile the distribution (and if you -are using the @command{config.sh} method, also reinstall, but that will -be pretty fast.) - -@node OIL Syntax -@appendixsec OIL Syntax -@cindex OIL, syntax -@cindex syntax, of OIL - -An @acronym{OIL} file is encoded as an @acronym{ASCII} text file using -no codepoints outside the range 0-127; using 10 for newline (as on a -UNIX or Linux system) is always acceptable, but using 13 then 10 (as is -common on Windows or DOS) for newline is acceptable only if your C -compiler recognizes that as a newline. I have no idea what happens if -you use just 13 on an Apple computer on which that is the common newline -convention. - -@cindex OIL, comments -@cindex comments, OIL -Comments can be given anywhere in the file by writing lines starting -with semicolons (known as hybrids to @ical{} programmers). It's also -possible to write a semicolon after part of a line to comment out the -rest of the line. Inside braced C expressions, comments can be given -anywhere whitespace would be allowed by placing them between @code{/*} -and @code{*/} (in such cases, the comments will be copied verbatim to -the C temporary files used when building the @cic{} compiler, where your -C compiler will ignore them). Whitespace is ignored nearly everywhere; -the only places it isn't ignored are in the middle of a decimal -constant, inside square brackets, immediately after one of the -characters @samp{.:#_@}}, and anywhere that C doesn't allow it in quoted -C code. (This means that you can even place it inside operators like && -if you like, as long as they're part of OIL code and not C code, -although doing this is not recommended.) If you use whitespace in a -situation where it isn't ignored, that's almost certainly an error. - -@cindex OIL, idiom groups -Idioms are grouped into groups of idioms by placing an identifier in -square brackets before the group; this follows the rules for C -identifiers, except that there's a maximum length of 30 characters. -This identifier is the `name' of the group, which has no effect except -on optimizer debug output; for that matter, the only effect a group has -is that all idioms in the group look the same in optimizer debug output, -because they have the same name. It's recommended that idioms only have -the same name if they are the same idiom, possibly written in several -ways. For example, a shift by 0 has no effect and may as well be -removed from the output; the way to express this in OIL is: - -@example -[nullshift] -(_1 >> #0)->(_1) -(_1 << #0)->(_1) -@end example - -Here, nullshift is the name of the group of idioms, and two idioms are -given; one which removes a null rightshift, and one which removes a null -leftshift. - -@cindex OIL, idioms -@cindex idiom -As the example above shows, the syntax of an idiom itself is - -@example -(pattern)->(replacement) -@end example - -The parentheses here are actually part of the pattern and/or -replacement, and as such sparks (apostrophes) or rabbit-ears (double -quotes) can be used instead; they're shown in the syntax because the -outer layer of parenthesising is always required. Both the pattern and -replacement are @acronym{OIL} expressions, although they both have their -own special syntax elements as well. - -@node OIL Expressions -@appendixsec OIL Expressions -@cindex expressions, OIL -@cindex OIL, expressions - -An @acronym{OIL} expression is built around subexpressions connected by -infix binary operators and/or preceded by prefix unary operators, the -same way as in C or @ical{} (although unary operators must be entirely -before their argument; the one character later position is not allowed.) -As in @ical{}, there is no operator precedence; expressions must be very -fully bracketed to show unambiguously what the precedences must be, and -then more so; for instance, bracketing marks must be placed around the -argument of a unary operator in most circumstances. Bracketing of -expressions can be done with parentheses, sparks (apostrophes) or -rabbit-ears (double-quotes). - -The following unary and binary operators are allowed in OIL expressions: - -@cindex OIL, operators -@cindex operators, OIL -@multitable {@code{@@2..@@5}} {@ical{} unary generalised whirlpool} -@item @code{$} @tab INTERCAL mingle -@item @code{~} @tab INTERCAL select -@item @code{&} @tab INTERCAL unary AND -@item @code{V} @tab INTERCAL unary OR -@item @code{?} @tab INTERCAL unary XOR -@item @code{^} @tab INTERCAL unary sharkfin -@item @code{@@} @tab INTERCAL unary whirlpool -@item @code{@@2..@@5} @tab INTERCAL unary generalised whirlpool -@item @code{&} @tab C binary bitwise AND -@item @code{|} @tab C binary bitwise OR -@item @code{^} @tab C binary bitwise XOR -@item @code{+} @tab C addition -@item @code{-} @tab C subtraction -@item @code{*} @tab C multiplication -@item @code{/} @tab C integer division -@item @code{%} @tab C modulus -@item @code{>} @tab C greater than -@item @code{<} @tab C less than -@item @code{~} @tab C unary bitwise complement -@item @code{!=} @tab C not equals operator -@item @code{==} @tab C equals operator -@item @code{&&} @tab C logical AND -@item @code{||} @tab C logical OR -@item @code{>>} @tab C bitwise rightshift -@item @code{<<} @tab C bitwise leftshift -@item @code{!} @tab C unary logical NOT -@end multitable - -(Note that in some cases two operators are expressed the same way, but -that this doesn't matter because one is unary and the other is binary so -that there can't be any ambiguity, only confusion.) - -It hasn't yet been explained what operands these operators have to -operate on; the syntax for those depends on whether it's a pattern or -replacement that the expression is representing. - -@node OIL Patterns -@appendixsec OIL Patterns -@cindex patterns -@cindex OIL, patterns - -Patterns are simply @acronym{OIL} expressions; the expressions match -either original @ical{} input or expressions produced by earlier idioms. -Each operator must match the same operator in the (possibly -partially-optimised) input; the operands themselves are pattern -templates specifying what operands in the input they can match. - -One special simple form of match is possible: @code{#@var{NUMBER}}, -where @var{NUMBER} is in decimal, matches a constant with that value. -(Unlike in @ical{}, this constant is not limited to being a onespot -value; it is, however, limited to being at most twospot, as are all -operands and intermediate values in @acronym{OIL}.) - -Otherwise, an operand consists of the following parts, written in order: - -@cindex operands, OIL, in patterns -@cindex patterns, operands -@enumerate - -@item -A character to specify the data type of what's being matched. Usually, -this will be @code{_} to specify that any data type can be matched. In -a few cases, you may want to use @code{.} or @code{:} to specify that -you only want to match a onespot or twospot value respectively (that is, -16- or 32-bit). You can also use @code{#}; this specifies a value that -can be any width, but must be known to be a constant with a known value -at optimize time (either because it was hardcoded as a constant -originally or because a constant was produced there by the optimizer, -for instance via a constant folding optimization). - -@item -Optionally, an expression in braces (@code{@{} and @code{@}}). This -expression is written in C, not @acronym{OIL} (as are all expressions in -braces), and puts an extra condition on whether the pattern matches. -The exact meaning of this will be explained later. - -@item -A reference number, which must be one decimal digit long. A reference -number of 0 causes the operand to be discarded immediately after -matching; normally, you will want to specify a positive reference -number. Two operands with the same reference number must be exactly the -same for the pattern to match (for instance, both references to the same -variable, or identical subexpressions). The reference number also -allows the operand to be referenced by C expressions on other operands -and by replacements. Reference numbers must be unique within the idiom -(unless two or reference numbers are deliberately the same so that the -operands they reference have to be identical to produce a match), and -they are scoped only as far as the containing idiom; they don't carry -from one idiom to another. - -@end enumerate - -Note that syntax like @code{#2} is ambiguous given what comes so far; -the first interpretation is the one that is taken in practice, and if -the second interpretation is wanted the operand should be expressed as -@code{#@{1@}2}, using a no-op braced expression to tell them apart. -This particular no-op is recommended because it's detected and optimized -by the @code{OIL} compiler. - -Braced expressions, which must be written purely in C, add extra -conditions; they must return nonzero to allow a possible match or zero -to prevent one. They can reference the following variables and -functions: - -@cindex functions, OIL in C -@cindex OIL, functions in C -@cindex C, within OIL -@anchor{C functions in OIL} -@table @code - -@item c -@itemx c@var{NUMBER} -@findex c -@findex c1--c9 - -This accesses a calculation made automatically by the compiled -@acronym{OIL} program to identify which bits of the operand can possibly -be set, and which ones cannot be. @code{c} by itself refers to the -operand to which the braced expression is attached; if a number is -given, it refers to another node (the number is interpreted as a -reference numer). The actual value of @code{c} is a 32-bit unsigned -integer, each bit of which is true, or 1, if there is any chance that -the corresponding bit of the operand might be 1, and false, or 0, if -it's known for certain that the corresponding bit of the operand is 0. - -For instance: - -@example -_@{!(c&4294901760LU)@}1 -@end example - -The constant given here is FFFF0000 when expressed in hexadecimal; the -point is that the expression matches any operand that is known to have a -value no greater than 65535. Unless the operand is the argument to a -unary AND, this check generally makes more point than explicitly -specifying @code{.} rather than @code{_}, because it will identify both -16- and 32-bit values as long as they're small enough to fit into a -onespot variable. This code could, for instance, be used to check that -an argument to a mingle must be small enough before optimising it (this -is important because an optimisation shouldn't optimise an error -- in -this case, an overflowing mingle -- into a non-error). - -@item x -@itemx x@var{NUMBER} -@findex x -@findex x1--x9 - -@code{x} is like @code{c}, and refers to operands in the same way, -except that it can only refer to an operand marked with @code{#}. It -holds the value of that constant (a 32-bit unsigned integer), which will -be known to the optimizer at optimize time. One common use of this is -to detect whether a constant happens to be a power of 2, although there -are many other possibilities that may be useful. - -@item r -@findex r - -When inside a loop, @code{r} is the value of the loop counter. (It's -almost certainly a mistake if you have a loop but don't reference the -loop counter at least once, and usually at least twice, within the -loop.) @xref{OIL Loops}. - -@item and16 -@itemx and32 -@itemx or16 -@itemx or32 -@itemx xor16 -@itemx xor32 -@itemx iselect -@itemx mingle -@findex and16 -@findex and32 -@findex or16 -@findex or32 -@findex xor16 -@findex xor32 -@findex iselect -@findex mingle - -These are all functions with one argument (apart from iselect and -mingle, which each take two arguments); they exist so that @ical{} -operators can be used by C expressions. They all take unsigned longs as -input and output, even if they are onespot operators. Note that it's -entirely possible for these to cause a compile-time error if used on -invalid arguments (such as mingling with an operand over 65535), or to -silently truncate an invalid argument down to the right number of bits; -both of these should be avoided if possible, so the optimiser should -check first to make sure that it doesn't use any of these functions on -invalid arguments. - -@item xselx -@findex xselx - -This function returns its argument selected with itself; so -@code{xselx(c)} is shorthand for @code{iselect(c,c)}. When the argument -is very complicated, this can save a lot of space in the original -@acronym{OIL} program. - -@item setbitcount -@findex setbitcount - -This function simply returns the number of bits with value 1 in its -argument. This is sometimes useful with respect to various -select-related optimisations, and can be a useful alternative to having -to take logarithms in various situations. - -@item smudgeright -@itemx smudgeleft -@findex smudgeright -@findex smudgeleft - -The @code{smudgeright} function returns its argument but with all the -bits less significant than the most significant bit with value 1 set to -1; likewise, @code{smudgeleft} returns its argument with all the bits -more significant than the least significant bit with value 1 set to 1. - -@end table - -Note that all @acronym{OIL} character is done internally using unsigned -32-bit numbers, and C expressions you write should do the same. The -practical upshot of this is that you should write @code{LU} after any -constant you write in C code; if you don't do this, you are reasonably -likely to get compiler warnings, and the resulting program may not work -reliably, although the @acronym{OIL} compiler itself will not complain. - -Here's a more complicated example of an optimizer operand: - -@example -#@{!(x&2863311530LU)&&iselect(x,1431655765LU)== - xselx(iselect(x,1431655765LU))@}3 -@end example - -It helps to understand this if you know that 2863311530 in hexadecimal -is AAAAAAAA and 1431655765 is hexadecimal is 55555555. (It's worth -putting a comment with some frequently-used decimal constants in an -@acronym{OIL} input file to help explain what these numbers mean and -make the code more maintainable.) The operand matches any constant -integer which has no bits in common with AAAAAAAA, and for which if any -bit in common with 55555555 is set, all less significant bits in common -with that number are also set. - -@node OIL Replacements -@appendixsec OIL Replacements -@cindex OIL, replacements -@cindex replacements - -Replacements have much the same syntax as patterns. The expressions are -parsed in much the same way; however, one peculiarity of replacements is -that bitwidths must be specified. @ical{} has a typecaster that figures -out whether each expression is 16 bits or 32 bits wide, but it runs -before the optimizer, and as the optimizer can produce expressions whose -bitwidths don't obey @ical{}'s rules, this information needs to be -inserted somehow in a replacement. In @cic{}, it usually doesn't matter -what the bitwidth is, and in cases where it doesn't matter the normal -operators (@code{$}, @code{~}, and so on) can be used. (Note that the -bit width of the entire replacement is always set to the same bit width -as the bit width of the expression matched by the pattern; so you don't -have to worry about the effect on unary logical operators that might be -operating on the expression being optimized. This is an exception to -the normal bitwidth rules for a replacement.) In cases where it does -matter (due to @cic{}'s lenient interpretation of bitwidth on mingle -inputs, the only place it matters is in the input to @ical{} unary -logical operators), both the bidwidth of the operator and the argument -on which it operates must be explicitly given, and given as the same -value; to set the bitwidth of an operator's result, simply write the -bitwidth (16 or 32 for onespot and twospot respectively) immediately -after the operator; for instance, @code{!=32} will generate a not-equals -operation with a 32-bit bitwidth. If an operator's width is set to 16, -and during the course of execution of the optimized program, a value -that doesn't fit into 16 bits is encountered, that's undefined behaviour -and anything might happen (most likely, though, the program will just -act as though its width had been set to 32 bits instead); this error -condition is not detected. - -@cindex operands, OIL, in replacements -@cindex replacements, operands -Replacement operands are simpler than pattern operands, because there -are only a few forms they can take. - -@table @code -@item _@var{NUMBER} -@itemx .@var{NUMBER} -@itemx :@var{NUMBER} - -This tells the optimiser to copy the operand or expression with -reference number @var{NUMBER} to this point in the replacement used for -the expression matched by the pattern. The three forms are identical; -the last two are provided for aesthetic reasons (it can look better and -be clearer to match @code{.1} in the pattern with @code{.1} in the -replacement, for instance). You cannot use @code{#@var{NUMBER}} here to -copy in a constant from the left-hand side, though, nor -@code{#@{1@}@var{NUMBER}}, because the first means something else and -the second is undefined behaviour (that is, no behaviour for the second -case has been specifically implemented in the compiler and therefore its -behaviour is unpredictable and subject to change in future versions); -use @code{_@var{NUMBER}} to copy over a constant with an unknown at -optimizer compile time (but known at optimize time) value from the left -hand side, as you can do with any other operand being copied. - -@item #@var{NUMBER} - -Insert a constant with the literal value @var{NUMBER} here. - -@item #@{@var{EXPRESSION}@}0 - -Calculate the value of @var{EXPRESSION} (a C expression, which can -reference the same variables and functions as a C expression in a -pattern can; @xref{C functions in OIL}. - -@end table - -As an example, here's an idiom that moves C bitwise AND operations -inside leftshifts. (This is useful because if the optimizer has -generated a large sequence of mixed ANDs and bitshifts, moving all the -ANDs to one end allows them to be clumped together and optimized down to -one AND.) - -@example -((_1 << #@{1@}2) & #@{1@}3)->((_1 & #@{x3>>x2@}0) << _2) -@end example - -@node OIL Loops -@appendixsec OIL Loops -@cindex loops, OIL -@cindex OIL, loops - -When writing idioms, sometimes instead of using very complicated -expressions to try to match multiple situations at once it's easier to -have a separate idiom for each possible situation; for instance, it's -easier to write idioms for right-shift by 1, right-shift by 2, -right-shift by 3, etc.@:, rather than a general idiom to rightshift by any -amount. When the idioms follow a pattern, as they will do in basically -every case of this sort, it's possible to automatically generate them -using a loop. For instance, idioms to optimize a one-bit rightshift -and a two-bit rightshift are: - -@example -(_1~#@{xselx(x)<<1==x&&x@}2)->((_1&_2)>>#1) -(_1~#@{xselx(x)<<2==x&&x@}2)->((_1&_2)>>#2) -@end example - -Adding a loop to automatically generate the idioms, and placing a name -for the group of idioms at the start, produces the following code: - -@example -[rshift] -<#1-#31 -(_1~#@{xselx(x)<((_1&_2)>>#@{r@}0) -> -@end example - -That's 31 different idioms, generated with a loop. As the above example -shows, a loop starts with @code{<#@var{NUMBER}-#@var{NUMBER}} and ends -with @code{>}; a different idiom is generated for each possible value of -the loop counter @code{r} in the range given by the opening line of the -loop. Loops must be placed around idioms, but inside a group of -idioms. Note the use of @code{#@{r@}0} to generate a constant whose -value is equal to the value of the loop counter. - -@node OIL Tips -@appendixsec OIL Tips -@cindex tips, OIL -@cindex OIL, tips - -Here are some tips for the best use of @acronym{OIL}: - -@itemize - -@item -Not all idioms that you might want to write can be expressed in -@acronym{OIL}, although most can. (See the @file{idiotism.oil} file -provided with the distribution for an example of where @acronym{OIL} -gets stuck; it's due to tricky bitwidth problems.) There are some -reasonably obvious ways to fix this deficiency, but if you don't -understand why a language which has no obvious problems but several -subtle deficiencies is appropriate for @ical{}, you don't really get -what @ical{} is about. - -@item -@findex MAXTOFREE -The @acronym{OIL} compiler has a few deficiencies, such as error -messages that don't give you much of an idea of what you did wrong (to -compensate for this, it does give a reasonably accurate line and -character number where the error happened), limits on things like how -deep expressions can be nested and how many idioms are allowed (if you -hit the first, you should really break it up into smaller idioms if -possible, and if you hit the second, increase @code{MAXTOFREE} in oil.y; -this isn't a limit on the number of idioms but on the number of strings -that are allocated internally to process the idioms), and lack of error -checking (invalid @acronym{OIL} may produce errors in the @acronym{OIL} -compiler, or cause the output C code to contain errors or warnings, or -may even appear to work). - -@item -When you have symmetrical operators in an idiom (like C binary logical -operators), you need to write the idiom both ways round (in the same -group of idioms, preferably), or write another idiom to standardise the -format first; the first method can get very tedious when there are many -symmetrical operators in an idiom, and the second is prone to optimizer -loops and subtle errors (both methods have been used in the provided -@file{idiotism.oil} file.) - -@item -Idioms should preferably be as general as possible, broken down into -many separate idioms rather than all as one big idiom, and match the -smallest part of the expression being optimized that is necessary for -the idiom to be correct in all cirucmstances; all of these help to -improve the performance of the optimizer in terms of what it can -optimize. - -@item -If a program's optimizing incorrectly, or you just want to see how the -optimizer deals with a particular program, it's possible to debug the -optimizer by giving the @option{-h}, @option{-H}, or @option{-hH} -(@pxref{-h}) switch to the @cic{} compiler, which will cause debug -information to be output on stderr. @option{-h} will show the initial -and final expressions for each expression that was given as input to the -optimizer, as well as a list of all optimizations used, in a language -that's a sort of mix of C, @ical{}, and @acronym{OIL}; @option{-H} will -do the same, and also show the intermediate stages in the optimization. -@option{-hH} is like @option{-H}, but produces its output entirely in C, -so that the various intermediate stages can be tried with a C compiler, -or for people who are fed up of reading @ical{}. @option{-H} can be a -useful learning resource for people who want to understand how a -particular @ical{} expression works. - -@item -Make sure that the optimizer doesn't change a statement from a run-time -error into something that silently succeeds@! Checking which bits can -and can't be 1 is one good way to avoid this, especially with mingles. -(At present, there are some idioms that can turn run-time errors into -compile-time errors, such as with the expression -@code{''#65535$#65535'$#0'}; this could be avoided, but for the time -being it isn't.) - -@item -You can help@! If you find an idiom that the optimizer isn't optimizing -correctly, feel free to add it, or multiple idioms that come to the same -thing, to @file{idiotism.oil}. In such a case, it would help other -users if you would submit your new optimizer idiom to the project -(@pxref{Reporting Bugs}); this will help other users and future releases -of @ical{}, and also has a chance of allowing other users to check your -new idioms to see if they cause problems or could be written better. - -@end itemize - -@node OIL Example -@appendixsec OIL Example -@cindex OIL, example -@cindex examples, OIL - -To finish off this appendix, here's an example of the power of -@acronym{OIL}; this is the optimization of an idiom from the @icst{} -system library, as shown with @option{-H}; this should give a good idea -of how @acronym{OIL} programs work. (All the relevant idioms are in -@file{idiotism.oil} as of the time of writing.) Note how the expression -is reduced one small step at a time; the smallness of the steps makes -the optimizer more general, because if the original expression had been -slightly different, the optimizer wouldn't have come to the same result -but could have optimized it quite a bit of the way, up to the point -where the optimizations were no longer valid; in an older version of -@ical{}, this idiom was simply hardcoded as a special case and so slight -variations of it weren't optimized at all. If you look at the idioms -themselves, it'll also be apparent how @code{c} (the record of which -bits of an expression can be 1 and which bits can't be) is important -information in being able to apply an optimization more aggressively. - -@smallexample -.3 <- ((((((((.3 $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[minglefold] -.3 <- ((((((((.3 $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[lshift16] -.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[noopor] -.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[minglefold] -.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[lshift16] -.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[noopor] -.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) -[minglefold] -.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0xaaaaaaf) $ 0x0) ~ (0xfff $ 0xf)) -[lshift16] -.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) | 0x0) $ 0x0) ~ (0xfff $ 0xf)) -[noopor] -.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ (0xfff $ 0xf)) -[minglefold] -.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ 0xaaaaff) -[lshift16] -.3 <- (((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) | 0x0) -[noopor] -.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[nullshift] -.3 <- (((((((((((.3 & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[combinelrshift] -.3 <- ((((((((((.3 & 0x7fff) << 0x1) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[andintolshift] -.3 <- ((((((((((.3 & 0x7fff) & 0x3fff) << 0x1) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[combinellshift] -.3 <- (((((((((.3 & 0x7fff) & 0x3fff) << 0x2) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[combinelrshift] -.3 <- ((((((((.3 & 0x7fff) & 0x3fff) << 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[andintolshift] -.3 <- ((((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) << 0x3) >> 0x3) & 0x1ff) << 0x7) -[combinellshift] -.3 <- (((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x4) >> 0x3) & 0x1ff) << 0x7) -[combinelrshift] -.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) & 0x1ff) << 0x7) -[andintolshift] -.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x1) << 0x7) -[combinellshift] -.3 <- (((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x8) -[combineand] -.3 <- ((((.3 & 0x3fff) & 0xfff) & 0xff) << 0x8) -[combineand] -.3 <- (((.3 & 0xfff) & 0xff) << 0x8) -[combineand] -.3 <- ((.3 & 0xff) << 0x8) -@end smallexample - -@node Copying -@appendix Copying -@cindex copyright -@cindex copying conditions - -The majority of the files in the @cic{} distribution are licensed under -the GNU General Public License, but with some exceptions. The files -@file{ick-wrap.c} and @file{pickwrap.c} are licensed under a license -that allows them to be used for any purpose and redistributed at will, -and are explicitly not GPL'd. This means that C source code generated -by the compiler has the same copyright conditions as the original -@ical{} source. (Note that the libraries @file{libick.a} and -@file{libickmt.a} are GPL, though, so you cannot redistribute an -executable produced by @command{ick} or by linking a C file to either of -those libraries unless the original @ical{} source was GPL.) Also, this -manual, and the files that are the source code for creating it, are -licensed under the GNU Free Documentation License rather than the GPL, -and the licenses themselves (@file{fdl-1-2.txi}, @file{gpl-2-0.txi}, and -@file{COPYING.txt}) are licensed under a license that allows verbatim -redistribution but not creation of derivative works. - -@menu -* GNU General Public License:: License for copying source and binaries. -* GNU Free Documentation License:: License for copying this manual. -@end menu - -@node GNU General Public License -@appendixsec GNU General Public License -@cindex GPL -@cindex GNU General Public License -@cindex General Public License - -@include gpl-2-0.txi - -@node GNU Free Documentation License -@appendixsec GNU Free Documentation License -@cindex GFDL -@cindex FDL -@cindex GNU Free Documentation License -@cindex Free Documentation License - -@include fdl-1-2.txi - -@node Main Index -@unnumbered Index - -This is the index of everything in this manual. (Note that in some -versions of the manual this is called @samp{Main Index} to prevent it -transforming into a page called @file{index.html} in the HTML version of -the manual. The complications that that caused were really odd.) - -@printindex cp - -@bye +\input texinfo @c -*- texinfo -*- +@c %**start of header +@setfilename ick.info +@set VERSION 0.27 +@set VERSIONDASH 0-27 +@settitle C-INTERCAL @value{VERSION} Revamped Instruction Manual +@paragraphindent 0 +@documentlanguage en +@documentencoding ISO-8859-1 + +@c Command line option index. +@defcodeindex op +@c Error index +@defindex er +@c Commands and language features are in the predefined fnindex. +@c Things generally are in the predefined cpindex. + +@c Combining indices. +@syncodeindex fn cp +@syncodeindex op cp +@synindex er cp + +@c Adding to the main documentation tree. +@dircategory INTERCAL +@direntry +* C-INTERCAL: (ick). The C-INTERCAL language and compiler. +* ick: (ick) Invoking ick. Invoking the C-INTERCAL compiler. +* convickt: (ick) convickt. The command-line character set converter. +@end direntry + +@c Some macros to ease writing and updating. (The VERSION is set above because +@c it's needed to set the title.) +@macro cic{} +@abbr{C-INTERCAL} +@end macro +@macro clcic{} +@abbr{CLC-INTERCAL} +@end macro +@macro icst{} +@abbr{INTERCAL-72} +@end macro +@macro jic{} +@abbr{J-INTERCAL} +@end macro +@macro ical{} +@acronym{INTERCAL} +@end macro + +@c Part headings for unsplit output +@macro partheading{arg} +@html +

    \arg\

    +@end html +@c +@end macro +@iftex +@set notsplit +@end iftex + +@c 'Portability' boxes +@macro portability{st,c,clc,j} +@multitable @columnfractions .23 .23 .23 .23 +@headitem @icst{} @tab @cic{} @tab @clcic{} @tab @jic{} +@item \st\ @tab \c\ @tab \clc\ @tab \j\ +@end multitable +@c +@end macro + +@c Generating items and anchors together is also helpful. +@macro ianchor{arg} +@item \arg\ +@anchor{\arg\} +@c +@end macro +@macro ianchorc{arg} +@item \arg\ +@anchor{\arg\+} +@c +@end macro +@macro ieanchor{arg} +@item \arg\ +@anchor{\arg\} +@erindex \arg\ +@c +@end macro +@macro ianchorpm{arg} +@item +\arg\ +@itemx -\arg\ +@anchor{+\arg\} +@anchor{-\arg\} +@c +@end macro + +@c Some fixes for HTML. +@ifhtml +@c Examples are styled in CSS; don't do it with hardcoded whitespace! +@exampleindent 0 +@end ifhtml +@c %**end of header + +@copying +This manual is for @cic{} version @value{VERSION}. It does not replace +the old groff manual, nor is it designed to be read in conjunction with +it; instead, it serves a different purpose, of providing information +useful to users of @cic{} (unlike the other manual, it is not derived +from the original @icst{} manual). + +Copyright @copyright{} 2007 Alex Smith. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the section entitled +``GNU Free Documentation License.'' + +@end quotation +@end copying + +@titlepage +@ifset notsplit +@title C-INTERCAL Revamped Instruction Manual +@subtitle (this version distributed with version @value{VERSION} of C-INTERCAL) + +@page +@vskip 0pt plus 1filll +@insertcopying + +@end ifset +@end titlepage + +@ifset notsplit +@contents +@end ifset + +@ifnottex +@node Top +@top C-INTERCAL @value{VERSION} + +@insertcopying + +@menu +* About this manual:: What is covered in this manual + +The @cic{} compiler +* Installation:: How to install @cic{} +* Invoking ick:: Options to give to the compiler ick +* Errors and Warnings:: Error messages, and what to do about them +* The yuk debugger:: How to use the runtime debugger + +Basic @ical{} features +* Syntax:: Holding statements together +* Expressions:: Operators, operands, and grouping +* Statements:: What an @ical{} statement can do + +@ical{} dialects and extensions +* TriINTERCAL:: @ical{} in non-binary bases +* Multithreading and Backtracking:: Running @ical{} programs in parallel +* Operand Overloading:: Where one expression stands for another +* PIC-INTERCAL:: @ical{} on embedded systems +* Differences to Other Compilers:: @cic{} vs. @clcic{} + +Appendices and indices +* Character Sets:: A list of character sets used by @ical{} +* convickt:: The command-line character set converter +* Optimizer Idiom Language:: The syntax to specify optimizer idioms +* Copying:: License information for the code and manual +* Main Index:: An index of all the pages in this manual + +@end menu +@end ifnottex + +@node About this manual +@unnumbered About this manual +@cindex About this manual + +This is the Revamped Instruction Manual for @cic{} (this version is +distributed with @cic{} version @value{VERSION}). It is divided into +four parts. + +The first part is about the @cic{} compiler @command{ick}, and how to +use it. It covers installing the compiler, using the compiler, what +error and warning messages are produced by the compiler, and some +information on how to use the debugger. + +The second part is about the core @ical{} language, invented in 1972, +and some other commands since then which don't feel like they're +extensions. (This is a pretty arbitrary distinction, but people who +write the documentation are entitled to arbitrary distinctions. The +manual's licensed under a license that lets you change it +(@pxref{Copying}), so if you disagree you can move the commands from +section to section yourself.) Mostly only commands that are +implemented in @cic{} are covered here (if you're interested in the +other commands implemented in other compilers, read @clcic{}'s +documentation). However, a comprehensive guide to portability of +these commands between @cic{} and other @ical{} compilers is given. + +The third part covers the @ical{} extensions and dialects that are +implemented by @cic{}, such as TriINTERCAL and Threaded @ical{}. +Again, extensions and dialects not implemented have been mostly left +out. + +The final part contains appendices (which were known as `tonsils' in +the original @ical{} manual), such as character sets used by @ical{}, +programs other than @command{ick} in the @cic{} distribution, +information on how to read and update the list of optimizer idioms +used by the compiler, and the copyright. + +@ifset notsplit +@partheading{PART I: THE @cic{} COMPILER} +@end ifset +@node Installation +@chapter Installation +@cindex installation +@cindex @command{ick}, installing + +The @cic{} distribution is distributed in source code form; this means +that before using it, you first have to compile it. Don't worry: if you +have the right software, it's not at all difficult. Most Linux-based +and UNIX-based computers are likely to have the software needed already; +the software needed to compile source-distributed packages is also +readily available for free for other operating systems. The following +instructions will help you install the distribution in a method +appropriate for your system. + +(If you happen to be using Debian or Ubuntu, you can also obtain and +install binaries with the command @samp{sudo apt-get install +intercal}, making the rest of this chapter redundant. If you do this, +use Debian's bug tracker to report bugs, rather than reporting them +directly to the maintainers.) + +@menu +* Obtaining:: How to get a @cic{} distribution to install +* Unpacking:: What to do with the distribution file +* Simple Installation:: Normally you can just do things the easy way +* DOS/Windows Install:: For users of DOS or of Microsoft Windows +* Not Installing:: You can use the software without installing it +* Uninstalling:: If you don't want to use the software +* Reporting Bugs:: If it doesn't work or you know how to fix it +* Distributing:: How to make your own @cic{} distribution +@end menu + +@node Obtaining +@section Obtaining +@cindex obtaining C-INTERCAL +@cindex C-INTERCAL, obtaining a copy + +@cic{} distributions have been stored in many different places over +time; it can sometimes be hard to make sure that you are finding the +most recent version. In order to make sure that you have the most +recent version, the easiest way is to look at the +@uref{news:alt.lang.intercal,,alt.lang.intercal newsgroup}; all releases +of the @cic{} compiler ought to be announced there. (If you are +interested in what other @ical{} compilers are available, it may also be +worth looking there.) If you don't have access to a newsreader, your +newsreader doesn't cover that newsgroup, or the distance between +releases has been too large for your news server to keep the message, +it's likely that you can find the announcement in an archive on the +World Wide Web; at the time of writing (2007), the archives of the +newsgroup are stored by @uref{http://groups.google.com,Google Groups}, +and a search for @samp{alt.lang.intercal} there should tell you where to +find a copy. + +If you're looking for the latest version, note that the number after the +dot represents the major version number; you want to maximise this in +favour of the number before the dot, which is the bugfix level within a +major version. (Major versions are released as version 0.whatever; if a +new version comes out that fixes bugs but adds no new features, nowadays +its number will be of the form 1.whatever, with the same major number. +This has not always been the case, though.) + +@node Unpacking +@section Unpacking +@cindex C-INTERCAL, unzipping +@cindex C-INTERCAL, unpacking +@cindex unzipping C-INTERCAL +@cindex unpacking C-INTERCAL +@cindex ick-@value{VERSIONDASH}.tgz + +The distribution is likely to be a single file with extension +@samp{.tgz}; this refers to a gzipped tar file. Most computer systems +can extract files in this format (nowadays even many computers running +Windows have the appropriate software). + +It doesn't matter where you extract the distribution file to: it's best +if you don't put it anywhere special. If you aren't an administrator, +you should extract the file to somewhere in your home directory (Linux +or UNIX-like systems) or to your My Documents directory (recent versions +of Windows; if you're using an older version, then you @emph{are} an +administrator, or at least have the same privileges, and can extract it +anywhere). Some commands that you might use to extract it: + +@table @asis + +@item Generic UNIX/Linux + +@example +gunzip ick-@value{VERSIONDASH}.tgz +tar xvf ick-@value{VERSIONDASH}.tar +@end example + +On most UNIX-based and Linux-based systems, @command{tar} will be +available to unpack the installation files once they've been +uncompressed with @command{gunzip}. @command{gunzip} is also likely to +be available; if it isn't, you will need to download a copy from the +Internet. + +@item Using GNU tar + +@example +tar xzvf ick-@value{VERSIONDASH}.tgz +@end example + +If you are using the GNU version of @command{tar} (which is very likely +on Linux), you can combine the two steps into one as shown here. + +@item Using DJGPP + +@example +djtar -x ick-@value{VERSIONDASH}.tgz +@end example + +On a DOS or Windows system, you will have to install DJGPP anyway to be +able to compile the distribution (@pxref{DOS/Windows Install}), and once +you've done that you will be able to use DJGPP's decompressing and +unpacking utility to extract the files needed to install the +distribution. (You will need to type this at the command line; on +Windows 95 and later, try choosing Run...@: from the start menu then +typing @command{cmd} (or @command{command} if that fails) in the dialog +box that opens to get a command prompt, which you can exit by typing +@command{exit}. After typing any command at a command line, press +@key{RET} to tell the shell to execute that command.) + +@item On Windows + +If you're running a Windows system, you could always try double-clicking +on the ick-@value{VERSIONDASH}.tgz file. It's quite possible that +you'll have a program installed that's capable of decompressing and +unpacking it. Unfortunately, I can't guess what program that might be, +so I can't give you any instructions for using it. + +@end table + +Whatever method you use, you should end up with a directory created +called @file{ick-@value{VERSION}}; this is your main installation +directory where all the processing done by the installation will be +carried out. You will need to have that directory as the current +directory during install (at the command prompt in all the operating +systems I know, you can set the current directory by typing @command{cd +ick-@value{VERSION}}). + +@node Simple Installation +@section Simple Installation +@cindex installation, simple +@cindex simple installation +@findex config.sh +@findex configdj.sh +@findex make +@findex make install +@cindex compiling, @command{ick} itself +@cindex installation, via autoconf and make +@cindex configuring + +There are scripts included in the distribution to automate the process +of installing, in various ways. The simplest method of installing is to +use the following routine: + +@enumerate + +@item +Configure @cic{}, by typing @command{sh config.sh} (or @command{sh +configdj.sh} if you're using DJGPP) + +@item +Compile the source code, with the command @command{make} + +@item +Install the executables, help files, include files, and libraries, +using @command{make install}. (This is the only step that needs +root/administrator permissions; so on a system that uses sudo to +elevate permissions, for instance, write it as @command{sudo make +install}.) + +@end enumerate + +On all systems, it's worth just trying this to see if it works. This +requires a lot of software on your computer to work, but all of it is +standard on Linux and UNIX systems. The first command is a +shell-script which will analyse your system and set settings +accordingly; it will explain what it's doing and what settings it +detected, and create several files in the installation directory to +record its results. (This is a configure script produced by the GNU +autoconf (config.sh is produced by the Linux version, configdj.sh by +the DJGPP version); its autoconf source code is available in the file +@file{config.in}.) The second command actually compiles the source +code to produce binaries; this takes the longest of any of the steps. +You will see all the commands that it's running as it runs them. (The +most time-consuming one is the compilation of @file{idiotism.c}, by +the way; be prepared for this to take longer than the other +compilations.) The third command will copy the files it's compiled to +appropriate shared locations on your system so that anyone on the +system can just use @command{ick}. + +There may be various factors that prevent this simple installation +method working. On a system not based on UNIX or Linux, you may find +that you don't have some of the software required to run this (for +instance, you may be missing the shell @command{sh}, and don't have the +shell @command{bash} which can emulate it, and so can't run @command{sh +config.sh} that depends on one of those shells being available) and so +this method won't work for you. In such cases, one solution may be to +install all the software required; the GNU project has a version of all +the commands required, for instance, and there may be ports available +for your operating system. However, the only software absolutely +required is a C compiler (@cic{} was designed to work with @command{gcc} +and has only been tested in combination with that compiler, but in +theory it should be possible to adapt it to work with other compilers) +and the associated software needed to compile C files to object files +and executables, combine object files into libraries, etc. + +Another possiblity that might stop this process working is if your +version of the relevant software is incompatible with the GNU versions +that were used for testing. For instance, I have come across +proprietary versions of @command{lex} that need directives in the source +file to say in advance how much memory the lexer-generator needs to +allocate. In such cases, pay attention to the error messages you're +getting; normally they will suggest trivial modifications to the source +files that will cause the compilation to work again. + +@cindex installation, Debian +@cindex installation, Ubuntu +@cindex Debian +@cindex Ubuntu +Some Linux and UNIX systems (notably Debian and Ubuntu) don't have the +required files for compilation installed by default. To install them, +just download and install the required packages: for Ubuntu at the +time of writing, they are @samp{binutils}, @samp{bison}, @samp{cpp}, +@samp{flex}, @samp{gcc}, @samp{libc6-dev}, @samp{make} to compile +@cic{}, and if you want to modify it, you may also need +@samp{autoconf}. For debugging help, you may also want @samp{gdb}, +and to recompile the documentation, you may need @samp{groff}, +@samp{tetex-bin}, @samp{texinfo}, and @samp{tidy}. Of course, if +@ical{} ever (the author of this sentence was going to write something +like ``becomes popular, someone will probably package up a compiler +for Debian or Ubuntu anyway'', but at that point on a whim did an +Ubunutu package search for 'intercal' and actually came up with two +results, which look suspiciously like @cic{} and @clcic{}, later +confirming this. The author was vaguely aware that there was a +@clcic{} package floating around, but was unaware of the @cic{} +package, and as a result was too surprised to finish the sentence.) + +If you're trying to do something unusual, you probably want to set some +of the settings yourself rather than letting the compilation process +guess everything. In this case, use @command{sh config.sh --help} to +view the options that you can set on @command{config.sh}; there's a wide +range of settings that you can set available there, and one of them may +be what you want. For the special case of a non-administrator user who +wants to test the @cic{} compiler without having admin rights, or +equivalently any user who wants to test the compiler without installing +it, see @ref{Not Installing}. + +@node DOS/Windows Install +@section DOS/Windows Install +@cindex installation, on DOS or Windows +@cindex DOS +@cindex Windows +@cindex DJGPP +@findex makeick.sh +@findex makeick.bat + +On DOS and Windows, it's possible to install @cic{} by using the C +compiler and utilities provided by DJGPP. (Possibly other environments +also work, but DJGPP is the only C compilation system on which recent +versions of @cic{} have been tested.) If you don't have a copy of DJGPP, +or you're not sure whether you have the most recent version, visit +@uref{http://www.delorie.com/djgpp}. I think it's possible to compile +@cic{} to binaries from only the files in the distribution and the C +compilation parts of DJGPP, but this relies on some prebuilt files +enclosed in the distribution, and I haven't actually tested this, so I +might be wrong. At the other extreme, if you download and install not +only the DJGPP C compiler but also all the DJGPP ports of the GNU +utilities required to run @command{config.sh} and @command{make}, you +can use the simple installation method; see @ref{Simple Installation}. +(This is actually somewhat recommended; doing this will not only allow +you to change source code, recompile, and be guaranteed to have your +changes to the source code affect the executables, and allow you to +install @cic{} without having to fiddle around with the @samp{PATH} +environment variable, but also you may then be able to install other +programs distributed in source form without further hassle.) + +Assuming that you decide not to download all the utilites required to +carry out a simple install, follow the following instructions to compile +and install the @cic{} compiler: + +@enumerate + +@item +If you haven't already installed DJGPP, do that now, following the +instructions given there. + +@item +Open a command prompt if you aren't at one already, unpack the +distribution if you haven't already, and change directory to the main +installation directory (@pxref{Unpacking}). + +@item +Run one of two commands included in the distribution especially for +installing @cic{} under DJGPP. Which one you run depends on the shell +you're using: if you're running under one of the DOS/Windows shells +(@command{cmd.exe} or @command{command.com}), type +@command{makeick.bat}, and if you're running under a port of a UNIX or +Linux shell (such as @command{bash}), type @command{makeick.sh}. + +@item +The distribution should now have been compiled, but it still needs to be +installed. To do this, you will need to edit your @samp{PATH} +environment variable. Under DOS and earlier versions of Windows, you +can do this by editing @file{C:\autoexec.bat}; look for the last command +that sets the @samp{PATH} environment variable (i.@:e.@: that starts +with @samp{set PATH=}), and add another semicolon and the @file{bin} +subdirectory of your main installation directory to it (for instance, if +your installation directory is +@file{C:\stuff\intercal\ick-@value{VERSION}}, you want to add +@samp{;C:\stuff\intercal\ick-@value{VERSION}\bin} to the end of that +line). Under later versions of Windows, this won't work (I'm not sure +exactly where the cutoff is, but I know the other method doesn't work on +Windows XP); instead, go via the Start menu to Settings, Control Panel, +System, Advanced, Environment Variables, and edit either your own or the +system-wide PATH setting (depending on whether you want to install for +yourself or for everyone) to end with the @file{bin} subdirectory of the +main installation directory, the same way as for older versions of +Windows. + +@end enumerate + +To test that the @samp{PATH} setting is set correctly, try changing to +an unrelated directory (for instance, by typing @command{cd \} at a +command prompt), and typing @command{ick -@@}; if you get a usage +message for @command{ick}, then you've set the @samp{PATH} setting +correctly. Note that if things go wrong during compilation, other than +errors about inability to find @command{flex} or @command{bison} (the +compilation process can succeed despite either of these errors), it's +likely that you've messed up your DJGPP installation (maybe by setting +the @samp{PATH} or @samp{DJDIR} environment variables incorrectly for +it). + +@node Not Installing +@section Not Installing +@cindex @command{ick}, using without installation +@cindex @command{ick}, not installating +@cindex trying out @command{ick} +@cindex not installing +@cindex non-root installation +@cindex installation, non-root +@cindex live CD/USB stick +@cindex making a live CD/USB stick + +You don't have to install @cic{} to be able to use it; you can instead +stop any of the other install techniques just after compiling the source +code, before the installation step. (This may be useful if you just +want to try out @cic{}, or if you aren't a root/admin user and therefore +don't have the permissions to install things.) When @cic{} hasn't been +installed, @command{ick} won't be able to find the files it looks for in +the places that they ought to have been installed, so it will look in a +variety of places they might be instead (the installation directory, if +it can figure out where it is; the same directory as the binary; the +current directory). In order for this to work, just don't move any of +the files that were compiled anywhere else. + +Of course, if you haven't installed the compiler, just typing +@command{ick} is unlikely to work, because your computer won't know what +you mean. Instead, you should give a pathname (absolute or relative) to +where @command{ick} is, so that your computer can find it. With any +luck, your computer will communicate the pathname you used to +@command{ick} itself, and if that happens @command{ick} will use it to +figure out where the main installation directory is, and find the files +it needs that way. If you suspect that errors you are getting are due +to inability to find files (such as E127 (@pxref{E127}) or E999 +(@pxref{E999})), try giving the @option{-u} (@pxref{-u}) option to +@command{ick} to see where it's looking. + +You can make a `live' CD or USB-stick version of @cic{} using similar +methods; configure (if possible) and compile it, but instead of +installing it, copy the entire @file{ick-@value{VERSION}} directory to the +CD or USB stick. @ical{} can then be run from there by explicitly giving +a pathname to @file{bin/ick} or @file{bin/ick.exe} + +@node Uninstalling +@section Uninstalling +@cindex uninstalling +@cindex @command{ick}, uninstalling + +It may happen that you decide to uninstall @cic{} after installing it; +this may be useful if you want to test the installation system, or +change the location you install programs, or for some reason you don't +want it on your computer. It's worth uninstalling just before you +install a new version of @cic{} because this will save some disk space; +you cannot install two versions of @cic{} at once (but see @ref{Not +Installing} for information on how you can use @cic{} without installing +it). + +If you installed @cic{} using @command{make install}, you can uninstall +it by using @command{make uninstall} from the installation directory, +assuming that it still exists. If you can't use that method for some +reason, you can uninstall it by deleting the files @file{ick.exe} where +your computer installs binaries, @file{libick.a}, @file{libickmt.a}, +@file{libyuk.a}, @file{COPYING.txt}, and @file{coopt.sh} where your +computer installs libraries, and the subdirectories +@file{ick-@value{VERSION}} in the places where your computer installs +data files and include files, and their contents. + +If you installed @cic{} by changing your @samp{PATH} environment +variable, you can uninstall by changing it back. + +You can go further than uninstalling. Running @command{make distr}, +@command{districk.sh}, or @command{districk.bat} will delete any files +created by compilation; @command{make distclean} will delete those +files, and also any files created by configuring. The distribution +contains prebuilt versions of the parser, lexical analyser and OIL +compiler; doing @command{make clean} (or @command{cleanick.sh} or +@command{cleanick.bat}) will do the same thing as @command{make distr} +and also delete those prebuilt versions. + +@node Reporting Bugs +@section Reporting Bugs +@cindex bugs, reporting +@cindex reporting bugs +@cindex patches, submitting +@cindex submitting patches + +If you can't get @cic{} to install at all, or something goes wrong when +you're using it, reporting a bug is probably a good idea. (This is +still important even if you figure out how to fix it, and the +information isn't in the manual, because the fix can be added to the +source code if possible, or at least to the manual, to benefit future +users.) For general help, you may want to post to the +@uref{news:alt.lang.intercal,,alt.lang.intercal} news group; to report +a bug or submit a patch, email the person who released the most recent +@cic{} version (which you can determine by looking at that newsgroup). + +If you do find a bug (either the compiler not behaving in the way you'd +expect, or if you find a way to cause E778 (@pxref{E778}) without +modifying the source code), it helps a lot if you can submit a bug +report explaining what causes it. If you're not sure, say that; it +helps if you give examples of input, command line options, etc.@: that +cause the bug. There are several debug options (@pxref{Debug Options}) +that you can use to help pin down a bug if you're interested in trying +to solve the problem yourself; looking at the output C code can also +help pin down a bug if the compiler gets that far. + +Information that should be given in a bug report is what you expect to +happen, what actually happens, what input and command line options you +gave to the compiler, what operating system you're using, any ideas you +might have as to what the problem is, and any appropriate debug traces +(for instance, @option{-H} (@pxref{-H+,,-H}) output if you think the bug +is in the optimizer). Core dumps aren't portable between systems, so +don't send those; however, if you're getting an internal error and can +dump core with @option{-U} (@pxref{-U+,,-U}), it helps if you can load a +debugger (such as @command{gdb}) on the core dump, use the debugger to +produce a backtrace, and send that backtrace. + +If you figure out how to solve the bug yourself, and want to submit the +patches to help other users (this also carries the advantage that your +patches will then be maintained along with the rest of the distribution, +and that you won't have to reapply them every time you upgrade to a +newer version of @cic{}), you must first agree to license your code +under the same license as the code that surrounds it (normally, that's +the GNU General Public License, but if you submit a patch to a file with +a different license, like this manual (yes, documentation patches are +useful too), you must agree to that license). You will be credited for +the patch in the source code unless you specifically ask not to be or +you don't give your name (in both these cases, you must license the code +to the public domain so that it can be incorporated without the +attribution requirement). Preferably, patches should be submitted in +the format created by the command @command{diff -u}; this command is +likely to be available on UNIX and Linux systems and versions are also +available for DOS and Windows (including a DJGPP port of the GNU +version). If you can't manage that, just submit your new code with +enough lines of old code around it to show where it's meant to go, and a +description of approximately where in the file it was. Patches should +be submitted by email to the person who most recently released a version +of @cic{}. + +If you have a suggestion for a new feature, it makes sense to first +discuss it on the @uref{news:alt.lang.intercal,,alt.lang.intercal} news +group; other @ical{} compiler maintainers may also want to implement +that feature. If you have developed code to implement that feature in +@cic{}, you can submit it the same way that you would submit a patch for +a bug. + +@node Distributing +@section Distributing +@cindex C-INTERCAL, distributing +@cindex distributing C-INTERCAL +@cindex releasing C-INTERCAL + +Due to the licensing conditions of @cic{}, you are allowed to release +your own version or distribution if you want to. In such cases, it's +recommended that you follow the following guidelines: + +@enumerate + +@item +Make sure the new version is based on the most recent existing version. +Looking at the @uref{news:alt.lang.intercal,,alt.lang.intercal} +newsgroup will normally let you know what version is most recent. + +@item +Increment the version number; if you add any new features, increment the +major version number (after the decimal point) and drop the minor +version number (before the decimal point) to 0, and otherwise increment +the minor version number. You have to update the version number in the +following files: @file{config.in}, @file{config.sh}, and +@file{ick.info}. You also have to rename the installation directory to +reflect the new version number. + +@item +Add an entry to the @file{NEWS.txt} file explaining what's new in the +version that you're releasing, following the same format as the other +entries. + +@item +Update the @file{README.txt} with a description of any new files you may +have added. + +@item +Remove any autosave or backup files that may be littering the +installation directory or its subdirectories. + +@item +Run @command{make distclean}, or @command{districk.sh} or +@command{districk.bat} if you didn't manage to configure; this will +remove all files created by the compilation process that shouldn't be +in the distribution. + +@item +Update the @file{MANIFEST.txt} file that lists all files in the +distribution; on a Linux or UNIX system, you can do this by typing +@command{ls -R1 > MANIFEST.txt} in the main installation directory. + +@item +If creating the distribution under DJGPP, run @command{etc/ctrlmfix.bat} +or @command{etc/ctrlmfix.sh}, even if you managed to configure; this +will sort out portability problems with newlines. + +@item +Create a gzipped tar file containing the installation directory. Its +filename should be @samp{ick-}, followed by the version number with the +dot replaced by a dash, followed by @samp{.tgz}; this form of filename +is friendly to DOS. + +@item +Place the new version somewhere on the Internet, and announce the +location and the fact that a new version has been released on +@uref{news:alt.lang.intercal,,alt.lang.intercal}. + +@end enumerate + +@node Invoking ick +@chapter Invoking ick +@cindex command line options +@cindex options, to @command{ick} +@cindex @command{ick}, command line options +@cindex @command{ick}, invoking +@cindex @command{ick}, options +@cindex compiling, @ical{} source code + +All operations on @ical{} source code available in @cic{} are currently +carried out by the compiler @command{ick}. + +The syntax is + +@example +ick -options @var{inputfile} +@end example + +@noindent +(Options can be given preceded by separate hyphens, or all in a row +after one hyphen, or a mixture; they're all single characters.) By +default, this compiles one @ical{} program given as the input file +directly to an executable without doing anything fancy; usually you will +want to give options, which are described below. + +@menu +* Language-affecting Options:: Options that specify language dialect +* Debug Options:: Debug your code or ick itself +* Output Options:: Specifying output format and location +* Optimizer Options:: Yes, you can optimize @ical{}! +* Other Options:: Options not covered in other sections +* Options to Generated Programs:: Generated executables allow options too +* Environment Variables:: What environment variables affect ick +@end menu + +@node Language-affecting Options +@section Language-affecting Options +@cindex options, language-affecting +@cindex language-affecting options +@cindex options, dialect +@cindex dialect options + +The following command-line options to @command{ick} affect what dialect +of the @ical{} language is compiled by the compiler; you may need to set +one or more of these options if your input is not the default @cic{} but +instead some other language like @icst{} or @clcic{}, or just because +you like certainty or like being different with respect to your output. +Note that there is no command-line option corresponding to +@abbr{TriINTERCAL} (or the base 4-7 versions); instead, the numeric base +to use is determined by looking at the filename extension (@samp{.i} for +base 2, the default, or @samp{.3i} to @samp{.7i} for the base 3-7 +versions.) + +@table @option +@ianchor -b +@opindex -b +@cindex random bug +@cindex E774, disabling +If this option is @emph{not} given, there is a small chance that a +random bug appears in the compiler, which causes the programs it creates +to manifest a bug that causes error E774 (@pxref{E774}). Giving the +option means that this bug will not happen. (You may wonder why this +bug was preserved; it is in fact a bug that was carefully preserved +since the days of @icst{}, in this case, but the option to turn it off +is available as a workaround. (There are no plans to fix this or any of +the other carefully preserved bugs any time soon, because that would +kind of defeat the point of having preserved them.) Interestingly, the +@icst{} compiler documentation mentions a similar command-line option +that is a workaround for the same bug.) + +@ianchor -m +@opindex -m +@cindex multithreading, enabling +@cindex backtracking, enabling +This option needs to be given to allow any multithreading or +backtracking commands or identifiers to be used. (Unlike with other +language features, this is not autodetected because it's legal to have a +program with multiple COME FROM (@pxref{COME FROM}) commands aiming at +the same line even when it isn't multithreaded, in which case the +commands cause error E555 (@pxref{E555}) when that line is encountered +(with the usual caveats about both commands having to be active at the +time).) Attempts to use non-COME FROM multithreading or backtracking +commands without this option produce error E405 (@pxref{E405}). + +@ianchor -t +@opindex -t +@cindex INTERCAL-72 compatibility mode +@cindex compatibility, INTERCAL-72 +This option tells the compiler to treat the source code as @icst{}; as a +result, any language constructs that are used but weren't available in +1972 will trigger error E111 (@pxref{E111}). + +@ianchor -v +@opindex -v +@cindex constants, assigning to +@cindex assigning to constants +It is possible to write @ical{} code sufficiently tortuous that it ends +up assigning to a constant. Generally speaking, this isn't what you +wanted to do, so the compiler will kindly cause an error (E277; +@pxref{E277}) that stops the insanity at that point, but at the cost of +a significant amount of performance you can give this option to tell the +compiler to simply change the constant and keep on going anyway. (Note +that unlike @clcic{}, this only changes uses of the constant preceded by +@code{#} in your program, not things like line numbers; you want +@uref{http://esolangs.org/wiki/Forte,Forte} for that.) + +@ianchorc -C +@opindex -C +@cindex clockface mode +When this option is given, the generated programs will write the number +4 as @samp{IIII} rather than @samp{IV}, in case you're writing a clock +program. + +@ianchorc -P +@opindex -P +@cindex PIC-INTERCAL, command line option +@cindex E256, avoiding +@cindex E652, avoiding +This tells the compiler to treat the input as @abbr{PIC-INTERCAL} +(@pxref{PIC-INTERCAL}) rather than ordinary @cic{} input, and generate +PIC output code accordingly. There are a lot of options that are +incompatible with this, as well as many language features, due to the +limited memory available on a PIC. If you get error E256 +(@pxref{E256}), you have this option given when it shouldn't be; +likewise, if you get error E652 (@pxref{E652}), you should be using this +option but aren't. (A few simple programs are +@cic{}/@abbr{PIC-INTERCAL} polyglots, but such programs are incapable of +doing input or output, meaning that they aren't particularly useful.) + +@ianchorc -X +@opindex -X +@cindex Princeton syntax, option +@cindex syntax, Princeton +The @cic{} and @clcic{} compilers use different notation for various +things, sometimes to the extent where the same notation is legal in both +cases but has a different meaning. As this is the @cic{} compiler, it +rather guessably uses its own notation by default; however, the @clcic{} +notation can be used as the default instead using this option. (In most +situations where there isn't an ambiguity about what something means, +you can use the `wrong' syntax freely.) The option causes ambiguous +characters like @code{?} to be interpreted with Princeton rather than +Atari meanings. + +@ianchor -x +@opindex -x +@cindex CLC-INTERCAL compatibility mode +@cindex compatibility, CLC-INTERCAL +This option causes some constructs with different meanings in @cic{} +and @clcic{} to use the @clcic{} meaning rather than the @cic{} +meaning. At present, it affects the abstention of a GIVE UP +(@pxref{GIVE UP}) command by line number, which is possible as long as +this switch isn't given; reading through the @icst{} manual, there are +a lot of things that imply that this probably wasn't intended to be +possible, but as far as I can tell that manual doesn't actually +@emph{say} anywhere that this particular case is disallowed, even +though it rules out all other similar cases. It also causes I/O on +array variables to be done in @clcic{}'s extended Baudot syntax, +rather than using the Turing Tape method. + +@end table + +@node Debug Options +@section Debug Options +@cindex options, debug +@cindex debug options + +Sometimes things will go wrong with your program, or with the way +@command{ick} was installed. There may even be unknown bugs in +@command{ick} itself (if you find one of these, please report it). The +following options are used to debug the whole system on various levels. + +@table @option + +@ianchor -d +@opindex -d +@cindex debugging, parser +@cindex parser, debugging +@cindex debugging, lexical analyser +@cindex lexical analyser, debugging + +If you think that something has gone wrong with the parser, or you want +to see how your program is being parsed, you can give this option on the +command line. All the debug output produced by the parser and lexical +analyser will be output on standard error. + +@ianchor -g +@opindex -g +@cindex debugging, C code +@cindex C code, debugging +@cindex C code, leaving in place + +This option allows debugging of the final executable at the C code +level. Any C code generated will be left in place, and the @option{-g} +option will be given to the C compiler that's used to compile the code, +so all the information needed for a C debugger to be used on the +executable will be present there. + +@item -h +@itemx -H +@itemx -hH +@anchor{-h} +@anchor{-H+} +@anchor{-hH} +@opindex -h +@opindex -H +@opindex -hH +@cindex optimizer, debugging +@cindex debugging, optimizer +@cindex OIL, debugging +@cindex debugging, OIL + +These options allow debugging of the optimiser, or produce output +helpful for understanding how your program has been summarised. +@option{-h} produces a summary of what optimiser rules were used, the +initial expression and what it was optimised to; @option{-H} produces a +more expanded view that shows each intermediate step of optimisation, +and @option{-hH} shows the same output as @option{-H}, but written +completely using C syntax (the other options output in a strange mix of +@ical{} and C). + +@ianchor -l +@opindex -l +@cindex warnings, enabling + +This option turns on generation of warnings (@pxref{Warnings}). To make +sure that they aren't actually useful, or are only marginally useful, +the warning generator is far too sensitive, and there is no way to +decide which warnings are given and which ones aren't; you either get +all of them or none. + +@ianchor -p +@opindex -p +@cindex profiling +@cindex yuk, profiling + +This option causes the program to run immediately after being compiled, +and profiles the resulting program to identify performance bottlenecks, +etc. The usefulness of this depends on the resolution of the timers on +the computer and operating system; DOS, in particular, is really bad +with timer resolution. The output will be saved in a file called +@file{yuk.out} when the program finishes running. It's legal to turn on +both the profiler and the interactive debugger at the same time, but if +you do this the profiler will also identify bottlenecks in the person +typing in commands to step through the program! The profiler will, in +fact, identify all the timings that particular commands in the program +take; so @code{WRITE IN} instructions will often show up as taking a +long time due to their need to wait for input. + +@ianchor -u +@opindex -u +@cindex skeleton file, directory problems +@cindex system library, directory problems +@cindex syslib, directory problems +@cindex directory problems +@cindex E999, debugging +@cindex E127, debugging + +When you are getting problems with finding files -- for instance, the +compiler can't find the skeleton file (@pxref{E999}) or the system +library (@pxref{E127}) -- this option will let you know, on standard +error, where the compiler is looking for files. This may hopefully help +you pin down where the file-finding problems are coming from, and also +offers the option of simply placing copies of the files where the +compiler is looking as a last resort. + +@ianchor -y +@opindex -y +@cindex yuk, command line option + +This is the main debugging option: it loads yuk, an interactive @ical{} +debugger with ability to step through the program, set breakpoints, view +and modify variables, etc. @xref{yuk}. + +@ianchorc -U +@opindex -U +@cindex internal errors, debugging +@cindex debugging, internal errors +@cindex internal errors, dumping core +@cindex dumping core on error +@cindex E778, debugging + +The internal error E778 (@pxref{E778}) should never happen. However, +there are all sorts of potential problems that may come up, and if part +of the code detects something impossible, or more usually when the +operating system detects things have got too insane and segfaults, +normally this error will just be generated and that's that. (I most +often get this when I've been writing a new section of code and have +made a mistake; hopefully, all or at least most of these errors are +fixed before release, though.) If you want more information as to what's +going on, you can give the @option{-U} option, which will cause the +compiler to raise an abort signal when an internal error happens. This +can generally be caught by a debugger that's being run on @command{ick} +itself at the time; on many systems, it will also cause a core dump. + +@end table + +@node Output Options +@section Output Options +@cindex output options +@cindex options, output + +These options allow you to control how far to compile (all the way to an +executable, or only to C, etc.@:), and where the output will be created. +Note that the output options may change depending on the other options +selected; for instance, many of the debug options will prevent the code +being compiled all the way to an executable. + +@table @option + +@ianchor -c +@opindex -c +@cindex code generation, stopping at C code +@cindex C, stopping after C is generated +@cindex output, C only + +By default, the original @ical{} code will be compiled all the way to an +executable, and the intermediate C and object files produced will be +deleted. Giving this option causes the compiler to stop when it has +finished producing the C file, leaving the C file there as the final +output of the compiler. (Its filename is the same as the source file, +but with @samp{.c} as its extension/suffix rather than the source file's +extension.) Without this option, an executable will be produced with the +extension changed to whatever's appropriate for the system you are on +(or omitted entirely if that's appropriate for the system). + +This option also places verbose comments in the output C file. + +@ianchor -o +@opindex -o +@cindex output, to standard output +@cindex standard output + +This option causes the compiler to progress no further than producing +the C output file, but instead of writing it to a file writes it +directly to standard output. This might occasionally be useful when +using @command{ick} as part of a pipe; it can also be useful to see how +far the compiler gets with compiling code before an error happens, when +you're trying to track down an error. + +@end table + +@node Optimizer Options +@section Optimizer Options +@cindex optimizer options +@cindex options, optimizer +@cindex optimization + +There are various command line options that can be used to tell +@command{ick} whether and in what ways to optimize code. + +@table @option + +@ianchor -f +@opindex -f +@cindex flow optimization +@cindex optimization, flow +@cindex optimization, control flow + +This option requests the compiler to attempt to analyse the flow of the +program and optimize accordingly; for instance, it will detect which +commands can't possibly be @code{ABSTAINED} from and refrain from +generating code to check the abstention status of those commands. + +@ianchorc -F +@opindex -F +@cindex optimization, extreme +@cindex extreme optimization + +This option tells the compiler to optimize the output for speed. This +is done to crazy extremes; the compiler may take several hours/days +analysing the program in some cases and still not come up with an +improvement. It turns on all the other optimizer options. Note that +not all systems accept this option, because it sometimes outputs a shell +script disguised as an executable rather than an actual executable. + +@ianchorc -O +@opindex -O +@cindex optimization, idioms +@cindex idiom optimization +@cindex optimization, OIL +@cindex OIL, optimizing code + +This option tells the compiler to apply optimizer idioms to the +expressions in the code given, when appropriate. The list of idioms is +stored in the file @file{src/idiotism.oil}; note that it is compiled +into the compiler, though, so you will have to rebuild and reinstall the +compiler if you change it. For more information about changing the list +of idioms, see @ref{Optimizer Idiom Language}. + +@end table + +@node Other Options +@section Other Options +@cindex other options +@cindex options, other + +Some options just can't be classified. + +@table @option + +@item -@@ +@anchor{-at} +@opindex -@@ +@cindex options, help +@cindex help with options +@cindex usage instructions, printing + +If this option is given, the compiler doesn't run at all, but instead +prints a set of instructions for using it, explaining which options are +available on the system you're on and which options conflict with which +other options. + +@end table + +@node Options to Generated Programs +@section Options to Generated Programs +@cindex generated programs, options +@cindex options, to generated programs + +Once the compiler runs and produces an output executable, that +executable itself will accept a range of options that control the way it +runs. None of these options have to be used; a default value will be +assumed if they aren't. + +@table @option + +@ianchorpm help +@opindex +help +@opindex -help + +Whether @samp{+} or @samp{-} is given at the start of this option, it +will cause the program to print out what options are available and what +state they are in. It will then cause the program to exit via an +internal error. + +@ianchorpm wimpmode +@opindex +wimpmode +@opindex -wimpmode +@cindex wimpmode +@cindex Roman numerals, disabling +@cindex Arabic numberals, enabling +@cindex input, in Arabic numerals +@cindex output, in Arabic numerals + +If the @samp{+} version of this is given (rather than the default +@samp{-}), then the program will print a message explaining that you are +a wimp (the mode itself is known as wimpmode), and for the rest of +execution will input in Arabic numerals (@samp{123} rather than +@samp{ONE TWO THREE}) and likewise will output in Arabic numerals rather +than Roman numerals (such as @samp{CXXIII}). True @ical{} programmers +should rarely have to use this mode. + +@ianchorpm traditional +@opindex +traditional +@opindex -traditional + +This option does not actually appear to do anything. + +@ianchorpm printflow +@opindex +printflow +@opindex -printflow +@cindex flow, printing +@cindex debugging, flow +@cindex debugging, multithreaded programs +@cindex multithreading, debugging +@cindex backtracking, debugging + +The usual debugging methods don't work with multithreaded or +backtracking programs. This option exists to give at least a slim +chance of working out what is going on with them. It causes the program +to print the line number of the command it thinks it may be executing +next (i.e.@: the line number that would be printed if that line had an +error) immediately after executing each command, and also an internal +identifier for the thread that that command was in. It also prints a +trace of what parts of the multithreader are being activated; so for +instance, it will tell you when a thread is being forked into multiple +threads or when a choicepoint has been deleted. + +@ianchorpm mystery +@opindex +mystery +@opindex -mystery + +This option is occasionally capable of doing something, but is +deliberately undocumented. Normally changing it will have no effect, +but changing it is not recommended. + +@end table + +@node Environment Variables +@section Environment Variables +@cindex environment variables + +Various environment variables can be set to affect the operation of +@command{ick}. + +@multitable @columnfractions .3 .7 +@headitem Variable @tab Meaning +@item ICKINCLUDEDIR@*ICKLIBDIR@*ICKDATADIR +@tab +These three environment variables suggest locations in which +@command{ick} should look to find various files that it needs: the +skeleton file, system library, C header files and libraries that it +needs, constant-output optimiser, and the GNU General Public License +(which the debugger needs to be able to display on demand for legal +reasons). +@item CC +@tab +The name of a C compiler to use (defaults to gcc, which is the only +compiler with which @cic{} has been tested recently). This option has +no effect on DJGPP, where gcc is always used. +@item ICKTEMP@*TMPDIR@*TEMP@*TMP +@tab +On DJGPP, @command{ick} creates temporary files to pass options to gcc +as a method of getting around the limit on the length of a command line +that can sometimes affect DOS programs. These four environment +variables are tried (in this order) to determine a location for the +temporary file; if none of them are set, the current directory is used. +@end multitable + +@node Errors and Warnings +@chapter Errors and Warnings +@cindex @command{ick}, errors and warnings +@cindex errors and warnings + +Things may go wrong, either during the compilation or the execution of +your program. Note that some things that would be compile-time errors +in many other languages -- such as syntax errors -- are in fact run-time +errors in @ical{}. + +Errors and warnings appear as an error code starting with @samp{ICL}, +followed by a three digit number, followed by @samp{I} for an error or +@samp{W} for a warning. However, they will be notated here as +@samp{E000}, etc.@:, to save space and because consistency was never a +strong point of @ical{}. This is followed by a text description of the +error, and a hint as to the location of the error. This is not the line +on which the error occurred, but rather the line on which the next +command to be executed is. To add to the fun, the calculation of the +next command to be executed is done at compile-time rather than runtime, +so it may be completely wrong due to things like abstention on +@code{COME FROM}s or computed @code{COME FROM}s. The moral of this +story is that, if you really want to know where the error is, use a +debugger. Note also that if the error happens at compile-time, there is +no guarantee that the line number given makes any sense at all. Some +errors don't give next line numbers, mostly those for which it doesn't +make logical sense, such as E633 (@pxref{E633}). After this is a +suggestion to correct (or reconsider) the source code and to resubnit +it. (This typo has been carefully preserved for over a decade.) + +@menu +* Errors:: Error messages that might be produced +* Warnings:: Warnings produced by the @option{-l} option +@end menu + +@node Errors +@section Errors +@cindex errors +@cindex @command{ick}, errors + +This is a list of the error messages that might be produced during the +compilation or execution of an @ical{} program. + +@table @asis + +@ieanchor E000 +@cindex syntax error + +This is an unusual error; it's what's printed when a syntax error is +encounted at runtime, in a situation in which it would be executed. (An +@code{ABSTAIN}ed syntax error, for instance, would not be executed; this +is one of the mechanisms available for writing comments.) The text of +the error message is simply the statement that couldn't be decoded. + +@ieanchor E017 +@cindex syntax error, serious +@quotation +DO YOU EXPECT ME TO FIGURE THIS OUT? +@end quotation + +It sometimes happens that a syntax error manages to get the parser so +confused that it can't figure out what to do next; that causes this +error, which happens at compile time. + +@ieanchor E079 +@cindex politesse +@cindex @code{PLEASE}, proportion required +@quotation +PROGRAMMER IS INSUFFICIENTLY POLITE +@end quotation + +The balance between various statement identifiers is important. If less +than approximately one fifth of the statement identifiers used are the +polite versions containing @code{PLEASE}, that causes this error at +compile time. + +@ieanchor E099 +@quotation +PROGRAMMER IS OVERLY POLITE +@end quotation + +Of course, the same problem can happen in the other direction; this +error is caused at compile time if over about one third of the statement +identifiers are the polite form. + +@ieanchor E111 +@quotation +COMMUNIST PLOT DETECTED, COMPILER IS SUICIDING +@end quotation + +This error happens when you give the @option{-t} option (@pxref{-t}) but +you use a language construct that wasn't available in @icst{}. If this +happens, then either there's a mistake in the program that prevents it +being @icst{} or you shouldn't be compiling it as @icst{} in the first +place. + +@ieanchor E123 +@cindex black lagoon +@cindex @code{NEXT}, stack overflow +@cindex stack overflow +@quotation +PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON +@end quotation + +There is a hard limit of 80 @command{NEXT}s at a time; this is to +discourage excessive use of @command{NEXTING} for things like recursion. +(Recursive programs are entirely legal; you simply have to figure out +how to do it with computed @command{COME FROM} instead. (For the +record, it is possible. (Using lots of nested brackets when talking +about recursion is great (yay!@:).))) Another problem with writing the +source code that can cause this error is a failure to properly +@command{FORGET} the entry on the @command{NEXT} stack created when +trying to simulate a goto. + +@ieanchor E127 +@cindex system library, errors +@cindex syslib, errors +@quotation +SAYING 'ABRACADABRA' WITHOUT A MAGIC WAND WON'T DO YOU ANY GOOD +@end quotation +Your program asked to include the system library (by specifying a line +number from 1000 to 1999 inclusive without including a line with that +number), but due to installation problems the copmiler couldn't find the +system library to include. You could try using the @option{-u} +(@pxref{-u}) option to see where the compiler's looking; that may give +you an idea of where you need to copy the system library so that the +compilation will work. This error happens at compile time and doesn't +give a next command line number. + +@ieanchor E129 +@cindex @code{NEXT}, nonexistent target +@quotation +PROGRAM HAS GOTTEN LOST +@end quotation + +This error happens at compile time when the compiler can't figure out +where a @command{NEXT} command is actually aiming (normally due to a +typo in either the line label given or the line label on the line aimed +for). The logic behind this error means that the next line to be +executed is unknown (after all, that's the whole point of the error) and +is therefore not given. + +@ieanchor E139 +@cindex @code{ABSTAIN}, nonexistent target +@cindex @code{REINTSTATE}, nonexistent target +@quotation +I WASN'T PLANNING TO GO THERE ANYWAY +@end quotation + +This error happens at compile time when an @code{ABSTAIN} or +@code{REINSTATE} references a non-existent target line. This generally +happens for much the same reasons as E129 (@pxref{E129}). + +@ieanchor E182 +@cindex line label, duplicate +@cindex duplicate line label +@quotation +YOU MUST LIKE THIS LABEL A LOT! +@end quotation + +At present, it's impossible to have more than one line with the same +line number. That would make @code{NEXT} act too much like @code{COME +FROM} in reverse to be interesting. This error happens at compile time. + +@ieanchor E197 +@cindex line label, illegal value +@cindex illegal line label value +@cindex invalid line label value +@quotation +SO@! 65535 LABELS AREN'T ENOUGH FOR YOU? +@end quotation + +Legal values for line labels are 1 to 65535 (with values from 1000 to +1999 reserved if you want to use the system library). This error comes +up if you use nonpositive or twospot values for a line label. + +@ieanchor E200 +@cindex variable, illegal number +@cindex illegal variable number +@cindex invalid variable number +@quotation +NOTHING VENTURED, NOTHING GAINED +@end quotation + +You used a variable that isn't actually in your program. Failing that +(which would be quite impressive and is probably impossible, at least in +the present version of @cic{}), you specified an illegal number for a +variable (legal numbers are positive and onespot). This error happens +at compile time, at least for illegal variable numbers. + +@ieanchor E222 +@cindex out of memory, during @code{STASH} +@quotation +BUMMER, DUDE! +@end quotation + +In @ical{}, you're allowed to @code{STASH} as much as you like; this +makes the language Turing-complete and allows for unlimited recursion +when combined with computed @code{COME FROM} in the right way. +Unfortunately, real computers aren't so idealised; if you manage to +write a program so memory-intensive that the computer runs out of memory +to store stashes, it causes this error at runtime. To fix this error, +you either have to simplify the program or upgrade your computer's +memory, and even then that will only help to some extent. + +@ieanchor E240 +@cindex array, invalid dimension +@cindex invalid array dimension +@cindex illegal array dimension +@quotation +ERROR HANDLER PRINTED SNIDE REMARK +@end quotation + +Arrays have to be large enough to hold at least one element; you tried +to dimension an array which isn't large enough to hold any data. This +error happens at run time. + +@ieanchor E241 +@cindex array, wrong dimension +@cindex wrong array dimension +@cindex array, out of bounds +@cindex out of bounds +@quotation +VARIABLES MAY NOT BE STORED IN WEST HYPERSPACE +@end quotation + +This error happens at run time when the subscripts given to an array +are inconsistent with the way the array was dimensioned, either +because there were the wrong number of subscripts or because a +subscript was too large to fit in the array. It can also happen when +a multidimensional array is given to a command, such as @code{WRITE +IN}, that expects it to be monodimensional. + +@ieanchor E252 +@cindex I/O, out of memory +@cindex out of memory, I/O +@quotation +I'VE FORGOTTEN WHAT I WAS ABOUT TO SAY +@end quotation + +This run-time error message is caused by the compiler running out of +memory whilst trying to do I/O; at present, it can only happen during +@clcic{}-style I/O. + +@ieanchor E256 +@cindex PIC-INTERCAL, unsupported command +@quotation +THAT'S TOO HARD FOR MY TINY BRAIN +@end quotation + +Some commands simply aren't available in @abbr{PIC-INTERCAL}. I mean, +@acronym{PIC}s generally have less than a kilobyte of memory; you're not +going to be able to use some of the more confusing language features +with that sort of resource limitation. The solution is to replace the +affected command, or to not give the @option{-P} option +(@pxref{-P+,,-P}) if you didn't mean to compile as @abbr{PIC-INTERCAL} +in the first place. + +@ieanchor E275 +@cindex overflow, over onespot +@cindex overflow, over 16 bits +@cindex onespot overflow +@cindex 16 bit overflow +@quotation +DON'T BYTE OFF MORE THAN YOU CAN CHEW +@end quotation + +This error happens when there is an attempt to store a twospot value in +a onespot variable. The actual size of the value is what matters when +counting its spots; so you can store the output of a mingle in a onespot +variable if it happens to be less than or equal to 65535, for instance. +(This is not necessarily the case in versions of @ical{} other than +@cic{}, though, so you have to be careful with portability when doing +this.) + +@ieanchor E277 +@cindex reverse assignment, impossible +@cindex reverse assignment, error +@cindex operand overloading, impossible +@cindex impossible reverse assignment +@quotation +YOU CAN ONLY DISTORT THE LAWS OF MATHEMATICS SO FAR +@end quotation + +Reverse assignments are not always mathematically possible. Also, +sometimes they require changing the value of a constant; this is only +legal if you specifically specified that it was legal by using the +@option{-v} option. In the case of an impossible reverse assignment +(including a situation in which operand overloading causes a reverse +assignment to happen), this error happens at runtime. + +@ieanchor E281 +@cindex spark, nesting limit +@cindex ears, nesting limit +@cindex rabbit-ears, nesting limit +@cindex nesting limit +@findex SENESTMAX +@quotation +THAT MUCH QUOTATION AMOUNTS TO PLAGIARISM +@end quotation + +There is a limit of 256 on the number of nested spark/ears groups +allowed. If you somehow manage to exceed that limit, that will cause +this error. Try breaking the expression up into smaller expressions. +(The limit is trivial to increase by changing @code{SENESTMAX} in +@file{ick.h}; if you ever actually come across a program that hits the +limit but wasn't designed to, just email the maintainer to request a +higher limit.) + +@ieanchor E333 +@cindex variables, limit +@quotation +YOU CAN'T HAVE EVERYTHING, WHERE WOULD YOU PUT IT? +@end quotation + +Your program references so many variables that the compiler couldn't +cope. This error is unlikely to ever happen; if it does, try reducing +the number of variables you use by combining some into arrays. This is +a compile-time error. + +@ieanchor E404 +@cindex @code{GO BACK}, no choicepoint +@cindex @code{GO AHEAD}, no choicepoint +@quotation +I'M ALL OUT OF CHOICES! +@end quotation + +Your program asked that a choicepoint be backtracked to or removed, but +there aren't any choicepoints at the moment. This runtime error usually +indicates a logic mistake in your program. In backtracking programs +translated from other backtracking languages, this indicates that the +program has failed. + +@ieanchor E405 +@cindex multithreading, not enabled +@cindex backtracking, not enabled +@cindex @code{WHILE}, not enabled +@cindex @code{MAYBE}, not enabled +@cindex @code{GO AHEAD}, not enabled +@cindex @code{GO BACK}, not enabled +@quotation +PROGRAM REJECTED FOR MENTAL HEALTH REASONS +@end quotation + +Your program used a construct that only makes sense when multithreading +or backtracking (@code{WHILE}, @code{MAYBE}, @code{GO BACK}, or @code{GO +AHEAD}), but you didn't specify the @option{-m} option (@pxref{-m}). If +you meant to write a multithreaded or backtracking program, just give +that option; if you didn't, be careful what words you use in comments! +This error happens at compile-time. + +@ieanchor E436 +@cindex @code{RETRIEVE}, without stashing +@cindex stash failure +@quotation +THROW STICK BEFORE RETRIEVING! +@end quotation + +In order to @code{RETRIEVE} a variable, it has to be @code{STASH}ed +first; if it isn't, then this error happens at runtime. + +@ieanchor E444 +@cindex @code{COME FROM}, no target +@cindex @code{NEXT FROM}, no target +@quotation +IT CAME FROM BEYOND SPACE +@end quotation + +A @code{COME FROM} aiming at a line label --- as opposed to a computed +@code{COME FROM}, which is allowed to be pointing at a nonexistent line +--- must point to a valid line label. The same applies to @code{NEXT +FROM}. This error happens at compile time if a nonexistent line label is +found in one of these contexts. + +@ieanchor E533 +@cindex overflow, over twospot +@cindex overflow, over 32 bits +@cindex twospot overflow +@cindex 32 bit overflow +@quotation +YOU WANT MAYBE WE SHOULD IMPLEMENT 64-BIT VARIABLES? +@end quotation + +This error is like E275 (@pxref{E275}), but applies when an attempt is +made at runtime to store a threespot value (or even a fourspot or +morespot value) in a twospot variable, or a threespot or greater value +is produced as an intermediate during a calculation (for instance by a +mingle operation). No values above twospot are allowed at any point +during an @ical{} program; if you want to process higher numbers, you +have to figure out a different way of storing them. + +@ieanchor E555 +@cindex @code{COME FROM}, ambiguity +@quotation +FLOW DIAGRAM IS EXCESSIVELY CONNECTED +@end quotation + +Aiming two @code{COME FROM}s at the same line only makes sense in a +multithreaded program. In a non-multithread program, doing that will +cause this error at compile time (if neither @code{COME FROM} is +computed) or at run time (if the command that has just finished running +is simultaneously the target of two or more @code{COME FROM}s). This +either indicates an error in your program or that you've forgotten to +use the @option{-m} option (@pxref{-m}) if you are actually trying to +split the program into two threads. + +@ieanchor E562 +@cindex input, EOF +@cindex EOF +@cindex end of file +@quotation +I DO NOT COMPUTE +@end quotation + +The program asked for input, but for some reason it wasn't available. +(This is a runtime error, obviously.) The error may happen because the +input is being piped in from a command or file which has reached +end-of-file, or because the user typed @kbd{@key{CTRL}-@key{D}} +(UNIX/Linux) or @kbd{@key{CTRL}-@key{Z}} (DOS/Windows) while the program +was trying to @code{WRITE IN} some data. + +@ieanchor E579 +@cindex input, invalid +@quotation +WHAT BASE AND/OR LANGUAGE INCLUDES @var{string}? +@end quotation + +When reading spelt-out-digit input, the input didn't seem to be a valid +digit in English, Sanskrit, Basque, Tagalog, Classical Nahuatl, +Georgian, Kwakiutl, Volap@"uk, or Latin. This seems to have languages +covered pretty well; what on earth were you using, or did you just make +a spelling mistake? + +@ieanchor E621 +@cindex @code{RESUME}, by 0 +@quotation +ERROR TYPE 621 ENCOUNTERED +@end quotation + +The compiler encountered error E621 (@pxref{E621}). This happens at +runtime when the program requests that no entries are removed from the +@code{NEXT} stack (which is possible), but that the last entry removed +should be jumped to (which given the circumstances isn't, because no +entries were removed.) + +@ieanchor E632 +@quotation +THE NEXT STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT! +@end quotation + +When an attempt is made to @code{RESUME} past the end of the @code{NEXT} +stack, the program ends; however, this cause the program to end in a +manner other than via @code{GIVE UP} or @code{DON'T TRY AGAIN}, so an +error message must be printed, and this is that error message. + +@ieanchor E633 +@quotation +PROGRAM FELL OFF THE EDGE +@end quotation + +You can't just let execution run off the end of the program. At least, +that is, if it doesn't end with @code{TRY AGAIN}. An attempt to do that +causes this error at runtime. Note that if your program references the +system library, then it counts as being appended to your program and so +the program will run into the first line of the system library rather +than cause this error. As it happens, the first line of the system +library is a syntax error, so doing this will cause E000 (@pxref{E000}) +with the error text @samp{PLEASE KNOCK BEFORE ENTERING}. There isn't a +next statement to be executed with E633, so the next statement won't be +given in the error message. + +@ieanchor E652 +@cindex @code{PIN}, in a non-PIC program +@quotation +HOW DARE YOU INSULT ME! +@end quotation + +The @code{PIN} command doesn't make much sense for anything bigger than +a @acronym{PIC}; using it in a non-@acronym{PIC} program causes this +error at compile-time. Try using the normal input and output mechanisms +instead. This error may also be a clue that you are trying to compile a +@abbr{PIC-INTERCAL} program without giving the @option{-P} option +(@pxref{-P+,,-P}). + +@ieanchor E666 +@cindex out of memory, during compile +@quotation +COMPILER HAS INDIGESTION +@end quotation + +There isn't a limit on the length of an input program other than your +computer's memory; if your computer does run out of memory during +compilation, it causes this error. + +@ieanchor E774 +@cindex random bug, error message +@quotation +RANDOM COMPILER BUG +@end quotation + +No compiler is perfect; sometimes errors just happen at random. In this +case, the random error is E774. If you don't like the idea that your +program may be shot down by a random compiler bug, or you are doing +something important, you can use the @option{-b} option (@pxref{-b}) to +prevent this bug happening. (You may wonder why this bug is in there at +all if it's so easily prevented. The answer is that such a bug was +present in the original @icst{} compiler, which also had an option to +turn the bug off. It's also a reward for people who actually read the +manual.) + +@ieanchor E777 +@cindex directory problems, source file +@cindex no source file +@quotation +A SOURCE IS A SOURCE, OF COURSE, OF COURSE +@end quotation + +You specified a file to compile on the command line, but the compiler +couldn't find or couldn't open it. This is almost certainly because you +made a typo specifying the file. + +@ieanchor E778 +@cindex internal errors +@quotation +UNEXPLANED COMPILER BUG +@end quotation + +This should never come up, either at compile time or at run time. It +could come up at either when an internal check by the compiler or the +runtime libraries realises that something has gone badly wrong; mistakes +happen, and in such cases the mistake will have been detected. (If this +happens at compile time you can use the @option{-U} option +(@pxref{-U+,,-U}) to cause the compiler to send an abort signal -- which +normally causes a core dump -- when the error happens, to help debug +what's causing it.) More often, this error comes up when the operating +system has noticed something impossible, like an attempt to free +allocated memory twice or to write to a null pointer, and tells the +compiler an error has occured, in which case the same response of +putting up this error happens. The point is that in all cases this +error indicates a bug in the compiler (even if it happens at run time); +in such cases, it would be very helpful if you figure out what caused it +and send a bug report (@pxref{Reporting Bugs}). + +@ieanchor E810 +@cindex yuk, input overflow +@quotation +ARE ONE-CHARACTER COMMANDS TOO SHORT FOR YOU? +@end quotation + +This is a debug-time error caused when you give too much input to the +debugger when all it wanted was to know what you wanted to do next. + +@ieanchor E811 +@cindex yuk, breakpoint overflow +@cindex yuk, too many breakpoints +@cindex breakpoints, too many +@quotation +PROGRAM IS TOO BADLY BROKEN TO RUN +@end quotation + +There's a limit to how many breakpoints you can have in a program; +you've broken the limit and therefore broken the debugger. This is a +debug-time error. + +@ieanchor E888 +@quotation +I HAVE NO FILE AND I MUST SCREAM +@end quotation + +The output file couldn't be written, maybe because the disk is full or +because there's already a read-only file with the same name. This is a +compile-time error. + +@ieanchor E991 +@cindex out of memory, multithreading +@cindex out of memory, backtracking +@cindex multithreading, out of memory +@cindex backtracking, out of memory +@quotation +YOU HAVE TOO MUCH ROPE TO HANG YOURSELF +@end quotation + +There is no limit on the number of threads or choicepoints that you can +have in a multithreaded or backtracking program (in a program that isn't +multithreaded or backtracking, these are obviously limited to 1 and 0 +respectively). However, your computer may not be able to cope; if it +runs out of memory in the multithreader, it will cause this error at +runtime. + +@ieanchor E993 +@cindex @code{TRY AGAIN}, not last +@quotation +I GAVE UP LONG AGO +@end quotation + +@code{TRY AGAIN} has to be the last command in a program, if it's there +at all; you can't even follow it by comments, not even if you know in +advance that they won't be @code{REINSTATE}d. This error happens at +compile time if a command is found after a @code{TRY AGAIN}. + +@ieanchor E995 +@quotation +DO YOU REALLY EXPECT ME TO HAVE IMPLEMENTED THAT? +@end quotation + +Some parts of the code haven't been written yet. There ought to be no +way to cause those to actually run; however, if you do somehow find a +way to cause them to run, they will cause this error at compile time. + +@ieanchor E997 +@cindex whirlpool, in base 2 +@cindex sharkfin, in base 2 +@cindex TriINTERCAL, operators in base 2 +@quotation +ILLEGAL POSSESSION OF A CONTROLLED UNARY OPERATOR +@end quotation + +Some operators (such as whirlpool (@code{@@}) and sharkfin (@code{^})) +only make sense in @abbr{TriINTERCAL} programs, and some have a minimum +base in which they make sense. This error happens at compile-time if +you try to use an operator that conflicts with the base you're in (such +as using @abbr{TriINTERCAL} operators in an @ical{} program in the +default base 2). + +@ieanchor E999 +@cindex skeleton file, errors +@quotation +NO SKELETON IN MY CLOSET, WOE IS ME! +@end quotation + +The skeleton file @file{ick-wrap.c} or @file{pickwrap.c} is needed to be +able to compile @ical{} to C. If the compiler can't find it, it will +give this error message. This indicates a problem with the way the +compiler has been installed; try using the @option{-u} option +(@pxref{-u}) to find out where it's looking (you may be able to place a +copy of the skeleton file in one of those places). + +@end table + +@node Warnings +@section Warnings +@cindex warnings +@cindex @command{ick}, warnings + +This is a list of the warnings stored in the warning database. +Warnings only come up when the @option{-l} option (@pxref{-l}) is +given; even then, some of the warnings are not currently implemented +and therefore will never come up. + +@table @asis + +@ieanchor W016 +@quotation +DON'T TYPE THAT SO HASTILY +@end quotation + +The positional precedence rules for unary operators are somewhat +complicated, and it's easy to make a mistake. This warning is meant to +detect such mistakes, but is not currently implemented. + +@ieanchor W018 +@quotation +THAT WAS MEANT TO BE A JOKE +@end quotation + +If an @ical{} expression has been translated from another language such +as C, the optimiser is generally capable of translating it back into +something similar to the original, at least in base 2. When after +optimisation there are still @ical{} operators left in an expression, +then this warning is produced. (Therefore, it's likely to come up quite +a lot if optimisation isn't used@!) The system library produces some of +these warnings (you can tell if a warning has come up in the system +library because you'll get a line number after the end of your program). + +@ieanchor W112 +@cindex warnings, non-INTERCAL-72 +@cindex non-INTERCAL-72 warning +@quotation +THAT RELIES ON THE NEW WORLD ORDER +@end quotation + +This warning comes up whenever the compiler recognises that you've added +some code that didn't exist in @icst{}. This allows you to check +whether your code is valid @icst{} (although @option{-t} (@pxref{-t}) is +more useful for that); it also warns you that code might not be portable +(because @icst{} is implemented by most @ical{} compilers, but more +recent language features may not be). + +@ieanchor W128 +@quotation +SYSLIB IS OPTIMIZED FOR OBUSCATION +@end quotation + +There is an idiom used in the system library that does a right-shift by +selecting alternate bits from a twospot number and then mingling them +the other way round. A rightshift can much more easily be done with a +single rightshift, so this is a silly way to do it, and this warning +warns that this idiom was used. However, the present optimizer is +incapable of recognising whether this problem exists or not, so the +warning is not currently implemented. + +@ieanchor W276 +@cindex onespot, overflow warning +@cindex overflow, warning +@quotation +YOU CAN'T EXPECT ME TO CHECK BACK THAT FAR +@end quotation + +It's an error to assign a twospot value (a value over 65535) to a +onespot variable, or to use it as an argument to a mingle. If the +optimizer can't guarantee at compile time that there won't be an +overflow, it issues this warning. (Note that this doesn't necessarily +mean there's a problem --- for instance, the system library generates +some of these warnings --- only that the optimiser couldn't work out for +sure that there wasn't a problem.) + +@ieanchor W239 +@quotation +WARNING HANDLER PRINTED SNIDE REMARK +@end quotation + +Your code looks like it's trying to assign 0 to an array, giving it no +dimension; this is an error. This warning is produced at compile time +if it looks like a line in your code will cause this error, but it isn't +necessarily an error because that line of code might never be executed. + +@ieanchor W278 +@quotation +FROM A CONTRADICTION, ANYTHING FOLLOWS +@end quotation + +It's sometimes impossible to reverse an assignment (a reverse +assignment can happen if the @option{-v} option (@pxref{-v}) is used +and an expression is placed on the left of an assignment, or in +operand overloading); if the compiler detects that a reversal failure +is inevitable, it will cause this warning. Note that this doesn't +always cause an error, because the relevant code might never be +executed. + +@ieanchor W534 +@cindex unary operators, portability +@cindex portability, unary operators +@quotation +KEEP LOOKING AT THE TOP BIT +@end quotation + +@cic{} uses a slightly different typing mechanism to some other @ical{} +compilers; types are calculated at compile time rather than run time. +This only makes a difference in some cases involving unary operators. +It's impossible to detect at compile time for certain whether such a +case has come up or not, but if the compiler or optimizer thinks that +such a case might have come up, it will issue this warning. + +@ieanchor W622 +@quotation +WARNING TYPE 622 ENCOUNTERED +@end quotation + +Your code looks like it's trying to resume by 0; this is an error. This +warning is produced at compile time if it looks like a line in your code +will cause this error, but it isn't necessarily an error because that +line of code might never be executed. + +@end table + +@node The yuk debugger +@chapter The yuk debugger +@cindex yuk +@cindex debugging, yuk +@cindex debugging, runtime +@cindex runtime debugger +@anchor{yuk} + +The @cic{} distribution contains a runtime debugger called `yuk'. +Unlike most other debuggers, it is stored as object code rather than as +an executable, and it is compiled into the code rather than operating on +it. To debug code, add @option{-y} (@pxref{-y}) to the command line of +@command{ick} when invoking it; that tells it to compile the debugger +into the code and then execute the resulting combination. (The +resulting hybrid debugger/input executable is deleted afterwards; this +is to prevent it being run by mistake, and to prevent spreading the +debugger's licence onto the code it was compiled with.) + +yuk can also be used as a profiler using the @option{-p} option +(@pxref{-p}); this produces a file @file{yuk.out} containing information +on how much time was spent running each command in your program, and +does not prompt for debugger commands. + +Note that some command line arguments are incompatible with the +debugger, such as @option{-m} and @option{-f}. In particular, this +means that multithreaded programs and programs that use backtracking +cannot be debugged using this method; the @option{+printflow} option +(@pxref{+printflow}) to a compiled program may or may not be useful for +debugging multithreaded programs. + +When the debugger starts, it will print a copyright message and a +message on how to access online help; then you can enter commands to +run/debug the program. The debugger will show a command prompt, +@samp{yuk007 }, to let you know you can input a command. + +@cindex yuk, commands +Here are the commands available. Commands are single characters +followed by newlines, or followed by a line number (in decimal) and a +newline or a variable name (a @code{.}, @code{,}, @code{:} or @code{;} +followed by a number in decimal; note that some commands only allow +onespot and twospot variables as arguments). + +@multitable @columnfractions .15 .85 +@headitem Command @tab Description +@item a@var{LINE} +@tab +All non-abstained commands on line @var{LINE} become abstained from +once. +@item b@var{LINE} +@tab +A breakpoint is set on line @var{LINE}. The breakpoint causes execution +with @samp{c} to stop when it is reached. +@item c +@tab +The program is run until it ends (which also ends the debugger) or a +breakpoint is reached. +@item d@var{LINE} +@tab +Any breakpoint that may be on line @var{LINE} is removed. +@item e@var{LINE} +@tab +An explanation of the main expression in each command on line @var{LINE} +is printed to the screen. The explanation is in the same format as the +format produced by @option{-h} (@pxref{-h}) and shows what the optimiser +optimised the expression to (or the original expression if the optimiser +wasn't used). +@item f@var{LINE} +@tab +Removes the effect of the @samp{m} command on line @var{LINE}. +@item g@var{LINE} +@tab +Causes the current command to be the first command on @var{LINE} (if not +on that line already) or the next command on @var{LINE}, as if that line +was @code{NEXT}ed to and then that @code{NEXT} stack item was forgotten. +@item h +@tab +Lists 10 lines either side of the current line; if there aren't 10 lines +to one or the other side of the current line, instead more lines will be +shown on the other side to compensate, if available. +@item i@var{VAR} +@tab +Causes variable @var{VAR} to become @code{IGNORE}d, making it read-only. +@item j@var{VAR} +@tab +Causes variable @var{VAR} to become @code{REMEMBER}ed, making it no +longer read-only. +@item k +@tab +Continues executing commands until the @command{NEXT} stack is the same +size or smaller than it was before. In other words, if the current +command is not a @command{NEXT} and doesn't have a @command{NEXT FROM} +aiming at it, one command is executed; but if a @command{NEXT} does +happen, execution will continue until that @command{NEXT} returns or is +forgotten. A breakpoint or the end of the program also end this. +@item l@var{LINE} +@tab +Lists 10 lines of source code either side of line @var{LINE}, the same +way as with @samp{h}, but using a line stated in the command rather than +the current line. +@item m@var{LINE} +@tab +Produces a message onscreen every time a command on line @var{LINE} is +executed, but without interrupting the program. +@item n +@tab +Show the @command{NEXT} stack on the screen. +@item o +@tab +Continue executing commands until the @command{NEXT} stack is smaller +than it was before. If you are using @command{NEXT}s like procedures, +then this effectively means that the procedure will run until it +returns. A breakpoint or the end of the program also end this. +@item p +@tab +Displays the value of all onespot and twospot variables. +@item q +@tab +Aborts the current program and exits the debugger. +@item r@var{LINE} +@tab +Reinstates once all abstained commands on line @var{LINE}. +@item s +@tab +Executes one command. +@item t +@tab +Continues execution until the end of the program or a breakpoint: each +command that executes is displayed while this command is running. +@item u@var{LINE} +@tab +Continues execution of the program until just before a command on line +@var{LINE} is run (or a breakpoint or the end of the program). +@item v@var{VAR} +@tab +Adds a `view' on variable @var{VAR} (which must be onespot or twospot), +causing its value to be displayed on the screen whenever a command is +printed on screen (for instance, because the command has just been +stepped past, or due to the @samp{m} or @samp{t} commands). +@item w +@tab +Displays the current line and current command onscreen. +@item x@var{VAR} +@tab +Removes any view and any action that may be associated with it on +variable @var{VAR} (which must be onespot or twospot). +@item y@var{VAR} +@tab +Adds a view on variable @var{VAR}; also causes a break, as if a +breakpoint was reached, whenever the value of that variable changes. +@item z@var{VAR} +@tab +Adds a view on variable @var{VAR}; also causes a break, as if a +breakpoint was reached, whenever that variable's value becomes 0. +@item @var{VAR} +@tab +A onespot or twospot variable written by itself prints out the value of +that variable. +@item <@var{VAR} +@tab +@command{WRITEs IN} a new value for variable @var{VAR}. Note that input +must be in the normal @samp{ONE TWO THREE} format; input in any other +format will cause error E579 (@pxref{E579}) and as that is a fatal +error, the debugger and program it's debugging will end. +@item * +@tab +Displays the license conditions under which @command{ick} is +distributed. +@item ? +@tab +Displays a summary of what each command does. (@samp{@@} does the same +thing.) +@end multitable + +While the code is executing (for instance, during a @samp{c}, @samp{k}, +@samp{o}, @samp{t} or @samp{u} command), it's possible to interrupt it +with @kbd{@key{CTRL}-@key{C}} (on UNIX/Linux) or +@kbd{@key{CTRL}-@key{BREAK}} (on Windows/DOS); this will cause the +current command to finish running and the debugger prompt to come back +up. + +@ifset notsplit +@partheading{PART II: THE @ical{} LANGUAGE} +@end ifset +@node Syntax +@chapter Syntax +@cindex syntax, INTERCAL +@cindex INTERCAL, syntax + +@ical{} programs consist of a list of statements. Execution of a +program starts with its first statement; generally speaking each +statement runs after the previous statement, although many situations +can change this. + +Whitespace is generally insignificant in @ical{} programs; it cannot be +added in the middle of a keyword (unless the keyword contains whitespace +itself) or inside a decimal number, but it can be added more or less +anywhere else, and it can be removed from anywhere in the program as +well. + +An @ical{} statement consists of an optional line label, a statement +identifier, an optional execution chance, the statement itself +(@pxref{Statements}), and optionally @code{ONCE} or @code{AGAIN}. + +@menu +* Princeton and Atari Syntax:: There are two syntaxes for @ical{} +* Line Labels:: Allowing lines to be referred to +* Statement Identifiers:: Marking the start of a statement +* Execution Chance:: Statements that might not execute +* ONCE and AGAIN:: Self-abstaining and self-reinstating statements +@end menu + +@node Princeton and Atari Syntax +@section Princeton and Atari Syntax +@cindex syntax, dialects +@cindex dialects of syntax +@cindex character sets + +The history of @ical{} is plagued with multiple syntaxes and character +sets. The result has settled down with two versions of the syntax; +the original Princeton syntax, and the Atari syntax (which is more +suited to the operating systems of today). + +@cindex syntax, Princeton +@cindex Princeton syntax +@subheading Princeton syntax +@portability{some versions, version 0.18+, all versions, no} + +The original @icst{} compiler was the Princeton compiler, which +introduced what has become known as the Princeton syntax for @ical{}; +this is the syntax used in the original manual, for instance, and can +be considered to be the `original' or `official' @ical{} syntax. It +is notable for containing various characters not found in some +character sets; for instance, it writes the operator for mingle as a +cent sign (known as `change'). The other operator that often causes +problems is the bookworm operator @samp{V}, backspace, @samp{-}, which +is used for exclusive-or; the backspace can cause problems on some +systems (which was probably the original intention). This syntax is +also the default syntax in the @clcic{} compiler, which is the @i{de +facto} standard for expanding the Princeton syntax to modern @ical{} +features that are not found in @icst{}; however, it does not appear to +have been used as the default syntax in any other compilers. +Nowadays, there are other ways to write the required characters than +using backspace; for instance, the cent sign appears in Latin-1 and +UTF-8, and there are various characters that approximate bookworms +(for instance, @clcic{} uses the Latin-1 yen symbol for this, which +just to make things confusing, refers to a mingle in modern Atari +syntax). + +@cindex syntax, Atari +@cindex Atari syntax +@subheading Atari syntax +@portability{some versions, yes, version 0.05+, yes} + +The other main syntax is the Atari syntax, so called because it was +originally used by the ``Atari implementation'' of @icst{}. It is not +clear why the implementation was given this name, because the authors +of the implementation are not known; it is not clear whether it has +any connection with Atari other than running on an Atari computer, for +instance. The syntax was designed to work better on ASCII-based +systems, by avoiding the change character (although it can still be +written as @samp{c}, backspace, @samp{/}, which the Atari compiler +documentation claims that the Princeton compiler supported) in favour +of a `big money' character (@samp{$}), and using the `what' (@samp{?}) +as an alternative character for exclusive-or. This is the syntax that +@cic{} and @jic{} have always used, and is the one most commonly used +for communicating @ical{} programs on Usenet and other similar fora +(where ASCII is one of the most reliable-to-send character sets). It +is also the syntax used for examples in this manual, for much the same +reason. The Atari syntax for constructs more modern than @icst{} is +normally taken to be that used by the @cic{} compiler, because it is +the only Atari-syntax-based compiler that contains non-@icst{} +constructs that actually need their own notation. + +@node Line Labels +@section Line Labels +@cindex line label +@cindex line number + +@portability{yes, all versions, all versions, all versions} + +The first part of an @ical{} statement is a line label that specifies +what its line number is. This is optional; it's allowed to have a +statement without a line number, although that prevents other commands +referring to it by number. Line numbers must be constants, and unique +within the program. However, they do not have to be in order; unlike +some other languages with line numbers, a line with a higher number can +come earlier in the program than a line with a lower number, and the +numbers don't affect the order in which commands are executed. + +A line label is a integer expressed in decimal within a wax/wane pair +(@code{(} and @code{)}). For instance, this is a valid line label: + +@example +(1000) +@end example + +Note that line numbers from 1000 to 1999 are used by the system library, +so using them within your own programs may produce unexpected errors if +the system library is included. Apart from this, line numbers from 1 to +65535 are allowed. + +It has become reasonably customary for people writing @ical{} libraries +to pick a range of 1000 line numbers (for instance, 3000 to 3999) and +stick to that range for all line numbers used in the program (apart from +when calling the system library), so if you want to write an @ical{} +library, it may be a good idea to look at the existing libraries (in the +@file{pit/lib} directory in the @cic{} distribution) and choose a range +of numbers that nobody else has used. If you aren't writing a library, +it may be a good idea to avoid such number ranges (that is, use only +line numbers below 1000 or very high numbers that are unlikely to be +used by libraries in the future), so that you can easily add libraries +to your program without renumbering in the future. + +@node Statement Identifiers +@section Statement Identifiers +@cindex statement identifier +@findex DO +@findex PLEASE +@findex NOT +@findex N'T +@cindex abstain, at program start +@cindex reinstate, at program start +@cindex initial abstention +@cindex abstained state +@cindex reinstated state + +@portability{yes, all versions, all versions, all versions} + +After the line label (if a statement has one) comes the statement +identifier, which marks where the statement starts. Either the label or +the statement identifier, whichever one comes first, marks where the +preceding statement finishes. + +@anchor{DO}@anchor{PLEASE} +The main statement identifier is @code{DO}. It also has two synonyms, +@code{PLEASE} and @code{PLEASE DO}; these synonyms are the 'polite' +forms of statement identifiers. Although the three identifiers have the +same meaning, using either polite or non-polite identifiers too much can +cause an error; the correct proportion is approximately 3 non-polite +identifiers for every polite identifier used. None of these identifiers +actually does anything else apart from marking where the statement +starts; they leave the statements in the default `reinstated' state. + +@anchor{NOT}@anchor{N'T} +Adding @code{NOT} or @code{N'T} to the end of any of these identifiers, +to create a statement identifier such as @code{DO NOT} or @code{PLEASE +DON'T}, also creates a valid statement identifier. These differ in +meanings from the previous set of identifiers, though; they cause the +statement they precede to not be executed by default; that is, the +command will be skipped during execution (this is known as the +`abstained' state). This applies even if the command in question is in +fact a syntax error, thus causing this to be a useful method of writing +comments. One common idiom is to write code like this: + +@example +PLEASE NOTE: This is a comment. +@end example + +The statement identifier (@code{PLEASE NOT}) is the only part of this +statement that is valid @ical{}; however, because the statement +identifier is in the negated form that contains @code{NOT}, the syntax +error won't be executed, and therefore this is a valid statement. (In +@ical{}, syntax errors happen at runtime, so a program containing a +statement like @code{DOUBT THIS WILL WORK} will still compile, and will +not end due to the syntax error unless that statement is actually +executed. @xref{E000}.) + +The @code{ABSTAIN} and @code{REINSTATE} statements can override the +@code{NOT} or otherwise on a statement identifier; see @ref{ABSTAIN}. + +In backtracking programs, @code{MAYBE} is also a valid statement +identifier; see @ref{MAYBE}. It comes before the other keywords in the +statement identifier, and an implicit @code{DO} is added if there wasn't +one already in the statement identifier (so @code{MAYBE}, @code{MAYBE +DO}, @code{MAYBE DON'T}, @code{MAYBE PLEASE}, and so on are all valid +statement identifiers). + +@node Execution Chance +@section Execution Chance +@cindex execution chance +@cindex double-oh-seven +@findex % + +@portability{yes, all versions, version 0.02+, all versions} + +It's possible to specify that a command should be run only a certain +proportion of the time, at random. This is a rarely used feature of +@ical{}, although it is the only way to introduce randomness into a +program. (The @cic{} compiler approximates this with pseudorandomness.) +An execution chance specification comes immediately after the statement +identifier, but before the rest of the statement, and consists of a +double-oh-seven (@code{%}) followed by an integer from 1 to 99 +inclusive, written in decimal; this gives the percentage chance of the +statement running. The execution chance only acts to prevent a +statement running when it otherwise would have run; it cannot cause a +statement that would otherwise not have run to run. For instance, the +statement @code{DO %40 WRITE OUT #1} has a 40% chance of writing out +@samp{I}, but the statement @code{DON'T %40 WRITE OUT #1} has no chance +of writing out @code{I} or anything else, because the @code{N'T} +prevents it running and the double-oh-seven cannot override that. + +@node ONCE and AGAIN +@section ONCE and AGAIN +@cindex ABSTAIN, self-abstaining +@cindex REINSTATE, self-reinstating +@cindex self-abstaining +@cindex self-reinstating +@findex ONCE +@findex AGAIN +@anchor{ONCE}@anchor{AGAIN} + +@portability{no, version 0.25+, no, no} + +The last part of a statement is an optional @code{ONCE} or @code{AGAIN}. +@code{ONCE} specifies that the statement is self-abstaining or +self-reinstating (this will be explained below); @code{AGAIN} specifies +that the statement should behave like it has already self-reinstated or +self-abstained. Whether the behaviour is self-abstention or +self-reinstatement depends on whether the statement was initially +abstained or not; a @code{ONCE} on an initially reinstated statement or +@code{AGAIN} on an initially abstained statement indicates a +self-abstention, and a @code{ONCE} on an initially abstained statement +or @code{AGAIN} on an initially reinstated statement indicates a +self-reinstatement. + +The first time a self-abstaining statement is encountered, it is +executed as normal, but the statement is then abstained from and +therefore will not run in future. Likewise, the first time +self-reinstating statement is encountered, it is not executed (as is +normal for an abstained statement), but then becomes reinstated and will +run in future. In each of these cases, the @code{ONCE} effectively +changes to an @code{AGAIN}; the @code{ONCE} only happens once, as might +be expected. + +@code{REINSTATING} a currently abstained self-abstaining statement or +@code{ABSTAINING} (that is, with the @code{ABSTAIN} or @code{REINSTATE} +commands) a currently reinstated self-reinstating statement causes the +@code{AGAIN} on the statement to change back into a @code{ONCE}, so the +statement will again self-abstain or self-reinstate. Likewise, +@code{REINSTATING} a currently abstained self-reinstating statement or +@code{ABSTAINING} a currently reinstated self-abstaining statement +causes its @code{ONCE} to turn into an @code{AGAIN}. + +Historical note: @code{ONCE} was devised by Malcom Ryan as a method of +allowing synchronisation between threads in a multithreaded program +(@code{ONCE} is atomic with the statement it modifies, that is, there is +no chance that threads will change between the statement and the +@code{ONCE}). @code{AGAIN} was added to Malcom Ryan's Threaded Intercal +standard on the suggestion of Kyle Dean, as a method of adding extra +flexibility (and to allow the @code{ONCE}s to happen multiple times, +which is needed to implement some multithreaded algorithms). + +@node Expressions +@chapter Expressions +@cindex expressions + +Many @ical{} statements take expressions as arguments. Expressions are +made up out of operands and operators between them. Note that there is +no operator precedence in @ical{}; different compilers resolve +ambiguities different ways, and some versions of some compilers +(including the original @icst{} compiler) will cause error messages on +compiling or executing an ambiguous expression, so it's safest to fully +group each expression. + +@menu +* Constants and Variables:: The basic operands that make up expressions +* Grouping Rules:: How to specify grouping in expressions +* Operators:: Joining operands into more complex expressions +@end menu + +@node Constants and Variables +@section Constants and Variables +@cindex constant +@cindex variable +@cindex mesh +@cindex onespot +@cindex twospot +@cindex tail +@cindex hybrid +@findex # +@findex . +@findex : +@findex , +@findex ; + +@portability{yes, all versions, all versions, all versions} + +The basic operands in @ical{} are constants and variables. These +together make up what in other languages are known as `lvalues', that +is, operands to which values can be assigned. (Constants can also be +lvalues in @ical{}, but by default @cic{} turns this off because it +carries an efficiency penalty and can be confusing; this can be turned +on with the @option{-v} option (@pxref{-v}).) + +Constants can have any integer value from 0 to 65535 inclusive; higher +values (up to 4294967295) can be generated in programs, but cannot be +specified literally as constants. (The usual way to work around this +limitation is to interleave two constants together; see @ref{Mingle}.) A +constant is written as a mesh (@code{#}) followed by a number in +decimal. At the start of the program, all constants have the same value +as the number that identifies them; for instance, @code{#100} has 100 as +its value, and it's strongly advised not to change the value of a +constant during the execution of a program. + +There are four types of variable: 16-bit and 32-bit unsigned integers, +and arrays of 16-bit and 32-bit unsigned integers. These are +represented with a spot, twospot, tail, and hybrid (@code{.}, @code{:}, +@code{,}, and @code{;}) respectively. For this reason, integers within +the range 0 to 65535 inclusive are known as `onespot numbers', and +integers within the range 0 to 4294967295 inclusive are known as +`twospot numbers'; variables with those ranges are known as onespot and +twospot variables. (Note that arrays did not work in @cic{} before +version 0.7.) + +Variables are represented with a character representing their data type, +followed by an integer from 1 to 65535 inclusive, written in decimal. +Non-array variables don't need to be declared before they are used; they +automatically exist in any program that uses them. For instance, +@code{.1} and @code{.001} are the same variable, onespot number 1. +Array variables need to be dimensioned before they are used, by +assigning dimensions to them; see @ref{Calculate}. + +@node Grouping Rules +@section Grouping Rules +@cindex grouping rules +@cindex positional precedence +@cindex spark +@cindex rabbit-ears +@cindex ears +@findex ' +@findex " + +Because there are no operator precedences in @ical{}, there are various +solutions to specifying what precedences actually are. + +@table @asis + +@item The portable solution + +All known versions of @ical{} accept the @icst{} grouping rules. These +state that it's possible to specify that an operator takes precedence by +grouping it inside sparks (@code{'}) or rabbit-ears (@code{"}), the same +way as wax/wane pairs (parentheses) are used in other programming +languages. @icst{} and earlier @cic{} versions demanded that +expressions were grouped fully like this, and this practice is still +recommended because it leads to portable programs and is easier to +understand. Whether sparks or rabbit-ears (often called just `ears' for +short) are used normally doesn't matter, and programmers can use one or +the other for clarity or for aesthetic appeal. (One common technique is +to use just sparks at the outermost level of grouping, just ears at the +next level, just sparks at the next level, and so on; but expressions +like @code{''#1~#2'~"#3~#4"'~#5} are completely unambiguous, at least to +the compiler.) + +There are, however, some complicated situations involving arrays +subscripting where it is necessary to use sparks and ears at alternate +levels, if you want to write a portable program. This limitation is in +@cic{} to simplify the parsing process; @icst{} has the same limitation, +probably for the same reason. Compare these two statements: + +@example +DO .1 <- ,3SUB",2SUB.1".2 +DO .1 <- ,3SUB",2SUB.1".2~.3"".4 +@end example + +The problem is that in the first statement, the ears close a group, and +in the second statement, the ears open a group, and it's impossible to +tell the difference without unlimited lookahead in the expression. +Therefore, in similar situations (to be precise, in situations where a +group is opened inside an array subscript), it's necessary to use the +other grouping character to the one that opened the current group if you +want a portable program. + +One final comment about sparks and rabbit-ears; if the next character in +the program is a spot, as often happens because onespot variables are +common choices for operands, a spark and the following spot can be +combined into a wow (@code{!}). Unfortunately, none of the character +sets that @cic{} accepts as input (UTF-8, Latin-1, and ASCII-7) contain +the rabbit character, although the Hollerith input format that @clcic{} +can use does. + +@item Positional precedences: @clcic{} rules + +The precedence rules used by @clcic{} for grouping when full grouping +isn't used are simple to explain: the largest part of the input that +looks like an expression is taken to be that expression. The main +practical upshot of this is that binary operators right-associate; that +is, @code{.1~.2~.3} is equivalent to @code{.1~'.2~.3'}. @cic{} versions +0.26 and later also right-associate binary operators so as to produce +the same results as @clcic{} rules in this situation, but as nobody has +yet tried to work out what the other implications of @clcic{} rules are +they are not emulated in @cic{}, except possibly by chance + +@ianchor Prefix and infix unary operators +@cindex unary operator, prefix +@cindex unary operator, infix + +In @icst{} and versions of @cic{} before 0.26, unary operators were +always in the `infix' position. (If you're confused about how you can +have an infix unary operator: they go one character inside a group that +they apply to, or one character after the start of a constant or +variable representation; so for instance, to portably apply the unary +operator @code{&} to the variable @code{:1}, write @code{:&1}, and to +portably apply it to the expression @code{'.1~.2'}, write +@code{'&.1~.2'}.) @clcic{}, and versions of @cic{} from 0.26 onwards, +allow the `prefix' position of a unary operator, which is just before +whatever it applies to (as in @code{&:1}). This leads to ambiguities as +to whether an operator is prefix or infix. The portable solution is, of +course, to use only infix operators and fully group everything, but when +writing for recent versions of @cic{}, it's possible to rely on its +grouping rule, which is: unary operators are interpreted as infix where +possible, but at most one infix operator is allowed to apply to each +variable, constant, or group, and infix operators can't apply to +anything else. So for instance, the @cic{} @code{'&&&.1~.2'} is +equivalent to the portable @code{'&"&.&1"~.2'} (or the more readable +version of this, @code{"&'"&.&1"~.2'"}, which is also portable). If +these rules are counter-intuitive to you, remember that this is @ical{} +we're talking about; note also that this rule is unique to @cic{}, at +least at the time of writing, and in particular @clcic{} is likely to +interpret this expression differently. + +@end table + +@node Operators +@section Operators +@cindex operator + +Operators are used to operate on operands, to produce more complicated +expressions that actually calculate something rather than just fetch +information from memory. There are two types of operators, unary and +binary operators, which operate on one and two arguments respectively. +Binary operators are always written between their two operands; to +portably write a unary operator, it should be in the `infix' position, +one character after the start of its operand; see @ref{Prefix and infix +unary operators} for the full details of how to write unary operators +portably, and how else you can use them if you aren't aiming for +portability. This section only describes @icst{} operators; many +@ical{} extensions add their own operators. + +@menu +* Mingle:: Interleaving bits in two operands +* Select:: Selecting from one operand according to another +* Unary Binary Logic:: Binary logic on adjacent bits of an operand +* Array Subscript:: Selecting elements of arrays +@end menu + +@node Mingle +@subsection Mingle +@cindex mingle +@cindex interleave +@findex $ + +@portability {yes, all versions, all versions, all versions} + +Mingle, or interleave, is one of the two binary operators in @icst{}. +However, different @ical{} compilers represent it in different ways, so +it is impossible to write a mingle in a program completely portably, +because it differs between Princeton and Atari syntax, and worse, the +sequence of character codes needed to represent it in each syntax has +varied from compiler to compiler. + +The original @icst{} compiler (the Princeton compiler) used the +'change' (cent) character for a mingle, represented as @code{c}, +backspace, @code{/}. (By the way, this is still the most portable way +to write a mingle; both @cic{} and @clcic{} accept it, at least if a +lowercase @code{c} is used, the Atari compiler accepted it, and its +documentation claimed that the Princeton compiler also accepted it; +@clcic{} also accepts a capital @code{C} before the backspace and +@code{/}, and allows @code{|} rather than @code{/}.) The Atari +compiler, another @icst{} compiler, used a 'big money' character +(@code{$}) as the mingle character; this character is also the only +one accepted for mingle by the @jic{} compiler. @cic{} originally +also used the @code{$} character for mingle, and this character is the +one most commonly seen in existing @cic{} programs, and most often +used when giving examples of @ical{} on Usenet, because it exists in +the ASCII-7 character set, and because it doesn't contain control +characters. From version 0.18 of @cic{} onwards, various other units +of currency (change, quid, and zlotnik if Latin-1 is used as the +input, and euro if Latin-9 is used as the input) are accepted; from +version 0.20 onwards, in addition to the Latin-1 characters, all the +currency symbols in Unicode are accepted if UTF-8 is used as the input +format. @cic{} has always used the change character (either the +Latin-1 version or the version that contains a backspace) for mingle. +In this manual, mingle will be represented as @code{$}, but it's +important to bear in mind that this character is not the most portable +choice. + +The mingle operator should be applied to two operands or expressions. +To be portable, the operands must both be onespot expressions, that is +expressions which have a 16-bit result; @cic{} relaxes this rule +slightly and only requires that the result be in the onespot range. +(This is because the data type of a select operator's value is meant to +be determined at runtime; @cic{} determines all data types at compile +time, so has to guess a 32-bit result for a select with a 32-bit type as +its right operand even when the result might actually turn out to be of +a 16-bit type, and so this behaviour prevents an error when a select +operation returns a value with a 16-bit data type and is used as an +argument to amingle.) The result is a 32-bit value (that is, it is of a +32-bit data type, even if its value fits into the onespot range), which +consists of bits alternated from the two arguments; to be precise, its +most significant bit is the most significant bit of its first argument, +its second most significant bit is the most significant bit of its +second argument, its third most significant bit is the second most +significant bit of its first argument, and so on until its least +significant bit, which is the least significant bit of its second +argument. + +One of the most common uses of interleaving is to create a constant with +a value greater than 65535; for instance, 65536 is @code{#256$#0}. It +is also commonly used in expressions that need to produce 32-bit +results; except in some simple cases, this is usually coded by +calculating separately the odd-numbered and even-numbered bits of the +result, and mingling them together at the end. It is also used in +expressions that need to left-shift values or perform similar +value-increasing operations, as none of the other operators can easily +do this; and mingle results are commonly used as the argument to unary +binary logic operators, because this causes them to behave more like the +binary logic operators found in some other languages. + +@node Select +@subsection Select + +@portability{yes, all versions, all versions, all versions} + +The select operator is one of the two binary operators in @icst{}; +unlike mingle, every known implementation of @ical{} ever has used the +sqiggle character (@code{~}) as the representation of the select +operator, meaning that writing it portably is easy. + +The select operator takes two arguments, which can be of either datatype +(that is, 16- or 32-bit). It returns a value made by selecting certain +bits of its first operand indicated by the second operand, and +right-justifying them. What it does is ignores all the bits of the +first operand where the second operand has a 0 as the corresponding bit, +that is, deletes them from a copy of the operand's value; the bits that +are left are squashed together towards the least-significant end of the +number, and the result is filled with 0s to make it up to 16 or 32 +bits. (In @icst{} the minimum multiple of 16 bits possible that the +result fits into is chosen, although if :1 has the value 131061 (in hex, +1FFFF) the expression @code{#21~:1} produces a 32-bit result because 17 +bits were selected, even though many of the leading bits were zeros; in +@cic{} the data type of the result is the same as of the right operand +of the select, so that it can be determined at run time, and so using a +unary binary logic operator on the result of select when the right +operand has a 32-bit type is nonportable and not recommended.) As an +example, @code{#21~:1} produces 21 as its result if :1 has the value +131061, 10 as its result if :1 has the value 30 (1E in hex; the +least significant bit of 21 is removed because it corresponds to a 0 in +:1), and 7 as its result if :1 has the value 21 (because three bits in +21 are set, and those three bits from 21 are therefore selected by 21). + +Select is used for right-shifts, to select every second bit from a +number (either to produce what will eventually become an argument to +mingle, or to interpret the result of a unary binary logic operator, or +occasionally both), to test if a number is zero or not (by selecting it +from itself and selecting 1 from the result), in some cases as a limited +version of bitwise-and (that only works if the right operand is 1 less +than a power of 2), and for many other purposes. + +@node Unary Binary Logic +@subsection Unary Binary Logic +@cindex unary binary logic +@cindex and +@cindex or +@cindex xor +@cindex exor +@cindex exclusive or +@findex ? +@findex & +@findex V +@cindex what +@cindex ampersand +@cindex book + +@portability{yes, all versions, all versions, all versions} + +There are three unary operators in @icst{}, each of which carries out +a binary logic operation on adjacent bits of the number. The operators +are and, or, and exclusive or; and and or are represented by an +ampersand (@code{&}) and book (@code{V}) respectively, and exclusive +or has the same notational problems as mingle, as it differs between +Princeton and Atari syntax. It was represented by a bookworm, written +@code{V}, backspace, @code{-}, in the Princeton @icst{} +implementation, and this is still the most portable way to write it +(@cic{} and @clcic{} accept it). The Atari implementation of @icst{} +wrote it with a what (@code{?}), and this is the representation +originally used by @cic{} (and still accepted), the only +representation accepted by @jic{}, the one most commonly used on +Usenet, and the one used in this manual (although again, it's worth +pointing out that this isn't portable). @clcic{} approximates a +bookworm with the yen character, which being a currency character is +one of the possible representations for mingle in @cic{}; @cic{} uses +the rather confusing method of interpreting a yen character as +exclusive-or if input in Latin-1 but as mingle if input in UTF-8. +(This usually does the right thing, because @clcic{} doesn't support +UTF-8.) In the same way, @clcic{} has a @cic{} compatibility option +to allow the use of @code{?} for exclusive-or. + +The operators take each pair of consecutive bits in their arguments +(that is, the least significant with the second least significant, the +second least significant with the third least significant, the third +least significant with the fourth least significant, and so on, with the +pair consisting of the most significant and least significant being used +to calculate the most significant bit of the result), and perform an +appropriate logic operation on them; and sets a bit of the result if and +only if both bits in the pair were set, or sets each bit corresponding to +each pair where either bit was set, and exclusive or sets if and only if +the bits in the pair had different values (that is, one was set, but not +both). So for instance, @code{#&26} is 16 (26 is 1A in hexadecimal or +11010 in binary); @code{#V26} is 31 (11111 in binary), and @code{#?26} +is 23 (10111 in binary). + +The most commonly seen use for these operators is to carry out bitwise +ands, ors, and exclusive ors between two different 16-bit expressions, +by mingling them together, applying a unary binary logic operator, and +selecting every second bit of the result; such code often results due to +people thinking in terms of some other language when writing @ical{}, +but is still often useful. (Historically, the first idiom added to the +optimizer, apart from constant folding, was the mingle/unary/select +sequence.) There are more imaginative uses; one impressive example is +the exclusive or in the test for greater-than from the original @icst{} +system library: + +@example +DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"' + ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$ + #65535'"'~'#0$#65535'" +DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535~ + #65535"'~'#65535$#0'"$#32768'~'#0$#65535'" + $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"' + "$"':5~:5'~#1"'~#1"$#2'~#3 +@end example + +The first statement works out the value of :1 bitwise exclusive or :2; +the second statement then works out whether the most significant set bit +in :5 (that is, the most significant bit that differs between :1 and :2) +corresponds to a set bit in :2 or not. In case that's a bit too +confusing to read, here's the corresponding optimizer idiom (in OIL): + +@example +((_1~:2)~((?32(:2~:2))^#2147483648))->(_1>(:2^_1)) +@end example + +(Here, the ^ refers to a bitwise exclusive or, an operation found in OIL +but not in @ical{}, which is why the @ical{} version is so much longer.) +The @ical{} version also has some extra code to check for equality and +to produce 1 or 2 as the output rather than 0 or 1. + +@node Array Subscript +@subsection Array Subscript +@cindex arrays, subscripting +@cindex subscripts +@findex SUB + +@portability{yes, version 0.7+, all versions, all versions} + +In order to access the elements of an array, either to read or write +the array, it is necessary to use the array subscript operator +@code{SUB}. Note that an array element is not a variable, so it is +not accepted as an acceptable argument to statements like +@code{IGNORE}; however, it can be assigned to. + +The syntax for an array element is the array, followed by the keyword +@code{SUB}, followed by an expression for the element number in the +array. In the case of a multidimensional array, more than one +expression is given after the keyword @code{SUB} to give the location +of the element in each of the array's dimensions. The first element +in an array or array dimension is numbered 1. + +For instance, this is a legal (but not particularly useful) @ical{} +program with no syntax errors that shows some of the syntaxes possible +with array subscripting: + +@example +PLEASE ,1 <- #2 +DO .1 <- #2 +DO ,1 SUB .1 <- #1 +DO ,1 SUB #1 <- ,1 SUB #2 +PLEASE ;1 <- #2 BY #2 +DO ;1 SUB #1 #2 <- ,1 SUB ,1 SUB .1 +DO READ OUT ;1SUB#1.1 +DO GIVE UP +@end example + +Grouping can get complicated when nested array subscripting is used, +particularly with multiple subscripts. It is the programmer's job to +write an unambiguous statement, and also obey the extra grouping rules +that apply to array subscripts; see @ref{Grouping Rules}. + +@node Statements +@chapter Statements +@cindex statements +@cindex statements, INTERCAL + +There is a wide range of statements available to @ical{} programs; +some identifiably belong to a particular variant or dialect (such as +Backtracking @ical{}), but others can be considered to be part of the +'core language'. The statements listed here are those that the @cic{} +compiler will accept with no compiler switches to turn on particular +dialect options. Note that many statements have slightly different +effects in different implementations of @ical{}; known +incompatibilities are listed here, but it's important to check your +program on multiple compilers when attempting to write a portable +program. + +@menu +* Syntax Error:: Why use a deliberate syntax error? +* Calculate:: Assigning to variables and arrays +* NEXT FORGET and RESUME:: @icst{}-style flow control +* STASH and RETRIEVE:: Value stacks and scoping +* IGNORE and REMEMBER:: Creating read-only variables +* ABSTAIN and REINSTATE:: Dynamic DOs and DON'Ts +* READ OUT and WRITE IN:: @ical{} input and output +* GIVE UP:: How to end a program +* TRY AGAIN:: Control flow without loops +* COME FROM and NEXT FROM:: Time-reversed GOTO +@end menu + +@node Syntax Error +@section Syntax Error +@cindex syntax error +@cindex comment +@findex COMMENT +@findex COMMENTS +@findex COMMENTING +@portability{yes,version 0.15+,all versions,all versions} + +One of the more commonly-used commands in @ical{} is the syntax error. +A properly-written syntax error looks nothing like any known @ical{} +command; a syntax error that looks vaguely like a command but isn't +may confuse @cic{}, and possibly other compilers, into bailing out at +compile time in some situations (this is known as a `serious syntax +error'), and so is not portable. For other syntax errors, though, the +semantics are easily explained: there is a run-time error whenever the +syntax error is actually executed, and the line containing the syntax +error is used as the error message. + +One purpose of this is to allow your programs to produce their own +custom errors at run time; however, it's very important to make sure +that they start and end in the right place, by manipulating where +statement identifiers appear. Here's a correct example from the +system library: + +@example +DOUBLE OR SINGLE PRECISION ARITHMETIC OVERFLOW +@end example + +This is a valid @ical{} command, that produces an error when run (note +the @code{DO} at the start). An even more common use is to produce an +initially abstained syntax error by using an appropriate statement +identifier, for instance + +@example +PLEASE NOTE THAT THIS IS A COMMENT +@end example + +This would produce an error if reinstated somehow, but assuming that +this isn't done, this is a line of code that does nothing, which is +therefore equivalent to a comment in other programming languages. +(The initial abstention is achieved with the statement identifier +@code{PLEASE NOT}; the extra @code{E} causes the command to be a +syntax error, and this particular construction is idiomatic.) + +Referring to the set of all syntax errors in a program (or the set of +all commands of any other given type) is achieved with a special +keyword known as a `gerund'; gerund support for syntax errors is +resonably recent, and only exists in @clcic{} (version 1.-94.-3 and +later, with @code{COMMENT}, @code{COMMENTS}, or @code{COMMENTING}), +and @cic{} (@code{COMMENT} in version 0.26 and later, and also +@code{COMMENTS} and @code{COMMENTING} in version 0.27 and later). +Therefore, it is not portable to refer to the set of all syntax errors +by gerund; using a line label is a more portable way to refer to an +individual syntax-error command. + +@node Calculate +@section Calculate +@findex CALCULATING +@cindex calculate +@cindex assignment +@cindex arrays, dimensioning +@cindex dimensioning arrays +@cindex variables, assignment +@portability{yes, all versions, all versions, all versions} + +At present, the only @ical{} command that contains no keywords (apart +from the statement identifier and possibly @code{ONCE} or +@code{AGAIN}) is what is known as the `calculate' command. It is used +to assign values to variables, array elements, and arrays; assigning a +value to an array changes the number of elements that that array can +hold, and causes the values of all elements previously in that array +to be lost. The syntax of a calculate command is as follows: + +@example +DO .1 <- ':2~:3'~#55 +@end example + +That is, the command is written as a variable or array element, then +the @code{<-} operator (known as an `angle-worm' and pronounced +`gets'), then an expression to assign to it. In the special case when +an array is being dimensioned by assigning a value to it, the +expression can contain the keyword @code{BY} to cause the array to +become multidimensional; so for a 3 by 4 by 5 array, it would be +possible to write + +@example +DO ,1 <- #3 BY #4 BY #5 +@end example + +The calculate command always evaluates the expression, even if for +some reason the assignment can't be done (for instance, if the +variable being assigned to is read-only); this is important if the +expression has side-effects (for instance, giving an overflow error). +If the variable does happen to be read-only, there is not an error; +the expression being assigned to it is just evaluated, with the +resulting value being discarded. + +The gerund to refer to calculations is @code{CALCULATING}; however, if +you are planning to use this, note that a bug in older versions of +@cic{} means that assignments to arrays are not affected by this +gerund before version 0.27. + +@node NEXT FORGET and RESUME +@section NEXT, FORGET and RESUME +@findex NEXT +@findex FORGET +@findex RESUME +@findex NEXTING +@findex FORGETTING +@findex RESUMING +@cindex NEXT stack +@cindex flow control, INTERCAL-72 +@cindex stack, NEXT +@cindex stack, instruction pointer +@anchor{NEXT} +@anchor{FORGET} +@anchor{RESUME} +@portability{yes, all versions, see text, all versions} + +The only flow-control commands in @icst{} were @code{NEXT}, +@code{RESUME}, and @code{FORGET}; together these manipulate a stack of +locations in the program known as the `NEXT stack'. Although all +@ical{} compilers have implemented these, from @clcic{} version 0.05 +onwards @clcic{} has considered them obsolete, and therefore a special +command-line switch needs to be used to enable them. (They are still +the most portable flow-control commands currently available, though, +precisely because @icst{} implements nothing else.) Note that there +is a strict limit of 80 locations on the NEXT stack, enforced by all +known @ical{} compilers; this helps to enforce good programming style, +by discouraging NEXT-stack leaks (which are otherwise quite easy to +write). + +Here are examples to show the syntax of these three statements: + +@example +DO (1000) NEXT +DO FORGET '.1~.1'~#1 +DO RESUME .5 +@end example + +The @code{NEXT} command takes a line label as its argument (unlike +most other @ical{} commands, it comes after its argument rather than +before); both @code{FORGET} and @code{RESUME} take expressions. +(@cic{} from version 0.05 onwards also allows an expression in +@code{NEXT}, rather than a label, to give a computed @code{NEXT}, but +this behaviour was not implemented in other compilers, and is +deprecated in @clcic{} along with noncomputed @code{NEXT}; if computed +@code{NEXT} is ever implemented in @cic{}, it will likely likewise be +deprecated upon introduction). Running a @code{NEXT} causes the +program control to transfer to the command whose line label is +referenced, and also saves the location in the program immediately +after the @code{NEXT} command on the top of the NEXT stack. + +In order to remove items from the @code{NEXT} stack, to prevent it +filling up (which is what happens with a naive attempt to use the +@code{NEXT} command as an equivalent to what some other languages call +GOTO), it is possible to use the @code{FORGET} or @code{RESUME} +commands. They each remove a number of items from the NEXT stack +equal to their argument; @code{RESUME} also transfers control flow to +the last location removed from the @code{NEXT} stack this way. Trying +to remove no items, or more items than there are in the stack, does +not cause an error when @code{FORGET} is used (no items or all the +items are removed respectively); however, both of these cases are +errors in a @code{RESUME} statement. + +Traditionally, boolean values in @ical{} programs have been stored +using #1 and #2 as the two logic levels. This is because the easiest +way to implement an if-like construct in @icst{} is by @code{NEXTING}, +then @code{NEXTING} again, then @code{RESUMING} either by 1 or 2 +according to an expression, and then if the expression evaluated to 1 +@code{FORGETTING} the remaining NEXT stack entry. By the way, the +previous sentence also explained what the appropriate gerunds are for +@code{NEXT}, @code{RESUME}, and @code{FORGET}. + +@node STASH and RETRIEVE +@section STASH and RETRIEVE +@anchor{STASH} +@anchor{RETRIEVE} +@findex STASH +@findex RETRIEVE +@findex STASHING +@findex RETRIEVING +@cindex stack, variable +@cindex stashes +@cindex variables, stashes +@portability{yes, all versions, all versions, all versions} + +The NEXT stack is not the only stack available in an @ical{} program; +each variable used in the program also has its own stack, which holds +values of the same type as the variable. The @code{STASH} command +pushes a variable's value onto that variable's stack; @code{RETRIEVE} +can be used in the same way to pop the top element of a variable's +stack to replace that variable's value. The syntax is the same as +most other @ical{} commands, with the word @code{STASH} or +@code{RETRIEVE} followed by the variable or variables to stash or +retrieve: + +@example +DO STASH .1 + ;2 +DO RETRIEVE ,3 +@end example + +Note that it is possible to stash or retrieve multiple variables at +once, by listing their names separated by intersections (@code{+}); +it's even possible to stash or retrieve a variable twice in the same +statement. + +It is not entirely clear how @code{RETRIEVE} interacts with +@code{IGNORE} in historical @icst{} compilers; the three modern +@ical{} compilers all use different rules for the interaction: + +@cindex @code{IGNORE}/@code{RETRIEVE} interaction +@cindex @code{RETRIEVE}/@code{IGNORE} interaction +@itemize +@item +@cic{} treats a retrieval just like an assignment. That is, a +read-only variable will not be changed by a retrieval, and will remain +read-only, but the side-effect of popping that variable's stash will +still happen. + +@item +@jic{} ignores the read-only status of a variable when retrieving it +from a stash; the value of the variable changes despite being +read-only. The variable remains read-only; the @code{RETRIEVE} simply +allows a change to its value despite the read-only status. + +@item +@clcic{} is the most complicated; it stores read-only status or +otherwise in the stash, along with the variable's value. This means +that if a variable was stashed when read-only, retrieving it will +retrieve its value and set it to read-only regardless of its previous +read-only status; likewise, if a variable was stashed when read-write, +retrieving it will retrieve its value and set it to read-write even if +it was previously read-only. + +@end itemize + +The appropriate gerunds for @code{STASH} and @code{RETRIEVE} are +@code{STASHING} and @code{RETRIEVING} respectively. + +@node IGNORE and REMEMBER +@section IGNORE and REMEMBER +@anchor{IGNORE} +@anchor{REMEMBER} +@findex IGNORE +@findex IGNORING +@findex REMEMBER +@findex REMEMBERING +@cindex variables, read-only +@cindex variables, read-write +@cindex read-only variables +@cindex read-write variables +@cindex variables, ignoring +@cindex variables, remembering +@portability{yes, all versions, all versions, all versions} + +Variables in @ical{} can be either read-write or read-only. At the +start of a program, all variables are read-only, but this status can +be changed dynamically during execution of a program using the +@code{IGNORE} and @code{REMEMBER} statements (whose gerunds are +@code{IGNORING} and @code{REMEMBERING} respectively). The syntax is +the same as for @code{STASH} and @code{RETRIEVE}: the command's name +followed by an intersection-separated list of variables. For +instance: + +@example +DO IGNORE .4 +DO REMEMBER ,4 + ;5 +@end example + +Using the @code{IGNORE} statement sets a variable to be read-only (or +does nothing if it's read-only already); @code{REMEMBER} sets it to be +read-write. Any attempt to assign to a read-only variable silently +fails. One place that this is used is in the system library; instead +of not assigning to a variable in certain control flow paths, it +instead sets it to be read-only so that subsequent assignments don't +change its value (and sets it to be read-write at the end, which +succeeds even if it was never set read-only in the first place); the +advantage of this is that it doesn't need to remember what flow path +it's on except in the variable's ignorance status. + +The interaction between @code{IGNORE} and @code{RETRIEVE} was never +defined very clearly, and is in fact different in @cic{}, @clcic{} and +@jic{}; for more details, see @ref{RETRIEVE}. + +@node ABSTAIN and REINSTATE +@section ABSTAIN and REINSTATE +@anchor{ABSTAIN} +@anchor{REINSTATE} +@findex ABSTAIN +@findex ABSTAINING +@findex REINSTATE +@findex REINSTATING +@cindex abstain, during execution +@cindex reinstate, during execution +@portability{yes, all versions, all versions, all versions} + +The statement identifier of a statement determines whether it's +in an abstained or reinstated state at the start of a program; these +states determine whether the statement runs at all when it's +encountered. It is, however, possible to change this state +dynamically during a program's execution, and the statements to do +this are rather appropriately named @code{ABSTAIN} and +@code{REINSTATE}. There are two forms of each, one which takes a +single line label (which must be constant in most compilers, but can +instead be an expression in recent @clcic{} versions), and one which +takes an intersection-delimited list of gerunds. They look like this: + +@example +DO ABSTAIN FROM ABSTAINING + REINSTATING +DO ABSTAIN FROM (10) +DO REINSTATE CALCULATING +DO REINSTATE (22) +@end example + +(This also illustrates the gerunds used for these commands; note that +@code{ABSTAINING} from @code{REINSTATING} is generally a bad idea@!) +The line referenced, or every command represented by any gerund +referenced, are reinstated or abstained as appropriate (effectively +changing the DO to DON'T (or PLEASE to PLEASE DON'T, etc.@:), or vice +versa). Using these forms of @code{ABSTAIN} and/or @code{REINSTATE} +won't abstain from a command that's already abstained, or reinstate a +command that's already reinstated. + +There is a strange set of restrictions on @code{ABSTAIN} and +@code{REINSTATE} that has existed since @icst{}; historically such +restrictions have not always been implemented, or have not been +implemented properly. They together define an unusual interaction of +@code{ABSTAIN} and @code{GIVE UP} (note, for instance, that there +isn't a gerund for @code{GIVE UP}). The wording used in the @icst{} +manual is: + +@quotation +[...] the statement DO ABSTAIN FROM GIVING UP is not accepted, even +though DON'T GIVE UP is. [...] DO REINSTATE GIVING UP is invalid, and +attempting to REINSTATE a GIVE UP statement by line label will have no +effect. Note that this insures that DON'T GIVE UP will always be a +"do-nothing" statement. +@end quotation + +This restriction was not implemented at all in the only @clcic{} +version before 0.02 (i.e.@: version 0.01), or in @cic{} versions +before 1.26. The restriction was implemented in @cic{} version 1.26 +and @clcic{} versions 0.02 and later as ``@code{GIVE UP} cannot be +@code{REINSTATED} or @code{ABSTAINED FROM}''; however, this is not +strictly the same as the definition used by @icst{} (@cic{} still uses +this definition in @clcic{} compatibility mode). The @jic{} +implementation of this restriction is to make @code{REINSTATING} or +@code{ABSTAINING} from a line label that refers to a @code{GIVE UP} +statement a compile-time error, but this does not fit the @icst{} +definition either. The definition adopted with version 0.27 and +later of @cic{}, which is hopefully correct, is to allow abstaining +from a @code{GIVE UP} statement by line number but to rule out the +other three cases (reinstating by line number silently fails, +reinstating or abstaining by gerund is impossible because there is no +gerund). + +As well as @clcic{}'s extension to abstain/reinstate by computed line +number, there is also (since version 0.25) a @cic{}-specific extension +to @code{ABSTAIN}, also known as `computed abstain', but with a +different syntax and different semantics. It's written like an +ordinary @code{ABSTAIN}, but with an expression between the words +@code{ABSTAIN} and @code{FROM}, for instance: + +@example +DO ABSTAIN #1 FROM (1000) +DO ABSTAIN .2 FROM WRITING IN +@end example + +Unlike non-computed @code{ABSTAIN}, this form (available from @cic{} +version 0.25 onwards) allows a command to be abstained from even if +it's already been abstained from; so if the first example command is +run and line (1000) is already abstained, it becomes +`double-abstained'. The number of times the statement is abstained +from is equal to the number of times it was already abstained from, +plus the expression (whereas with non-computed abstain, it ends up +abstained once if it wasn't abstained at all, and otherwise stays at +the same abstention status). Reinstating a statement always +de-abstains it exactly once; so double-abstaining from a statement, +for instance, means it needs to be reinstated twice before it will +actually execute. + +There are many uses for @code{ABSTAIN} (both the computed and +non-computed versions) and @code{REINSTATE}, especially when +interacting with @code{ONCE} and @code{AGAIN} (@pxref{ONCE and +AGAIN}); the computed version, in particular, is a major part of a +particular concise way to write conditionals and certain kinds of +loops. They also play an important role in multithreaded programs. + +@node READ OUT and WRITE IN +@section READ OUT and WRITE IN +@anchor{READ OUT} +@anchor{WRITE IN} +@findex READ OUT +@findex READING OUT +@findex WRITE IN +@findex WRITING IN +@cindex I/O +@cindex input +@cindex output + +The @code{READ OUT} and @code{WRITE IN} commands are the output and +input commands in @ical{}; they allow communication between the +program and its user. There was a numeric I/O mechanism implemented +in @icst{}, and it (or trivial variants) have been likewise +implemented in all more modern variants. However, it had some obvious +deficiences (such as not being able to read its own output) which +meant that other methods of I/O were implemented in @cic{} and +@clcic{}. + +The syntax of @code{READ OUT} and @code{WRITE IN} is the same in all +cases: the name of the command followed by an intersection-separated +list of items; the form of each item, the compiler you are using, and +its command line arguments together determine what sort of I/O is +used, which can in be different for different elements in the list. + +@menu +* INTERCAL-72 I/O:: Spelt-out numbers and Roman numerals +* C-INTERCAL I/O:: The Turing Tape I/O system +* CLC-INTERCAL I/O:: Baudot and mingled binary +@end menu + +@node INTERCAL-72 I/O +@subsection INTERCAL-72 I/O +@cindex I/O, INTERCAL-72 +@cindex input, INTERCAL-72 +@cindex output, INTERCAL-72 +@cindex INTERCAL-72, I/O +@cindex Roman numerals + +@portability{yes, all versions, see text, all versions} + +@icst{} had its own versions of I/O commands; these commands are +available in all modern @ical{} compilers as well (but @clcic{} +implements output slightly differently). To distinguish @icst{} input +and output from the other more modern types of I/O, the @code{READ +OUT} and @code{WRITE IN} commands must take one of the following +values: a onespot or twospot variable, a single element of a tail or +hybrid array, or (in the case of @code{READ OUT}) a constant, meaning +that these are some examples of the possible forms: + +@example +READ OUT .1 +READ OUT ;2 SUB .3:4 +READ OUT #3 +WRITE IN :4 +WRITE IN ,5 SUB #6 +@end example + +The statements do what you would expect; @code{READ OUT} outputs its +argument to the user, and @code{WRITE IN} inputs a number from the +user and assigns it to the variable or array element referenced. (If +the variable, or the array that contains the array element, happens to +be read-only, the input or output still happens but in the case of +@code{WRITE IN} silently skips the assignment, instead throwing away +the input.) The formats used for input and output are, however, +different from each other and from the formats used by most mainstream +languages. + +Input is achieved by writing a number in decimal, one digit at a time, +with each digit written out as a word; so to input the number 12345, a +user would have to type @code{ONE TWO THREE FOUR FIVE} as input (if +they were using English, the most portable choice of language). In +@icst{} only English is accepted as a language, but other compilers +accept other languages in addition. @cic{} from version +0.10 onwards accepts English, Sanskrit, Basque, Tagalog, Classical +Nahuatl, Georgian, and Kwakiutl; also Volap@"uk from version 0.11 +onwards, and Latin from version 0.20 onwards. @jic{} accepts the same +languages, except with Esperanto instead of Latin; from version 0.05 +of @clcic{} onwards, the same list of languages as @cic{} is supported +(apart from Latin, which was added in version 1.-94.-8). + +The format that output can be read in is a modified form of Roman +numerals, known as `butchered' Roman numerals. @icst{}, @cic{} and +@jic{} do this the same way; @clcic{} is somewhat different. The +characters @samp{I}, @samp{V}, @samp{X}, @samp{L}, @samp{C}, @samp{D}, +and @samp{M} mean 1, 5, 10, 50, 100, 500 and 1000 respectively, +placing a lower-valued letter after a higher-valued letter adds them, +and placing a lower-valued letter before a higher-valued letter +subtracts it from the value; so @samp{XI} is 11 and @samp{IX} is 9, +for instance. In @icst{}, @cic{}, and @jic{}, a bar over a numeral +multiplies its value by 1000, and writing a letter in lowercase +multiplies its value by 1000000; however, @clcic{} uses lowercase to +represent multiplication by 1000 and for multiplication by 1000000 +writes a backslash before the relevant numeral. + +@node C-INTERCAL I/O +@subsection C-INTERCAL I/O +@cindex I/O, C-INTERCAL +@cindex input, C-INTERCAL +@cindex output, C-INTERCAL +@cindex C-INTERCAL, I/O +@cindex Turing Tape + +@portability{no, version 0.07+, version 0.05+, no} + +@cic{}'s method of character-based (rather than numeric) input and +output is known as the Turing Tape method; it is a binary +(character-set-agnostic) input/output mechanism. To specify that +@cic{}-style I/O is being used, an array must be used as the argument +to @code{READ OUT} or @code{WRITE IN}; as the syntax is the same as +for @clcic{}'s I/O, command-line arguments and the capabilities of the +version of the compiler being used serve to distinguish the two +mechanisms. + +The character-based input writes as many characters into a tail or +hybrid array as will fit, one character in each element. The number +that's written into the array is not the character code, though, but +the difference between the character code and the previous character +code, modulo 256. (To be precise, the code is the new character minus +the previous character, or 256 minus (the previous character minus the +new character) if the previous character had a higher character code; +the 'previous character' is the previous character from the input, not +the previous character written into the array.) End-of-file causes +256 to be written into the array. The concept is that of a circular +tape containing all the characters, where the program measures how +many spaces it needs to move along the tape to reach the next +character. The 'previous character' starts at 0, but is preserved +throughout the entire program, even from one @code{WRITE IN} to the +next. + +Character-based output uses a similar model, but conceptually the +output device moves on the inside of the tape, rather than on the +outside. Therefore, the character is that is actually output is the +bit-reversal of the difference between the last character output +before it was bit-reversed and the number found in the array +(subtracting in that order, and adding 256 if the result is +negative). (Rather than trying to parse the previous sentence, you +may find it easier to look either at the source code to the compiler +if you have it (the relevant part is binout in @file{src/cesspool.c}) +or at some example @cic{} programs that do text-based I/O.) + +@node CLC-INTERCAL I/O +@subsection CLC-INTERCAL I/O +@cindex Baudot +@cindex I/O, Baudot +@cindex I/O, CLC-INTERCAL +@cindex CLC-INTERCAL I/O +@cindex input, CLC-INTERCAL +@cindex output, CLC-INTERCAL + +@portability{no, version 0.27+, all versions, no} + +There are also two @clcic{}-specific I/O mechanisms. These are +Baudot-based text I/O (which is also implemented from @cic{} version +0.27 onwards), and @clcic{} generalised binary I/O (not implemented in +@cic{}). + +Baudot text-based I/O is specified by using a tail array as an +argument to @code{WRITE IN} or @code{READ OUT}. (A tail array can +also be used to specift @cic{}-style Turing Tape I/O. In order to +determine which is used: both @cic{} and @clcic{} use their own sort +of I/O unless a command-line argument instructs them to use the +other.) In the case of @code{WRITE IN}, one line of input is +requested from the user (@cic{} requires this to be input in Latin-1, +and will then automatically convert it; @clcic{} gives the option of +various character sets for this input as command-line options); the +final newline is removed from this line, then it is converted to +extended Baudot and stored in the tail array specified (causing an +error if the array is too small). Because Baudot is only a 5-bit +character set, each element is padded to 16 bits; @clcic{} pads with +zeros, @cic{} pads with random bits. Trying to input at end-of-file +will act as if the input were a blank line. @code{READ OUT} is the +reverse; it interprets the array as extended Baudot and converts it to +an appropriate character set (Latin-1 for @cic{}, or whatever was +specified on the command line for @clcic{}), which is output to the +user, followed by a newline. Note that the Baudot is often longer +than the corresponding character in other character sets due to the +need to insert shift codes; for information on the extended Baudot +character set, @ref{Character Sets}. + +Generalised binary I/O is specified using a hybrid array as an +argument to @code{WRITE IN} or @code{READ OUT}. Input works by +reading in a number of bytes equal to the length of the array (without +trying to interpret them or translating them to a different character +set), prepending a byte with 172 to the start, padding each byte to 16 +bits with random data, then replacing each pair of consecutive bytes +(that is, the first and second, the second and third, the third and +fourth, and so on) with (the first element selected from the second +element) mingled with (the complement of the first element selected from +the complement of the second element). Output is the exact opposite +of this process. End-of-file reads a 0, which is padded with 0s +rather than random data; if a non-end-of-file 0 comes in from the +data, its padding will contain at least one 1. Any +all-bits-0-even-the-padding being read out will be skipped. + +@node GIVE UP +@section GIVE UP +@findex GIVE UP +@cindex quitting +@cindex exiting + +@portability{yes, all versions, all versions, all versions} + +The @code{GIVE UP} command causes the program to end (or, in a +multithreaded program, causes the current thread to end). It is +written simply as @code{GIVE UP}. There is not much else to say about +it, except to mention that it is the only way to end the program +without an error unless the last line of the program is @code{TRY +AGAIN}, and that it has an unusual interaction with @code{ABSTAIN}; +for details of this, see @ref{ABSTAIN}. (Going past the last command +in the program is an error.) + +There is no gerund for @code{GIVE UP}; in particular, @code{GIVING UP} +is a syntax error. + +@node TRY AGAIN +@section TRY AGAIN +@findex TRY AGAIN +@cindex loops, entire program + +@portability{no, version 0.25+, no, no} + +The @code{TRY AGAIN} command is a very simple command with many +limitations; its effect is to place the entire program in a loop. If +it exists, it must be the very last command in the program (it cannot +even be followed by syntax errors), and it causes execution of the +program to go back to the first command. If the @code{TRY AGAIN} +command is abstained or for some other reason doesn't execute when +reached, it exits the program without the error that would usually be +caused by going past the last line of code. + +The gerund for @code{TRY AGAIN} is @code{TRYING AGAIN}. + +@node COME FROM and NEXT FROM +@section COME FROM and NEXT FROM +@anchor{COME FROM} +@anchor{NEXT FROM} +@findex COME FROM +@findex NEXT FROM +@cindex reverse goto +@cindex goto, time-reversed +@cindex time-reversed goto + +@portability{no, see text, see text, see text} + +The @code{COME FROM} statement (incidentally also invented in 1972, +but not in connection with @ical{}) is the main control-flow command +in @clcic{} (which deprecates @code{NEXT}), and one of two main +control flow structures in other modern @ical{} compilers. It takes +either a label or an expression as its argument; these forms are +noncomputed @code{COME FROM} and computed @code{COME FROM}. + +Noncomputed @code{COME FROM} was implemented in version 0.5 of @cic{}, +but did not conform to modern-day semantics until version 0.7; it is +available in every version of @clcic{} and @jic{}. Computed +@code{COME FROM} support is available in every version of @clcic{} and +in @cic{} from version 0.25 onwards, but not in @jic{}; the variant +@code{NEXT FROM} of @code{COME FROM} is available from @clcic{} +version 1.-94.-8 and @cic{} version 0.26 (both computed and +noncomputed). @cic{} and @clcic{} also have a from-gerund form of +@code{COME FROM} and @code{NEXT FROM}, which was also implemented from +@clcic{} version 1.-94.-8 and @cic{} version 0.26. + +The basic rule of @code{COME FROM} is that if a @code{COME FROM} +statement references another statement, whenever that statement is +reached, control flow will be transferred to the @code{COME FROM} +after that statement finishes executing. (@code{NEXT FROM} is +identical except that in addition to the @code{COME FROM} behaviour, +the location immediately after the statement that was nexted from is +saved on the NEXT stack, in much the same way as if the statement +being nexted from was iteslf a @code{NEXT}.) + +Here are examples of noncomputed, computed, and from-gerund @code{COME +FROM}: + +@example +DO COME FROM (10) +DO COME FROM #2$'.1~#1' +DO COME FROM COMING FROM +@end example + +(The last example is an infinite loop. If it said @code{DO NEXT FROM +NEXTING FROM}, it would not be an infinite loop because the NEXT stack +would overflow and cause an error. This also establishes the gerunds +used for @code{COME FROM} and @code{NEXT FROM}.) + +There are some things to be careful with involving @code{COME FROM} +and @code{NEXT FROM}. First, if the statement come from or nexted +from happens to be a @code{NEXT}, the @code{NEXT} doesn't count as +'finishing executing' until the NEXT stack entry created by the +@code{NEXT} is @code{RESUME}d to. In particular, this means that if +@code{FORGET} is used to remove the entry, or a @code{RESUME} with a +large argument resumes a lower entry, the @code{COME FROM} doesn't +steal execution at all. + +Second, you may be wondering what happens if two @code{COME FROM}s or +@code{NEXT FROM}s aim at the same line. In a non-multithreaded +program (whether a program is multithreaded or not is determined by a +compiler option for those compilers that support it), this is an +error; but it is only an error if the statement that they both point +to finishes running, and both @code{COME FROM}s or @code{NEXT FROM}s +try to execute as a result (they might not if, for instance, one is +abstained or has a double-oh-seven causing it not to run some of the +time). If both @code{COME FROM}s or @code{NEXT FROM}s are +noncomputed, however, a compiler can (but does not have to) give a +compile time error if two @code{COME FROM}s or @code{NEXT FROM}s share +a label, and so that situation should be avoided in portable code. +(If it is wanted, one solution that works for @cic{} and @clcic{} is +to use computed @code{COME FROM}s or @code{NEXT FROM}s with a constant +expression.) + +@ifset notsplit +@partheading{PART III: @ical{} DIALECTS AND EXTENSIONS} +@end ifset +@node TriINTERCAL +@chapter TriINTERCAL +@cindex TriINTERCAL +@cindex ternary +@cindex whirlpool +@cindex sharkfin +@cindex BUT +@cindex add-without-carry +@cindex subtract-without-borrow +@cindex controlled unary operator +@findex ^ +@findex @@ + +@portability{no, version 0.7+, version 1.-94.-8+, no} + +One extension to @ical{} that is implemented by both @cic{} and +@clcic{} is known as TriINTERCAL, and extends @ical{} to bases other +than binary. Unlike ordinary @ical{} programs, which have the +extension @samp{.i}, TriINTERCAL programs in bases from 3 to 7 (the +only allowed bases) have extensions from @samp{.3i} to @samp{.7i} +respectively. + +The change of numeric base only affects expressions, and in particular +the behaviour of operators, and the range of variables. (The onespot +and twospot ranges become the highest number of trits or other digits +in the base required that fit inside the binary ranges, so for +instance, the maximum value of a onespot variable in ternary is 59048, +or 3 to the power 10 minus 1.) Interleave/mingle is the simplest to +explain; it alternates digits just as it alternated bits in binary. +The other operators all change, as follows: + +@itemize + +@item +Exclusive-or becomes two operators, known either as +subtract-without-borrow and add-without-carry due to their +mathematical interpretations, or what and sharkfin after their Atari +syntax representations (@code{?} and @code{^}). (In Princeton syntax, +these are the bookworm or yen sign, and a spike (@code{|}).) The two +operators do the same thing in binary, but differ in higher bases. +(Nevertheless, it is an error to use a sharkfin in binary, because it +is a so-called `controlled unary operator', as are the rest of the +new operators defined in this section, which has a lower limit on +which base it is allowed in.) Instead of doing the exclusive-or +operation, the bits being combined are either subtracted or added; if +the result is out of range for the base being used, the base is added +or subtracted from the result until it is in range. (For the +subtraction, the bit that was less significant is subtracted from the +bit that was more significant in any given pair of bits, except for +the subtraction between the most and least significant bits, where the +most significant bit is subtracted from the least.) + +@item +The AND and OR operators are generalised into an entire sequence of +operators; the number of operators available is the same as the base +that is being used. In base 3, the third operator is known as BUT; in +other bases, there are no commonly accepted names for the extra +operators, so names that reflect the notation are used here. + +The way to think of it is this: in base 2, an AND gives the result 0 +if either argument is a 0, and otherwise a 1, and likewise, an OR +gives the result 1 if either argument is a 1, and otherwise a 0; they +could be said to favour 0 over 1 and 1 over 0 respectively. In base +3, AND favours 0 over 2 over 1, OR favours 2 over 1 over 0, and BUT +favours 1 over 0 over 2. (The symbol for BUT is @code{@@} (a +`whirlpool', which is another name for the BUT operation) in Atari +syntax, and @code{?} in Princeton syntax.) The pattern continues: in +base 4, AND favours 0 over 3 over 2 over 1, BUT favours 1 over 0 over +3 over 2, 2BUT (written @code{2@@} or @code{2?}) favours 2 over 1 over +0 over 3, and OR favours 3 over 2 over 1 over 0. (This can be +extended to higher bases following the same pattern, introducing +operators @code{3@@} or @code{3?}, etc., to favour 3, etc., when +neither AND (which always favours 0) nor OR (which favours the highest +digit in the base) are available.) All the whirlpool operators are +controlled unary operators, which are only legal when both the base +contains the favoured digit, and they aren't redundant to AND nor OR. + +@item +Select has its semantics modified to deal with more than one nonzero +digit in the base. It starts off by doing an OR (in whatever base is +being used) between the two numbers being selected; then the bits of +the result are sorted by the bits of the right-hand argument to the +select, with bits corresponding to 0s in the right-hand argument +ending up more significant than bits corresponding to high digits in +the right-hand argument. In base 2, this has the same effect as a +traditional-style select. + +@end itemize + +Note that the base doesn't affect anything other than variable ranges +and expressions; in particular, it doesn't affect the bit-reversal +used by Turing Tape I/O. (The tape still has characters written on it +in binary, even though the program uses a different base.) + +@node Multithreading and Backtracking +@chapter Multithreading and Backtracking +@cindex multithreading +@cindex threading +@cindex Threaded INTERCAL +@cindex Backtracking INTERCAL + +The multithreading and backtracking extensions to @ical{} were +originally invented by Malcom Ryan, who implemented @code{COME +FROM}-based multithreading as a modified version of @cic{}, but did +not implement backtracking, known as Threaded @ical{}. (The same +functionality is implemented in @cic{} today, but with different code. +Most likely, this means that the original code was better.) He also +invented the original version of Backtracking @ical{}, but did not +implement it; the only known implementation is the @cic{} one. A +different version of multithreading, using @code{WHILE}, was +implemented as part of @clcic{} (like all extensions first available +in @clcic{}, it is most likely due to Claudio Calvelli) and then added +to @cic{}, although its implications were not noticed for some time +afterwards. + +So nowadays, three freely-mixable threading-like extensions to @ical{} +exist, all of which are implemented in @cic{}. (A fourth, Quantum +@ical{}, is implemented in @clcic{} but not @cic{}, and so will not be +discussed further here.) If you're wondering about the description of +backtracking as a threading-like extension, it's implemented with much +of the same code as multithreading in @cic{}, because the @ical{} +version can be seen as roughly equivalent to multithreading where the +threads run one after another rather than simultaneously. (This +conceptualisation is probably more confusing than useful, though, and +is also not strictly correct. The same could probably be said about +@ical{} as a whole, for that matter.) + +@menu +* Multithreading using COME FROM:: Creating separate threads. +* Multithreading using WHILE:: Creating connected threads. +* Backtracking:: Multithreading in series, not parallel. +@end menu + +@node Multithreading using COME FROM +@section Multithreading using COME FROM +@cindex @code{COME FROM}, multithreading +@cindex @code{NEXT FROM}, multithreading +@cindex multithreading, separate threads +@cindex threading, separate +@cindex threading, unwoven +@cindex separate threads +@cindex unwoven threads + +@portability{no, version 0.25+, version 0.05+, no} + +The original multithreading implementation worked by giving a new +meaning to what was previously an error condition. If in a +multithreaded program (a program is marked as multithreaded using +options to a compiler) two or more @code{COME FROM}s or @code{NEXT +FROM}s (or a mixture of the two) attempt to steal control +simultaneously, the original thread splits into multiple threads, one +for each of the commands trying to take control, and a different +command gains control of the program in each case. + +From then on, all the threads run simultaneously. The only thing +shared between threads (apart from the environment in which they run) +is the abstained/reinstated status of each command; everything else is +separate. This means, for instance, that it's possible to change the +value of a variable in one thread, and it will not affect the +corresponding variable in other threads created this way. Likewise, +there is a separate NEXT stack in each thread; if both a @code{COME +FROM} and a @code{NEXT FROM} aim at the same line, for instance, the +@code{NEXT FROM} thread will end up with a NEXT stack entry that isn't +in the @code{COME FROM} thread, created by the @code{NEXT FROM} +itself. This is known as unwoven thread creation; none of the threads +created this way are `woven' with any of the other threads created +this way. (Whether threads are woven depends on how they were +created.) If the thread being split was itself woven with other +threads, exactly one of the resulting threads after the split is woven +with the threads that the original thread was woven to, but the rest +will not be woven to anything. (If that seems a somewhat unusual +rule: well, this is @ical{}.) + +In @cic{}, there are other guarantees that can be made about unwoven +threads (that is, threads not woven to any other thread). In +particular, they can all be guaranteed to run at approximately the +same speed; to be more precise, the number of commands that have been +given the chance to execute in any given thread will not differ by +more than 2 from the number of commands that have been given the +chance to execute in any other thread that was created at the same +time. (However, @code{COME FROM}s and @code{NEXT FROM}s can make this +relationship less precise; it is unspecified (in the technical sense +that means the compiler can choose any option it likes and change its +mind on a whim without telling anyone) whether a @code{COME FROM} or +@code{NEXT FROM} aiming at the current command counts towards the +command total or not, thus causing the relationship to become weaker +the more of them have the chance to execute. In versions of @cic{} +from 0.27 onwards, there is a third guarantee; that if a @code{COME +FROM} comes from itself, it will actually give other threads at least +some chance to run, at some speed, by counting itself as a command +every now and then; previously this requirement didn't exist, meaning +that a @code{COME FROM} could block all threads if it aimed for itself +due to the speed restrictions and the fact that @code{COME FROM}s need +not count towards the total command count.) Also, all commands, +including any @code{ONCE} or @code{AGAIN} attached to the command, are +atomic; this means that it's impossible for another thread to conflict +with what the command is doing. (In a departure from the usual +@ical{} status quo, these guarantees are somewhat @emph{better} than +in most other languages that implement threading, amusingly continuing +to leave @ical{} with the status of being unlike any other mainstream +language.) + +The only way to communicate between unwoven threads is by changing the +abstention status of commands; this always affects all threads in the +program, whether woven or not. (The combination of @code{ABSTAIN} and +@code{ONCE} is one way to communicate atomically, due to the atomic +nature of @code{ONCE}.) + +If there are at least two threads, the @code{GIVE UP} command ends the +current thread, rather than the current program. + +@node Multithreading using WHILE +@section Multithreading using WHILE +@findex WHILE +@anchor{WHILE} +@cindex multithreading, connected threads +@cindex threading, connected +@cindex threading, woven +@cindex connected threads +@cindex woven threads + +@portability{no, version 0.27+, version 0.05+, no} + +The @code{WHILE} command (which is not strictly speaking a command, +but more a sort of metacommand that joins commands) is a second method +of achieving multithreading. (In @clcic{}, there are at least two +other meanings for @code{WHILE}, but only the one implemented in +@cic{} is discussed here.) The syntax is somewhat unusual, and +consists of two commands separated by the @code{WHILE} keyword, but +sharing the statement identifier, execution chance, and any +@code{ONCE}/@code{AGAIN} keyword that may be present. For instance: + +@example +(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- + "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$ + "'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1" +@end example + +(OK, maybe that's an unnecessarily complicated example, and maybe it +shouldn't have included the @code{/} operator which is part of another +@ical{} extension (@pxref{Operand Overloading}). Still, I thought +that maybe you'd want to see how addition can be implemented in @ical{}.) + +A @code{WHILE} command starts two threads (the original thread that +ran that command and a new one), one of which runs the command to the +left of the @code{WHILE} and one of which runs the command to the +right. Any line number applies to the left-hand command, not the +WHILE as a whole, which is a metalanguage construct. @code{NEXTING +FROM}, @code{ABSTAINING FROM} or similar behaviour with respect to the +@code{WHILE} itself is impossible, although it's certainly possible to +abstain from either of its operands (and abstaining from the left +operand has much the same effect as abstaining from the @code{WHILE} +itself; the right-hand thread deliberately takes a bit of time to get +started just so that this behaviour happens). The right-command +thread starts just before the left command is run (so @code{NEXTING}, +etc.@:, directly to the left command will not start that loop in the +first place); if that command finishes (which may be almost +immediately for something like a calculate command, or take a long +time for something like @code{NEXT}), that thread loops and reruns +that command as long as the left command has not finished; +@code{COMING FROM} that command, or a @code{NEXT}/@code{NEXT FROM} +from/aiming at that command, doesn't count as finishing that command +until it is @code{RESUME}d back to (if possible; if it's come from, +that command can never end and the right-hand loop will continue +forever, or until it @code{GIVE}s @code{UP} or the loop ends due to +the command ending later in another thread). A @code{WHILE} command +itself exists across all threads of a multithreaded program in a way; +for each left-hand command that ends (in any thread), the next time a +right-hand command ends it will cause the thread it's looping in to +end, regardless of whether that thread corresponds to the thread in +which the left-hand command ended. (As well as a right-hand command +ending, there's also the possibility that it never got started; there +is a delay before the right-hand command runs during which a left-hand +command ending can prevent the right-hand thread starting in the first +place; this counts as the same sort of event as terminating a +right-hand loop, and can substitute for it anywhere a right-hand +command ending is mentioned.) There is one exception, in that if two +or more left-hand commands end in a space of time in which no +right-hand commands for that @code{WHILE} ends, they together only +cause one right-hand command to end. (What, did you expect the +logical and orthogonal behaviour?) + +The two threads produced by a @code{WHILE} (the original thread and a +new copy of it) have more in common than ordinary @ical{} threads +created by @code{COME FROM}; ordinary threads share only +@code{ABSTAIN}/@code{REINSTATE} information, whereas the +@code{WHILE}-produced threads count as `woven' threads which also +share variables and stashes. (They still have separate instruction +pointers, separate instruction pointer stacks, such as the NEXT stack, +and separate choicepoint lists. Overloading information is shared, +though. Being woven is a relationship between two or more threads, +rather than an attribute of a thread, although a thread can be +referred to as being unwoven if it is not woven to any other thread. + +Ordinary multithreading cannot create woven threads. When threads are +created by multiple @code{COME FROM}s from an original thread, which +was woven with at least one other thread, one of the resulting threads +counts as the `original' thread and remains woven; the rest are `new' +threads which initially start out with the same data as the original, +but are not woven with anything. Backtracking in a thread +(@pxref{Backtracking}) causes it to unweave with any threads it may be +woven with at the time (so the data in the thread that backtracks is +set back to the data it, and the threads it was woven with at the +time, had at the time of the @code{MAYBE}, but the other threads +continue with the same data as before). The only way to cause three +or more threads to become woven is with a new @code{WHILE} inside one +of the threads that is already woven, which causes all the new threads +to be woven together (the weaving relationship is transitive). + +@node Backtracking +@section Backtracking +@cindex backtracking +@cindex choicepoints +@cindex dormant thread +@cindex threading, in series +@cindex threading, dormant + +@portability{no, version 0.25+, no, no} + +A somewhat unusual threading construct that's available is +backtracking. In case you haven't come across it before (the concept +exists in other languages but is implemented differently and usually +in a less general way), the basic idea is that instead of executing or +not executing a command, you can @code{MAYBE} execute a command. This +causes the command to be executed, but also creates a dormant thread +in which the command wasn't executed; at any time later, the program +can either decide that it liked the consequences of the command and +@code{GO AHEAD} and get rid of the dormant thread, or decide that it +didn't like the consquences of the command and @code{GO BACK} to the +dormant thread, discarding the current one. The dormant thread is +more commonly called a `choicepoint', that is, a point at which a +choice was made but a different choice can still be made, and is +generally not thought of as a thread at all by most programmers. (In +case you're wondering: dormant threads are always unwoven.) + +@anchor{MAYBE} +@findex MAYBE +@cindex choicepoints, creating +To create a choicepoint, the statement identifier @code{MAYBE} is +used, rather than the more usual @code{DO} or @code{PLEASE}. +(Combination statement identifiers are still allowed, but must be in +the order @code{MAYBE DO PLEASE NOT} with optionally some parts +omitted, or different versions of @code{NOT} used, or both.) Here's an +example: + +@example +MAYBE DON'T GIVE UP +@end example + +When a command whose statement identifer contains @code{MAYBE} is +reached, it is executed or not executed as normal, but in addition a +choicepoint is created containing the program as it is at that time. +Only @code{ABSTAIN} and @code{REINSTATE}, which always affect all +threads in a program (even choicepoints), can alter the values stored +in the choicepoint; so in this way, a choicepoint is also somewhat +similar to the concept of a continuation in other languages. The +choicepoint is placed on a choicepoint stack, which is maintained +separately for each thread in much the same way that stashes and the +@code{NEXT} stack are. + +@anchor{GO BACK} +@findex GO BACK +@cindex choicepoints, activating +The choicepoint does not actually do anything immediately, but if the +program doesn't like the look of where it's ended up, or it decides to +change its mind, or just wants to try all the possibilities, it can +call the @code{GO BACK} command (which has no arguments, and is just +the statement identifier, optional execution chance, @code{GO BACK}, +and optional @code{ONCE} or @code{AGAIN}). This causes the current +thread to unweave from all other threads and then replace itself with +the thread created by the choicepoint on top of the choicepoint stack. +The difference is that this time, the abstention or reinstatement +status of the command that was modified with @code{MAYBE} is +temporarily reversed for determining whether it runs or not (this +reversal only lasts immediately after the @code{GO BACK}, and does not +affect uses of the command in other threads or later in the same +thread), so unless it has been @code{ABSTAIN}ed or @code{REINSTATE}d +in the meantime it will run if and only if it wasn't run the first +time. The choicepoint stack's top entry is replaced by a `stale' +choicepoint that definitely isn't a thread; attempting to @code{GO +BACK} to a stale choicepoint instead causes the stale choicepoint to +be deleted and the program to continue executing. (This is what gives +@ical{}'s backtracking greater flexibility in some ways than some +other languages; to get backtracking without the stale choicepoints +having an effect, simply run @code{COME FROM} the @code{GO BACK} as +the previous statement.) + +Note that, though, when a thread splits into separate threads (whether +woven or unwoven), the choicepoint stack doesn't split completely, but +remains joined at the old top of stack. The two choicepoint stacks +can add and remove items independently, but an attempt to @code{GO +BACK} to before the current thread split off from any other threads +that are still running instead causes the current thread to end, +although it will @code{GO BACK} as normal if all other threads that +split off from it or that it split off from since the top choicepoint +of the stack was created have ended since. This means that it's +possible to backtrack past a thread splitting and get the effect of +the thread unsplitting, as long as both resulting threads backtrack; +this is another way in which @ical{}'s backtracking is more flexible +than that of some other languages. + +@anchor{GO AHEAD} +@findex GO AHEAD +@cindex choicepoints, discarding +If, on the other hand, a program decides that it likes where it is and +doesn't need to @code{GO BACK}, or it wants to @code{GO BACK} to a +choicepoint lower down the stack while skipping some of the ones +nearer the top of the stack, it can run the @code{GO AHEAD} command, +which removes the top choicepoint on the stack, whether it's a genuine +choicepoint or just a stale one. + +Both @code{GO AHEAD} and @code{GO BACK} cause errors if an attempt is +made to use them when the choicepoint stack is empty. + +@node Operand Overloading +@chapter Operand Overloading + +@node PIC-INTERCAL +@chapter PIC-INTERCAL + +@node Differences to Other Compilers +@chapter Differences to Other Compilers + +@ifset notsplit +@partheading{PART IV: APPENDICES AND INDICES} +@end ifset +@node Character Sets +@appendix Character Sets +@cindex character sets +@cindex Atari, character set +@cindex Baudot +@cindex EBCDIC +@cindex Latin-1 + +The following table explains the equivalences between the various +character sets used for @ical{}: 7-bit ASCII Atari syntax, 5-bit +Baudot Princeton syntax, 8-bit EBCDIC Princeton syntax, and 8-bit +Latin-1 Princeton syntax. (The Baudot and EBCDIC are the @clcic{} +versions, which are used by @ical{} compilers but basically nowhere +else.) The characters themselves are not shown in the table below, +because they would have to be shown in some syntax, which would be +misleading. (Atari syntax is used throughout this manual; you could +convert from that, assuming you have an ASCII table handy.) You can +also use the @command{convickt} command-line tool to translate @ical{} +programs from one format to another (@pxref{convickt}). Note that +Baudot has more than one 'shift state'; the shift state (1, 2, 3, or +4) is written before the hexadecimal code for each character, and * +represents a character available in every shift state. To change from +one shift state to another, use character 1f to change from shift +states 3 or 4 to 1, or from 1 or 2 to 2, and character 1b to change +from shift states 1 or 2 to 3, or from 3 or 4 to 4. + +@multitable {@b{Atari}}{@b{Baudot}}{@b{EBCDIC}}{@b{Latin-1}} +@headitem Atari @tab Baudot @tab EBCDIC @tab Latin-1 +@item 09 @tab N/A @tab 09 @tab 09 +@item 0a @tab * 02 @tab 0a @tab 0a +@item 0d @tab * 08 @tab 0d @tab 0d +@item 20 @tab * 04 @tab 40 @tab 20 +@item 21 @tab 3 0d @tab 4f @tab 21 +@item 22 @tab 3 11 @tab 7f @tab 22 +@item 23 @tab 4 06 @tab 7b @tab 23 +@item 24 @tab 4 01 @tab 4a @tab a2 +@item 25 @tab 4 1c @tab 6c @tab 25 +@item 26 @tab 3 1a @tab 50 @tab 26 +@item 27 @tab 3 0b @tab 7d @tab 27 +@item 28 @tab 3 0f @tab 4d @tab 28 +@item 29 @tab 3 12 @tab 5d @tab 29 +@item 2a @tab 4 09 @tab 5c @tab 2a +@item 2b @tab 4 03 @tab 4e @tab 2b +@item 2c @tab 3 0c @tab 6b @tab 2c +@item 2d @tab 3 03 @tab 60 @tab 2d +@item 2e @tab 3 1c @tab 4b @tab 2e +@item 2f @tab 3 1d @tab 61 @tab 2f +@item 30 @tab 3 16 @tab f0 @tab 30 +@item 31 @tab 3 17 @tab f1 @tab 31 +@item 32 @tab 3 13 @tab f2 @tab 32 +@item 33 @tab 3 01 @tab f3 @tab 33 +@item 34 @tab 3 0a @tab f4 @tab 34 +@item 35 @tab 3 10 @tab f5 @tab 35 +@item 36 @tab 3 15 @tab f6 @tab 36 +@item 37 @tab 3 07 @tab f7 @tab 37 +@item 38 @tab 3 06 @tab f8 @tab 38 +@item 39 @tab 3 18 @tab f9 @tab 39 +@item 3a @tab 3 0e @tab 7a @tab 3a +@item 3b @tab 3 1e @tab 5e @tab 3b +@item 3c @tab 4 0f @tab 4c @tab 3c +@item 3d @tab 4 07 @tab 7e @tab 3d +@item 3e @tab 4 12 @tab 6e @tab 3e +@item 3f @tab 4 0c @tab 65 @tab a5 +@item 40 @tab 3 19 @tab 6f @tab 3f +@item 41 @tab 1 03 @tab c1 @tab 41 +@item 42 @tab 1 19 @tab c2 @tab 42 +@item 43 @tab 1 0e @tab c3 @tab 43 +@item 44 @tab 1 09 @tab c4 @tab 44 +@item 45 @tab 1 01 @tab c5 @tab 45 +@item 46 @tab 1 0d @tab c6 @tab 46 +@item 47 @tab 1 1a @tab c7 @tab 47 +@item 48 @tab 1 14 @tab c8 @tab 48 +@item 49 @tab 1 06 @tab c9 @tab 49 +@item 4a @tab 1 0b @tab d1 @tab 4a +@item 4b @tab 1 0f @tab d2 @tab 4b +@item 4c @tab 1 13 @tab d3 @tab 4c +@item 4d @tab 1 1c @tab d4 @tab 4d +@item 4e @tab 1 0c @tab d5 @tab 4e +@item 4f @tab 1 18 @tab d6 @tab 4f +@item 50 @tab 1 16 @tab d7 @tab 50 +@item 51 @tab 1 17 @tab d8 @tab 51 +@item 52 @tab 1 0a @tab d9 @tab 52 +@item 53 @tab 1 05 @tab e2 @tab 53 +@item 54 @tab 1 10 @tab e3 @tab 54 +@item 55 @tab 1 07 @tab e4 @tab 55 +@item 56 @tab 1 1e @tab e5 @tab 56 +@item 57 @tab 1 12 @tab e6 @tab 57 +@item 58 @tab 1 1d @tab e7 @tab 58 +@item 59 @tab 1 15 @tab e8 @tab 59 +@item 5a @tab 1 11 @tab e9 @tab 5a +@item 5b @tab 4 10 @tab 9e @tab 5b +@item 5c @tab 4 05 @tab N/A @tab 5c +@item 5d @tab 4 13 @tab 5a @tab 5d +@item 5e @tab 4 0d @tab 6a @tab 7c +@item 5f @tab 4 15 @tab 7c @tab 40 +@item 60 @tab N/A @tab N/A @tab 60 +@item 61 @tab 2 03 @tab 81 @tab 61 +@item 62 @tab 2 19 @tab 82 @tab 62 +@item 63 @tab 2 0e @tab 83 @tab 63 +@item 64 @tab 2 09 @tab 84 @tab 64 +@item 65 @tab 2 01 @tab 85 @tab 65 +@item 66 @tab 2 0d @tab 86 @tab 66 +@item 67 @tab 2 1a @tab 87 @tab 67 +@item 68 @tab 2 14 @tab 88 @tab 68 +@item 69 @tab 2 06 @tab 89 @tab 69 +@item 6a @tab 2 0b @tab 91 @tab 6a +@item 6b @tab 2 0f @tab 92 @tab 6b +@item 6c @tab 2 13 @tab 93 @tab 6c +@item 6d @tab 2 1c @tab 94 @tab 6d +@item 6e @tab 2 0c @tab 95 @tab 6e +@item 6f @tab 2 18 @tab 96 @tab 6f +@item 70 @tab 2 16 @tab 97 @tab 70 +@item 71 @tab 2 17 @tab 98 @tab 71 +@item 72 @tab 2 0a @tab 99 @tab 72 +@item 73 @tab 2 05 @tab a2 @tab 73 +@item 74 @tab 2 10 @tab a3 @tab 74 +@item 75 @tab 2 07 @tab a4 @tab 75 +@item 76 @tab 2 1e @tab a5 @tab 76 +@item 77 @tab 2 12 @tab a6 @tab 77 +@item 78 @tab 2 1d @tab a7 @tab 78 +@item 79 @tab 2 15 @tab a8 @tab 79 +@item 7a @tab 2 11 @tab a9 @tab 7a +@item 7b @tab 4 0a @tab 9c @tab 7b +@item 7c @tab 4 1e @tab fe @tab N/A +@item 7d @tab 4 11 @tab dc @tab 7d +@item 7e @tab 4 0b @tab a1 @tab 7e +@end multitable + +@node convickt +@appendix convickt +@cindex convickt +@cindex character sets, converting +@cindex converting between character sets + +A variety of character sets have historically been used to represent +@ical{} programs. Atari syntax was designed specifically for use with +ASCII-7, and all Atari-syntax-based @ical{} compilers accept that +character set as possible input. (@cic{} also accepts Latin-1 and +UTF-8.) However, the story is more complicated with Princeton syntax; +the original Princeton compiler was designed to work with EBCDIC, but +because modern computers are often not designed to work with this +character set other character sets are often used to represent it, +particularly Latin-1. The @clcic{} compiler accepts Latin-1, a custom +dialect of EBCDIC, Baudot, and a punched-card format as input; @cic{} +can cope with Latin-1 Princeton syntax, but for the other character +sets, for other compilers, or just for getting something +human-readable, it's useful to have a conversion program. +@command{convickt} is an @ical{} character set conversion program +designed with these needs in mind. + +The syntax for using @command{convickt} is + +@example +convickt @var{inputset} @var{outputset} [@var{padding}] +@end example + +(that is, the input and output character sets are compulsory, but the +parameter specifying what sort of padding to use is optional). + +The following values for @var{inputset} and @var{outputset} are +permissible: + +@table @samp +@item latin1 +Latin-1, or to give it its official name ISO-8859-1, is the character +set most commonly used for transmitting @clcic{} programs, and +therefore nowadays the most popular character set for Princeton syntax +programs. Because it is identical to ASCII-7 in all codepoints that +don't have the high bit set, most of the characters in it can be read +by most modern editors and terminals. It is also far more likely to +be supported by modern editors than EBCDIC, Baudot, or punched cards, +all of which have fallen into relative disuse since 1972. It is also +the only input character set that @cic{} supports for Princeton syntax +programs. It uses 8 bit characters. + +@item ebcdic +EBCDIC is an 8-bit character set that was an alternative to ASCII in +1972, and is the character set used by the original Princeton +compiler. Unfortunately, there is no single standard version; the +version of EBCDIC used by @command{convickt} is the one that @clcic{} +uses. It is the default input character set that @clcic{} uses +(although more recent versions of @clcic{} instead try to guess the +input character set based on the input program.) + +@item baudot +Baudot is a 5-bit character set with shift codes; therefore when +storing it in a file on an 8-bit computer, padding is needed to fill +in the remaining three bits. The standard Baudot character set does +not contain all the characters needed by @ical{}; therefore, @clcic{} +uses repeated shift codes to add two more sets of characters. +@command{convickt} uses the @clcic{} version of Baudot, so as to be +able to translate programs designed for that compiler; however, +standard Baudot is also accepted in input if it contains no redundant +shift codes, and if the input contains no characters not in standard +Baudot, the output will be written so that it is both correct standard +Baudot and correct @clcic{} Baudot for those characters. + +@item atari +This option causes @command{convickt} to attempt a limited conversion +to or from Atari syntax; this uses ASCII-7 as the character set, but +also tries to translate between Atari and Princeton syntax at the +character level, which is sometimes but not always effective. For +instance, @code{?} is translated from Atari to Princeton as a yen +sign, and from Princeton to Atari as a whirlpool (@code{@@}); this +sort of behaviour is often capable of translating expressions +automatically, but will fail when characters outside ASCII-7 (Atari) +or Latin-1 (Princeton) are used, and will not, for instance, translate +a Princeton @code{V}, backspace, @code{-} into Atari @code{?}, but +instead leave it untouched. ASCII-7 is a 7-bit character set, so on +an 8 bit computer, there is one bit of padding that needs to be +generated; note, however, that it is usual nowadays to clear the top +bit when transmitting ASCII-7, which the `printable' and `zero' +padding styles will do, but the `random' style may not do. + +@end table + +When using a character set where not all bits in each byte are +specified, a third argument can be given to specify what sort of +padding to use for the top bits of each character. There are three +options for this: + +@multitable {printable}{Keep the output in the range 32-126 where possible} +@headitem Option @tab Meaning +@item printable +@tab Keep the output in the range 32-126 where possible +@item zero +@tab Zero the high bits in the output +@item random +@tab Pad with random bits (avoiding all-zero bytes) +@end multitable + +Note that not all conversions are possible. If a character cannot be +converted, it will normally be converted to a NUL byte (which is +invalid in every character set); note that this will prevent +round-tripping, because NUL is interpreted as end-of-input if given in +the input. There is one exception; if the character that could not be +converted is a tab character, it will be converted to the other +character set's representation of a space character, if possible, +because the two characters have the same meaning in @ical{} (the only +difference is if the command is a syntax error that's printed as an +error message). (The exception exists to make it possible to +translate existing @ical{} source code into Baudot.) + +@node Optimizer Idiom Language +@appendix Optimizer Idiom Language +@cindex Optimizer Idiom Language +@cindex OIL + +One file in the @cic{} distribution (@file{src/idiotism.oil}) is written +in Optimizer Idiom Language, a programming language designed especially +for expressing optimizer idioms for @ical{} in an easily editable form +(well, at least it's easier than the unmaintainable set of idioms +hard-coded in C that were used in previous versions of the @ical{} +compiler). + +@menu +* Basics: OIL Basics. The basics of how an OIL program works. +* Syntax: OIL Syntax. How to write comments, idioms, and groups. +* Expressions: OIL Expressions. Expressions are the basis of idioms. +* Patterns: OIL Patterns. Filling in the left hand side of an idiom. +* Replacements: OIL Replacements. Syntax for the right hand side. +* Loops: OIL Loops. Simplifying and shortening programs. +* Tips: OIL Tips. Some tips about using OIL. +* Example: OIL Example. An example of how OIL can work. +@end menu + +@node OIL Basics +@appendixsec OIL Basics +@cindex OIL, basics +@cindex @file{src/idiotism.oil} +@cindex @file{idiotism.oil} +@cindex OIL, execution + +The structure of an @acronym{OIL} file consists of a sequence of idioms. +An optimizer idiom looks for a certain pattern in an expression (which +could be an @ical{} expression, or an expression that has already been +partly optimized and therefore contains some non-@ical{} operators), and +replaces it with a replacement that's `simpler' in some sense (in the +case of @cic{}, `simpler' is interpreted to mean `compiles into a faster +or smaller executable when run through a C compiler'). When an +@acronym{OIL} program acts on an input @ical{} file, it keeps on +matching idioms to simplify expressions, until none of the idioms act +any more (and if a situation occurs where idioms can keep matching +indefinitely, the compiler goes into an infinite loop; so don't allow +that to happen); at present, the idioms are tried from left to right, +from the leaves of an expression to its root, and from the start of the +OIL file to the end; but don't rely on that, because it's subject to +change (and gets confusing when you think about what happens when the +program actually does a replacement). Anyway, the point is that if an +idiom can match an expression, and another idiom doesn't change it +first, then the idiom will be matched against that part of the +expression eventually, and the program won't end until there are no +idioms that match the optimized expression. + +At present, the only place that @acronym{OIL} is used in the @cic{} +compiler is when the @option{-O} option (@pxref{-O+,,-O}) is used in +base 2. (Syntax is planned to extend @acronym{OIL} to higher bases, and +some of this is documented and even implemented, but there's no way to +use it.) The idioms are read from the file @file{src/idiotism.oil} +during the compilation of the @cic{} from sources; you can change the +idioms, but you will then have to recompile the distribution (and if you +are using the @command{config.sh} method, also reinstall, but that will +be pretty fast.) + +@node OIL Syntax +@appendixsec OIL Syntax +@cindex OIL, syntax +@cindex syntax, of OIL + +An @acronym{OIL} file is encoded as an @acronym{ASCII} text file using +no codepoints outside the range 0-127; using 10 for newline (as on a +UNIX or Linux system) is always acceptable, but using 13 then 10 (as is +common on Windows or DOS) for newline is acceptable only if your C +compiler recognizes that as a newline. I have no idea what happens if +you use just 13 on an Apple computer on which that is the common newline +convention. + +@cindex OIL, comments +@cindex comments, OIL +Comments can be given anywhere in the file by writing lines starting +with semicolons (known as hybrids to @ical{} programmers). It's also +possible to write a semicolon after part of a line to comment out the +rest of the line. Inside braced C expressions, comments can be given +anywhere whitespace would be allowed by placing them between @code{/*} +and @code{*/} (in such cases, the comments will be copied verbatim to +the C temporary files used when building the @cic{} compiler, where your +C compiler will ignore them). Whitespace is ignored nearly everywhere; +the only places it isn't ignored are in the middle of a decimal +constant, inside square brackets, immediately after one of the +characters @samp{.:#_@}}, and anywhere that C doesn't allow it in quoted +C code. (This means that you can even place it inside operators like && +if you like, as long as they're part of OIL code and not C code, +although doing this is not recommended.) If you use whitespace in a +situation where it isn't ignored, that's almost certainly an error. + +@cindex OIL, idiom groups +Idioms are grouped into groups of idioms by placing an identifier in +square brackets before the group; this follows the rules for C +identifiers, except that there's a maximum length of 30 characters. +This identifier is the `name' of the group, which has no effect except +on optimizer debug output; for that matter, the only effect a group has +is that all idioms in the group look the same in optimizer debug output, +because they have the same name. It's recommended that idioms only have +the same name if they are the same idiom, possibly written in several +ways. For example, a shift by 0 has no effect and may as well be +removed from the output; the way to express this in OIL is: + +@example +[nullshift] +(_1 >> #0)->(_1) +(_1 << #0)->(_1) +@end example + +Here, nullshift is the name of the group of idioms, and two idioms are +given; one which removes a null rightshift, and one which removes a null +leftshift. + +@cindex OIL, idioms +@cindex idiom +As the example above shows, the syntax of an idiom itself is + +@example +(pattern)->(replacement) +@end example + +The parentheses here are actually part of the pattern and/or +replacement, and as such sparks (apostrophes) or rabbit-ears (double +quotes) can be used instead; they're shown in the syntax because the +outer layer of parenthesising is always required. Both the pattern and +replacement are @acronym{OIL} expressions, although they both have their +own special syntax elements as well. + +@node OIL Expressions +@appendixsec OIL Expressions +@cindex expressions, OIL +@cindex OIL, expressions + +An @acronym{OIL} expression is built around subexpressions connected by +infix binary operators and/or preceded by prefix unary operators, the +same way as in C or @ical{} (although unary operators must be entirely +before their argument; the one character later position is not allowed.) +As in @ical{}, there is no operator precedence; expressions must be very +fully bracketed to show unambiguously what the precedences must be, and +then more so; for instance, bracketing marks must be placed around the +argument of a unary operator in most circumstances. Bracketing of +expressions can be done with parentheses, sparks (apostrophes) or +rabbit-ears (double-quotes). + +The following unary and binary operators are allowed in OIL expressions: + +@cindex OIL, operators +@cindex operators, OIL +@multitable {@code{@@216..@@516}}{@ical{} unary generalised whirlpool (16-bit)} +@item @code{$} @tab INTERCAL mingle +@item @code{~} @tab INTERCAL select +@item @code{&16} @tab INTERCAL unary AND (16-bit) +@item @code{V16} @tab INTERCAL unary OR (16-bit) +@item @code{?16} @tab INTERCAL unary XOR (16-bit) +@item @code{^16} @tab INTERCAL unary sharkfin (16-bit) +@item @code{@@16} @tab INTERCAL unary whirlpool (16-bit) +@item @code{@@216..@@516} @tab INTERCAL unary generalised whirlpool (16-bit) +@item @code{&32} @tab INTERCAL unary AND (32-bit) +@item @code{V32} @tab INTERCAL unary OR (32-bit) +@item @code{?32} @tab INTERCAL unary XOR (32-bit) +@item @code{^32} @tab INTERCAL unary sharkfin (32-bit) +@item @code{@@32} @tab INTERCAL unary whirlpool (32-bit) +@item @code{@@232..@@532} @tab INTERCAL unary generalised whirlpool (32-bit) +@item @code{&} @tab C binary bitwise AND +@item @code{|} @tab C binary bitwise OR +@item @code{^} @tab C binary bitwise XOR +@item @code{+} @tab C addition +@item @code{-} @tab C subtraction +@item @code{*} @tab C multiplication +@item @code{/} @tab C integer division +@item @code{%} @tab C modulus +@item @code{>} @tab C greater than +@item @code{<} @tab C less than +@item @code{~} @tab C unary bitwise complement +@item @code{!=} @tab C not equals operator +@item @code{==} @tab C equals operator +@item @code{&&} @tab C logical AND +@item @code{||} @tab C logical OR +@item @code{>>} @tab C bitwise rightshift +@item @code{<<} @tab C bitwise leftshift +@item @code{!} @tab C unary logical NOT +@end multitable + +(Note that in some cases two operators are expressed the same way, but +that this doesn't matter because one is unary and the other is binary so +that there can't be any ambiguity, only confusion. Also note that +unlike @ical{} unary logic operators, OIL unary logic operators must +have a bitwidth stated.) + +It hasn't yet been explained what operands these operators have to +operate on; the syntax for those depends on whether it's a pattern or +replacement that the expression is representing. + +@node OIL Patterns +@appendixsec OIL Patterns +@cindex patterns +@cindex OIL, patterns + +Patterns are simply @acronym{OIL} expressions; the expressions match +either original @ical{} input or expressions produced by earlier idioms. +Each operator must match the same operator in the (possibly +partially-optimised) input; the operands themselves are pattern +templates specifying what operands in the input they can match. + +One special simple form of match is possible: @code{#@var{NUMBER}}, +where @var{NUMBER} is in decimal, matches a constant with that value. +(Unlike in @ical{}, this constant is not limited to being a onespot +value; it is, however, limited to being at most twospot, as are all +operands and intermediate values in @acronym{OIL}.) + +Otherwise, an operand consists of the following parts, written in order: + +@cindex operands, OIL, in patterns +@cindex patterns, operands +@enumerate + +@item +A character to specify the data type of what's being matched. Usually, +this will be @code{_} to specify that any data type can be matched. In +a few cases, you may want to use @code{.} or @code{:} to specify that +you only want to match a onespot or twospot value respectively (that is, +16- or 32-bit). You can also use @code{#}; this specifies a value that +can be any width, but must be known to be a constant with a known value +at optimize time (either because it was hardcoded as a constant +originally or because a constant was produced there by the optimizer, +for instance via a constant folding optimization). + +@item +Optionally, an expression in braces (@code{@{} and @code{@}}). This +expression is written in C, not @acronym{OIL} (as are all expressions in +braces), and puts an extra condition on whether the pattern matches. +The exact meaning of this will be explained later. + +@item +A reference number, which must be one decimal digit long. A reference +number of 0 causes the operand to be discarded immediately after +matching; normally, you will want to specify a positive reference +number. Two operands with the same reference number must be exactly the +same for the pattern to match (for instance, both references to the same +variable, or identical subexpressions). The reference number also +allows the operand to be referenced by C expressions on other operands +and by replacements. Reference numbers must be unique within the idiom +(unless two or reference numbers are deliberately the same so that the +operands they reference have to be identical to produce a match), and +they are scoped only as far as the containing idiom; they don't carry +from one idiom to another. + +@end enumerate + +Note that syntax like @code{#2} is ambiguous given what comes so far; +the first interpretation is the one that is taken in practice, and if +the second interpretation is wanted the operand should be expressed as +@code{#@{1@}2}, using a no-op braced expression to tell them apart. +This particular no-op is recommended because it's detected and optimized +by the @code{OIL} compiler. + +Braced expressions, which must be written purely in C, add extra +conditions; they must return nonzero to allow a possible match or zero +to prevent one. They can reference the following variables and +functions: + +@cindex functions, OIL in C +@cindex OIL, functions in C +@cindex C, within OIL +@anchor{C functions in OIL} +@table @code + +@item c +@itemx c@var{NUMBER} +@findex c +@findex c1--c9 + +This accesses a calculation made automatically by the compiled +@acronym{OIL} program to identify which bits of the operand can possibly +be set, and which ones cannot be. @code{c} by itself refers to the +operand to which the braced expression is attached; if a number is +given, it refers to another node (the number is interpreted as a +reference numer). The actual value of @code{c} is a 32-bit unsigned +integer, each bit of which is true, or 1, if there is any chance that +the corresponding bit of the operand might be 1, and false, or 0, if +it's known for certain that the corresponding bit of the operand is 0. + +For instance: + +@example +_@{!(c&4294901760LU)@}1 +@end example + +The constant given here is FFFF0000 when expressed in hexadecimal; the +point is that the expression matches any operand that is known to have a +value no greater than 65535. Unless the operand is the argument to a +unary AND, this check generally makes more point than explicitly +specifying @code{.} rather than @code{_}, because it will identify both +16- and 32-bit values as long as they're small enough to fit into a +onespot variable. This code could, for instance, be used to check that +an argument to a mingle must be small enough before optimising it (this +is important because an optimisation shouldn't optimise an error -- in +this case, an overflowing mingle -- into a non-error). + +@item x +@itemx x@var{NUMBER} +@findex x +@findex x1--x9 + +@code{x} is like @code{c}, and refers to operands in the same way, +except that it can only refer to an operand marked with @code{#}. It +holds the value of that constant (a 32-bit unsigned integer), which will +be known to the optimizer at optimize time. One common use of this is +to detect whether a constant happens to be a power of 2, although there +are many other possibilities that may be useful. + +@item r +@findex r + +When inside a loop, @code{r} is the value of the loop counter. (It's +almost certainly a mistake if you have a loop but don't reference the +loop counter at least once, and usually at least twice, within the +loop.) @xref{OIL Loops}. + +@item and16 +@itemx and32 +@itemx or16 +@itemx or32 +@itemx xor16 +@itemx xor32 +@itemx iselect +@itemx mingle +@findex and16 +@findex and32 +@findex or16 +@findex or32 +@findex xor16 +@findex xor32 +@findex iselect +@findex mingle + +These are all functions with one argument (apart from iselect and +mingle, which each take two arguments); they exist so that @ical{} +operators can be used by C expressions. They all take unsigned longs as +input and output, even if they are onespot operators. Note that it's +entirely possible for these to cause a compile-time error if used on +invalid arguments (such as mingling with an operand over 65535), or to +silently truncate an invalid argument down to the right number of bits; +both of these should be avoided if possible, so the optimiser should +check first to make sure that it doesn't use any of these functions on +invalid arguments. + +@item xselx +@findex xselx + +This function returns its argument selected with itself; so +@code{xselx(c)} is shorthand for @code{iselect(c,c)}. When the argument +is very complicated, this can save a lot of space in the original +@acronym{OIL} program. + +@item setbitcount +@findex setbitcount + +This function simply returns the number of bits with value 1 in its +argument. This is sometimes useful with respect to various +select-related optimisations, and can be a useful alternative to having +to take logarithms in various situations. + +@item smudgeright +@itemx smudgeleft +@findex smudgeright +@findex smudgeleft + +The @code{smudgeright} function returns its argument but with all the +bits less significant than the most significant bit with value 1 set to +1; likewise, @code{smudgeleft} returns its argument with all the bits +more significant than the least significant bit with value 1 set to 1. + +@end table + +Note that all @acronym{OIL} character is done internally using unsigned +32-bit numbers, and C expressions you write should do the same. The +practical upshot of this is that you should write @code{LU} after any +constant you write in C code; if you don't do this, you are reasonably +likely to get compiler warnings, and the resulting program may not work +reliably, although the @acronym{OIL} compiler itself will not complain. + +Here's a more complicated example of an optimizer operand: + +@example +#@{!(x&2863311530LU)&&iselect(x,1431655765LU)== + xselx(iselect(x,1431655765LU))@}3 +@end example + +It helps to understand this if you know that 2863311530 in hexadecimal +is AAAAAAAA and 1431655765 is hexadecimal is 55555555. (It's worth +putting a comment with some frequently-used decimal constants in an +@acronym{OIL} input file to help explain what these numbers mean and +make the code more maintainable.) The operand matches any constant +integer which has no bits in common with AAAAAAAA, and for which if any +bit in common with 55555555 is set, all less significant bits in common +with that number are also set. + +@node OIL Replacements +@appendixsec OIL Replacements +@cindex OIL, replacements +@cindex replacements + +Replacements have much the same syntax as patterns. The expressions are +parsed in much the same way; however, one peculiarity of replacements is +that bitwidths must be specified. @ical{} has a typecaster that figures +out whether each expression is 16 bits or 32 bits wide, but it runs +before the optimizer, and as the optimizer can produce expressions whose +bitwidths don't obey @ical{}'s rules, this information needs to be +inserted somehow in a replacement. In @cic{}, it usually doesn't matter +what the bitwidth is, and in cases where it doesn't matter the normal +operators (@code{$}, @code{~}, and so on) can be used. (Note that the +bit width of the entire replacement is always set to the same bit width +as the bit width of the expression matched by the pattern; so you don't +have to worry about the effect on unary logical operators that might be +operating on the expression being optimized. This is an exception to +the normal bitwidth rules for a replacement.) In cases where it does +matter (due to @cic{}'s lenient interpretation of bitwidth on mingle +inputs, the only place it matters is in the input to @ical{} unary +logical operators), both the bidwidth of the operator and the argument +on which it operates must be explicitly given, and given as the same +value; to set the bitwidth of an operator's result, simply write the +bitwidth (16 or 32 for onespot and twospot respectively) immediately +after the operator; for instance, @code{!=32} will generate a not-equals +operation with a 32-bit bitwidth. If an operator's width is set to 16, +and during the course of execution of the optimized program, a value +that doesn't fit into 16 bits is encountered, that's undefined behaviour +and anything might happen (most likely, though, the program will just +act as though its width had been set to 32 bits instead); this error +condition is not detected. Also note that operators like @code{&32} +already have a bitwidth specified, so specifying @code{&3232} (or worse, +@code{&3216}) is not allowed. + +@cindex operands, OIL, in replacements +@cindex replacements, operands +Replacement operands are simpler than pattern operands, because there +are only a few forms they can take. + +@table @code +@item _@var{NUMBER} +@itemx .@var{NUMBER} +@itemx :@var{NUMBER} + +This tells the optimiser to copy the operand or expression with +reference number @var{NUMBER} to this point in the replacement used for +the expression matched by the pattern. The three forms are identical; +the last two are provided for aesthetic reasons (it can look better and +be clearer to match @code{.1} in the pattern with @code{.1} in the +replacement, for instance). You cannot use @code{#@var{NUMBER}} here to +copy in a constant from the left-hand side, though, nor +@code{#@{1@}@var{NUMBER}}, because the first means something else and +the second is undefined behaviour (that is, no behaviour for the second +case has been specifically implemented in the compiler and therefore its +behaviour is unpredictable and subject to change in future versions); +use @code{_@var{NUMBER}} to copy over a constant with an unknown at +optimizer compile time (but known at optimize time) value from the left +hand side, as you can do with any other operand being copied. + +@item #@var{NUMBER} + +Insert a constant with the literal value @var{NUMBER} here. + +@item #@{@var{EXPRESSION}@}0 + +Calculate the value of @var{EXPRESSION} (a C expression, which can +reference the same variables and functions as a C expression in a +pattern can; see @ref{C functions in OIL}. + +@end table + +As an example, here's an idiom that moves C bitwise AND operations +inside leftshifts. (This is useful because if the optimizer has +generated a large sequence of mixed ANDs and bitshifts, moving all the +ANDs to one end allows them to be clumped together and optimized down to +one AND.) + +@example +((_1 << #@{1@}2) & #@{1@}3)->((_1 & #@{x3>>x2@}0) << _2) +@end example + +@node OIL Loops +@appendixsec OIL Loops +@cindex loops, OIL +@cindex OIL, loops + +When writing idioms, sometimes instead of using very complicated +expressions to try to match multiple situations at once it's easier to +have a separate idiom for each possible situation; for instance, it's +easier to write idioms for right-shift by 1, right-shift by 2, +right-shift by 3, etc.@:, rather than a general idiom to rightshift by any +amount. When the idioms follow a pattern, as they will do in basically +every case of this sort, it's possible to automatically generate them +using a loop. For instance, idioms to optimize a one-bit rightshift +and a two-bit rightshift are: + +@example +(_1~#@{xselx(x)<<1==x&&x@}2)->((_1&_2)>>#1) +(_1~#@{xselx(x)<<2==x&&x@}2)->((_1&_2)>>#2) +@end example + +Adding a loop to automatically generate the idioms, and placing a name +for the group of idioms at the start, produces the following code: + +@example +[rshift] +<#1-#31 +(_1~#@{xselx(x)<((_1&_2)>>#@{r@}0) +> +@end example + +That's 31 different idioms, generated with a loop. As the above example +shows, a loop starts with @code{<#@var{NUMBER}-#@var{NUMBER}} and ends +with @code{>}; a different idiom is generated for each possible value of +the loop counter @code{r} in the range given by the opening line of the +loop. Loops must be placed around idioms, but inside a group of +idioms. Note the use of @code{#@{r@}0} to generate a constant whose +value is equal to the value of the loop counter. + +@node OIL Tips +@appendixsec OIL Tips +@cindex tips, OIL +@cindex OIL, tips + +Here are some tips for the best use of @acronym{OIL}: + +@itemize + +@item +@findex MAXTOFREE +The @acronym{OIL} compiler has a few deficiencies, such as error +messages that don't give you much of an idea of what you did wrong (to +compensate for this, it does give a reasonably accurate line and +character number where the error happened), limits on things like how +deep expressions can be nested and how many idioms are allowed (if you +hit the first, you should really break it up into smaller idioms if +possible, and if you hit the second, increase @code{MAXTOFREE} in oil.y; +this isn't a limit on the number of idioms but on the number of strings +that are allocated internally to process the idioms), and lack of error +checking (invalid @acronym{OIL} may produce errors in the @acronym{OIL} +compiler, or cause the output C code to contain errors or warnings, or +may even appear to work). + +@item +When you have symmetrical operators in an idiom (like C binary logical +operators), you need to write the idiom both ways round (in the same +group of idioms, preferably), or write another idiom to standardise the +format first; the first method can get very tedious when there are many +symmetrical operators in an idiom, and the second is prone to optimizer +loops and subtle errors (both methods have been used in the provided +@file{idiotism.oil} file.) + +@item +Idioms should preferably be as general as possible, broken down into +many separate idioms rather than all as one big idiom, and match the +smallest part of the expression being optimized that is necessary for +the idiom to be correct in all cirucmstances; all of these help to +improve the performance of the optimizer in terms of what it can +optimize. + +@item +If a program's optimizing incorrectly, or you just want to see how the +optimizer deals with a particular program, it's possible to debug the +optimizer by giving the @option{-h}, @option{-H}, or @option{-hH} +(@pxref{-h}) switch to the @cic{} compiler, which will cause debug +information to be output on stderr. @option{-h} will show the initial +and final expressions for each expression that was given as input to the +optimizer, as well as a list of all optimizations used, in a language +that's a sort of mix of C, @ical{}, and @acronym{OIL}; @option{-H} will +do the same, and also show the intermediate stages in the optimization. +@option{-hH} is like @option{-H}, but produces its output entirely in C, +so that the various intermediate stages can be tried with a C compiler, +or for people who are fed up of reading @ical{}. @option{-H} can be a +useful learning resource for people who want to understand how a +particular @ical{} expression works. + +@item +Make sure that the optimizer doesn't change a statement from a run-time +error into something that silently succeeds@! Checking which bits can +and can't be 1 is one good way to avoid this, especially with mingles. +(At present, there are some idioms that can turn run-time errors into +compile-time errors, such as with the expression +@code{''#65535$#65535'$#0'}; this could be avoided, but for the time +being it isn't.) + +@item +You can help@! If you find an idiom that the optimizer isn't optimizing +correctly, feel free to add it, or multiple idioms that come to the same +thing, to @file{idiotism.oil}. In such a case, it would help other +users if you would submit your new optimizer idiom to the project +(@pxref{Reporting Bugs}); this will help other users and future releases +of @ical{}, and also has a chance of allowing other users to check your +new idioms to see if they cause problems or could be written better. + +@end itemize + +@node OIL Example +@appendixsec OIL Example +@cindex OIL, example +@cindex examples, OIL + +To finish off this appendix, here's an example of the power of +@acronym{OIL}; this is the optimization of an idiom from the @icst{} +system library, as shown with @option{-H}; this should give a good idea +of how @acronym{OIL} programs work. (All the relevant idioms are in +@file{idiotism.oil} as of the time of writing.) Note how the expression +is reduced one small step at a time; the smallness of the steps makes +the optimizer more general, because if the original expression had been +slightly different, the optimizer wouldn't have come to the same result +but could have optimized it quite a bit of the way, up to the point +where the optimizations were no longer valid; in an older version of +@ical{}, this idiom was simply hardcoded as a special case and so slight +variations of it weren't optimized at all. If you look at the idioms +themselves, it'll also be apparent how @code{c} (the record of which +bits of an expression can be 1 and which bits can't be) is important +information in being able to apply an optimization more aggressively. + +@ifhtml +@smallexample +.3 <- ((((((((.3 $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[minglefold] +.3 <- ((((((((.3 $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[lshift16] +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[noopor] +.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[minglefold] +.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[lshift16] +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[noopor] +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf)) +[minglefold] +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0xaaaaaaf) $ 0x0) ~ (0xfff $ 0xf)) +[lshift16] +.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) | 0x0) $ 0x0) ~ (0xfff $ 0xf)) +[noopor] +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ (0xfff $ 0xf)) +[minglefold] +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ 0xaaaaff) +[lshift16] +.3 <- (((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) | 0x0) +[noopor] +.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[nullshift] +.3 <- (((((((((((.3 & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[combinelrshift] +.3 <- ((((((((((.3 & 0x7fff) << 0x1) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[andintolshift] +.3 <- ((((((((((.3 & 0x7fff) & 0x3fff) << 0x1) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[combinellshift] +.3 <- (((((((((.3 & 0x7fff) & 0x3fff) << 0x2) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[combinelrshift] +.3 <- ((((((((.3 & 0x7fff) & 0x3fff) << 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[andintolshift] +.3 <- ((((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) << 0x3) >> 0x3) & 0x1ff) << 0x7) +[combinellshift] +.3 <- (((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x4) >> 0x3) & 0x1ff) << 0x7) +[combinelrshift] +.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) & 0x1ff) << 0x7) +[andintolshift] +.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x1) << 0x7) +[combinellshift] +.3 <- (((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x8) +[combineand] +.3 <- ((((.3 & 0x3fff) & 0xfff) & 0xff) << 0x8) +[combineand] +.3 <- (((.3 & 0xfff) & 0xff) << 0x8) +[combineand] +.3 <- ((.3 & 0xff) << 0x8) +@end smallexample +@end ifhtml +@ifnothtml +@quotation +.3 <- ((((((((.3 $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[minglefold]@* +.3 <- ((((((((.3 $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[lshift16]@* +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[noopor]@* +.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x7fff $ 0x1)) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[minglefold]@* +.3 <- (((((((((.3 >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0x2aaaaaab) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[lshift16]@* +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) | 0x0) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[noopor]@* +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ (0x3fff $ 0x3)) $ 0x0) ~ (0xfff $ 0xf))@* +[minglefold]@* +.3 <- ((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) $ 0x0) ~ 0xaaaaaaf) $ 0x0) ~ (0xfff $ 0xf))@* +[lshift16]@* +.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) | 0x0) $ 0x0) ~ (0xfff $ 0xf))@* +[noopor]@* +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ (0xfff $ 0xf))@* +[minglefold]@* +.3 <- (((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) $ 0x0) ~ 0xaaaaff)@* +[lshift16]@* +.3 <- (((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7) | 0x0)@* +[noopor]@* +.3 <- ((((((((((((.3 >> 0x0) & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[nullshift]@* +.3 <- (((((((((((.3 & 0x7fff) << 0x1) >> 0x0) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[combinelrshift]@* +.3 <- ((((((((((.3 & 0x7fff) << 0x1) & 0x7fff) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[andintolshift]@* +.3 <- ((((((((((.3 & 0x7fff) & 0x3fff) << 0x1) << 0x1) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[combinellshift]@* +.3 <- (((((((((.3 & 0x7fff) & 0x3fff) << 0x2) >> 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[combinelrshift]@* +.3 <- ((((((((.3 & 0x7fff) & 0x3fff) << 0x1) & 0x1fff) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[andintolshift]@* +.3 <- ((((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) << 0x3) >> 0x3) & 0x1ff) << 0x7)@* +[combinellshift]@* +.3 <- (((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x4) >> 0x3) & 0x1ff) << 0x7)@* +[combinelrshift]@* +.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) << 0x1) & 0x1ff) << 0x7)@* +[andintolshift]@* +.3 <- ((((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x1) << 0x7)@* +[combinellshift]@* +.3 <- (((((.3 & 0x7fff) & 0x3fff) & 0xfff) & 0xff) << 0x8)@* +[combineand]@* +.3 <- ((((.3 & 0x3fff) & 0xfff) & 0xff) << 0x8)@* +[combineand]@* +.3 <- (((.3 & 0xfff) & 0xff) << 0x8)@* +[combineand]@* +.3 <- ((.3 & 0xff) << 0x8)@* +@end quotation +@end ifnothtml + +@node Copying +@appendix Copying +@cindex copyright +@cindex copying conditions + +The majority of the files in the @cic{} distribution are licensed +under the GNU General Public License (version 2 or later), but with +some exceptions. The files @file{ick-wrap.c} and @file{pickwrap.c} +are licensed under a license that allows them to be used for any +purpose and redistributed at will, and are explicitly not GPL'd. This +means that C source code generated by the compiler has the same +copyright conditions as the original @ical{} source. (Note that the +libraries @file{libick.a} and @file{libickmt.a} are GPL, though, so +you cannot redistribute an executable produced by @command{ick} or by +linking a C file to either of those libraries unless the original +@ical{} source was GPL.) Also, this manual, and the files that are +the source code for creating it, are licensed under the GNU Free +Documentation License rather than the GPL, and the licenses themselves +(@file{fdl-1-2.txi} and @file{COPYING.txt}) are licensed under a +license that allows verbatim redistribution but not creation of +derivative works. All other files, though (including the +@command{man} pages, which are not part of @emph{this} manual), are +licensed under the GPL. For the full text of the GPL, see the file +@file{COPYING.txt} in the distribution. + +@menu +* GNU Free Documentation License:: License for copying this manual. +@end menu + +@node GNU Free Documentation License +@appendixsec GNU Free Documentation License +@cindex GFDL +@cindex FDL +@cindex GNU Free Documentation License +@cindex Free Documentation License + +@include fdl-1-2.txi + +@node Main Index +@unnumbered Index + +This is the index of everything in this manual. (Note that in some +versions of the manual this is called @samp{Main Index} to prevent it +transforming into a page called @file{index.html} in the HTML version of +the manual. The complications that that caused were really odd.) + +@printindex cp + +@bye + diff --git a/doc/ickwhile.txt b/doc/ickwhile.txt deleted file mode 100644 index 6edb665..0000000 --- a/doc/ickwhile.txt +++ /dev/null @@ -1,73 +0,0 @@ -A WHILE command starts two threads (the original thread that ran that -command and a new one), one of which runs the command to the left and -one of which runs the command to the right. Any line number applies to -the left-hand command, not the WHILE as a whole, which is a -metalanguage construct. NEXTING FROM, ABSTAINING FROM or similar -behaviour with respect to the WHILE itself is impossible, although -it's certainly possible to abstain from either of its operands or next -from the left operands (and abstaining from the left operand has much -the same effect as abstaining from the WHILE itself; the right-hand -thread deliberately takes a bit of time to get started so that this -behaviour happens). The right-command thread starts just before the -left command is run (so NEXTing, etc., directly to the left command -will not start that loop in the first place); if that command finishes -(which may be almost immediately for something like CALCULATE, or take -a long time for something like NEXT), that thread loops and reruns -that command as long as the left command has not finished; COMING FROM -that command, or a NEXT/NEXT FROM from/aiming at that command, doesn't -count as finishing that command until it is RESUMEd back to (if -possible; if it's come from, that command can never end and the right- -hand loop will continue forever). A WHILE command itself exists across -all threads of a multithreaded program in a way; for each left-hand -command that ends (in any thread), the next time a right-hand command -ends it will cause the thread it's looping in to end, regardless of -whether that thread corresponds to the thread in which the left-hand -command ended. (As well as a right-hand command ending, there's also -the possibility that it never got started; there is a delay before the -right-hand command runs during which a left-hand command ending can -prevent the right-hand thread starting in the first place; this counts -as the same sort of event as terminating a right-hand loop, and can -substitute for it anywhere a right-hand command ending is mentioned.) -There is one exception, in that if two or more left-hand commands end -in a space of time in which no right-hand commands for that WHILE -ends, they together only cause one right-hand command to end. [This -particular behaviour is one of my main concessions to the way the -compiler actually behaves, as opposed to the way it 'ought' to behave -in some sense; it would be more orthogonal and logical to end the same -number of right-hand threads as left-hand threads in this situation, -but as this INTERCAL I'm going with the counterintuitive version of -the behaviour documented here.] - - -The two threads produced by a WHILE (the original thread and a new -copy of it) have more in common than ordinary INTERCAL threads created -by COME FROM; ordinary threads share only ABSTAIN/REINSTATE -information, whereas the WHILE-produced threads count as 'woven' -threads which also share variables and stashes. (They still have -separate instruction pointers, separate IP stacks, such as the NEXT -stack, and separate choicepoint lists. Overloading information in my -current working version of C-INTERCAL (and in the released version -1.26) is shared between all threads, but this is a bug which I intend -to fix before the next release, and weaving ought to also share -overloading information.) Being woven is a relationship between two or -more threads, rather than an attribute of a thread. - - -Ordinary multithreading cannot create woven threads. When threads are -created by multiple COME FROMs from an original thread, which was -woven with at least one other thread, one of the resulting threads (an -implementation can choose to always select the same one, or to -randomize, or use any other means of selection as long as it always -chooses exactly one; I hope to cause this to say 'a random thread' in -the future, to make programming with woven threads more interesting, -but I haven't figured out how to implement that yet) counts as the -'original' thread and remains woven; the rest are 'new' threads which -initially start out with the same data as the original, but are not -woven with anything. Backtracking in a thread causes it to unweave -with any threads it may be woven with at the time (so the data in the -thread that backtracks is set back to the data it, and the threads it -was woven with at the time, had at the time of the MAYBE, but the -other threads continue with the same data as before). The only way to -cause three or more threads to become woven is with a new WHILE inside -one of the threads that is already woven, which causes all the new -threads to be woven together (the weaving relationship is transitive). diff --git a/doc/t.t b/doc/t.t deleted file mode 100644 index a9641f5..0000000 --- a/doc/t.t +++ /dev/null @@ -1,210 +0,0 @@ -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2925: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2818: Cross reference to nonexistent node `C functions in OIL' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2413: Cross reference to nonexistent node `-O+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2254: Cross reference to nonexistent node `MAYBE' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2251: Cross reference to nonexistent node `ABSTAIN' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2248: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2112: Cross reference to nonexistent node `E579' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2014: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1978: Cross reference to nonexistent node `+printflow' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1970: Cross reference to nonexistent node `-p' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1962: Cross reference to nonexistent node `-y' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1919: Cross reference to nonexistent node `-v' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1870: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1832: Cross reference to nonexistent node `-l' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1821: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1719: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1690: Cross reference to nonexistent node `-b' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1669: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1653: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1626: Cross reference to nonexistent node `E621' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1590: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1570: Cross reference to nonexistent node `E275' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1533: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1442: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1351: Cross reference to nonexistent node `E129' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1324: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1290: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1226: Cross reference to nonexistent node `E633' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:964: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:954: Cross reference to nonexistent node `yuk' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:942: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:941: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:834: Cross reference to nonexistent node `GIVE UP' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:816: Cross reference to nonexistent node `E652' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:815: Cross reference to nonexistent node `E256' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:791: Cross reference to nonexistent node `E277' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:782: Cross reference to nonexistent node `E111' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:774: Cross reference to nonexistent node `E405' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:771: Cross reference to nonexistent node `E555' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:769: Cross reference to nonexistent node `COME FROM' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:752: Cross reference to nonexistent node `E774' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:592: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:589: Cross reference to nonexistent node `-H+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:576: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:512: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -make.exe: [ick.inf] Error 1 (ignored) -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -makeinfo: could not open --css-file: ickstyle.css -ick.txi:3064: @include `gpl-2-0.txi': Too many open files (EMFILE). -makeinfo: could not open --css-file: ickstyle.css -ick.txi:3072: @include `fdl-1-2.txi': Too many open files (EMFILE). -makeinfo: could not open --css-file: ickstyle.css -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2925: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2818: Cross reference to nonexistent node `C functions in OIL' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2413: Cross reference to nonexistent node `-O+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2254: Cross reference to nonexistent node `MAYBE' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2251: Cross reference to nonexistent node `ABSTAIN' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2248: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2112: Cross reference to nonexistent node `E579' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2014: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1978: Cross reference to nonexistent node `+printflow' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1970: Cross reference to nonexistent node `-p' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1962: Cross reference to nonexistent node `-y' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1919: Cross reference to nonexistent node `-v' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1870: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1832: Cross reference to nonexistent node `-l' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1821: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1719: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1690: Cross reference to nonexistent node `-b' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1669: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1653: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1626: Cross reference to nonexistent node `E621' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1590: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1570: Cross reference to nonexistent node `E275' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1533: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1442: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1351: Cross reference to nonexistent node `E129' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1324: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1290: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1226: Cross reference to nonexistent node `E633' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:964: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:954: Cross reference to nonexistent node `yuk' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:942: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:941: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:834: Cross reference to nonexistent node `GIVE UP' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:816: Cross reference to nonexistent node `E652' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:815: Cross reference to nonexistent node `E256' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:791: Cross reference to nonexistent node `E277' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:782: Cross reference to nonexistent node `E111' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:774: Cross reference to nonexistent node `E405' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:771: Cross reference to nonexistent node `E555' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:769: Cross reference to nonexistent node `COME FROM' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:752: Cross reference to nonexistent node `E774' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:592: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:589: Cross reference to nonexistent node `-H+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:576: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:512: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -make.exe: [ickhtml] Error 1 (ignored) -ick.txi:155: warning: undefined flag: . -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2925: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2818: Cross reference to nonexistent node `C functions in OIL' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2413: Cross reference to nonexistent node `-O+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2254: Cross reference to nonexistent node `MAYBE' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2251: Cross reference to nonexistent node `ABSTAIN' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2248: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2112: Cross reference to nonexistent node `E579' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2014: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1978: Cross reference to nonexistent node `+printflow' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1970: Cross reference to nonexistent node `-p' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1962: Cross reference to nonexistent node `-y' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1919: Cross reference to nonexistent node `-v' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1870: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1832: Cross reference to nonexistent node `-l' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1821: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1719: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1690: Cross reference to nonexistent node `-b' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1669: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1653: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1626: Cross reference to nonexistent node `E621' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1590: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1570: Cross reference to nonexistent node `E275' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1533: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1442: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1351: Cross reference to nonexistent node `E129' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1324: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1290: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1226: Cross reference to nonexistent node `E633' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:964: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:954: Cross reference to nonexistent node `yuk' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:942: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:941: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:834: Cross reference to nonexistent node `GIVE UP' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:816: Cross reference to nonexistent node `E652' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:815: Cross reference to nonexistent node `E256' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:791: Cross reference to nonexistent node `E277' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:782: Cross reference to nonexistent node `E111' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:774: Cross reference to nonexistent node `E405' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:771: Cross reference to nonexistent node `E555' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:769: Cross reference to nonexistent node `COME FROM' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:752: Cross reference to nonexistent node `E774' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:592: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:589: Cross reference to nonexistent node `-H+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:576: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:512: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -make.exe: [ick.htm] Error 1 (ignored) -ick.txi:155: warning: undefined flag: . -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2925: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2818: Cross reference to nonexistent node `C functions in OIL' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2413: Cross reference to nonexistent node `-O+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2254: Cross reference to nonexistent node `MAYBE' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2251: Cross reference to nonexistent node `ABSTAIN' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2248: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2112: Cross reference to nonexistent node `E579' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:2014: Cross reference to nonexistent node `-h' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1978: Cross reference to nonexistent node `+printflow' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1970: Cross reference to nonexistent node `-p' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1962: Cross reference to nonexistent node `-y' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1919: Cross reference to nonexistent node `-v' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1870: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1832: Cross reference to nonexistent node `-l' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1821: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1719: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1690: Cross reference to nonexistent node `-b' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1669: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1653: Cross reference to nonexistent node `E000' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1626: Cross reference to nonexistent node `E621' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1590: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1570: Cross reference to nonexistent node `E275' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1533: Cross reference to nonexistent node `-m' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1442: Cross reference to nonexistent node `-P+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1351: Cross reference to nonexistent node `E129' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1324: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1290: Cross reference to nonexistent node `-t' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:1226: Cross reference to nonexistent node `E633' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:964: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:954: Cross reference to nonexistent node `yuk' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:942: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:941: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:834: Cross reference to nonexistent node `GIVE UP' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:816: Cross reference to nonexistent node `E652' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:815: Cross reference to nonexistent node `E256' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:791: Cross reference to nonexistent node `E277' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:782: Cross reference to nonexistent node `E111' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:774: Cross reference to nonexistent node `E405' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:771: Cross reference to nonexistent node `E555' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:769: Cross reference to nonexistent node `COME FROM' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:752: Cross reference to nonexistent node `E774' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:592: Cross reference to nonexistent node `-U+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:589: Cross reference to nonexistent node `-H+' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:576: Cross reference to nonexistent node `E778' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `-u' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:513: Cross reference to nonexistent node `E999' (perhaps incorrect sectioning?). -c:/Documents and Settings/Alex/My Documents/esoteric/intercal/ick-0.27/doc//ick.txi:512: Cross reference to nonexistent node `E127' (perhaps incorrect sectioning?). -make.exe: [ick.txt] Error 1 (ignored) diff --git a/doc/tempnote.txt b/doc/tempnote.txt deleted file mode 100644 index 10d237b..0000000 --- a/doc/tempnote.txt +++ /dev/null @@ -1,9 +0,0 @@ -$ flonck -EIGHT FIVE ZERO ZERO ZERO ZERO ZERO ZERO TWO -SEVEN SEVEN ONE ZERO ZERO ZERO ZERO ZERO ONE -THREE -SIX - ____ -dclvCCCLIV -THREE ZERO -$ diff --git a/doc/tidy.cfg b/doc/tidy.cfg new file mode 100644 index 0000000..7167ef1 --- /dev/null +++ b/doc/tidy.cfg @@ -0,0 +1,51 @@ +accessibility-check: 0 +break-before-br: yes +char-encoding: latin1 +doctype: transitional +drop-empty-paras: yes +drop-font-tags: yes +drop-proprietary-attributes: yes +fix-bad-comments: yes +hide-comments: no +hide-endtags: no +indent: yes +indent-attributes: no +indent-cdata: yes +indent-spaces: 2 +input-encoding: latin1 +input-xml: no +join-classes: yes +join-styles: yes +keep-time: no +logical-emphasis: yes +lower-literals: yes +merge-divs: yes +newline: LF +numeric-entities: no +output-bom: no +output-encoding: latin1 +output-html: yes +output-xhtml: no +output-xml: no +punctuation-wrap: no +quiet: yes +quote-ampersand: yes +quote-marks: no +quote-nbsp: yes +repeated-attributes: keep-last +show-errors: 50 +show-warnings: no +split: no +tab-size: 2 +tidy-mark: no +uppercase-attributes: no +uppercase-tags: no +vertical-space: yes +wrap: 78 +wrap-asp: yes +wrap-attributes: no +wrap-jste: yes +wrap-php: yes +wrap-script-literals: no +wrap-sections: no +write-back: yes diff --git a/etc/ctrlmfix.bat b/etc/ctrlmfix.bat index 9bda031..26aef6a 100755 --- a/etc/ctrlmfix.bat +++ b/etc/ctrlmfix.bat @@ -19,3 +19,4 @@ dtou pit\tests\*.i dtou pit\lib\*.doc dtou pit\lib\*.i utod *.bat +utod configdj.sh diff --git a/etc/ctrlmfix.sh b/etc/ctrlmfix.sh index 6dd58f0..7c43962 100755 --- a/etc/ctrlmfix.sh +++ b/etc/ctrlmfix.sh @@ -19,3 +19,4 @@ dtou pit/tests/*.i dtou pit/lib/*.doc dtou pit/lib/*.i utod *.bat +utod configdj.sh \ No newline at end of file diff --git a/etc/intercal.el b/etc/intercal.el index d0239bc..82ecf27 100644 --- a/etc/intercal.el +++ b/etc/intercal.el @@ -20,8 +20,8 @@ ;; AIS: I corrected the READ/WRITE, IN/OUT reversal independent of the correction ;; that happened from 0.22 to 0.24 (this code was originally based on the 0.22 ;; distribution and updated for 0.24 compatibility); this version is distributed -;; with C-INTERCAL 0.25. -;; +;; with C-INTERCAL 0.27. +;; ;; I also altered the code for ( so the user didn't have to go to the beginning ;; of the line, added C-c C-[a,c,r,s] for convenience when working with ;; constants, and added support for TRY AGAIN, ONCE, AGAIN, and Font Lock. @@ -33,7 +33,7 @@ (defconst intercal-politesse-level 4 "Fraction of DOs that are automagically expanded to PLEASE DO.") -(defvar intercal-mode-map nil +(defvar intercal-mode-map nil "Keymap for INTERCAL mode.") (if intercal-mode-map nil @@ -185,17 +185,17 @@ It activates the following abbrevs (each one appropriately modified to a gerund if it occurs on a line with ABSTAIN or REINSTATE). -ab ABSTAIN co COME FROM fo FORGET -gi GIVE UP ig IGNORE ne NEXT -rea READ OUT rei REINSTATE rem REMEMBER -res RESUME ret RETRIEVE st STASH +ab ABSTAIN co COME FROM fo FORGET +gi GIVE UP ig IGNORE ne NEXT +rea READ OUT rei REINSTATE rem REMEMBER +res RESUME ret RETRIEVE st STASH wr WRITE IN pl PLEASE tr TRY AGAIN on ONCE ag AGAIN ma MAYBE goa GO AHEAD gob GO BACK do DO, or sometimes PLEASE DO -cal CALCULATING (only as a gerund) +cal CALCULATING (gerund only) wh WHILE Carriage return takes you to the first tab stop (code indent level). -Certain other single keys are bound to things which may or may not be useful. +Certain other single keys are bound to things which may or may not be useful. You may consider discovering these one of the pleasures awaiting you in your discovery of INTERCAL's unique ambience. @@ -323,8 +323,8 @@ a good idea in long files, which take a long time to update." ;; be abstained from all program. (defvar intercal-font-lock-keywords '(("^\\(([0-9]+)\\|\\)[ \t]*\\(PLEASE DO\\|DO\\|PLEASE\\)[ \t]*\\(NOT\\|N'T\\).*$" . font-lock-comment-face) - ("\\<\\(ABSTAIN\\|GIVE UP\\|READ OUT\\|RESUME\\|WRITE IN\\|PIN\\|COME\\|FROM\\|IGNORE\\|REINSTATE\\|RETRIEVE\\|PLEASE\\|DO\\|MAYBE\\|ONCE\\|AGAIN\\|FORGET\\|NEXT\\|REMEMBER\\|STASH\\|DON'T\\|NOT\\|TRY AGAIN\\|GO AHEAD\\|GO BACK\\)\\>" . font-lock-keyword-face) - ("\\<\\(ABSTAINING\\|GIVING UP\\|READING OUT\\|RESUMING\\|WRITING IN\\|PINNING\\|COMING\\|IGNORING\\|REINSTATING\\|RETRIEVING\\|FORGETTING\\|NEXTING\\|REMEMBERING\\|STASHING\\|TRYING AGAIN\\|CALCULATING\\|GOING AHEAD\\|GOING BACK\\)\\>" . font-lock-builtin-face) + ("\\<\\(ABSTAIN\\|GIVE UP\\|READ OUT\\|RESUME\\|WRITE IN\\|PIN\\|COME\\|FROM\\|IGNORE\\|REINSTATE\\|RETRIEVE\\|PLEASE\\|DO\\|MAYBE\\|ONCE\\|AGAIN\\|FORGET\\|NEXT\\|REMEMBER\\|STASH\\|DON'T\\|NOT\\|TRY AGAIN\\|WHILE\\|GO AHEAD\\|GO BACK\\)\\>" . font-lock-keyword-face) + ("\\<\\(ABSTAINING\\|GIVING UP\\|READING OUT\\|RESUMING\\|WRITING IN\\|PINNING\\|COMING\\|IGNORING\\|REINSTATING\\|RETRIEVING\\|FORGETTING\\|NEXTING\\|REMEMBERING\\|STASHING\\|TRYING AGAIN\\|CALCULATING\\|WHILING\\|GOING AHEAD\\|GOING BACK\\)\\>" . font-lock-builtin-face) ("[.,:;][0-9]+" . font-lock-variable-name-face) ("#[0-9]+\\(\\$#[0-9]+\\|\\)" . font-lock-constant-face)) "Default expressions to highlight in Intercal mode.") @@ -332,13 +332,13 @@ a good idea in long files, which take a long time to update." ;; Find an error message produced by ick. If the famous RESUBNIT spelling error ;; is ever corrected, this will need to be corrected too. (defvar intercal-error-regexp - '("ICL[0-9][0-9][0-9][IW].*\n[ \t]*ON THE WAY TO \\([0-9]+\\)\n[ \t]*\\(CORRECT\\|RECONSIDER\\) SOURCE AND RESUBNIT$" nil 1) + '("\\(ICL[0-9][0-9][0-9][IW].*\\)\n[ \t]*ON THE WAY TO \\([0-9]+\\)\n[ \t]*\\(\\(CORRECT\\)\\|\\(RECONSIDER\\)\\) SOURCE AND RESUBNIT$" nil 2 nil (5 . nil) 1) "Regexp that identifies an INTERCAL error message, and the file and line number positions in it.") ;; Detect the line with which ick was invoked, so the filename used can be ;; used by Emacs' compile-mode to find the error. This will need to be changed ;; if command-line arguments to ick other than letters are allowed. -(defvar intercal-file-regexp '(".*ick \\(-[a-zA-Z]+ \\)*\\(.*i\\)$" 2) +(defvar intercal-file-regexp '(".*ick \\(-[a-zA-Z]+ \\)*\\(.*i\\)$" 2 nil nil 0 2) "Regexp that identifies the line with which ick was invoked, and the filename it was used on.") ;; Helper function for the binary I/O routines. @@ -578,17 +578,23 @@ for the interface it uses." (function (lambda () (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(intercal-font-lock-keywords t)) - (make-local-variable 'compilation-error-regexp-alist) - (setq compilation-error-regexp-alist (cons intercal-error-regexp - compilation-error-regexp-alist)) - (make-local-variable 'compilation-file-regexp-alist) - (setq compilation-file-regexp-alist (cons intercal-file-regexp - compilation-file-regexp-alist)) (make-local-variable 'compile-command) (setq compile-command (concat "ick -O " (buffer-name))) (make-local-variable 'compilation-parse-errors-function) (setq compilation-parse-errors-function 'intercal-error-wrap)))) +;; In recent versions of Emacs this must apparently be set globally; +;; also, the -error-regexp and -file-regexp were merged. +(setq compilation-error-regexp-alist (cons intercal-error-regexp + compilation-error-regexp-alist)) +(if (boundp 'compilation-file-regexp-alist) + (setq compilation-file-regexp-alist (cons intercal-file-regexp + compilation-file-regexp-alist)) + (setq compilation-error-regexp-alist (cons intercal-file-regexp + compilation-error-regexp-alist)) + ) + + ;; AIS: End of section I wrote. ;;; intercal.el ends here diff --git a/include/abcess.h b/include/abcess.h deleted file mode 100644 index e677d46..0000000 --- a/include/abcess.h +++ /dev/null @@ -1,187 +0,0 @@ -/* abcess.h -- functions used by compiled INTERCAL programs */ - -/* AIS note: This header file now serves two purposes. For non-multithread - programs, it serves as headers to the degenerated code and many support - functions. For multithread programs, this header file adds extra functions - only when compiling the degenerated code and unravel.c, and holds its - previous contents during other files. */ - -typedef int bool; -#define TRUE 1 -#define FALSE 0 - -#define ONESPOT 0 -#define TWOSPOT 1 -#define TAIL 2 -#define HYBRID 3 - -#define MAXNEXT 80 /* AIS: Moved from cesspool.c */ - -/* the following two types must both promote to unsigned int in expressions */ - -typedef unsigned short type16; -typedef unsigned int type32; - -typedef struct array_t -{ - unsigned int rank; - unsigned int *dims; - union - { - type16 *tail; - type32 *hybrid; - } data; -} array; - - -/* AIS: For operand overloading, a more complicated data type is needed. */ -typedef struct overop_t -{ - type32 (*get)(type32); - void (*set)(type32, void(*)()); -} overop; - -/* AIS: Moved from cesspool.c */ -typedef struct stashbox_t /* this is a save-stack element */ -{ - unsigned int type; /* variable type */ - unsigned int index; /* variable's index within the type */ - union /* the data itself */ - { - type16 onespot; - type32 twospot; - array *a; - } save; - struct stashbox_t *next; /* pointer to next-older stashbox */ - overop overloadinfo; /* AIS: overloading info is stashed too, in a - non-overloaded program (ignored otherwise) */ -} stashbox; - -/* AIS: files to take input and output from */ -extern FILE* cesspoolin; -extern FILE* cesspoolout; - -/* defined in cesspool.c */ -extern void pushnext(int n); -extern unsigned int popnext(int n); -extern unsigned int resume(unsigned int n); -extern unsigned int pin(void); -extern void clockface(bool mode); -extern void pout(unsigned int val); -extern void binin(unsigned int type, array *a, bool forget); -extern void binout(unsigned int type, array *a); -extern unsigned int assign(char *dest, unsigned int type, bool forget, - unsigned int value); - -/* AIS: yuk and unravel need these */ -extern int* next; -extern int nextindex; -extern stashbox* first; - -/* AIS: Implement the +mystery command line option. */ -extern unsigned long mysteryc; -extern int mystery; -#define MYSTERYLINE if(mystery && mysteryc++ > 4000000000LU) exit(42); - -/* AIS: Handle multiple COME FROMs aiming at the same line */ -extern int multicome0(int errlineno, jmp_buf pc); - -#ifdef _POSIX_SOURCE -extern char *aref(unsigned int type, ...); -extern void resize(unsigned int type, ...); -#else -extern char *aref(); -extern void resize(); -#endif - -extern void stashinit(void); -/* AIS: Added mentions of oo. This is set to 0 in a non-overloaded program. */ -extern void stash(unsigned int type, unsigned int index, void *from, overop* oo); -extern void retrieve(void *to, int type, unsigned int index, bool forget, - overop* oo); -extern unsigned int roll(unsigned int n); - -/* defined in arrgghh.c */ -extern void parseargs(int argc, char **argv); - -/* AIS: Multithreading types and defines */ -#if MULTITHREAD != 0 -typedef struct tag_ickthread ickthread; -struct tag_ickthread -{ - void* varforget[10]; /* holds all four variable types, and forgetting data */ - int* nextstack; - int nextpointer; - jmp_buf pc; /* program counter */ - stashbox* sb; /* holds all stash data */ - ickthread* next; - ickthread* choicepoint; /* the top choicepoint available. Used as a next - pointer in the choicepoint stack. */ - int stale; /* if this is a choicepoint, whether it's a stale choicepoint. */ - int refcount; /* when Threaded INTERCAL and Backtracking INTERCAL are - combined, reference-counting on choicepoints is needed - so that backtracking past multithreading is possible. - This also allows for garbage-collection of choicepoints. - (Luckily, choicepoints cannot refer to themselves, so this - mechanism works.) This only applies to ickthreads that are - acting as choicepoints, not those acting as threads. */ - int ccfc; /* number of comefroms currently active */ - unsigned skipto; /* compucome line number */ - jmp_buf cjb; /* keeps track of compucomes */ - ickthread* dsi; /* which thread's varforget and sb to use */ - ickthread* usesthis; /* for garbage collection purposes */ -}; -extern ickthread* ickmt_cur; /* current thread */ -extern ickthread* ickmt_prev; /* previous thread: an optimisation to make - thread switching O(1), not O(n), with - respect to the number of threads */ -extern int weaving; /* whether to weave newly created threads */ -#define NEXTTHREAD if(printflow) printf("[%d:%lx]",lineno,(unsigned long)\ - ickmt_cur); \ - if(setjmp(cjb) == 0) \ - nextthread(cjb, lineno, 3); - -extern void nextthread(jmp_buf pc, int errlineno, int flags); -extern void killthread(void); -extern void ickmtinit(void); -extern int multicome1(int errlineno, jmp_buf pc); -extern void choicepoint(void); -extern void choiceahead(void); -extern void choiceback(void); - -/* from ick-wrap.c, declare as extern so they can be accessed by cesspool.c, - unravel.c */ -extern int onespotcount; -extern int twospotcount; -extern int tailcount; -extern int hybridcount; - -extern int oldabstain; -extern int gonebackto; -extern int ccfc; -extern unsigned skipto; -extern jmp_buf btjb; -extern jmp_buf cjb; - -#define MULTICOME multicome1 -#else -#define MULTICOME multicome0 -#endif /* MULTITHREAD */ - -/* AIS: Used by the debugger, multithread code */ -#if (MULTITHREAD != 0) || (YUKDEBUG != 0) -extern type16* onespots; -extern bool* oneforget; -extern type32* twospots; -extern bool* twoforget; -extern array* tails; -extern bool* tailforget; -extern array* hybrids; -extern bool* hyforget; -#if (MULTITHREAD != 0) -extern overop* oo_onespots; -extern overop* oo_twospots; -#endif -#endif - -/* abcess.h ends here */ diff --git a/include/fiddle.h b/include/fiddle.h deleted file mode 100644 index a5289bd..0000000 --- a/include/fiddle.h +++ /dev/null @@ -1,23 +0,0 @@ -/* fiddle.h -- functions implementing intercal's operators */ - -extern unsigned int mingle(register unsigned int r, register unsigned int s); -extern unsigned int iselect(register unsigned int r, register unsigned int s); -extern unsigned int and16(unsigned int n), or16(unsigned int n), - xor16(unsigned int n), fin16(unsigned int n); -extern unsigned int whirl16(unsigned int p, unsigned int n); -extern unsigned int and32(unsigned int n), or32(unsigned int n), - xor32(unsigned int n), fin32(unsigned int n); -extern unsigned int whirl32(unsigned int p, unsigned int n); -/* AIS: Reversed operators */ -extern unsigned int rev_and16(unsigned int n), rev_or16(unsigned int n), - rev_xor16(unsigned int n), rev_fin16(unsigned int n); -extern unsigned int rev_whirl16(unsigned int p, unsigned int n); -extern unsigned int rev_and32(unsigned int n), rev_or32(unsigned int n), - rev_xor32(unsigned int n), rev_fin32(unsigned int n); -extern unsigned int rev_whirl32(unsigned int p, unsigned int n); -/* AIS: Optimizer helper operators */ -extern unsigned int xselx(unsigned int x); -extern unsigned int setbitcount(unsigned int x); -extern unsigned int smudgeleft(unsigned int x); -extern unsigned int smudgeright(unsigned int x); -/* fiddle.h ends here */ diff --git a/include/lose.h b/include/lose.h deleted file mode 100644 index 4549ece..0000000 --- a/include/lose.h +++ /dev/null @@ -1,238 +0,0 @@ -/* lose.h --- error message strings */ - -/* - * Note: these error message texts, with one exception, are direct from - * the Princeton compiler (INTERCAL-72) sources (transmitted by Don Woods). - * The one exception is E632, which in INTERCAL-72 had the error message - * PROGRAM ATTEMPTED TO EXIT WITHOUT ERROR MESSAGE - * ESR's "THE NEXT STACK HAS RUPTURED!..." has been retained on the grounds - * that it is more obscure and much funnier. For context, find a copy of - * Joe Haldeman's SF short story "A !Tangled Web", first published in - * Analog magazine in September 1981 and later anthologized in the author's - * "Infinite Dreams" (Ace 1985). - */ -/* An undecodable statement has been encountered in the course of execution. */ -#define E000 "000 %s\n\ - ON THE WAY TO %d\n" -/* An expression contains a syntax error. */ -#define E017 "017 DO YOU EXPECT ME TO FIGURE THIS OUT?\n\ - ON THE WAY TO %d\n" -/* Improper use has been made of statement identifiers. */ -#define E079 "079 PROGRAMMER IS INSUFFICIENTLY POLITE\n\ - ON THE WAY TO %d\n" -/* Improper use has been made of statement identifiers. */ -#define E099 "099 PROGRAMMER IS OVERLY POLITE\n\ - ON THE WAY TO %d\n" -/* Program has attempted 80 levels of NEXTing */ -#define E123 "123 PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON\n\ - ON THE WAY TO %d\n" -/* Program has attempted to transfer to a non-existent line label */ -#define E129 "129 PROGRAM HAS GOTTEN LOST\n\ - ON THE WAY TO WHO KNOWS WHERE\n" -/* An ABSTAIN or REINSTATE statement references a non-existent line label */ -#define E139 "139 I WASN'T PLANNING TO GO THERE ANYWAY\n\ - ON THE WAY TO %d\n" -/* A line label has been multiply defined. */ -#define E182 "182 YOU MUST LIKE THIS LABEL A LOT!\n\ - ON THE WAY TO %d\n" -/* An invalid line label has been encountered. */ -#define E197 "197 SO! 65535 LABELS AREN'T ENOUGH FOR YOU?\n\ - ON THE WAY TO %d\n" -/* An expression involves an unidentified variable. */ -#define E200 "200 NOTHING VENTURED, NOTHING GAINED\n\ - ON THE WAY TO %d\n" -/* An attempt has been made to give an array a dimension of zero. */ -#define E240 "240 ERROR HANDLER PRINTED SNIDE REMARK\n\ - ON THE WAY TO %d\n" -/* Invalid dimensioning information was supplied - * in defining or using an array. */ -#define E241 "241 VARIABLES MAY NOT BE STORED IN WEST HYPERSPACE\n\ - ON THE WAY TO %d\n" -/* A 32-bit value has been assigned to a 16-bit variable. */ -#define E275 "275 DON'T BYTE OFF MORE THAN YOU CAN CHEW\n\ - ON THE WAY TO %d\n" -/* A retrieval has been attempted for an unSTASHed value. */ -#define E436 "436 THROW STICK BEFORE RETRIEVING!\n\ - ON THE WAY TO %d\n" -/* A WRITE IN statement or interleave ($) operation - * has produced value requiring over 32 bits to represent. */ -#define E533 "533 YOU WANT MAYBE WE SHOULD IMPLEMENT 64-BIT VARIABLES?\n\ - ON THE WAY TO %d\n" -/* Insufficient data. (raised by reading past EOF) */ -#define E562 "562 I DO NOT COMPUTE\n\ - ON THE WAY TO %d\n" -/* Input data is invalid. */ -#define E579 "579 WHAT BASE AND/OR LANGUAGE INCLUDES %s?\n\ - ON THE WAY TO %d\n" -/* The expression of a RESUME statement evaluated to #0. */ -#define E621 "621 ERROR TYPE 621 ENCOUNTERED\n\ - ON THE WAY TO %d\n" -/* Program execution terminated via a RESUME statement instead of GIVE UP. */ -#define E632 "632 THE NEXT STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT!\n\ - ON THE WAY TO %d\n" -/* Execution has passed beyond the last statement of the program. */ -#define E633 "633 PROGRAM FELL OFF THE EDGE\n\ - ON THE WAY TO THE NEW WORLD\n" -/* A compiler error has occurred (see section 8.1). */ -#define E774 "774 RANDOM COMPILER BUG\n\ - ON THE WAY TO %d\n" -/* An unexplainable compiler error has occurred (see J. Lyon or D. Woods). */ -#define E778 "778 UNEXPLAINED COMPILER BUG\n\ - ON THE WAY TO %d\n" - -/* - * These errors are unique to C-INTERCAL. - */ -/* You tried to use a C-INTERCAL extension with the `traditional' flag on */ -#define E111 "111 COMMUNIST PLOT DETECTED, COMPILER IS SUICIDING\n\ - ON THE WAY TO %d\n" -/* Cannot find the magically included system library */ -#define E127 "127 SAYING 'ABRACADABRA' WITHOUT A MAGIC WAND WON'T DO YOU ANY GOOD\n\ - ON THE WAY TO THE CLOSET\n" -/* Out of stash space */ -#define E222 "222 BUMMER, DUDE!\n\ - ON THE WAY TO %d\n" -/* (AIS) Can't reverse an expression in an assignment. This is the - same error number as in CLC-INTERCAL, but the message is different. */ -#define E277 "277 YOU CAN ONLY DISTORT THE LAWS OF MATHEMATICS SO FAR\n\ - ON THE WAY TO %d\n" -/* (AIS) The spark/ears nesting is too deep. */ -#define E281 "281 THAT MUCH QUOTATION AMOUNTS TO PLAGIARISM\n\ - ON THE WAY TO %d\n" -/* Too many variables. */ -#define E333 "333 YOU CAN'T HAVE EVERYTHING, WHERE WOULD YOU PUT IT?\n\ - ON THE WAY TO %d\n" -/* (AIS, from the suggestion by Malcom Ryan) - GO BACK or GO AHEAD was executed without a choicepoint. */ -#define E404 "404 I'M ALL OUT OF CHOICES!\n\ - ON THE WAY TO %d\n" -/* (AIS) WHILE, MAYBE, GO BACK, or GO AHEAD used without the -m option. */ -#define E405 "405 PROGRAM REJECTED FOR MENTAL HEALTH REASONS\n\ - ON THE WAY TO %d\n" -/* A COME FROM statement references a non-existent line label. */ -#define E444 "444 IT CAME FROM BEYOND SPACE\n\ - ON THE WAY TO %d\n" -/* More than one COME FROM references the same label. */ -#define E555 "555 FLOW DIAGRAM IS EXCESSIVELY CONNECTED\n\ - ON THE WAY TO %d\n" -/* Too many source lines. */ -#define E666 "666 COMPILER HAS INDIGESTION\n\ - ON THE WAY TO %d\n" -/* No such source file. */ -#define E777 "777 A SOURCE IS A SOURCE, OF COURSE, OF COURSE\n\ - ON THE WAY TO %d\n" -/* Can't open C output file */ -#define E888 "888 I HAVE NO FILE AND I MUST SCREAM\n\ - ON THE WAY TO %d\n" -/* Can't open C skeleton file. */ -#define E999 "999 NO SKELETON IN MY CLOSET, WOE IS ME!\n\ - ON THE WAY TO %d\n" -/* Source file name with invalid extension (use .i or .[3-7]i). */ -#define E998 "998 EXCUSE ME,\n\ - YOU MUST HAVE ME CONFUSED WITH SOME OTHER COMPILER\n" -/* Illegal possession of a controlled unary operator. */ -#define E997 "997 ILLEGAL POSSESSION OF A CONTROLLED UNARY OPERATOR.\n\ - ON THE WAY TO %d\n" -/* (AIS) Command found after TRY AGAIN. */ -#define E993 "993 I GAVE UP LONG AGO\n\ - ON THE WAY TO %d\n" -/* (AIS) Memory allocation failure during multithreading */ -#define E991 "991 YOU HAVE TOO MUCH ROPE TO HANG YOURSELF\n\ - ON THE WAY TO %d\n" -/* (AIS) Unimplemented feature used. This should never come up, hopefully. */ -#define E995 "995 DO YOU REALLY EXPECT ME TO HAVE IMPLEMENTED THAT?\n\ - ON THE WAY TO %d\n" -/* - * AIS: These errors are specific to PIC-INTERCAL - */ -/* (AIS) Attempted to use an unsupported language feature. */ -#define E256 "256 THAT'S TOO HARD FOR MY TINY BRAIN\n\ - ON THE WAY TO %d\n" - -/* (AIS) Attempted to use a PIC feature in a non-PIC program. */ -#define E652 "652 HOW DARE YOU INSULT ME!\n\ - ON THE WAY TO %d\n" - -/* - * AIS: These errors are generated by the yuk debugger - */ -/* (AIS) fgets' buffer overflowed on debugger comand input. */ -#define E810 "810 ARE ONE-CHARACTER COMMANDS TOO SHORT FOR YOU?\n\ - ON THE WAY TO %d\n" - -/* (AIS) Too many breakpoints. */ -#define E811 "811 PROGRAM IS TOO BADLY BROKEN TO RUN\n\ - ON THE WAY TO %d\n" - -/* - * (AIS) Warnings produced by -l. - */ - -/* (AIS) Non-INTERCAL-72 identifier used. */ -#define W112 "112 THAT RELIES ON THE NEW WORLD ORDER\n\ - ON THE WAY TO %d\n" - -/* (AIS) That stupid idiom in syslib was used. */ -#define W128 "128 SYSLIB IS OPTIMIZED FOR OBFUSCATION\n\ - ON THE WAY TO %d\n" - -/* (AIS) Possibly nonportable unary operator. */ -#define W534 "534 KEEP LOOKING AT THE TOP BIT\n\ - ON THE WAY TO %d\n" - -/* (AIS) Expression still contains INTERCAL operators after - optimization. Only in binary, because this nearly always - happens in the higher bases. Syslib causes quite a lot of - these. This warning is fine on INTERCAL-like lines, but - flags a mistake on lines that are meant to be translations - of C. */ -#define W018 "018 THAT WAS MEANT TO BE A JOKE\n\ - ON THE WAY TO %d\n" - -/* (AIS) Possible misplaced unary operator. At the moment, ick -l cannot - detect this condition (so it never comes up). It's meant to detect - expressions like '?"?.1~#256"$#2'~#3 (from numio.i); in this expression, - the second what has no effect (it changes only the msb of the immediately - surrounding expression, which is eventually filtered out by the select - against #3). But detecting this would probably require code that could - check which bits of a result were going to be used elsewhere in an - expression, which is something I haven't written yet (but would make - a decent optimize_pass3). */ -#define W016 "016 DON'T TYPE THAT SO HASTILY\n\ - ON THE WAY TO %d\n" - -/* (AIS) Possibly overflowing assignment or mingle. Syslib causes some of - these too, in complicated situations where the bugcatcher can't figure - out what's happening, and also in a few blatant statements in the mould - of DO .3 <- :3, which are quite clearly possible overflows. Strangely - enough, there's a commented-out section of code in feh.c that suggests - that someone tried to make this an error (using a more general check - which would have caught more correct code involving GETS, but none - involving $). As a middle ground, I've made it an -l warning. */ -#define W276 "276 YOU CAN'T EXPECT ME TO CHECK BACK THAT FAR\n\ - ON THE WAY TO %d\n" - -/* (AIS) A line will inevitably cause an expression-reversal failure. */ -#define W278 "278 FROM A CONTRADICTION, ANYTHING FOLLOWS\n\ - ON THE WAY TO A HUGE DISASTER\n" - -/* (AIS) The two following warnings are both compile-time traps for - near-certain runtime errors. As such, they have similar numbers - and similar messages. In fact, they're a shameless ripoff of the - originals, but should serve as a reminder for anyone aware of the - original messages. */ -/* (AIS) Dimension given for an array will come out as #0. */ -#define W239 "239 WARNING HANDLER PRINTED SNIDE REMARK\n\ - ON THE WAY TO %d\n" - -/* (AIS) RESUME argument will come out as #0. */ -#define W622 "622 WARNING TYPE 622 ENCOUNTERED\n\ - ON THE WAY TO %d\n" - -extern int lineno; - -extern void lose(char *m, int n, char *s); - -extern void lwarn(char *m, int n, char *s); - -/* lose.h ends here */ diff --git a/include/syslib.3i b/include/syslib.3i deleted file mode 100644 index 44b3ba9..0000000 --- a/include/syslib.3i +++ /dev/null @@ -1,323 +0,0 @@ - PLEASE KNOCK THREE TIMES BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '^.1$.2'~'#0$#29524' - DO .6 <- '?"'V"'&.1$.2'~'#0$#29524'"$#29524' - ~'#0$#29524'"$#29524'~'#0$#29524' - PLEASE DO .5 <- 'V".6~#39366"$#1'~#1 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- 'V"!6~.6'~#2"$#1'~#1 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#9841$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?#59048$.2'~'#0$#29524' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- 'V"!1~.2'$#1"'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#29524' - DO (1022) NEXT - DO .2 <- !2$#0'~'#9841$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#29524 - PLEASE DO .5 <- :1~'#29403$#29403' - DO .5 <- 'V"!5~.5'~#2"$#1'~#1 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#29403$#29403' - DO .5 <- 'V"!5~.5'~#2"$#1'~#1 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#29524 - PLEASE DO .2 <- :2~#29524 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#29403$#29403' - DO .2 <- :2~'#29403$#29403' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '&.6$.4' - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?#59048$":2~'#29524$#0'"'~'#0$#29524'" - $"'?#59048$":2~'#0$#29524'"'~'#0$#29524'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#22143 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#22143"'~'#0$#29524' - DO .3 <- .1~#7381 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#7381"'~'#0$#29524'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"'"!3$#0'~'#9841$#1'"$#0'~'#3280$#4'" - $#0'~'#3280$#4' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .3 + .5 - DO :1 <- #0 - DO :2 <- .2 - DO .3 <- #1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- '@"'^".1~.3"$#7'~#4"$#2'~#10 - DO (1534) NEXT - DO (1500) NEXT - DO :1 <- :3 - DO (1536) NEXT - (1534) DO (1531) NEXT - (1536) DO (1500) NEXT - DO :1 <- :3 - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #2 - DO .3 <- !3$#0'~'#9841$#1' - DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' - ~'#9841$#1'" - PLEASE DO .5 <- 'V"!3~.3'~#2"$#1'~#1 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - PLEASE RETRIEVE :2 + :3 + .3 + .5 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#29524 - PLEASE DO .2 <- :2~'#29403$#29403' - DO .5 <- :1~'#29403$#29403' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#29524 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#29403$#29403'"$":4~'#29403 - $#29403'" - DO .5 <- ':1~:1'~#2 - DO .2 <- :2~'#29403$#29403' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#2"$.5'~#4 - DO .1 <- :3~#29524 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#29524 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$":4~#1"'~#31 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$":4~#1"'~#274 - DO .5 <- !5~.5'~#1 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :4 + :5 + :6 + .5 - DO :3 <- #0 - DO .5 <- 'V"':2~:2'~#2"$#1'~#1 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#39366$#0"'"$#1'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' - ~'#9841$#1'" - PLEASE DO :4 <- ":4~'#0$#29524'"$"'":4~'#9841 - $#0'"$#0'~'#9841$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 - ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ - "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ - #29524'"'~'#0$#29524'"'~'#0$#29524'" - DO :5 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' - ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ - #29524'"'~'#0$#59048'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#29524$#0'"$ - #19683'~'#0$#29524'"$"'?:5~:5'~'#9841$#0'"' - ~'#19683$#9841'"$"'?:5~:5'~'#0$#29524'"'" - ~#1'$#1"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 - ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ - "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ - #29524'"'~'#0$#29524'"'~'#0$#29524'" - DO :3 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' - ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ - #29524'"'~'#0$#59048'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#29524$#0'"$ - #19683'~'#0$#29524'"$"'?:3~:3'~'#9841$#0'"' - ~'#19683$#9841'"$"'?:3~:3'~'#0$#29524'"'" - ~#1'$#1"~#1 - DO (1557) NEXT - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :3 <- "'V":4~'#59048$#0'"$":5~'#29524$#0'"' - ~'#0$#29524'"$"'V":4~'#0$#59048'"$":5~'#0$ - #29524'"'~'#0$#29524'" - PLEASE DO (1555) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :3 <- "'V":4~'#29524$#0'"$":5~'#29524$#0'"' - ~'#0$#29524'"$"'V":4~'#0$#29524'"$":5~'#0$ - #29524'"'~'#0$#29524'" - PLEASE DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) PLEASE FORGET #1 - DO .5 <- "?':4~#2'$#1"~#1 - DO (1551) NEXT - DO :2 <- :2~'#29524$#29523' - DO :4 <- :4~'#29524$#29523' - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .5 - PLEASE RESUME #2 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#29524' - DO %50 .1 <- '^.1$.2'~'#0$#29524' - (1903) PLEASE FORGET #1 - DO .2 <- !2$#0'~'#9841$#1' - PLEASE DO .5 <- 'V"!2~.2'~#2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #59037 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET THREE FROM HERE - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#2"$#1'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #29524 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#29403$#29403' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/syslib.4i b/include/syslib.4i deleted file mode 100644 index 1710a1f..0000000 --- a/include/syslib.4i +++ /dev/null @@ -1,354 +0,0 @@ - PLEASE KNOCK TWICE TWO TIMES BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '^.1$.2'~'#0$#21845' - DO .6 <- '?"'V"'&.1$.2'~'#0$#21845'"$"'^"'@.1$ - .2'~'#0$#21845'"$#21845'~'#0$#43690'"' - ~'#0$#21845'"$#43690'~'#0$#21845' - PLEASE DO .5 <- '?".6~#49152"$#4'~#4 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- '?"!6~.6'~#3"$#4'~#4 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#5461$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?#65535$.2'~'#0$#21845' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- '?"'V".1~.2"$#2'~#1"$#1'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#21845' - DO (1022) NEXT - DO .2 <- !2$#0'~'#5461$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#21845 - PLEASE DO .5 <- :1~'#21760$#21760' - DO .5 <- '?"!5~.5'~#3"$#4'~#4 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#21760$#21760' - DO .5 <- '?"!5~.5'~#3"$#4'~#4 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1200) DO .2 <- '^.1$.1'~'#0$#21845' - DO .3 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .2 <- '^.2$"!3$#0'~'#5461$#1'"'~'#0$#21845' - DO .3 <- .3~#16384 - PLEASE RESUME #1 - (1210) DO .2 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .3 <- '^.1$.1'~'#0$#21845' - DO .2 <- '^.2$".3~#21844"'~'#0$#21845' - DO .3 <- .3~#1 - PLEASE RESUME #1 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#21845 - PLEASE DO .2 <- :2~#21845 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#21760$#21760' - DO .2 <- :2~'#21760$#21760' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '&.6$.4' - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?#65535$":2~'#21845$#0'"'~'#0$#21845'"$ - "'?#65535$":2~'#0$#21845'"'~'#0$#21845'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#17476 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#17476"'~'#0$#21845' - DO .3 <- .1~#4369 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#4369"'~'#0$#21845'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"'"!3$#0'~'#5461$#1'"$#0'~'#5461$#1'"$ - #0'~'#1365$#5' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .1 + .2 + .3 - DO :3 <- #0 - DO :2 <- .1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .3 <- '?"!2~.2'~#3"$#4'~#4 - DO (1532) NEXT - DO .1 <- .2 - DO (1210) NEXT - DO .3 <- 'V.3$#1'~#1 - DO (1531) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1534) NEXT - (1533) DO FORGET #1 - DO :1 <- :2 - DO (1700) NEXT - DO (1535) NEXT - (1534) PLEASE RESUME .3 - (1532) DO (1534) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#21845 - PLEASE DO .2 <- :2~'#21760$#21760' - DO .5 <- :1~'#21760$#21760' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#21845 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#21760$#21760'"$":4 - ~'#21760$#21760'" - DO .5 <- ':1~:1'~#3 - DO .2 <- :2~'#21760$#21760' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#3"$.5'~#5 - DO .1 <- :3~#21845 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#21845 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#69 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#1093 - DO .5 <- '?"!5~.5'~#1"$#1'~#1 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :1 + :4 + :5 + :6 + .1 + .5 - DO :3 <- #0 - DO .5 <- '?"':2~:2'~#3"$#4'~#4 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?#0$"'V"'@":2~'#16384$#0'"$#3'~#1"$#2' - ~#1"'~#1 - DO (1552) NEXT - DO :5 <- :2 - DO :1 <- :4 - PLEASE DO (1700) NEXT - DO :4 <- :2 - DO :1 <- :5 - PLEASE DO (1700) NEXT - DO (1553) NEXT - (1552) DO (1001) NEXT - DO RETRIEVE :1 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#21845$#0'"$"'?#65535$":1 - ~'#21845$#0'"'~'#0$#21845'"'~'#0$#21845'"$ - "'&":2~'#0$#21845'"$"'?#65535$":1~'#0$ - #21845'"'~'#0$#21845'"'~'#0$#21845'" - DO :6 <- "'?"'V":6~'#21845$#0'"$#21845'~'#0$ - #21845'"$#21845'~'#0$#65535'"$"'?"'V":6 - ~'#0$#21845'"$#21845'~'#0$#21845'"$#21845' - ~'#0$#65535'" - DO :5 <- "'?":1~'#21845$#0'"$":2~'#21845$#0'"' - ~'#0$#65535'"$"'?":1~'#0$#21845'"$":2~'#0$ - #21845'"'~'#0$#65535'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#21845$#0'"$ - #16384'~'#0$#21845'"$"'?:5~:5'~'#5461$#0'"' - ~'#16384$#5461'"$"'?:5~:5'~'#0$#21845'"'" - ~#1'$#2"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :3 <- "'^":4~'#21845$#0'"$":5~'#21845$#0'"' - ~'#0$#21845'"$"'^":4~'#0$#21845'"$":5~'#0$ - #21845'"'~'#0$#21845'" - DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) DO FORGET #1 - DO .5 <- 'V":4~#1"$"'?#2$":4~#1"'~#1"'~#1 - DO (1551) NEXT - DO :5 <- :1 - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :5 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1700) PLEASE STASH .2 - DO .1 <- :1~'#0$#21845' - DO .2 <- :1~'#21845$#0' - DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ - #21845'" - DO .1 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .2 <- '?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO :2 <- "'^":2~'#21845$#0'"$.1'~'#0$#21845'"$ - "'^":2~'#0$#21845'"$"'.2$#0'~'#5461$#1'"' - ~'#0$#21845'" - DO .1 <- .2~#16384 - PLEASE RETRIEVE .2 - PLEASE RESUME #1 - (1710) PLEASE STASH :1 + .2 - DO .1 <- :1~'#0$#21845' - DO .2 <- :1~'#21845$#0' - DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ - #21845'" - DO :1 <- "'?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' - ~'#0$#21845'"'~'#0$#21845'"$"'?"'@.1$#0' - ~'#0$#21845'"$"'@.1$#65535'~'#0$#21845'"' - ~'#0$#21845'" - DO .1 <- :2~#1 - DO :2 <- "'^":1~'#21845$#0'"$":2~'#0$#21844'"' - ~'#0$#21845'"$"'^":1~'#0$#21845'"$":2 - ~'#21845$#0'"'~'#0$#21845'" - PLEASE RETRIEVE :1 + .2 - PLEASE RESUME #1 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) PLEASE FORGET #1 - DO %50 .1 <- 'V.1$.2'~'#0$#21845' - DO %50 .1 <- '^.1$".2~#43690"'~'#0$#21845' - DO .2 <- !2$#0'~'#5461$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #65524 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET ANYWHERE FROM HERE - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#3"$#2'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #32768 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#21760$#21760' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/syslib.5i b/include/syslib.5i deleted file mode 100644 index c768250..0000000 --- a/include/syslib.5i +++ /dev/null @@ -1,355 +0,0 @@ - PLEASE KNOCK "SHAVE-AND-A-HAIRCUT" BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '^.1$.2'~'#0$#3906' - DO .6 <- '?"'V"'&.1$.2'~'#0$#3906'"$"'^"'@.1$ - .2'~'#0$#3906'"$#3906'~'#0$#11718'"' - ~'#0$#3906'"$#11718'~'#0$#3906' - PLEASE DO .5 <- "?!6~#12500'$#5"~#5 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- '?"!6~.6'~#4"$#5'~#5 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#781$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?#15624$.2'~'#0$#3906' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- '?"'V".1~.2"$#3'~#1"$#2'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#3906' - DO (1022) NEXT - DO .2 <- !2$#0'~'#781$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#3906 - PLEASE DO .5 <- :1~'#3875$#3875' - DO .5 <- '?"!5~.5'~#4"$#5'~#5 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#3875$#3875' - DO .5 <- '?"!5~.5'~#4"$#5'~#5 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#3906 - PLEASE DO .2 <- :2~#3906 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#3875$#3875' - DO .2 <- :2~'#3875$#3875' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '&.6$.4' - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?#15624$":2~'#3906$#0'"'~'#0$#3906'"$ - "'?#15624$":2~'#0$#3906'"'~'#0$#3906'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#3255 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#3255"'~'#0$#3906' - DO .3 <- .1~#651 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#651"'~'#0$#3906'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#781$#1'"$#0'~'#156$#6' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 - DO :3 <- #0 - DO :4 <- .2 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- '?".1~#4"$#5'~#5 - DO (1531) NEXT - DO :1 <- :4 - DO (1720) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #1 - DO .1 <- .1~#3905 - DO :4 <- ":4~'#0$#3906'"$"'":4~'#781$#0'"$#0' - ~'#781$#1'" - PLEASE DO .5 <- '?"!1~.1'~#4"$#5'~#5 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .5 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#3906 - PLEASE DO .2 <- :2~'#3875$#3875' - DO .5 <- :1~'#3875$#3875' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#3906 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#3875$#3875'"$":4 - ~'#3875$#3875'" - DO .5 <- ':1~:1'~#4 - DO .2 <- :2~'#3875$#3875' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#4"$.5'~#6 - DO .1 <- :3~#3906 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#3906 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#131 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#3256 - DO .5 <- '?"!5~.5'~#1"$#2'~#1 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :4 + :5 + :6 + .1 + .5 - DO :5 <- #0 - DO .5 <- '?"':2~:2'~#4"$#5'~#5 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#12500$#0"'"$#3'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#3906'"$"'":2~'#781$#0'"$#0' - ~'#781$#1'" - PLEASE DO :4 <- ":4~'#0$#3906'"$"'":4~'#781 - $#0'"$#0'~'#781$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - DO .1 <- #0 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#3906$#0'"$"'?#15624$":1 - ~'#3906$#0'"'~'#0$#3906'"'~'#0$#3906'"$ - "'&":2~'#0$#3906'"$"'?#15624$":1~'#0$ - #3906'"'~'#0$#3906'"'~'#0$#3906'" - DO :6 <- "'?"'V":6~'#3906$#0'"$#7812'~'#0$ - #3906'"$#7812'~'#0$#15624'"$"'?"'V":6 - ~'#0$#3906'"$#7812'~'#0$#3906'"$#7812' - ~'#0$#15624'" - DO :3 <- "'?":1~'#3906$#0'"$":2~'#3906$#0'"' - ~'#0$#15624'"$"'?":1~'#0$#3906'"$":2~'#0$ - #3906'"'~'#0$#15624'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#3906$#0'"$ - #3125'~'#0$#3906'"$"'?:3~:3'~'#781$#0'"' - ~'#3125$#781'"$"'?:3~:3'~'#0$#3906'"'"~#1'$ - #3"~#1 - PLEASE DO (1557) NEXT - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO .5 <- '?#0$"'V.1$#3'~#1"'~#1 - DO (1557) NEXT - DO .1 <- '^.1$#3906'~'#0$#3906' - DO (1556) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :5 <- "'V":4~'.1$#0'"$":5~'#3906$#0'"' - ~'#0$#3906'"$"'V":4~'#0$.1'"$":5~'#0$ - #3906'"'~'#0$#3906'" - DO .5 <- "?#2$':4~#1'"~#1 - DO (1551) NEXT - DO :2 <- :2~'#3906$#3905' - DO :4 <- :4~'#3906$#3905' - DO .1 <- #0 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - DO :3 <- :5 - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 - DO :2 <- #0 - DO .2 <- #0 - DO .5 <- '?".1~#4"$#5'~#5 - DO (1729) NEXT - DO .5 <- .1~#1 - DO .2 <- :1~'#3906$#0' - DO .1 <- :1~'#0$#3906' - PLEASE DO (1724) NEXT - DO :1 <- '"?#0$.2"~"#0$#3906"'$'"?#0$.1"~"#0$ - #3906"' - DO :2 <- '"?'"V.2$#3906"~"#0$#3906"'$ - #3906"~"#0$#3906"'$'"?'"V.1$#3906" - ~"#0$#3906"'$#3906"~"#0$#3906"' - DO (1728) NEXT - (1724) PLEASE DO (1723) NEXT - DO :1 <- '"?#0$'"^.2$.2"~"#0$#3906"'"~"#0$#3906"'$ - '"?#0$'"^.1$.1"~"#0$#3906"'"~"#0$#3906"' - DO :2 <- '"?'"V'"@.2$#11718"~"#0$#3906"'$#7812" - ~"#0$#3906"'$#7812"~"#0$#3906"'$'"?'"V'"@.1$ - #11718"~"#0$#3906"'$#7812"~"#0$#3906"'$#7812" - ~"#0$#3906"' - (1728) DO .2 <- :2~'#3125$#0' - DO :2 <- ':2~"#0$#3906"'$'"':2~"#781$#0"'$#0" - ~"#781$#1"' - DO (1509) NEXT - DO :2 <- :3 - DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 - DO (1721) NEXT - (1723) PLEASE DO (1722) NEXT - DO :1 <- '"^.2$.2"~"#0$#3906"'$'"^.1$.1"~"#0$ - #3906"' - DO :2 <- '"?'"V'"2@.2$#15624"~"#0$#3906"'$ - #11718"~"#0$#3906"'$#11718"~"#0$#3906"'$ - '"?'"V'"2@.1$#15624"~"#0$#3906"'$#11718" - ~"#0$#3906"'$#11718"~"#0$#3906"' - PLEASE FORGET #2 - DO (1728) NEXT - (1729) DO (1001) NEXT - DO (1721) NEXT - (1722) PLEASE DO (1001) NEXT - DO :2 <- :1 - DO .2 <- #0 - DO FORGET #1 - (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 - PLEASE RESUME #3 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO %20 (1903) NEXT - DO .1 <- 'V.1$.2'~'#0$#3906' - DO %50 .1 <- '^.1$".2~#7812"'~'#0$#3906' - DO %50 .1 <- '^.1$.2'~'#0$#3906' - PLEASE DO (1903) NEXT - (1903) PLEASE FORGET #2 - DO .2 <- !2$#0'~'#781$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #15613 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET SOMETHING FROM NOTHING - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#4"$#3'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #7812 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#3875$#3875' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/syslib.6i b/include/syslib.6i deleted file mode 100644 index 43e5f52..0000000 --- a/include/syslib.6i +++ /dev/null @@ -1,373 +0,0 @@ - PLEASE KNOCK THRICE TWO TIMES BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '^.1$.2'~'#0$#9331' - DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#9331'"$"'^"'@.1$ - .2'~'#0$#9331'"$#9331'~'#0$#9331'"'~'#0$ - #9331'"$"'^"'2@.1$.2'~'#0$#9331'"$#18662' - ~'#0$#9331'"'~'#0$#37324'"$#37324'~'#0$#9331' - PLEASE DO .5 <- "?!6~#38880'$#6"~#6 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- '?"!6~.6'~#5"$#6'~#6 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#1555$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?#46655$.2'~'#0$#9331' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- '?"'V".1~.2"$#4'~#1"$#3'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#9331' - DO (1022) NEXT - DO .2 <- !2$#0'~'#1555$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#9331 - PLEASE DO .5 <- :1~'#9288$#9288' - DO .5 <- '?"!5~.5'~#5"$#6'~#6 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#9288$#9288' - DO .5 <- '?"!5~.5'~#5"$#6'~#6 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1200) DO .2 <- '^.1$.1'~'#0$#9331' - DO .3 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO .2 <- '^.2$"!3$#0'~'#1555$#1'"'~'#0$#9331' - DO .3 <- .3~#7776 - PLEASE RESUME #1 - (1210) DO .2 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ - #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331' - DO .3 <- '^"'^.1$.1'~'#0$#9331'"$.1'~'#0$#9331' - DO .2 <- '^.2$".3~#9330"'~'#0$#9331' - DO .3 <- .3~#1 - PLEASE RESUME #1 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#9331 - PLEASE DO .2 <- :2~#9331 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#9288$#9288' - DO .2 <- :2~'#9288$#9288' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '&.6$.4' - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?#46655$":2~'#9331$#0'"'~'#0$#9331'"$ - "'?#46655$":2~'#0$#9331'"'~'#0$#9331'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#7998 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#7998"'~'#0$#9331' - DO .3 <- .1~#1333 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#1333"'~'#0$#9331'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#1555$#1'"$#0'~'#259$#7' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .1 + .2 + .3 - DO :3 <- #0 - DO :2 <- .1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .3 <- '?"!2~.2'~#5"$#6'~#6 - DO (1532) NEXT - DO .1 <- .2 - DO (1210) NEXT - DO .3 <- '?#1$".3~#5"'~#1 - DO (1531) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1534) NEXT - (1533) DO FORGET #1 - DO :1 <- :2 - DO (1700) NEXT - DO (1535) NEXT - (1534) PLEASE RESUME .3 - (1532) DO (1534) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#9331 - PLEASE DO .2 <- :2~'#9288$#9288' - DO .5 <- :1~'#9288$#9288' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#9331 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#9288$#9288'"$":4 - ~'#9288$#9288'" - DO .5 <- ':1~:1'~#5 - DO .2 <- :2~'#9288$#9288' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#5"$.5'~#7 - DO .1 <- :3~#9331 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#9331 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#223 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#7999 - DO .5 <- '?"!5~.5'~#1"$#3'~#1 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :1 + :4 + :5 + :6 + .1 + .5 - DO :3 <- #0 - DO .5 <- '?"':2~:2'~#5"$#6'~#6 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?#0$"'V"'2@":2~'#7776$#0'"$#5'~#1"$#4' - ~#1"'~#1 - DO (1552) NEXT - DO :5 <- :2 - DO :1 <- :4 - PLEASE DO (1700) NEXT - DO :4 <- :2 - DO :1 <- :5 - PLEASE DO (1700) NEXT - DO (1553) NEXT - (1552) DO (1001) NEXT - DO RETRIEVE :1 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#9331$#0'"$"'?#46655$":1 - ~'#9331$#0'"'~'#0$#9331'"'~'#0$#9331'"$ - "'&":2~'#0$#9331'"$"'?#46655$":1~'#0$ - #9331'"'~'#0$#9331'"'~'#0$#9331'" - DO :5 <- "'?":1~'#9331$#0'"$":2~'#9331$#0'"' - ~'#0$#9331'"$"'?":1~'#0$#9331'"$":2~'#0$ - #9331'"'~'#0$#9331'" - DO :6 <- "'&":6~'#9331$#0'"$":5~'#9331$#0'"' - ~'#0$#9331'"$"'&":6~'#0$#9331'"$":5~'#0$ - #9331'"'~'#0$#9331'" - DO :5 <- :5~'#46655$#46655' - DO :6 <- "'?"'V":6~'#9331$#0'"$#27993'~'#0$ - #9331'"$#27993'~'#0$#46655'"$"'?"'V":6 - ~'#0$#9331'"$#27993'~'#0$#9331'"$#27993' - ~'#0$#46655'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#9331$#0'"$ - #7776'~'#0$#9331'"$"'?:5~:5'~'#1555$#0'"' - ~'#7776$#1555'"$"'?:5~:5'~'#0$#9331'"'"~#1'$ - #4"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO :2 <- :5 - DO :5 <- :3 - DO (1500) NEXT - DO :2 <- :4 - DO :4 <- :1 - DO :1 <- :5 - DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) DO FORGET #1 - DO .5 <- '?#2$"'@#0$":4~#1"'~#1"'~#1 - DO (1551) NEXT - DO :5 <- :1 - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :5 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1700) PLEASE STASH .2 - DO .1 <- :1~'#0$#9331' - DO .2 <- :1~'#9331$#0' - DO :2 <- "'^.2$.2'~'#0$#9331'"$"'^.1$.1'~'#0$ - #9331'" - DO .1 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO .2 <- '?"'2@.2$#0'~'#0$#9331'"$"'2@.2$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO :2 <- "'^":2~'#9331$#0'"$.1'~'#0$#9331'"$"'^":2 - ~'#0$#9331'"$"'.2$#0'~'#1555$#1'"'~'#0$#9331'" - DO .1 <- .2~#7776 - PLEASE RETRIEVE .2 - PLEASE RESUME #1 - (1710) PLEASE STASH :1 + .2 - DO .2 <- :1~'#9331$#0' - DO .1 <- :1~'#0$#9331' - DO :2 <- "'^"'^.2$.2'~'#0$#9331'"$.2'~'#0$ - #9331'"$"'^"'^.1$.1'~'#0$#9331'"$.1'~'#0$ - #9331'" - DO .1 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ - #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331' - DO :1 <- "'^"'?"'@.2$#0'~'#0$#9331'"$"'@.2$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.2$#0'~'#0$ - #9331'"$"'3@.2$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331'"$.1 - DO .1 <- :2~#1 - DO :2 <- "'^":1~'#9331$#0'"$":2~'#0$#9330'"' - ~'#0$#9331'"$"'^":1~'#0$#9331'"$":2~'#9331$ - #0'"'~'#0$#9331'" - PLEASE RETRIEVE :1 + .2 - PLEASE RESUME #1 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#9331' - DO %50 .1 <- '^.1$.2'~'#0$#9331' - (1903) PLEASE FORGET #1 - DO %50 .1 <- '^.1$".2~#27993"'~'#0$#9331' - DO .2 <- !2$#0'~'#1555$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #46644 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET BLOOD FROM A TURNIP - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#5"$#4'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #23328 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#9288$#9288' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/syslib.7i b/include/syslib.7i deleted file mode 100644 index ea218e0..0000000 --- a/include/syslib.7i +++ /dev/null @@ -1,402 +0,0 @@ - PLEASE KNOCK "SHAVE-AND-A-HAIRCUT-TWO-PLEASE" BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '^.1$.2'~'#0$#2801' - DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#2801'"$"'^"'@.1$ - .2'~'#0$#2801'"$#2801'~'#0$#2801'"'~'#0$ - #2801'"$"'^"'2@.1$.2'~'#0$#2801'"$#5602' - ~'#0$#2801'"'~'#0$#14005'"$#14005'~'#0$#2801' - PLEASE DO .5 <- "?!6~#14406'$#7"~#7 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- '?"!6~.6'~#6"$#7'~#7 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#400$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?#16806$.2'~'#0$#2801' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- '?"'V".1~.2"$#5'~#1"$#4'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#2801' - DO (1022) NEXT - DO .2 <- !2$#0'~'#400$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#2801 - PLEASE DO .5 <- :1~'#2793$#2744' - DO .5 <- '?"!5~.5'~#6"$#7'~#7 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#2793$#2744' - DO .5 <- '?"!5~.5'~#6"$#7'~#7 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#2801 - PLEASE DO .2 <- :2~#2801 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#2793$#2744' - DO .2 <- :2~'#2793$#2744' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '&.6$.4' - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?#16806$":2~'#2801$#0'"'~'#0$#2801'"$ - "'?#16806$":2~'#0$#2801'"'~'#0$#2801'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#2451 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#350"'~'#0$#2801' - DO .3 <- .1~#350 - PLEASE DO (1526) NEXT - DO :1 <- .4$"'V.3$".2~#2451"'~'#0$#2801'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#400$#1' - PLEASE RESUME #1 - (1526) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#57$#8' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 - DO :3 <- #0 - DO :4 <- .2 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- '?".1~#6"$#7'~#7 - DO (1531) NEXT - DO :1 <- :4 - DO (1720) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #1 - DO .1 <- .1~#2800 - DO :4 <- ":4~'#0$#2801'"$"'":4~'#400$#0'"$#0' - ~'#400$#1'" - PLEASE DO .5 <- '?"!1~.1'~#6"$#7'~#7 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .5 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#2801 - PLEASE DO .2 <- :2~'#2793$#2744' - DO .5 <- :1~'#2793$#2744' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#2801 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#2793$#2744'"$":4 - ~'#2793$#2744'" - DO .5 <- ':1~:1'~#6 - DO .2 <- :2~'#2793$#2744' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#6"$.5'~#8 - DO .1 <- :3~#2801 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#2801 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#4'~#1"'~#351 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#4'~#1"'~'#57$#1' - DO .5 <- '?"!5~.5'~#1"$#4'~#1 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :4 + :5 + :6 + .1 + .5 - DO :5 <- #0 - DO .5 <- '?"':2~:2'~#6"$#7'~#7 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#14406$#0"'"$#5'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#2801'"$"'":2~'#400$#0'"$#0' - ~'#400$#1'" - PLEASE DO :4 <- ":4~'#0$#2801'"$"'":4~'#400 - $#0'"$#0'~'#400$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - DO .1 <- #0 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#2801$#0'"$"'?#16806$":1 - ~'#2801$#0'"'~'#0$#2801'"'~'#0$#2801'"$ - "'&":2~'#0$#2801'"$"'?#16806$":1~'#0$ - #2801'"'~'#0$#2801'"'~'#0$#2801'" - DO :3 <- "'?":1~'#2801$#0'"$":2~'#2801$#0'"' - ~'#0$#2801'"$"'?":1~'#0$#2801'"$":2~'#0$ - #2801'"'~'#0$#2801'" - DO :6 <- "'&":6~'#2801$#0'"$":3~'#2801$#0'"' - ~'#0$#2801'"$"'&":6~'#0$#2801'"$":3~'#0$ - #2801'"'~'#0$#2801'" - DO :3 <- :3~'#16806$#16806' - DO :6 <- "'?"'V":6~'#2801$#0'"$#11204'~'#0$ - #2801'"$#11204'~'#0$#16806'"$"'?"'V":6 - ~'#0$#2801'"$#11204'~'#0$#2801'"$#11204' - ~'#0$#16806'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#2801$#0'"$ - #2401'~'#0$#2801'"$"'?:3~:3'~'#400$#0'"' - ~'#2401$#400'"$"'?:3~:3'~'#0$#2801'"'"~#1'$ - #5"~#1 - PLEASE DO (1557) NEXT - DO (1510) NEXT - DO :1 <- :3 - DO .5 <- '?#0$"'V.1$#5'~#1"'~#1 - DO (1557) NEXT - DO .1 <- '^.1$#2801'~'#0$#2801' - DO (1556) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :5 <- "'V":4~'.1$#0'"$":5~'#2801$#0'"' - ~'#0$#2801'"$"'V":4~'#0$.1'"$":5~'#0$ - #2801'"'~'#0$#2801'" - DO .5 <- "?#2$':4~#1'"~#1 - DO (1551) NEXT - DO :2 <- :2~'#2801$#2800' - DO :4 <- :4~'#2801$#2800' - DO .1 <- #0 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - DO :3 <- :5 - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 - DO :2 <- #0 - DO .2 <- #0 - DO .5 <- '?".1~#6"$#7'~#7 - DO (1729) NEXT - DO .5 <- .1~#1 - DO .2 <- :1~'#2801$#0' - DO .1 <- :1~'#0$#2801' - PLEASE DO (1726) NEXT - DO :1 <- '"?#0$.2"~"#0$#2801"'$'"?#0$.1"~"#0$ - #2801"' - DO :2 <- '"?'"V.2$#2801"~"#0$#2801"'$#2801" - ~"#0$#2801"'$'"?'"V.1$#2801"~"#0$#2801"'$ - #2801"~"#0$#2801"' - DO (1728) NEXT - (1726) PLEASE DO (1725) NEXT - DO :1 <- '"?#0$'"^.2$.2"~"#0$#2801"'"~"#0$ - #2801"'$'"?#0$'"^.1$.1"~"#0$#2801"'"~"#0$ - #2801"' - DO .2 <- "^'"V'"2@.2$#11204"~"#0$#2801"'$ - #5602"~"#0$#2801"'$'"2@.2$#2801"~"#0$ - #2801"'"~"#0$#2801" - DO .1 <- "^'"V'"2@.1$#11204"~"#0$#2801"'$ - #5602"~"#0$#2801"'$'"2@.1$#2801"~"#0$ - #2801"'"~"#0$#2801" - DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" - ~"#0$#2801"' - (1728) DO .2 <- :2~'#2401$#0' - DO :2 <- ':2~"#0$#2801"'$'"':2~"#400$#0"'$#0" - ~"#400$#1"' - DO (1509) NEXT - DO :2 <- :3 - DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 - DO (1721) NEXT - (1725) PLEASE DO (1724) NEXT - DO :2 <- '"?'"V'"?'"3@.2$#14005"~"#0$#2801"'$ - '"@.2$#0"~"#0$#2801"'"~"#0$#11204"'$#8403" - ~"#0$#2801"'$#8403"~"#0$#2801"'$ - '"?'"V'"?'"3@.1$#14005"~"#0$#2801"'$'"@.1$ - #0"~"#0$#2801"'"~"#0$#11204"'$#8403"~"#0$ - #2801"'$#8403"~"#0$#2801"' - DO .2 <- '^.2$.2'~'#0$#2801' - DO .1 <- '^.1$.1'~'#0$#2801' - DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ - #2801"' - PLEASE FORGET #2 - DO (1728) NEXT - (1724) PLEASE DO (1723) NEXT - DO :1 <- '"^'"^.2$.2"~"#0$#2801"'$.2"~"#0$ - #2801"'$'"^'"^.1$.1"~"#0$#2801"'$.1" - ~"#0$#2801"' - DO .2 <- "^'"V'"2@.2$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$'"V'"4@.2$#16806" - ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ - #2801" - DO .1 <- "^'"V'"2@.1$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$'"V'"4@.1$#16806" - ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ - #2801" - DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" - ~"#0$#2801"' - PLEASE FORGET #3 - DO (1728) NEXT - (1723) PLEASE DO (1722) NEXT - DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ - #2801"' - DO :2 <- '"?'"V'"3@.2$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$#14005"~"#0$#2801"'$ - '"?'"V'"3@.1$#16806"~"#0$#2801"'$#14005" - ~"#0$#2801"'$#14005"~"#0$#2801"' - PLEASE FORGET #4 - DO (1728) NEXT - (1729) DO (1001) NEXT - DO (1721) NEXT - (1722) PLEASE DO (1001) NEXT - DO :2 <- :1 - DO .2 <- #0 - DO FORGET #3 - (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 - PLEASE RESUME #3 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1905) NEXT - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1905) DO FORGET #1 - DO .1 <- '^.1$".2~#8403"'~'#0$#2801' - PLEASE DO %50 .1 <- '^.1$".2~#5602"'~'#0$#2801' - DO (1906) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#2801' - (1906) DO %50 .1 <- '^.1$.2'~'#0$#2801' - (1903) PLEASE FORGET #1 - DO .2 <- !2$#0'~'#400$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #16795 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET SENSE FROM INTERCAL - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#6"$#5'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #8403 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#2793$#2744' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/syslib.i b/include/syslib.i deleted file mode 100644 index ace68f7..0000000 --- a/include/syslib.i +++ /dev/null @@ -1,289 +0,0 @@ - PLEASE KNOCK BEFORE ENTERING - - (1000) PLEASE IGNORE .4 - PLEASE ABSTAIN FROM (1005) - (1009) DO STASH .1 + .2 + .5 + .6 - DO .4 <- #1 - DO (1004) NEXT - (1004) PLEASE FORGET #1 - DO .3 <- '?.1$.2'~'#0$#65535' - DO .6 <- '&.1$.2'~'#0$#65535' - PLEASE DO .5 <- "?!6~#32768'$#1"~#3 - DO (1002) NEXT - DO .4 <- #2 - (1005) DO (1006) NEXT - (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - (1002) DO (1001) NEXT - (1006) PLEASE FORGET #1 - DO .5 <- '?"!6~.6'~#1"$#1'~#3 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#32767$#1' - DO (1004) NEXT - (1003) DO (1001) NEXT - DO REINSTATE (1005) - (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - DO REMEMBER .4 - PLEASE RESUME #2 - (1001) DO RESUME .5 - (1010) DO STASH .1 + .2 + .4 - DO .4 <- .1 - DO .1 <- '?.2$#65535'~'#0$#65535' - DO (1020) NEXT - PLEASE DO .2 <- .4 - PLEASE DO (1009) NEXT - DO RETRIEVE .1 + .2 + .4 - PLEASE RESUME #1 - (1020) DO STASH .2 + .3 - DO .2 <- #1 - PLEASE DO (1021) NEXT - (1021) DO FORGET #1 - DO .3 <- "?!1~.2'$#1"~#3 - PLEASE DO .1 <- '?.1$.2'~'#0$#65535' - DO (1022) NEXT - DO .2 <- !2$#0'~'#32767$#1' - DO (1021) NEXT - (1023) PLEASE RESUME .3 - (1022) DO (1023) NEXT - PLEASE RETRIEVE .2 + .3 - PLEASE RESUME #2 - (1030) DO ABSTAIN FROM (1033) - PLEASE ABSTAIN FROM (1032) - (1039) DO STASH :1 + .5 - DO (1530) NEXT - DO .3 <- :1~#65535 - PLEASE DO .5 <- :1~'#65280$#65280' - DO .5 <- '?"!5~.5'~#1"$#1'~#3 - DO (1031) NEXT - (1032) DO (1033) NEXT - DO (1999) NEXT - (1031) DO (1001) NEXT - (1033) DO .4 <- .5 - DO REINSTATE (1032) - PLEASE REINSTATE (1033) - DO RETRIEVE :1 + .5 - PLEASE RESUME #2 - (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - DO .2 <- #0 - DO (1520) NEXT - DO STASH :1 - PLEASE RETRIEVE .2 - DO .1 <- .2 - DO .2 <- #0 - PLEASE DO (1520) NEXT - DO :2 <- :1 - DO RETRIEVE .1 + .2 + :1 - DO (1550) NEXT - PLEASE DO .3 <- :3 - DO RETRIEVE :1 + :2 + :3 - DO RESUME #1 - (1050) PLEASE STASH :2 + :3 + .5 - DO :2 <- .1 - PLEASE DO (1550) NEXT - DO .5 <- :3~'#65280$#65280' - DO .5 <- '?"!5~.5'~#1"$#1'~#3 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#65535 - PLEASE DO .2 <- :2~#65535 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#65280$#65280' - DO .2 <- :2~'#65280$#65280' - DO (1009) NEXT - DO .1 <- .3 - PLEASE DO (1503) NEXT - DO .6 <- .4 - DO .2 <- #1 - DO (1009) NEXT - DO .1 <- .3 - DO (1501) NEXT - (1504) PLEASE RESUME .6 - (1503) DO (1504) NEXT - (1501) DO .2 <- .5 - DO .5 <- '?"'&.6$.4'~#1"$#2'~#3 - DO (1505) NEXT - (1506) DO (1502) NEXT - PLEASE DO (1999) NEXT - (1505) DO (1001) NEXT - (1502) DO :4 <- .5 - DO (1520) NEXT - DO :3 <- :1 - PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO REINSTATE (1502) - DO REINSTATE (1506) - PLEASE RESUME #3 - (1510) DO STASH :1 + :2 + :4 - DO :1 <- "'?":2~'#65535$#0'"$#65535'~'#0$#65535'"$ - "'?":2~'#0$#65535'"$#65535'~'#0$#65535'" - DO :2 <- #1 - DO (1509) NEXT - PLEASE RETRIEVE :1 - DO :2 <- :3 - PLEASE DO (1509) NEXT - DO RETRIEVE :2 + :4 - PLEASE RESUME #1 - (1520) PLEASE STASH .3 + .4 - DO .3 <- .1~#43690 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#43690"'~'#0$#65535' - DO .3 <- .1~#21845 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#21845"'~'#0$#65535'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"'"'"!3$#0'~'#32767$#1'"$#0'~'#32767$ - #1'"$#0'~'#16383$#3'"$#0'~'#4095$#15' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .3 + .5 - DO :1 <- #0 - DO :2 <- .2 - DO .3 <- #1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- "?!1~.3'$#1"~#3 - DO (1531) NEXT - DO (1500) NEXT - DO :1 <- :3 - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #1 - DO .3 <- !3$#0'~'#32767$#1' - DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$ - #0'~'#32767$#1'" - PLEASE DO .5 <- "?!3~.3'$#1"~#3 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - PLEASE RETRIEVE :2 + :3 + .3 + .5 - DO RESUME #2 - (1540) PLEASE ABSTAIN FROM (1541) - DO ABSTAIN FROM (1542) - (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - DO .1 <- :1~#65535 - PLEASE DO .2 <- :2~'#65280$#65280' - DO .5 <- :1~'#65280$#65280' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#65535 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#65280$#65280'"$":4~'#65280$ - #65280'" - DO .5 <- ':1~:1'~#1 - DO .2 <- :2~'#65280$#65280' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3 - DO .1 <- :3~#65535 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#65535 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$":4~#3"'~#15 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$":4~#3"'~#172 - DO .5 <- '?"!5~.5'~#1"$#1'~#3 - PLEASE RETRIEVE :4 - (1541) DO :4 <- .5 - DO (1543) NEXT - (1542) DO (1544) NEXT - PLEASE DO (1999) NEXT - (1543) DO (1001) NEXT - (1544) DO REINSTATE (1541) - PLEASE REINSTATE (1542) - PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - DO RESUME #2 - (1550) DO STASH :1 + :4 + :5 + .5 - DO :3 <- #0 - DO .5 <- '?"':2~:2'~#1"$#1'~#3 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?":2~'#32768$#0'"$#2'~#3 - DO (1552) NEXT - DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$# - 0'~'#32767$#1'" - PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767 - $#0'"$#0'~'#32767$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - (1556) PLEASE FORGET #1 - DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"' - ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$ - #65535'"'~'#0$#65535'" - DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535$ - #65535"'~'#65535$#0'"$#32768'~'#0$#65535'" - $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"' - "$"':5~:5'~#1"'~#1"$#2'~#3 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"' - ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$ - #65535'"'~'#0$#65535'" - DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) DO FORGET #1 - DO .5 <- "?':4~#1'$#2"~#3 - DO (1551) NEXT - DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'" - DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'" - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + .5 - PLEASE RESUME #2 - (1900) DO STASH .2 + .3 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 .1 <- 'V.1$.2'~'#0$#65535' - DO .2 <- !2$#0'~'#32767$#1' - PLEASE DO .5 <- "?!2~.2'$#1"~#3 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .3 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #65524 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE - (1912) DO (1001) NEXT - (1911) DO FORGET #1 - PLEASE DO (1900) NEXT - DO :2 <- .1 - DO (1500) NEXT - PLEASE DO :1 <- :3 - DO .1 <- .3 - DO (1020) NEXT - PLEASE DO .3 <- .1 - DO .5 <- '?"!3~.3'~#1"$#2'~#3 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #32768 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#65280$#65280' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 diff --git a/include/yuk.h b/include/yuk.h deleted file mode 100644 index 4a3d1ca..0000000 --- a/include/yuk.h +++ /dev/null @@ -1,127 +0,0 @@ -/* yuk.h - header file for yuk.c and debugging versions of ick-wrap.c */ -/* Copyright (C) Alex Smith 2006. See yuk.c for copyright conditions. - This file is GPL'd, and so can be freely redistributed but has - absolutely no warranty. */ - -#define YUK(t,u) yukline(t,u) -#define YUKTERM yukterm() - -#define YUKEND 5 - -extern void yukline(int,int); -extern void yukterm(void); - -extern int abstained[]; -extern int yukopts; -extern int lineno; -extern int yuklines; -extern int yukcommands; -extern char *textlines[]; -extern int lineofaboff[]; -extern char *yukexplain[]; - -extern int yukloop; - -/* Defines that change the functions used for profiling. */ - -/* Define the following to the timing function you want for profiling, or leave - it undef to use the value computed by config.sh. */ -#undef YPTIMERTYPE -/* 0 to use clock(), 1 to use gettimeofday() and long, - 2 to use gettimeofday() and long long, 3 to use gethrtime() - 4 to use times() */ -/* Note: On many systems, 0's resolution is too low to produce any output - 1 and 2 produce the same output; use 2 if your system can handle - long long because the overflow is dealt with more simply. - 3 is a system-specific function. If there are more system-specific - functions around that return more accurate times than the others - used here, it would improve the profiler on those systems. - According to the DJGPP documentation, it's impossible to get times - with decent accuracy under DOS. DJGPP implements timer types 0, 1, - and 2, so it will 'work' with the default value of 2, but the results - you get will be basically meaningless as the base information can't - be accurately obtained (the resolution is slightly worse than 50ms, - which is far too slow for profiling). */ -#ifndef YPTIMERTIME -# ifdef HAVE_GETHRTIME -# define YPTIMERTYPE 3 -# else -# ifdef HAVE_GETTIMEOFDAY -/* Allow for an erroneous blank value for SIZEOF_LONG_LONG_INT. */ -# if SIZEOF_LONG_LONG_INT + 0 > 0 -# define YPTIMERTYPE 2 -# else -# define YPTIMERTYPE 1 -# endif -# else -# define YPTIMERTYPE 0 -# endif -# endif -#endif - - -#if YPTIMERTYPE == 0 -#define YPTIMERTFORMAT "lu" -#define YPCOUNTERTFORMAT "lu" -#define YPTIMERTFORMATD "6" YPTIMERTFORMAT -#define YPTIMERSCALE CLOCKS_PER_SEC -#define YPGETTIME clock() -typedef unsigned long yptimer; -typedef unsigned long ypcounter; - -#elif YPTIMERTYPE == 1 -#define YPTIMERTFORMAT "lu" -#define YPCOUNTERTFORMAT "lu" -#define YPTIMERTFORMATD "6" YPTIMERTFORMAT -#define YPTIMERSCALE 1000000LU -#define YPGETTIME yukgettimeofday() -typedef unsigned long yptimer; -typedef unsigned long ypcounter; - -#elif YPTIMERTYPE == 2 -#define YPTIMERTFORMAT "llu" -#define YPCOUNTERTFORMAT "lu" -#define YPTIMERTFORMATD "6" YPTIMERTFORMAT -#define YPTIMERSCALE 1000000LU -#define YPGETTIME yukgettimeofday() -typedef unsigned long long yptimer; -typedef unsigned long ypcounter; - -#elif YPTIMERTYPE == 3 -#define YPTIMERTFORMAT "llu" -#define YPCOUNTERTFORMAT "lu" -#define YPTIMERTFORMATD "9" YPTIMERTFORMAT -#define YPTIMERSCALE 1000000000LLU -#define YPGETTIME gethrtime() -typedef unsigned long long yptimer; -typedef unsigned long ypcounter; - -#elif YPTIMERTYPE == 4 -#define YPTIMERTFORMAT "lu" -#define YPCOUNTERTFORMAT "lu" -#define YPTIMERTFORMATD "6" YPTIMERTFORMAT -#define YPTIMERSCALE CLK_TCK -#define YPGETTIME yuktimes() -typedef unsigned long yptimer; -typedef unsigned long ypcounter; - -#else -#error Invalid YPTIMERTYPE in yuk.h - -#endif /* YPTIMERTYPE cases */ - -extern yptimer ypexectime[]; -extern ypcounter ypexecount[]; -extern ypcounter ypabscount[]; - -typedef struct yukvar_tag -{ - int vartype; - int extername; - int intername; -} yukvar; - -extern yukvar yukvars[]; - -extern char** globalargv; -extern int globalargc; diff --git a/pit/CATALOG b/pit/CATALOG index cbcf63c..d6f7a8c 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -18,7 +18,7 @@ by Jon Blow lib/plus.i Increment .1 by Hans Olsson - lib/1910.doc Listing of a random number routine. Hans said he wrote this + lib/1910.doc Listing of a random number routine. Hans said he wrote this because he couldn't find (1910) in the system library, but it's there in our lib/syslib.i. We keep this around as an example. (What? Throw away INTERCAL code? Perish the thought!) @@ -62,7 +62,7 @@ by Clemens Meier rot13b.i Another ROT-13 program By Brian Raiter - lib/numio.i I/O routines + lib/numio.i I/O routines lib/numio.doc Description of the I/O routines lib/syslib.3i lib/syslib.4i @@ -89,6 +89,10 @@ by Donald Knuth tpk.i Don Knuth's implementation of the TPK algorithm tpk.doc Don's note about the algorithm +by Oerjan Johansen + unlambda.i An Unlambda interpreter in INTERCAL + unlambda.doc Better-commented version of the above + The subdirectory tests contains some programs written only to test the compiler. @@ -99,9 +103,9 @@ by David Moews David Moews wrote of the latter (test2.i): The following program reads in two numbers and then prints their product. -It consists of a trivial calling program followed by a cleaned-up version -of a portion of the INTERCAL subroutine library. (Only a portion of -the INTERCAL subroutine library is present in the posted manual, and +It consists of a trivial calling program followed by a cleaned-up version +of a portion of the INTERCAL subroutine library. (Only a portion of +the INTERCAL subroutine library is present in the posted manual, and that portion is full of typos.) by Alex Smith @@ -114,6 +118,8 @@ by Alex Smith tests/permute.i A permutation-printing program to test backtracking tests/permute.doc Information about the permutation-printer tests/whileadd.i Adds two input numbers with a single WHILE statement + tests/ignorret.i Testing interactions of IGNORE and RETRIEVE + tests/ignorret.doc What ignorret does on several compilers sort.i An insertion-sort program testing computed ABSTAIN by Malcom Ryan diff --git a/pit/tests/ignorret.doc b/pit/tests/ignorret.doc new file mode 100644 index 0000000..3acab41 --- /dev/null +++ b/pit/tests/ignorret.doc @@ -0,0 +1,43 @@ +One aspect of INTERCAL-72 that was never fully documented was the way +in which IGNORE and RETRIEVE statements interacted. It turns out that +the three modern INTERCAL compilers all use slightly different +definitions. + +The associated program ignorret.i stores 1 in a variable's stash, 2 in +the variable itself, ignores the variable, and retrieves it; it then +prints out the variable, and tests to see whether the variable is +ignored. + +C-INTERCAL prints: + +II + +II +In other words, the interpretation used is that the variable is +read-only, so a RETRIEVE can't change its value (but instead just +discards the stash item). The variable remains IGNOREd. + +J-INTERCAL prints: + +I + +I +J-INTERCAL doesn't take the interaction between IGNORE and RETRIEVE +into account at all; the RETRIEVE just does what a RETRIEVE would +normally do, which is to set the variable from its own stack. The +variable remains IGNOREd. + +CLC-INTERCAL prints: +I +III +The interpretation used by CLC-INTERCAL is somewhat different. The +ignorance status is stashed along with the variable itself; so the +value of 1 is read from the variable's stash, but doing so also +removes the read-only status of the variable. This means that the +third assignment to the variable works, unlike in the other two +cases. + +The upshot of all this is: don't RETRIEVE a read-only variable if you +want your program to be portable! + +Alex Smith diff --git a/pit/tests/ignorret.i b/pit/tests/ignorret.i new file mode 100644 index 0000000..b42bde3 --- /dev/null +++ b/pit/tests/ignorret.i @@ -0,0 +1,9 @@ + DO .1 <- #1 + DO STASH .1 + DO .1 <- #2 + DO IGNORE .1 + PLEASE RETRIEVE .1 + DO READ OUT .1 + DO .1 <- #3 + DO READ OUT .1 + PLEASE GIVE UP diff --git a/pit/unlambda.doc b/pit/unlambda.doc new file mode 100644 index 0000000..391e205 --- /dev/null +++ b/pit/unlambda.doc @@ -0,0 +1,928 @@ +Here's a program that we found and added to the pit (with the author's +permission). This is an Unlambda interpreter; see +http://esolangs.org/wiki/Unlambda for more information about +Unlambda. (This must have been a doubly difficult program to write; +INTERCAL is known for being hard to write programs in, and Unlambda is +in part known for being hard to write interpreters for, among its +other claims to fame.) This should run under C-INTERCAL with no +command-line options given, although I recommend -b, -O and -f. It's +valid INTERCAL-72 except for Turing Tape IO and COME FROM label. + +What follows is the original version of the program, with the author's +comments interspersed. + +# Copyright (C) 2001 Ørjan Johansen + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + PLEASE .200 <- #8 PLEASE NOTE AMOUNT OF INITIAL MEMORY + PLEASE .80 <- #80 PLEASE NOTE END-OF-LINE CHARACTER + + DO (100) NEXT PLEASE NOTE IO SETUP + DO (200) NEXT PLEASE NOTE MEMORY SETUP + DO (300) NEXT PLEASE NOTE REFERENCE COUNTING SETUP + DO (400) NEXT PLEASE NOTE PARSER TABLE SETUP + + DO (401) NEXT PLEASE NOTE PARSING + DON'T (404) NEXT PLEASE NOTE PRINTING PROGRAM + DO (501) NEXT PLEASE NOTE EVALUATION + DON'T (404) NEXT PLEASE NOTE PRINTING RESULT + DON'T (203) NEXT PLEASE NOTE MEMORY MAP + PLEASE GIVE UP + + PLEASE NOTE DIPLOMATIC RELATIONS + PLEASE NOTE .101=LAST READ .102=LAST WRITTEN +# Character array +(100) DO ,101 <- #1 + PLEASE DO .101 <- #0 + DO .102 <- #0 + DO RESUME #1 +# Read a new character + PLEASE READ ME A STORY +(101) DO (3101) NEXT + DO .101 <- .1 + PLEASE REINSTATE (3101) + DO RESUME #1 +(3101) DON'T THINK YOU CAN HAVE YOUR CAKE AND EAT IT + DO WRITE IN ,101 + PLEASE .1 <- ,101SUB#1 + DO .2 <- .101 + DO (1000) NEXT + PLEASE DO .101 <- .3~#255 + PLEASE RESUME '?.1$#512'~'#256$#256' +# Reverse bits in .2 +(102) DO .2 <- !2~#15'$!2~#240' + DO .2 <- !2~#15'$!2~#240' + DO .2 <- !2~#15'$!2~#240' + PLEASE RESUME #1 +# Write a new revchar (from .2) +(103) PLEASE .1 <- .102 + DO .102 <- .2 + DO (1010) NEXT + DO ,101SUB#1 <- .3 + PLEASE READ OUT ,101 + DO RESUME #1 + + DO ASSERT TERRITORIAL CLAIMS +# Memory initialization, uses value of .200. +# .204 = items per cell, not used for the (?202) loops! +(200) DO .204 <- #7 + DO ,201 <- .200 BY #32767 BY .204 +(3200) PLEASE DO .201 <- #0 + DO .202 <- #16383 + PLEASE RESUME #1 + + PLEASE LET THEM EAT CAKE + PLEASE NOTE .201+.202=MEMORY TOP +# Allocate new cell, .201 (high) and .202 (low) will contain new address. +# May also be used to traverse memory. +(201) DO (3201) NEXT +(5201) DON'T (202) NEXT + DO COME FROM (7202) + PLEASE .1 <- .201 + DO (4201) NEXT + PLEASE REINSTATE (5201) + DO RESUME #1 +(4201) DO (1020) NEXT + DO FORGET '#65535~"'?.1$.200'~'#0$#65535'"'~#1 + DO .201 <- .1 + PLEASE RESUME #1 + DON'T STEP ON THE GALOIS FIELD MINES +(3201) DO .202 <- "?.202$!202~#16384'"~'#16383$#1' + PLEASE RESUME "?!202~.202'$#32768"~"#16384$#16384" +# Uncontrolled unary operators: +# "?.1$!1~#16384'"~'#16383$#1' +# "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0' + + PLEASE STAND BY FOR ASSIMILATION +# Handle memory enlargement. +(202) PLEASE DON'T RESUME #3 + DO REINSTATE (202) + DO FORGET #1 + PLEASE STASH .203+,202 +# Calculate the new memory size + DO .203 <- '.200$#0'~'#65535$#1' +# Temporarily copy memory + DON'T TELL ME WE HAVE TO MOVE IT ALL? + DO ,202 <- .200 BY #32767 BY .204 + DO (3200) NEXT + DO ABSTAIN FROM (5201) + PLEASE DO (3202) NEXT +# Enlarge memory and copy back + DO ,201 <- .203 BY #32767 BY .204 + DO (3200) NEXT + PLEASE ABSTAIN FROM (5201) + PLEASE DO (5202) NEXT +# Clean up and return + DO .200 <- .203 + DO ABSTAIN FROM (5201) + DO ABSTAIN FROM (202) +(7202) DO RETRIEVE .203+,202 +(9202) DO RESUME '?#32768$.203'~'#16384$#32768' +(3202) DO COME FROM (4202) + PLEASE DO (201) NEXT + DO ,202SUB.201.202#1 <- ,201SUB.201.202#1 + DO ,202SUB.201.202#2 <- ,201SUB.201.202#2 + DO ,202SUB.201.202#3 <- ,201SUB.201.202#3 + DO ,202SUB.201.202#4 <- ,201SUB.201.202#4 + DO ,202SUB.201.202#5 <- ,201SUB.201.202#5 + DO ,202SUB.201.202#6 <- ,201SUB.201.202#6 +(4202) DO ,202SUB.201.202#7 <- ,201SUB.201.202#7 +# Remember to expand if .204 changes! +(5202) DO COME FROM (6202) + PLEASE DO (201) NEXT + DO ,201SUB.201.202#1 <- ,202SUB.201.202#1 + DO ,201SUB.201.202#2 <- ,202SUB.201.202#2 + DO ,201SUB.201.202#3 <- ,202SUB.201.202#3 + DO ,201SUB.201.202#4 <- ,202SUB.201.202#4 + DO ,201SUB.201.202#5 <- ,202SUB.201.202#5 + DO ,201SUB.201.202#6 <- ,202SUB.201.202#6 +(6202) DO ,201SUB.201.202#7 <- ,202SUB.201.202#7 +# Remember to expand if .204 changes! +# List memory and some important addresses + DO TELL ME ALL ABOUT YOURSELF +(203) DO READ OUT .201+.202+.301+.302+.311+.312 + DO (3200) NEXT + PLEASE REINSTATE (202) + DO ABSTAIN FROM (5201) + DO (3203) NEXT + PLEASE GIVE UP + PLEASE COME FROM (4203) +(3203) DO (201) NEXT + DO READ OUT .201+.202 + DO READ OUT ,201SUB.201.202#1 + DO READ OUT ,201SUB.201.202#2 + DO READ OUT ,201SUB.201.202#3 + DO READ OUT ,201SUB.201.202#4 + DO READ OUT ,201SUB.201.202#5 + DO READ OUT ,201SUB.201.202#6 +(4203) DO READ OUT ,201SUB.201.202#7 + +# Reference count memory model + PLEASE NOTE + #1+#2=REFERENCE COUNT + #3+#4=CAR + #5+#6=CDR + #7=TYPE (TAG$DATA) + + PLEASE WELCOME TO THE BAZAAR +# Initialize recycle bin +(300) PLEASE DO .301 <- #0 + DO .302 <- #0 + PLEASE NOTE NIL=.303+.304 + DO (303) NEXT + DO ,201SUB.311.312#1 <- #0 + PLEASE ,201SUB.311.312#2 <- #0 + DO ,201SUB.311.312#3 <- .311 + DO ,201SUB.311.312#4 <- .312 + DO ,201SUB.311.312#5 <- .311 + DO ,201SUB.311.312#6 <- .312 + DO ,201SUB.311.312#7 <- #0 + PLEASE .303 <- .311 + DO .304 <- .312 + DO RESUME #1 + +# Increment reference count of cell pointed to by .311+.312. + PLEASE REPORT NEW PURCHASES HERE +(301) PLEASE .1 <- ,201SUB.311.312#2 + DO .1 <- "?.1$!1~#16384'"~'#16383$#1' + DO ,201SUB.311.312#2 <- .1 + DO (3301) NEXT + PLEASE .1 <- ,201SUB.311.312#1 + DO .1 <- "?.1$!1~#16384'"~'#16383$#1' + DO ,201SUB.311.312#1 <- .1 + DO (3301) NEXT + PLEASE NOTE THAT IMMORTALITY IS TREASON + DO ,201SUB.311.312#2 <- #0 + DO RESUME #1 +(3301) PLEASE RESUME "?!1~.1'$#32768"~"#16384$#16384" + + PLEASE STAND IN LINE FOR TERMINATION + DO COME FROM (4302) +# Decrement reference count of cell pointed to by .311+.312. +(302) PLEASE .1 <- ,201SUB.311.312#2 + DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0' + DO ,201SUB.311.312#2 <- .1 + DO (3302) NEXT + PLEASE .1 <- ,201SUB.311.312#1 + DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0' + DO ,201SUB.311.312#1 <- .1 + DO (3302) NEXT +# Count reached zero, release cell + PLEASE .1 <- .311 + DO .2 <- .312 + DO .311 <- ,201SUB.1.2#3 + DO .312 <- ,201SUB.1.2#4 + DO ,201SUB.1.2#3 <- .301 + DO ,201SUB.1.2#4 <- .302 + PLEASE .301 <- .1 +(4302) DO .302 <- .2 +(3302) PLEASE RESUME "?'#65535~"'?.1$#16383'~'#0$#65535'"'$#1"~#3 + + PLEASE LET ME INTRODUCE YOU TO .311+.312 +# Receive pointer to cell, possibly recycled, in .311+.312 +(303) PLEASE (3303) NEXT + DO .1 <- .301 + DO .2 <- .302 + DO .301 <- ,201SUB.1.2#3 + DO .302 <- ,201SUB.1.2#4 + PLEASE STASH .1+.2 + DO .311 <- ,201SUB.1.2#5 + DO .312 <- ,201SUB.1.2#6 + DO (302) NEXT + PLEASE RETRIEVE .1+.2 + DO .311 <- .1 + DO .312 <- .2 + DO (5303) NEXT +(3303) PLEASE DO (4303) NEXT + DO (201) NEXT + DO .311 <- .201 + DO .312 <- .202 +(5303) DO ,201SUB.311.312#1 <- #32767 + PLEASE ,201SUB.311.312#2 <- #32767 +# Initialize pointers to null so errors are (hopefully) caught easier. + DO ,201SUB.311.312#3 <- #0 + DO ,201SUB.311.312#5 <- #0 + PLEASE RESUME #2 +(4303) DO RESUME "?!301~.301'$#1"~#3 +# As (303), but set CDR to NIL +(304) PLEASE (303) NEXT + DO ,201SUB.311.312#5 <- .303 + DO ,201SUB.311.312#6 <- .304 + DO RESUME #1 +# As (304), but also set CAR to NIL +(305) PLEASE (304) NEXT + DO ,201SUB.311.312#3 <- .303 + DO ,201SUB.311.312#4 <- .304 + DO RESUME #1 + +# ,401+,402 is a table of pointers to the parameterless +# primitive functions. + PLEASE NOTE `=#1 K=#2 K1=#3 S=#4 S1=#5 S2=#6 I=#7 V=#8 C=#9 + CONT=#10 D=#11 D1=#12 .=#13 E=#14 @=#15 ?=#16 + |=#17 (R=#18=#13$.80) +(3400) PLEASE STASH .1 + PLEASE (305) NEXT + PLEASE RETRIEVE .1 + DO ,201SUB.311.312#2 <- #0 + DO ,201SUB.311.312#7 <- .1$#0 + DO ,401SUB.1 <- .311 + DO ,402SUB.1 <- .312 + DO RESUME #1 +(400) PLEASE ,401 <- #18 + DO ,402 <- #18 + DO .1 <- #2 DO (3400) NEXT + DO .1 <- #4 DO (3400) NEXT + DO .1 <- #7 DO (3400) NEXT + DO .1 <- #8 DO (3400) NEXT + DO .1 <- #9 DO (3400) NEXT + DO .1 <- #11 DO (3400) NEXT + DO .1 <- #14 DO (3400) NEXT + DO .1 <- #15 DO (3400) NEXT + DO .1 <- #17 DO (3400) NEXT + DO .1 <- #18 DO (3400) NEXT + PLEASE ,201SUB.311.312#7 <- #13$.80 +# ,400 is a character table. + PLEASE NOTE 7=ILLEGAL 6=BLANK 5=COMMENT + 4=PRIMITIVE 3=KRAPS 2=WHAT 1=SPOT +(410) PLEASE ,400 <- #127 + PLEASE .1 <- #127 + PLEASE (3410) NEXT + DO ,400SUB#8 <- #6 $ #0 + DO ,400SUB#10 <- #6 $ #0 + DO ,400SUB#13 <- #6 $ #0 + DO ,400SUB#32 <- #6 $ #0 + DO ,400SUB#35 <- #5 $ #0 + DO ,400SUB#46 <- #1 $ #13 + DO ,400SUB#63 <- #2 $ #16 + DO ,400SUB#64 <- #4 $ #15 + DO ,400SUB#67 <- #4 $ #9 + DO ,400SUB#68 <- #4 $ #11 + DO ,400SUB#69 <- #4 $ #14 + DO ,400SUB#73 <- #4 $ #7 + DO ,400SUB#75 <- #4 $ #2 + DO ,400SUB#82 <- #4 $ #18 + DO ,400SUB#83 <- #4 $ #4 + DO ,400SUB#86 <- #4 $ #8 + DO ,400SUB#96 <- #3 $ #0 + DO ,400SUB#99 <- #4 $ #9 + DO ,400SUB#100 <- #4 $ #11 + DO ,400SUB#101 <- #4 $ #14 + DO ,400SUB#105 <- #4 $ #7 + DO ,400SUB#107 <- #4 $ #2 + DO ,400SUB#114 <- #4 $ #18 + DO ,400SUB#115 <- #4 $ #4 + DO ,400SUB#118 <- #4 $ #8 +(5410) DO ,400SUB#124 <- #4 $ #17 + PLEASE COME FROM (3410) +(3410) PLEASE (4410) NEXT +(4410) PLEASE ,400SUB.1 <- #7 + DO .1 <- "?.1$!1~#64'"~'#63$#1' + DO RESUME "?!1~.1'$#64"~"#64$#64" + DO COME FROM (5410) +# ,403 is a character table the other way. + PLEASE NOTE KSIVCDE@|=#7 K1,S1,D1=#6 S2=#5 + CONT=#4 KRAPS=#3 WHAT=#2 SPOT=#1 +(420) PLEASE ,403 <- #17 + DO ,403SUB#1 <- #3 $ #6 + DO ,403SUB#2 <- #7 $ #210 + DO ,403SUB#3 <- #6 $ #210 + DO ,403SUB#4 <- #7 $ #202 + DO ,403SUB#5 <- #6 $ #202 + DO ,403SUB#6 <- #5 $ #202 + DO ,403SUB#7 <- #7 $ #146 + DO ,403SUB#8 <- #7 $ #106 + DO ,403SUB#9 <- #7 $ #194 + DO ,403SUB#10 <- #4 $ #0 + DO ,403SUB#11 <- #7 $ #34 + DO ,403SUB#12 <- #6 $ #34 + DO ,403SUB#13 <- #1 $ #116 + DO ,403SUB#14 <- #7 $ #162 + DO ,403SUB#15 <- #7 $ #2 + DO ,403SUB#16 <- #2 $ #252 + DO ,403SUB#17 <- #7 $ #62 + PLEASE RESUME #1 + +# Parser continuation stack cell types + PLEASE NOTE 3=TOP 2=BOTH 1=LAST +# Generate stack top in .401+.402 +(401) DO (305) NEXT + DO .401 <- .311 + DO .402 <- .312 + DO ,201SUB.401.402#7 <- #3 + PLEASE (402) NEXT + PLEASE ABSTAIN FROM SUCH MEANINGLESS LANGUAGE +(4402) DO RESUME '?"?!101~#128'$!101~.101'"$#2'~#3 +(3402) DO (3101) NEXT + DOG ATE END OF MY ESSAY +# Parse expression and send to continuation + DO COME FROM (5402) +(402) DO (3402) NEXT + PLEASE (4402) NEXT +(5402) DO (412) NEXT +# Comments + DON'T COMMENT +(412) PLEASE (422) NEXT + DO COME FROM (4412) + DO (3402) NEXT +(4412) PLEASE (3412) NEXT +(3412) DO FORGET "?'#255~"'?.101$#10'~'#0$#65535'"'$#1"~#1 + DO FORGET "?'#255~"'?.101$#13'~'#0$#65535'"'$#1"~#1 + DO RESUME #1 +# Primitive functions + DO YOU THINK _THIS_ IS PRIMITIVE? +(422) PLEASE (432) NEXT + DO .311 <- ,401SUB!410~"#0$#31"' + DO .312 <- ,402SUB!410~"#0$#31"' + DO FORGET #1 + PLEASE (403) NEXT +# Application + PLEASE FILL OUT THE APPLICATION FORM +(432) PLEASE (442) NEXT + DO (305) NEXT + DO ,201SUB.311.312#5 <- .401 + DO ,201SUB.311.312#6 <- .402 + DO ,201SUB.311.312#7 <- #2 + PLEASE .401 <- .311 + DO .402 <- .312 + DO RESUME #3 +# ?x + DO WHAT? +(442) PLEASE (452) NEXT + DO (3402) NEXT + DO (305) NEXT + DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.101 + DO FORGET #3 + PLEASE (403) NEXT +# .x + DOT OR SPOT, WE'RE ALL CIVILIZED PEOPLE HERE +(452) PLEASE (462) NEXT + DO (3402) NEXT + DO (305) NEXT + DO .2 <- .101 + PLEASE (102) NEXT + DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.2 + DO FORGET #4 + PLEASE (403) NEXT +(462) DO .410 <- ,400SUB.101 + DO RESUME .410~'#7$#0' + +# Handle a parsed expression in .311+.312 +# Remember to resume one extra level afterwards if continuing. +# First top expression + DO YOU KNOW THE TOP MAN FOR THIS OPERATION? + DO COME FROM (3423) +(403) PLEASE (413) NEXT + DO STASH .311+.312 + DO .311 <- .401 + DO .312 <- .402 + PLEASE (302) NEXT + DO RETRIEVE .311+.312 +# Return all the way from (401) + DO RESUME #4 +# Still one subexpression remaining + PLEASE CAN I HAVE SOME MORE? +(413) PLEASE (423) NEXT + DO ,201SUB.401.402#3 <- .311 + DO ,201SUB.401.402#4 <- .312 + DO ,201SUB.401.402#7 <- #1 + PLEASE RESUME #3 +# Application constructed + DOUBLE APPLICATION FORM RECEIVED +(423) PLEASE (433) NEXT + DO .1 <- ,201SUB.401.402#5 + DO .2 <- ,201SUB.401.402#6 + DO ,201SUB.401.402#5 <- .311 + DO ,201SUB.401.402#6 <- .312 + DO ,201SUB.401.402#7 <- #1$#0 + DO .311 <- .401 + PLEASE .312 <- .402 + DO .401 <- .1 + DO .402 <- .2 +(3423) DO FORGET #2 +(433) PLEASE RESUME ,201SUB.401.402#7 + +# Unparsing .311+.312 + DO YOU WANT A REPORT? +(404) DO STASH .311+.312 + PLEASE (6404) NEXT + DO RETRIEVE .311+.312 + DO .2 <- .80 DO (103) NEXT + DO RESUME #1 +# Uses weak pointer stack in .401+.402 with NIL at bottom (which is of type 0) +(6404) DO .401 <- .303 + DO .402 <- .304 + DO COME FROM (4404) + PLEASE DO (5404) NEXT +# Unparse the remainder of the stack + PLEASE (3404) NEXT + DO .311 <- ,201SUB.401.402#3 + DO .312 <- ,201SUB.401.402#4 + PLEASE STASH .311+.312 + DO .1 <- ,201SUB.401.402#5 + DO .2 <- ,201SUB.401.402#6 + DO ,201SUB.401.402#3 <- .303 + DO ,201SUB.401.402#4 <- .304 + DO ,201SUB.401.402#5 <- .303 + DO ,201SUB.401.402#6 <- .304 + DO .311 <- .401 + DO .312 <- .402 + DO .401 <- .1 + DO .402 <- .2 + PLEASE DO (302) NEXT +(4404) DO RETRIEVE .311+.312 +(3404) DO RESUME "?"#65535~',201SUB.401.402#7'"$#2"~#3 + DO COME FROM (5404) +(5404) PLEASE DO (414) NEXT +# Primitives + PLEASE DON'T BRING AUSTRALOPITHECI INTO THE HOUSE +(414) PLEASE DO (424) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + DO RESUME #2 +# Single parameter +(424) PLEASE DO (434) NEXT + DO .2 <- #6 DO (103) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + PLEASE COME FROM (4434) +(3424) DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO RESUME #2 +# Two-parameter + DOUBLE DOUBLE TOIL AND TROUBLE +(434) PLEASE DO (444) NEXT + DO .2 <- #6 DO (103) NEXT DO (103) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + DO COME FROM (3454) +(3434) PLEASE STASH .311+.312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .401 + DO ,201SUB.311.312#6 <- .402 + DO ,201SUB.311.312#7 <- #1 + DO .401 <- .311 DO .402 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.401.402#3 <- ,201SUB.311.312#5 + DO ,201SUB.401.402#4 <- ,201SUB.311.312#6 +(4434) DO FORGET #1 +# Continuations + DO CONTINUATIONS DREAM OF MONADIC SHEEP +(444) PLEASE DO (454) NEXT + PLEASE DO .2 <- #60 DO (103) NEXT + PLEASE DO .2 <- #194 DO (103) NEXT + PLEASE DO .2 <- #242 DO (103) NEXT + PLEASE DO .2 <- #114 DO (103) NEXT + PLEASE DO .2 <- #42 DO (103) NEXT + PLEASE DO .2 <- #124 DO (103) NEXT + PLEASE RESUME #5 +# Applications +(454) PLEASE DO (464) NEXT + PLEASE FORGET #2 + DO .2 <- #6 +(3454) DO (103) NEXT +# ?x + DON'T LOOK LIKE A QUESTION MARK +(464) PLEASE DO (474) NEXT + DO .2 <- .411~'#0$#255' DO (103) NEXT + PLEASE DO .2 <- .410~'#0$#255' + DO (102) NEXT DO (103) NEXT + DO RESUME #7 +# .x + PLEASE CAN YOU SPOT THE DIFFERENCE? +(474) PLEASE DO (484) NEXT + DO .2 <- .411~'#0$#255' + DO .410 <- .410~'#0$#255' + DO .411 <- #7$#74 + PLEASE DO (3474) NEXT + DO (103) NEXT + PLEASE DO .2 <- .410 + DO (103) NEXT + DO RESUME #8 +# Resume 1 or 7 times +(3474) DO RESUME '"?"#255~'"?.410$.80"~"#0$#65535"'"$#3"$#1'~#11 +(484) DO .410 <- ,201SUB.311.312#7 + DO .411 <- ,403SUB!410~"#31$#0"' + PLEASE RESUME .411~'#7$#0' + + PLEASE WELCOME TO THE PITS OF EVAL +# May use up the reference to .311+.312. +(501) DO .511 <- .311 + DO .512 <- .312 + PLEASE DO (3501) NEXT + DO .311 <- .511 + DO .312 <- .512 +# Continuation types + PLEASE NOTE EVAL2=1 APPLY=2 + PLEASE NOTE + .601=CURRENT CHARACTER + .501+.502=CURRENT CONTINUATION + .511+.512=CURRENT EXPRESSION +(3501) DO .601 <- #256 + DO (304) NEXT + DO ,201SUB.311.312#3 <- ,401SUB#14 + DO ,201SUB.311.312#4 <- ,402SUB#14 + DO ,201SUB.311.312#7 <- #2 + DO .501 <- .311 + DO .502 <- .312 +# Evaluate .511+.512 with the continuation given in .501+.502. + PLEASE COME FROM (3622) + PLEASE COME FROM (7503) +(502) DO (3502) NEXT + DO (503) NEXT +(4502) PLEASE RESUME "?'#15~"',201SUB.511.512#7'~'#30$#0'"'$#1"~#3 + DO NOTE KRAPS + PLEASE COME FROM (5502) +(3502) DO (4502) NEXT + PLEASE (303) NEXT + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + DO .311 <- ,201SUB.511.512#5 + DO .312 <- ,201SUB.511.512#6 + PLEASE DO (301) NEXT + DO ,201SUB.501.502#3 <- .311 + DO ,201SUB.501.502#4 <- .312 + DO .311 <- ,201SUB.511.512#3 + DO .312 <- ,201SUB.511.512#4 + PLEASE DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 +(5502) DO .512 <- .312 +# Send .511+.512 to the current continuation. + PLEASE NOTE THAT WE ARE CURRENTLY PROCESSING YOUR APPLICATION +(503) DO FORGET #1 + PLEASE (3503) NEXT + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + DO (301) NEXT + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT +(8503) PLEASE RETRIEVE .311+.312 +(4503) PLEASE RESUME ,201SUB.501.502#7 + PLEASE STAY WITH US FOR THE SECOND HALF OF THE SHOW +(3503) PLEASE (4503) NEXT + DO (5503) NEXT + DO FORGET #1 + DO .311 <- .501 + DO .312 <- .502 + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + PLEASE DO (301) NEXT + DO STASH .311+.312 + DO (304) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#7 <- #2 + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.501.502#5 <- .311 + DO ,201SUB.501.502#6 <- .312 + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 +(7503) DO (302) NEXT + DO D DO DAH +(6503) PLEASE RESUME + "?'#15~"'?"',201SUB.511.512#7'~'#31$#0'"$#11' + ~"#0$#65535""'$#1"~#3 +(5503) DO (6503) NEXT + DO FORGET #2 + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO (304) NEXT + DO ,201SUB.311.312#7 <- #12$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + PLEASE DO (301) NEXT + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + PLEASE DO (302) NEXT + DO RETRIEVE .311+.312 + DO .501 <- .311 + DO .502 <- .312 + DO (503) NEXT + + PLEASE LEARN THE DIFFERENCE BETWEEN APPLYS AND ORANGUTANS +# Apply .311+.312 to .511+.512 with the current continuation .501+.502 + PLEASE COME FROM (8503) + DO COME FROM (603) +(601) PLEASE DO (627) NEXT + DO (503) NEXT + PLEASE DON'T CLIMB INTO THE PIPES +(627) PLEASE DO (626) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE DO (3627) NEXT + DO STASH .311+.312 + PLEASE DO (305) NEXT + DO .2 <- .601 + DO (102) NEXT + DO ,201SUB.311.312#7 <- #13$.2 + DO .511 <- .311 + DO .512 <- .312 + DO RETRIEVE .311+.312 + PLEASE DO (603) NEXT +(3627) PLEASE DO (4627) NEXT + DO FORGET #1 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT +(4627) PLEASE RESUME '?.601$#512'~'#256$#256' + PLEASE WHAT DID YOU SAY? +(626) PLEASE DO (625) NEXT + DO .602 <- ',201SUB.311.312#7'~'#0$#255' + DO (302) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE DO (3626) NEXT + DO FORGET #1 + DO .511 <- ,401SUB#7 + DO .512 <- ,402SUB#7 + PLEASE DO (603) NEXT +(3626) PLEASE DO (4626) NEXT + DO FORGET #2 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT +(4626) DO RESUME "?'#255~"'?.601$.602'~'#0$#255'"'$#2"~#3 + DON'T FALL INTO THE WHIRLPOOL +(625) PLEASE DO (624) NEXT + DO .311 <- .511 + DO .312 <- .512 + DO (3625) NEXT + DO FORGET #2 + DO .601 <- .101 + DO .511 <- ,401SUB#7 + DO .512 <- ,402SUB#7 + PLEASE DO (603) NEXT +(3625) DO (3101) NEXT + PLEASE REINSTATE (3101) + DO FORGET #3 + DO .601 <- #256 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT + DO YOU THINK THIS IS THE END? +(624) PLEASE DO (623) NEXT + DO RESUME #5 + PLEASE STAY IN ONE SPOT SO I CAN HIT YOU +(623) PLEASE DO (622) NEXT + DO .2 <- ',201SUB.311.312#7'~'#0$#255' + DO (103) NEXT + DO (302) NEXT + DO RESUME #5 + DON'T PROMISE WHAT YOU CAN'T KEEP +(622) PLEASE DO (621) NEXT + DO FORGET #6 + DO STASH .311+.312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 +(3622) DO (302) NEXT + DO EXPECT SOME DELAY +(621) PLEASE DO (620) NEXT + DO RESUME #7 + PLEASE CONTINUE, NOTHING TO SEE HERE... +(620) PLEASE DO (619) NEXT + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + PLEASE .501 <- .311 + PLEASE .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + DO RESUME #8 + DO CALL ME ANY TIME +(619) PLEASE DO (618) NEXT + DO FORGET #8 + DO .311 <- .511 + DO .312 <- .512 + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + DO (301) NEXT + PLEASE DO (304) NEXT + DO ,201SUB.311.312#3 <- .501 + DO ,201SUB.311.312#4 <- .502 + DO ,201SUB.311.312#7 <- #10$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (603) NEXT + DON'T LOOK INTO THE ABYSS OR THE ABYSS LOOKS BACK INTO YOU +(618) PLEASE DO (617) NEXT + DO STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 + DO .512 <- .312 + DO RESUME #10 + DOESN'T REALLY DO MUCH +(617) PLEASE DO (616) NEXT + DO RESUME #11 + DO WATCH OUT FOR SUBSTITUTES +(616) PLEASE DO (615) NEXT + DO FORGET #11 + DO STASH .311+.312+.511+.512 + DO .311 <- .511 + DO .312 <- .512 + DO (301) NEXT + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .511 + DO ,201SUB.311.312#6 <- .512 + DO ,201SUB.311.312#7 <- #1$#0 + DO ,201SUB.501.502#3 <- .311 + DO ,201SUB.501.502#4 <- .312 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#5 + DO .312 <- ,201SUB.311.312#6 + DO .311 <- .1 + DO (301) NEXT + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + PLEASE DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE RETRIEVE .511+.512 + DO (603) NEXT +(615) PLEASE DO (614) NEXT + DO STASH .311+.312 + DO (303) NEXT + DO ,201SUB.311.312#5 <- .511 + DO ,201SUB.311.312#6 <- .512 + DO ,201SUB.311.312#7 <- #6$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + PLEASE DO (301) NEXT + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + PLEASE RESUME #13 +(614) PLEASE DO (613) NEXT + DO FORGET #13 + DO .602 <- #5$#0 + DO (602) NEXT + DON'T WORRY ABOUT THE CONSTANT NOISE +(613) PLEASE DO (612) NEXT + DO STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + PLEASE RESUME #15 +(612) PLEASE DO (611) NEXT + DO FORGET #15 + DO .602 <- #3$#0 + DO (602) NEXT +(611) PLEASE DO (610) NEXT + PLEASE HOW DID YOU GET HERE? +(610) PLEASE RESUME ',201SUB.311.312#7'~'#31$#0' +# Only for primitives! +(602) DO (304) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#7 <- .602 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RESUME #2 +(603) PLEASE FORGET #2 diff --git a/pit/unlambda.i b/pit/unlambda.i new file mode 100644 index 0000000..2ac849d --- /dev/null +++ b/pit/unlambda.i @@ -0,0 +1,855 @@ + PLEASE NOTE + +Copyright (C) 2001 Ørjan Johansen + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + PLEASE .200 <- #8 PLEASE NOTE AMOUNT OF INITIAL MEMORY + PLEASE .80 <- #80 PLEASE NOTE END-OF-LINE CHARACTER + + DO (100) NEXT PLEASE NOTE IO SETUP + DO (200) NEXT PLEASE NOTE MEMORY SETUP + DO (300) NEXT PLEASE NOTE REFERENCE COUNTING SETUP + DO (400) NEXT PLEASE NOTE PARSER TABLE SETUP + + DO (401) NEXT PLEASE NOTE PARSING + DON'T (404) NEXT PLEASE NOTE PRINTING PROGRAM + DO (501) NEXT PLEASE NOTE EVALUATION + DON'T (404) NEXT PLEASE NOTE PRINTING RESULT + DON'T (203) NEXT PLEASE NOTE MEMORY MAP + PLEASE GIVE UP + + PLEASE NOTE DIPLOMATIC RELATIONS + PLEASE NOTE .101=LAST READ .102=LAST WRITTEN +(100) DO ,101 <- #1 + PLEASE DO .101 <- #0 + DO .102 <- #0 + DO RESUME #1 + PLEASE READ ME A STORY +(101) DO (3101) NEXT + DO .101 <- .1 + PLEASE REINSTATE (3101) + DO RESUME #1 +(3101) DON'T THINK YOU CAN HAVE YOUR CAKE AND EAT IT + DO WRITE IN ,101 + PLEASE .1 <- ,101SUB#1 + DO .2 <- .101 + DO (1000) NEXT + PLEASE DO .101 <- .3~#255 + PLEASE RESUME '?.1$#512'~'#256$#256' +(102) DO .2 <- !2~#15'$!2~#240' + DO .2 <- !2~#15'$!2~#240' + DO .2 <- !2~#15'$!2~#240' + PLEASE RESUME #1 +(103) PLEASE .1 <- .102 + DO .102 <- .2 + DO (1010) NEXT + DO ,101SUB#1 <- .3 + PLEASE READ OUT ,101 + DO RESUME #1 + + DO ASSERT TERRITORIAL CLAIMS +(200) DO .204 <- #7 + DO ,201 <- .200 BY #32767 BY .204 +(3200) PLEASE DO .201 <- #0 + DO .202 <- #16383 + PLEASE RESUME #1 + + PLEASE LET THEM EAT CAKE + PLEASE NOTE .201+.202=MEMORY TOP +(201) DO (3201) NEXT +(5201) DON'T (202) NEXT + DO COME FROM (7202) + PLEASE .1 <- .201 + DO (4201) NEXT + PLEASE REINSTATE (5201) + DO RESUME #1 +(4201) DO (1020) NEXT + DO FORGET '#65535~"'?.1$.200'~'#0$#65535'"'~#1 + DO .201 <- .1 + PLEASE RESUME #1 + DON'T STEP ON THE GALOIS FIELD MINES +(3201) DO .202 <- "?.202$!202~#16384'"~'#16383$#1' + PLEASE RESUME "?!202~.202'$#32768"~"#16384$#16384" + + PLEASE STAND BY FOR ASSIMILATION +(202) PLEASE DON'T RESUME #3 + DO REINSTATE (202) + DO FORGET #1 + PLEASE STASH .203+,202 + DO .203 <- '.200$#0'~'#65535$#1' + DON'T TELL ME WE HAVE TO MOVE IT ALL? + DO ,202 <- .200 BY #32767 BY .204 + DO (3200) NEXT + DO ABSTAIN FROM (5201) + PLEASE DO (3202) NEXT + DO ,201 <- .203 BY #32767 BY .204 + DO (3200) NEXT + PLEASE ABSTAIN FROM (5201) + PLEASE DO (5202) NEXT + DO .200 <- .203 + DO ABSTAIN FROM (5201) + DO ABSTAIN FROM (202) +(7202) DO RETRIEVE .203+,202 +(9202) DO RESUME '?#32768$.203'~'#16384$#32768' +(3202) DO COME FROM (4202) + PLEASE DO (201) NEXT + DO ,202SUB.201.202#1 <- ,201SUB.201.202#1 + DO ,202SUB.201.202#2 <- ,201SUB.201.202#2 + DO ,202SUB.201.202#3 <- ,201SUB.201.202#3 + DO ,202SUB.201.202#4 <- ,201SUB.201.202#4 + DO ,202SUB.201.202#5 <- ,201SUB.201.202#5 + DO ,202SUB.201.202#6 <- ,201SUB.201.202#6 +(4202) DO ,202SUB.201.202#7 <- ,201SUB.201.202#7 +(5202) DO COME FROM (6202) + PLEASE DO (201) NEXT + DO ,201SUB.201.202#1 <- ,202SUB.201.202#1 + DO ,201SUB.201.202#2 <- ,202SUB.201.202#2 + DO ,201SUB.201.202#3 <- ,202SUB.201.202#3 + DO ,201SUB.201.202#4 <- ,202SUB.201.202#4 + DO ,201SUB.201.202#5 <- ,202SUB.201.202#5 + DO ,201SUB.201.202#6 <- ,202SUB.201.202#6 +(6202) DO ,201SUB.201.202#7 <- ,202SUB.201.202#7 + DO TELL ME ALL ABOUT YOURSELF +(203) DO READ OUT .201+.202+.301+.302+.311+.312 + DO (3200) NEXT + PLEASE REINSTATE (202) + DO ABSTAIN FROM (5201) + DO (3203) NEXT + PLEASE GIVE UP + PLEASE COME FROM (4203) +(3203) DO (201) NEXT + DO READ OUT .201+.202 + DO READ OUT ,201SUB.201.202#1 + DO READ OUT ,201SUB.201.202#2 + DO READ OUT ,201SUB.201.202#3 + DO READ OUT ,201SUB.201.202#4 + DO READ OUT ,201SUB.201.202#5 + DO READ OUT ,201SUB.201.202#6 +(4203) DO READ OUT ,201SUB.201.202#7 + + PLEASE NOTE + #1+#2=REFERENCE COUNT + #3+#4=CAR + #5+#6=CDR + #7=TYPE (TAG$DATA) + + PLEASE WELCOME TO THE BAZAAR +(300) PLEASE DO .301 <- #0 + DO .302 <- #0 + PLEASE NOTE NIL=.303+.304 + DO (303) NEXT + DO ,201SUB.311.312#1 <- #0 + PLEASE ,201SUB.311.312#2 <- #0 + DO ,201SUB.311.312#3 <- .311 + DO ,201SUB.311.312#4 <- .312 + DO ,201SUB.311.312#5 <- .311 + DO ,201SUB.311.312#6 <- .312 + DO ,201SUB.311.312#7 <- #0 + PLEASE .303 <- .311 + DO .304 <- .312 + DO RESUME #1 + + PLEASE REPORT NEW PURCHASES HERE +(301) PLEASE .1 <- ,201SUB.311.312#2 + DO .1 <- "?.1$!1~#16384'"~'#16383$#1' + DO ,201SUB.311.312#2 <- .1 + DO (3301) NEXT + PLEASE .1 <- ,201SUB.311.312#1 + DO .1 <- "?.1$!1~#16384'"~'#16383$#1' + DO ,201SUB.311.312#1 <- .1 + DO (3301) NEXT + PLEASE NOTE THAT IMMORTALITY IS TREASON + DO ,201SUB.311.312#2 <- #0 + DO RESUME #1 +(3301) PLEASE RESUME "?!1~.1'$#32768"~"#16384$#16384" + + PLEASE STAND IN LINE FOR TERMINATION + DO COME FROM (4302) +(302) PLEASE .1 <- ,201SUB.311.312#2 + DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0' + DO ,201SUB.311.312#2 <- .1 + DO (3302) NEXT + PLEASE .1 <- ,201SUB.311.312#1 + DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0' + DO ,201SUB.311.312#1 <- .1 + DO (3302) NEXT + PLEASE .1 <- .311 + DO .2 <- .312 + DO .311 <- ,201SUB.1.2#3 + DO .312 <- ,201SUB.1.2#4 + DO ,201SUB.1.2#3 <- .301 + DO ,201SUB.1.2#4 <- .302 + PLEASE .301 <- .1 +(4302) DO .302 <- .2 +(3302) PLEASE RESUME "?'#65535~"'?.1$#16383'~'#0$#65535'"'$#1"~#3 + + PLEASE LET ME INTRODUCE YOU TO .311+.312 +(303) PLEASE (3303) NEXT + DO .1 <- .301 + DO .2 <- .302 + DO .301 <- ,201SUB.1.2#3 + DO .302 <- ,201SUB.1.2#4 + PLEASE STASH .1+.2 + DO .311 <- ,201SUB.1.2#5 + DO .312 <- ,201SUB.1.2#6 + DO (302) NEXT + PLEASE RETRIEVE .1+.2 + DO .311 <- .1 + DO .312 <- .2 + DO (5303) NEXT +(3303) PLEASE DO (4303) NEXT + DO (201) NEXT + DO .311 <- .201 + DO .312 <- .202 +(5303) DO ,201SUB.311.312#1 <- #32767 + PLEASE ,201SUB.311.312#2 <- #32767 + DO ,201SUB.311.312#3 <- #0 + DO ,201SUB.311.312#5 <- #0 + PLEASE RESUME #2 +(4303) DO RESUME "?!301~.301'$#1"~#3 +(304) PLEASE (303) NEXT + DO ,201SUB.311.312#5 <- .303 + DO ,201SUB.311.312#6 <- .304 + DO RESUME #1 +(305) PLEASE (304) NEXT + DO ,201SUB.311.312#3 <- .303 + DO ,201SUB.311.312#4 <- .304 + DO RESUME #1 + + PLEASE NOTE `=#1 K=#2 K1=#3 S=#4 S1=#5 S2=#6 I=#7 V=#8 C=#9 + CONT=#10 D=#11 D1=#12 .=#13 E=#14 @=#15 ?=#16 + |=#17 (R=#18=#13$.80) +(3400) PLEASE STASH .1 + PLEASE (305) NEXT + PLEASE RETRIEVE .1 + DO ,201SUB.311.312#2 <- #0 + DO ,201SUB.311.312#7 <- .1$#0 + DO ,401SUB.1 <- .311 + DO ,402SUB.1 <- .312 + DO RESUME #1 +(400) PLEASE ,401 <- #18 + DO ,402 <- #18 + DO .1 <- #2 DO (3400) NEXT + DO .1 <- #4 DO (3400) NEXT + DO .1 <- #7 DO (3400) NEXT + DO .1 <- #8 DO (3400) NEXT + DO .1 <- #9 DO (3400) NEXT + DO .1 <- #11 DO (3400) NEXT + DO .1 <- #14 DO (3400) NEXT + DO .1 <- #15 DO (3400) NEXT + DO .1 <- #17 DO (3400) NEXT + DO .1 <- #18 DO (3400) NEXT + PLEASE ,201SUB.311.312#7 <- #13$.80 + PLEASE NOTE 7=ILLEGAL 6=BLANK 5=COMMENT + 4=PRIMITIVE 3=KRAPS 2=WHAT 1=SPOT +(410) PLEASE ,400 <- #127 + PLEASE .1 <- #127 + PLEASE (3410) NEXT + DO ,400SUB#8 <- #6 $ #0 + DO ,400SUB#10 <- #6 $ #0 + DO ,400SUB#13 <- #6 $ #0 + DO ,400SUB#32 <- #6 $ #0 + DO ,400SUB#35 <- #5 $ #0 + DO ,400SUB#46 <- #1 $ #13 + DO ,400SUB#63 <- #2 $ #16 + DO ,400SUB#64 <- #4 $ #15 + DO ,400SUB#67 <- #4 $ #9 + DO ,400SUB#68 <- #4 $ #11 + DO ,400SUB#69 <- #4 $ #14 + DO ,400SUB#73 <- #4 $ #7 + DO ,400SUB#75 <- #4 $ #2 + DO ,400SUB#82 <- #4 $ #18 + DO ,400SUB#83 <- #4 $ #4 + DO ,400SUB#86 <- #4 $ #8 + DO ,400SUB#96 <- #3 $ #0 + DO ,400SUB#99 <- #4 $ #9 + DO ,400SUB#100 <- #4 $ #11 + DO ,400SUB#101 <- #4 $ #14 + DO ,400SUB#105 <- #4 $ #7 + DO ,400SUB#107 <- #4 $ #2 + DO ,400SUB#114 <- #4 $ #18 + DO ,400SUB#115 <- #4 $ #4 + DO ,400SUB#118 <- #4 $ #8 +(5410) DO ,400SUB#124 <- #4 $ #17 + PLEASE COME FROM (3410) +(3410) PLEASE (4410) NEXT +(4410) PLEASE ,400SUB.1 <- #7 + DO .1 <- "?.1$!1~#64'"~'#63$#1' + DO RESUME "?!1~.1'$#64"~"#64$#64" + DO COME FROM (5410) + PLEASE NOTE KSIVCDE@|=#7 K1,S1,D1=#6 S2=#5 + CONT=#4 KRAPS=#3 WHAT=#2 SPOT=#1 +(420) PLEASE ,403 <- #17 + DO ,403SUB#1 <- #3 $ #6 + DO ,403SUB#2 <- #7 $ #210 + DO ,403SUB#3 <- #6 $ #210 + DO ,403SUB#4 <- #7 $ #202 + DO ,403SUB#5 <- #6 $ #202 + DO ,403SUB#6 <- #5 $ #202 + DO ,403SUB#7 <- #7 $ #146 + DO ,403SUB#8 <- #7 $ #106 + DO ,403SUB#9 <- #7 $ #194 + DO ,403SUB#10 <- #4 $ #0 + DO ,403SUB#11 <- #7 $ #34 + DO ,403SUB#12 <- #6 $ #34 + DO ,403SUB#13 <- #1 $ #116 + DO ,403SUB#14 <- #7 $ #162 + DO ,403SUB#15 <- #7 $ #2 + DO ,403SUB#16 <- #2 $ #252 + DO ,403SUB#17 <- #7 $ #62 + PLEASE RESUME #1 + + PLEASE NOTE 3=TOP 2=BOTH 1=LAST +(401) DO (305) NEXT + DO .401 <- .311 + DO .402 <- .312 + DO ,201SUB.401.402#7 <- #3 + PLEASE (402) NEXT + PLEASE ABSTAIN FROM SUCH MEANINGLESS LANGUAGE +(4402) DO RESUME '?"?!101~#128'$!101~.101'"$#2'~#3 +(3402) DO (3101) NEXT + DOG ATE END OF MY ESSAY + DO COME FROM (5402) +(402) DO (3402) NEXT + PLEASE (4402) NEXT +(5402) DO (412) NEXT + DON'T COMMENT +(412) PLEASE (422) NEXT + DO COME FROM (4412) + DO (3402) NEXT +(4412) PLEASE (3412) NEXT +(3412) DO FORGET "?'#255~"'?.101$#10'~'#0$#65535'"'$#1"~#1 + DO FORGET "?'#255~"'?.101$#13'~'#0$#65535'"'$#1"~#1 + DO RESUME #1 + DO YOU THINK _THIS_ IS PRIMITIVE? +(422) PLEASE (432) NEXT + DO .311 <- ,401SUB!410~"#0$#31"' + DO .312 <- ,402SUB!410~"#0$#31"' + DO FORGET #1 + PLEASE (403) NEXT + PLEASE FILL OUT THE APPLICATION FORM +(432) PLEASE (442) NEXT + DO (305) NEXT + DO ,201SUB.311.312#5 <- .401 + DO ,201SUB.311.312#6 <- .402 + DO ,201SUB.311.312#7 <- #2 + PLEASE .401 <- .311 + DO .402 <- .312 + DO RESUME #3 + DO WHAT? +(442) PLEASE (452) NEXT + DO (3402) NEXT + DO (305) NEXT + DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.101 + DO FORGET #3 + PLEASE (403) NEXT + DOT OR SPOT, WE'RE ALL CIVILIZED PEOPLE HERE +(452) PLEASE (462) NEXT + DO (3402) NEXT + DO (305) NEXT + DO .2 <- .101 + PLEASE (102) NEXT + DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.2 + DO FORGET #4 + PLEASE (403) NEXT +(462) DO .410 <- ,400SUB.101 + DO RESUME .410~'#7$#0' + + DO YOU KNOW THE TOP MAN FOR THIS OPERATION? + DO COME FROM (3423) +(403) PLEASE (413) NEXT + DO STASH .311+.312 + DO .311 <- .401 + DO .312 <- .402 + PLEASE (302) NEXT + DO RETRIEVE .311+.312 + DO RESUME #4 + PLEASE CAN I HAVE SOME MORE? +(413) PLEASE (423) NEXT + DO ,201SUB.401.402#3 <- .311 + DO ,201SUB.401.402#4 <- .312 + DO ,201SUB.401.402#7 <- #1 + PLEASE RESUME #3 + DOUBLE APPLICATION FORM RECEIVED +(423) PLEASE (433) NEXT + DO .1 <- ,201SUB.401.402#5 + DO .2 <- ,201SUB.401.402#6 + DO ,201SUB.401.402#5 <- .311 + DO ,201SUB.401.402#6 <- .312 + DO ,201SUB.401.402#7 <- #1$#0 + DO .311 <- .401 + PLEASE .312 <- .402 + DO .401 <- .1 + DO .402 <- .2 +(3423) DO FORGET #2 +(433) PLEASE RESUME ,201SUB.401.402#7 + + DO YOU WANT A REPORT? +(404) DO STASH .311+.312 + PLEASE (6404) NEXT + DO RETRIEVE .311+.312 + DO .2 <- .80 DO (103) NEXT + DO RESUME #1 +(6404) DO .401 <- .303 + DO .402 <- .304 + DO COME FROM (4404) + PLEASE DO (5404) NEXT + PLEASE (3404) NEXT + DO .311 <- ,201SUB.401.402#3 + DO .312 <- ,201SUB.401.402#4 + PLEASE STASH .311+.312 + DO .1 <- ,201SUB.401.402#5 + DO .2 <- ,201SUB.401.402#6 + DO ,201SUB.401.402#3 <- .303 + DO ,201SUB.401.402#4 <- .304 + DO ,201SUB.401.402#5 <- .303 + DO ,201SUB.401.402#6 <- .304 + DO .311 <- .401 + DO .312 <- .402 + DO .401 <- .1 + DO .402 <- .2 + PLEASE DO (302) NEXT +(4404) DO RETRIEVE .311+.312 +(3404) DO RESUME "?"#65535~',201SUB.401.402#7'"$#2"~#3 + DO COME FROM (5404) +(5404) PLEASE DO (414) NEXT + PLEASE DON'T BRING AUSTRALOPITHECI INTO THE HOUSE +(414) PLEASE DO (424) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + DO RESUME #2 +(424) PLEASE DO (434) NEXT + DO .2 <- #6 DO (103) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + PLEASE COME FROM (4434) +(3424) DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO RESUME #2 + DOUBLE DOUBLE TOIL AND TROUBLE +(434) PLEASE DO (444) NEXT + DO .2 <- #6 DO (103) NEXT DO (103) NEXT + DO .2 <- .411~'#0$#255' + DO (103) NEXT + DO COME FROM (3454) +(3434) PLEASE STASH .311+.312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .401 + DO ,201SUB.311.312#6 <- .402 + DO ,201SUB.311.312#7 <- #1 + DO .401 <- .311 DO .402 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.401.402#3 <- ,201SUB.311.312#5 + DO ,201SUB.401.402#4 <- ,201SUB.311.312#6 +(4434) DO FORGET #1 + DO CONTINUATIONS DREAM OF MONADIC SHEEP +(444) PLEASE DO (454) NEXT + PLEASE DO .2 <- #60 DO (103) NEXT + PLEASE DO .2 <- #194 DO (103) NEXT + PLEASE DO .2 <- #242 DO (103) NEXT + PLEASE DO .2 <- #114 DO (103) NEXT + PLEASE DO .2 <- #42 DO (103) NEXT + PLEASE DO .2 <- #124 DO (103) NEXT + PLEASE RESUME #5 +(454) PLEASE DO (464) NEXT + PLEASE FORGET #2 + DO .2 <- #6 +(3454) DO (103) NEXT + DON'T LOOK LIKE A QUESTION MARK +(464) PLEASE DO (474) NEXT + DO .2 <- .411~'#0$#255' DO (103) NEXT + PLEASE DO .2 <- .410~'#0$#255' + DO (102) NEXT DO (103) NEXT + DO RESUME #7 + PLEASE CAN YOU SPOT THE DIFFERENCE? +(474) PLEASE DO (484) NEXT + DO .2 <- .411~'#0$#255' + DO .410 <- .410~'#0$#255' + DO .411 <- #7$#74 + PLEASE DO (3474) NEXT + DO (103) NEXT + PLEASE DO .2 <- .410 + DO (103) NEXT + DO RESUME #8 +(3474) DO RESUME '"?"#255~'"?.410$.80"~"#0$#65535"'"$#3"$#1'~#11 +(484) DO .410 <- ,201SUB.311.312#7 + DO .411 <- ,403SUB!410~"#31$#0"' + PLEASE RESUME .411~'#7$#0' + + PLEASE WELCOME TO THE PITS OF EVAL +(501) DO .511 <- .311 + DO .512 <- .312 + PLEASE DO (3501) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE NOTE EVAL2=1 APPLY=2 + PLEASE NOTE + .601=CURRENT CHARACTER + .501+.502=CURRENT CONTINUATION + .511+.512=CURRENT EXPRESSION +(3501) DO .601 <- #256 + DO (304) NEXT + DO ,201SUB.311.312#3 <- ,401SUB#14 + DO ,201SUB.311.312#4 <- ,402SUB#14 + DO ,201SUB.311.312#7 <- #2 + DO .501 <- .311 + DO .502 <- .312 + PLEASE COME FROM (3622) + PLEASE COME FROM (7503) +(502) DO (3502) NEXT + DO (503) NEXT +(4502) PLEASE RESUME "?'#15~"',201SUB.511.512#7'~'#30$#0'"'$#1"~#3 + DO NOTE KRAPS + PLEASE COME FROM (5502) +(3502) DO (4502) NEXT + PLEASE (303) NEXT + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + DO .311 <- ,201SUB.511.512#5 + DO .312 <- ,201SUB.511.512#6 + PLEASE DO (301) NEXT + DO ,201SUB.501.502#3 <- .311 + DO ,201SUB.501.502#4 <- .312 + DO .311 <- ,201SUB.511.512#3 + DO .312 <- ,201SUB.511.512#4 + PLEASE DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 +(5502) DO .512 <- .312 + PLEASE NOTE THAT WE ARE CURRENTLY PROCESSING YOUR APPLICATION +(503) DO FORGET #1 + PLEASE (3503) NEXT + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + DO (301) NEXT + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT +(8503) PLEASE RETRIEVE .311+.312 +(4503) PLEASE RESUME ,201SUB.501.502#7 + PLEASE STAY WITH US FOR THE SECOND HALF OF THE SHOW +(3503) PLEASE (4503) NEXT + DO (5503) NEXT + DO FORGET #1 + DO .311 <- .501 + DO .312 <- .502 + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + PLEASE DO (301) NEXT + DO STASH .311+.312 + DO (304) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#7 <- #2 + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.501.502#5 <- .311 + DO ,201SUB.501.502#6 <- .312 + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 +(7503) DO (302) NEXT + DO D DO DAH +(6503) PLEASE RESUME + "?'#15~"'?"',201SUB.511.512#7'~'#31$#0'"$#11' + ~"#0$#65535""'$#1"~#3 +(5503) DO (6503) NEXT + DO FORGET #2 + DO .311 <- ,201SUB.501.502#3 + DO .312 <- ,201SUB.501.502#4 + DO (301) NEXT + PLEASE STASH .311+.312 + DO (304) NEXT + DO ,201SUB.311.312#7 <- #12$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + DO .311 <- ,201SUB.501.502#5 + DO .312 <- ,201SUB.501.502#6 + PLEASE DO (301) NEXT + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + PLEASE DO (302) NEXT + DO RETRIEVE .311+.312 + DO .501 <- .311 + DO .502 <- .312 + DO (503) NEXT + + PLEASE LEARN THE DIFFERENCE BETWEEN APPLYS AND ORANGUTANS + PLEASE COME FROM (8503) + DO COME FROM (603) +(601) PLEASE DO (627) NEXT + DO (503) NEXT + PLEASE DON'T CLIMB INTO THE PIPES +(627) PLEASE DO (626) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE DO (3627) NEXT + DO STASH .311+.312 + PLEASE DO (305) NEXT + DO .2 <- .601 + DO (102) NEXT + DO ,201SUB.311.312#7 <- #13$.2 + DO .511 <- .311 + DO .512 <- .312 + DO RETRIEVE .311+.312 + PLEASE DO (603) NEXT +(3627) PLEASE DO (4627) NEXT + DO FORGET #1 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT +(4627) PLEASE RESUME '?.601$#512'~'#256$#256' + PLEASE WHAT DID YOU SAY? +(626) PLEASE DO (625) NEXT + DO .602 <- ',201SUB.311.312#7'~'#0$#255' + DO (302) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE DO (3626) NEXT + DO FORGET #1 + DO .511 <- ,401SUB#7 + DO .512 <- ,402SUB#7 + PLEASE DO (603) NEXT +(3626) PLEASE DO (4626) NEXT + DO FORGET #2 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT +(4626) DO RESUME "?'#255~"'?.601$.602'~'#0$#255'"'$#2"~#3 + DON'T FALL INTO THE WHIRLPOOL +(625) PLEASE DO (624) NEXT + DO .311 <- .511 + DO .312 <- .512 + DO (3625) NEXT + DO FORGET #2 + DO .601 <- .101 + DO .511 <- ,401SUB#7 + DO .512 <- ,402SUB#7 + PLEASE DO (603) NEXT +(3625) DO (3101) NEXT + PLEASE REINSTATE (3101) + DO FORGET #3 + DO .601 <- #256 + DO .511 <- ,401SUB#8 + DO .512 <- ,402SUB#8 + PLEASE DO (603) NEXT + DO YOU THINK THIS IS THE END? +(624) PLEASE DO (623) NEXT + DO RESUME #5 + PLEASE STAY IN ONE SPOT SO I CAN HIT YOU +(623) PLEASE DO (622) NEXT + DO .2 <- ',201SUB.311.312#7'~'#0$#255' + DO (103) NEXT + DO (302) NEXT + DO RESUME #5 + DON'T PROMISE WHAT YOU CAN'T KEEP +(622) PLEASE DO (621) NEXT + DO FORGET #6 + DO STASH .311+.312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 +(3622) DO (302) NEXT + DO EXPECT SOME DELAY +(621) PLEASE DO (620) NEXT + DO RESUME #7 + PLEASE CONTINUE, NOTHING TO SEE HERE... +(620) PLEASE DO (619) NEXT + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + PLEASE .501 <- .311 + PLEASE .502 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + DO RESUME #8 + DO CALL ME ANY TIME +(619) PLEASE DO (618) NEXT + DO FORGET #8 + DO .311 <- .511 + DO .312 <- .512 + DO STASH .311+.312 + DO .311 <- .501 + DO .312 <- .502 + DO (301) NEXT + PLEASE DO (304) NEXT + DO ,201SUB.311.312#3 <- .501 + DO ,201SUB.311.312#4 <- .502 + DO ,201SUB.311.312#7 <- #10$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (603) NEXT + DON'T LOOK INTO THE ABYSS OR THE ABYSS LOOKS BACK INTO YOU +(618) PLEASE DO (617) NEXT + DO STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO .511 <- .311 + DO .512 <- .312 + DO RESUME #10 + DOESN'T REALLY DO MUCH +(617) PLEASE DO (616) NEXT + DO RESUME #11 + DO WATCH OUT FOR SUBSTITUTES +(616) PLEASE DO (615) NEXT + DO FORGET #11 + DO STASH .311+.312+.511+.512 + DO .311 <- .511 + DO .312 <- .512 + DO (301) NEXT + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .501 + DO ,201SUB.311.312#6 <- .502 + DO ,201SUB.311.312#7 <- #1 + DO .501 <- .311 + DO .502 <- .312 + PLEASE DO (303) NEXT + DO ,201SUB.311.312#5 <- .511 + DO ,201SUB.311.312#6 <- .512 + DO ,201SUB.311.312#7 <- #1$#0 + DO ,201SUB.501.502#3 <- .311 + DO ,201SUB.501.502#4 <- .312 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#5 + DO .312 <- ,201SUB.311.312#6 + DO .311 <- .1 + DO (301) NEXT + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + PLEASE DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + DO .311 <- .511 + DO .312 <- .512 + PLEASE RETRIEVE .511+.512 + DO (603) NEXT +(615) PLEASE DO (614) NEXT + DO STASH .311+.312 + DO (303) NEXT + DO ,201SUB.311.312#5 <- .511 + DO ,201SUB.311.312#6 <- .512 + DO ,201SUB.311.312#7 <- #6$#0 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + PLEASE DO (301) NEXT + DO ,201SUB.511.512#3 <- .311 + DO ,201SUB.511.512#4 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + PLEASE RESUME #13 +(614) PLEASE DO (613) NEXT + DO FORGET #13 + DO .602 <- #5$#0 + DO (602) NEXT + DON'T WORRY ABOUT THE CONSTANT NOISE +(613) PLEASE DO (612) NEXT + DO STASH .311+.312 + DO .311 <- .511 + DO .312 <- .512 + DO (302) NEXT + PLEASE RETRIEVE .311+.312 + DO STASH .311+.312 + DO .1 <- ,201SUB.311.312#3 + DO .312 <- ,201SUB.311.312#4 + DO .311 <- .1 + DO (301) NEXT + DO .511 <- .311 + DO .512 <- .312 + PLEASE RETRIEVE .311+.312 + DO (302) NEXT + PLEASE RESUME #15 +(612) PLEASE DO (611) NEXT + DO FORGET #15 + DO .602 <- #3$#0 + DO (602) NEXT +(611) PLEASE DO (610) NEXT + PLEASE HOW DID YOU GET HERE? +(610) PLEASE RESUME ',201SUB.311.312#7'~'#31$#0' +(602) DO (304) NEXT + DO ,201SUB.311.312#3 <- .511 + DO ,201SUB.311.312#4 <- .512 + DO ,201SUB.311.312#7 <- .602 + DO .511 <- .311 + DO .512 <- .312 + PLEASE RESUME #2 +(603) PLEASE FORGET #2 diff --git a/src/abcess.h b/src/abcess.h index e677d46..920eb6c 100644 --- a/src/abcess.h +++ b/src/abcess.h @@ -67,6 +67,7 @@ extern unsigned int popnext(int n); extern unsigned int resume(unsigned int n); extern unsigned int pin(void); extern void clockface(bool mode); +extern void clcsemantics(bool mode); /* AIS */ extern void pout(unsigned int val); extern void binin(unsigned int type, array *a, bool forget); extern void binout(unsigned int type, array *a); diff --git a/src/atari.bin b/src/atari.bin new file mode 100644 index 0000000000000000000000000000000000000000..3d6bc5c1375d32cd7b8937b4be1d53016711618f GIT binary patch literal 143 zcmXpsvfwi0sz^^uO-W8lrLCi@r*B|rWNcz;W^Q3=Wo=_?x76Oz$=Su#&E3P(%iG7-&p#kAC^#fE uEIcAIDmo^%#vvgwDLExIEj=SMD?2AQFTbF$sJNuGth}PKs+ys;t{wo#rzAxH literal 0 HcmV?d00001 diff --git a/src/baudot.bin b/src/baudot.bin new file mode 100644 index 0000000000000000000000000000000000000000..4750b3ea95c27ee0152ffd2203f0622b897109b4 GIT binary patch literal 142 zcmXpu;xgf?sHjLyNlr@SVgLfyRO3ZlK;W3DtE~V8!Nu$`o|zWPp{3@wyg=ZRqM{X4 zWK!*wrC#Tkr?b>8O|ix~*(%OETf-)##56jpN~t!yT+_}c$0*h#gMlNm(##>CzQ^zbTtNMW)>FTTs_r@3jO%7GHV7VCPqd8HP0mU literal 0 HcmV?d00001 diff --git a/src/bin2c.c b/src/bin2c.c new file mode 100644 index 0000000..7b6315e --- /dev/null +++ b/src/bin2c.c @@ -0,0 +1,47 @@ +/***************************************************************************** + +NAME + bin2c.c -- convert a binary data file to a C source file + +LICENSE TERMS + Copyright (C) 2007 Alex Smith + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +***************************************************************************/ + +#include + +int main(int argc, char** argv) +{ + int c,colno; + if(argc!=2) + { + fprintf(stderr,"Usage: bin2c varname < infile > outfile\n"); + return 0; + } + puts("/* This file is automatically generated; to modify it,"); + puts(" modify the source file, not this file. */"); + printf("char* %s=\"\\\n",argv[1]); + colno=0; + while((c=getchar())!=EOF) + { + printf("\\x%02x",c); + colno+=4; + if(colno>70) {puts("\\"); colno=0;} + } + puts("\";"); + return 0; +} diff --git a/src/cesspool.c b/src/cesspool.c index f11283f..98174ba 100644 --- a/src/cesspool.c +++ b/src/cesspool.c @@ -1,10 +1,10 @@ /***************************************************************************** -NAME +NAME cesspool.c -- storage management and runtime support for INTERCAL LICENSE TERMS - Copyright (C) 1996 Eric S. Raymond + Copyright (C) 1996 Eric S. Raymond This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,6 +53,12 @@ LICENSE TERMS FILE* cesspoolin=0; FILE* cesspoolout=0; +/* AIS: To keep ld happy. This shouldn't ever actually get used, but + * give it a sane value just in case it does. (This is referenced by + * clc-cset.c, but due to the linking-in of the character sets + * themselves the reference should never be used.) */ +char* datadir="."; + /********************************************************************** * * The following functions manipulate the nexting stack @@ -62,6 +68,8 @@ FILE* cesspoolout=0; int* next; /* AIS: now allocated by ick-wrap.c */ int nextindex = 0; +static int clcsem = 0; /* AIS */ + void pushnext(int n) { if (nextindex < MAXNEXT) @@ -109,7 +117,7 @@ unsigned int pin(void) extern int wimp_mode; if(!cesspoolin) cesspoolin=stdin; /* AIS */ - + if (fgets(buf, BUFSIZ, cesspoolin) == (char *)NULL) lose(E562, lineno, (char *)NULL); n = strlen(buf) - 1; @@ -280,6 +288,11 @@ void clockface(bool mode) } } +void clcsemantics(bool mode) /* AIS: CLC-INTERCAL semantics mode? */ +{ + clcsem=mode; +} + void pout(unsigned int val) /* output in `butchered' Roman numerals; see manual, part 4.4.13 */ { @@ -287,7 +300,7 @@ void pout(unsigned int val) extern int wimp_mode; if(!cesspoolout) cesspoolout=stdout; /* AIS */ - + if(wimp_mode) { (void) fprintf(cesspoolout,"%u\n",val); } @@ -298,6 +311,107 @@ void pout(unsigned int val) fflush(cesspoolout); } +/********************************************************************** + * + * AIS: CLC-INTERCAL bitwise I/O, only used in CLC-INTERCAL semantics + * mode. The I/O is done in extended Baudot for a tail array, or in + * mingled form for a hybrid array; for the Baudot, we rely on + * clc-cset.c and on the Baudot and Latin-1 character sets that are + * linked to libick.a (or libickmt.a), so the final executable doesn't + * reference the compiler's libraries. clc-cset.c is designed to + * handle this all transparently, though, so we don't have to worry + * about the details. I wrote the next two functions. + * + **********************************************************************/ + +/* AIS: From clc-cset.c */ +extern int clc_cset_convert(char* in, char* out, char* incset, + char* outcset, int padstyle, int outsize, + FILE* errsto); + +static void clcbinin(unsigned int type, array *a, bool forget) +{ + int i; + char* buf, *tempcp; + /* Allocating one byte per element in the array must be enough, + * because the Baudot version cannot possibly be shorter than the + * original Latin-1, plus one for the terminating NUL. */ + i=a->dims[0]; /* we already know that there's 1 dim only */ + if(!i) i=1; + buf=malloc(i+1); + if(!buf) lose(E252, lineno, (char*)NULL); + if(!fgets(buf,a->dims[0],cesspoolin)) + strcpy(buf,"\n"); /* EOF inputs the null string in CLC-INTERCAL */ + tempcp=strrchr(buf,'\n'); /* still working in ASCII at this point */ + if(!tempcp) /* input too long for the array is an error */ + { + free(buf); + lose(E241, lineno, (char*)NULL); + } + *tempcp='\0'; /* chomp the final newline */ + tempcp=malloc(6*i+12); /* to be on the safe side, even though + * Baudot doesn't use 16-byte chars */ + if(!tempcp) lose(E252, lineno, (char*)NULL); + /* Zero the array now. */ + i=a->dims[0]; + if(!forget) while(i--) + if(type==TAIL) + a->data.tail[i]=0; + else + a->data.hybrid[i]=0; + i=clc_cset_convert(buf,tempcp,"latin1","baudot",2,6*a->dims[0]+12,0); + /* Negative i ought to be impossible here; check anyway, and cause + * an internal error if it has happened. */ + if(i<0) lose(E778, lineno, (char*)NULL); + if((unsigned)i>a->dims[0]) lose(E241, lineno, (char*)NULL); + if(!forget) while(i--) + if(type==TAIL) + a->data.tail[i]=tempcp[i]+(rand()/(RAND_MAX/256))*256; + else + a->data.hybrid[i]=tempcp[i]+(rand()/(RAND_MAX/256))*256; + free(tempcp); + free(buf); +} + +static void clcbinout(unsigned int type, array* a) +{ + int i; + char* buf, *tempcp; + buf=malloc(a->dims[0]+1); + if(!buf) lose(E252, lineno, (char*) NULL); + i=0; tempcp=buf; + while((unsigned)idims[0]) + { + if(type==TAIL) + *tempcp=a->data.tail[i]; + else + *tempcp=a->data.hybrid[i]; + i++; + if(*tempcp) tempcp++; /* NULs are ignored for some reason, but + * that's the behaviour the CLC-INTERCAL + * specs specify */ + } + *tempcp=0; + /* tempcp is definitely overkill here, but the *6+6 rule is being + * obeyed because that way the code is robust against any future + * changes in character sets. */ + tempcp=malloc(a->dims[0]*6+12); + if(!tempcp) lose(E252, lineno, (char*) NULL); + i=clc_cset_convert(buf,tempcp,"baudot","latin1",0,6*a->dims[0]+12,0); + tempcp[i]=0; + /* CLC-INTERCAL bails out on invalid characters. C-INTERCAL uses + * instead the behaviour of replacing them with character code 26. + * (This is actually the purpose of character code 26 in ASCII, I + * think, although this is derived from memory; I don't know of any + * other system that uses it for this purpose, though, and the + * ability to confuse Windows with it is worth what might be lost + * through standards compliance.) */ + while(i--) if(!tempcp[i]) tempcp[i]=26; + fprintf(cesspoolout,"%s\n",tempcp); + free(tempcp); + free(buf); +} + /********************************************************************** * * The following two routines implement bitwise I/O. They assume @@ -314,9 +428,11 @@ void binin(unsigned int type, array *a, bool forget) if (a->rank != 1) lose(E241, lineno, (char *)NULL); - + if(!cesspoolin) cesspoolin=stdin; /* AIS */ + if(clcsem) {clcbinin(type, a, forget); return;} /* AIS */ + for (i = 0 ; i < a->dims[0] ; i++) { v = ((c=fgetc(cesspoolin)) == EOF) ? 256 : (c - lastin) % 256; lastin = c; @@ -338,7 +454,9 @@ void binout(unsigned int type, array *a) lose(E241, lineno, (char *)NULL); if(!cesspoolout) cesspoolout=stdout; /* AIS */ - + + if(clcsem) {clcbinout(type, a); return;} /* AIS */ + for (i = 0 ; i < a->dims[0] ; i++) { if (type == TAIL) c = lastout - a->data.tail[i]; diff --git a/src/clc-cset.c b/src/clc-cset.c new file mode 100644 index 0000000..b7010c3 --- /dev/null +++ b/src/clc-cset.c @@ -0,0 +1,384 @@ +/***************************************************************************** + +NAME + clc-cset.c -- CLC-INTERCAL character set support for C-INTERCAL + +LICENSE TERMS + Copyright (C) 2007 Alex Smith + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +***************************************************************************/ + +/* + The input is read from files such as latin1.bin and ebcdic.bin. + These contain three lines of text data that specify the length of + the character set (number of characters in each shift state), the + number of shift states, and the bit order of the input. The bit + order can either be 8 characters long (msb down to lsb) or 16 (the + first byte in a pair, followed by the second); each bit of the input + is transferred to the corresponding bit in a binary table that + follows (a for the lsb, b for the second least significant bit, up + to l for the 12th least significant bit; at most 12 significant bits + are allowed), or x for a don't care on the bit. The table that + follows is the relevant character codes in Latin-1 (which is used as + the interconversion language); if shift states are used, they're + represented by character codes 1, 2, 3, etc.. Invalid characters are + represented by character code 0, and changed to nulls on output. The + order of the bytes is 'Latin-1 for this set's char 0 in shift state + 1', 'Latin-1 for this set's char 0 in shift state 2', ..., 'Latin-1 + for this set's char 1 in shift state 1', and so on. + + Note that as the character set feature is designed to mirror + CLC-INTERCAL's, I've sprinkled a bit of idiomatic Perl throughout + the code. This is quite rare, though, as it has to be also legal in C. + */ + +#include +#include +#include +#include "uncommon.h" +#define NCSETRECENT 8 + +/* Sometimes we want to link the character set files to the program + * rather than reading them from disk; in this case, these extern + * variables will be set non-null by object files invented + * specifically for the purpose. */ +extern char* clc_cset_atari; +extern char* clc_cset_baudot; +extern char* clc_cset_ebcdic; +extern char* clc_cset_latin1; + +static char* clc_cset_ptr=0; + +/* Fake that we're reading hardcoded characters from a file. This + * method of doing it is obviously not thread-safe. */ +int clc_cset_hardcoderead(FILE* ignored) +{ + (void) ignored; + return *clc_cset_ptr++; +} + +struct cset +{ + unsigned char set[4096]; /* allow up to 12 bits of data+shifts */ + int setlen; + int shifts; + char setname[9]; /* 8.3 filenames are enforced! */ + char bitorder[16]; + int nbytes; +}; + +/* In particular, this initialises the setnames to the null string, + * and clears nbytes. Both of these are used to determine whether a + * cset is valid or not. */ +static struct cset cset_recent[NCSETRECENT]={{{0},0,0,{0},{0},0}}; +static int csetow=0; /* which cset to overwrite next */ + +/* For help finding files */ +extern char* globalargv0; +extern char* datadir; + +static void clc_cset_load(struct cset* cs, char* fname) +{ + FILE* in; + char buf[13]; /* enough for an 8.3 filename */ + int i,j,c; + int (*ipf)(FILE*); + /* Avoid buffer-overflow attacks. */ + if(strlen(fname)>8) return; + /* If clc_cset_atari is non-null, then don't read from disk. */ + if(clc_cset_atari) + { + /* If the character sets have been hardcoded, only accept + * hardcoded chararacter sets. */ + clc_cset_ptr=0; + if(!strcmp(fname,"atari")) clc_cset_ptr=clc_cset_atari; + if(!strcmp(fname,"baudot")) clc_cset_ptr=clc_cset_baudot; + if(!strcmp(fname,"ebcdic")) clc_cset_ptr=clc_cset_ebcdic; + if(!strcmp(fname,"latin1")) clc_cset_ptr=clc_cset_latin1; + if(!clc_cset_ptr) return; /* not a hardcoded charset */ + in=0; + ipf=clc_cset_hardcoderead; + } + else + { + sprintf(buf,"%s.bin",fname); + if(!(in=findandfopen(buf,datadir,"rb",globalargv0))) return; + ipf=fgetc; + } + /* First row: setlen */ + cs->setlen=0; + for(;;) + { + /* The input is definitely in ASCII, even if the C program isn't, + which is why numeric codes are used. */ + c=ipf(in); + if(c==EOF) {if(in) fclose(in); return;} /* error or EOF */ + if(c<48||c>57) break; + cs->setlen*=10; + cs->setlen+=c-48; + } + if(c!=10) {if(in) fclose(in); return;} + /* Second row: shifts. This can be from 1 to 9. */ + c=ipf(in); + if(c<49||c>57) {if(in) fclose(in); return;} + cs->shifts=c-48; + if(ipf(in)!=10) {if(in) fclose(in); return;} + /* Third row: byte order. */ + i=0; + while(((c=ipf(in)))>96&&i<16) cs->bitorder[i++]=c; + /* Sanity check; that it is a whole number of bytes, that the input + * format is correct, and that there are at most 4096 bytes of data + * total. */ + if(c!=10||i%8||!i||cs->setlen*cs->shifts>4096) return; + /* i/8 is now the number of bytes, but don't set that yet in case + * there's an error later. */ + /* Rest of file: the bytes themselves. */ + j=0; + while(jsetlen*cs->shifts) + if((cs->set[j++]=c=ipf(in)),c==EOF&&in) {if(in) fclose(in); return;} + if(in) fclose(in); + /* Now set the name and number of bytes, indicating a successful + * load. */ + cs->nbytes=i/8; + strcpy(cs->setname,fname); +} + +/* Helper function for fixing bit order in output. */ +static void bitencout(char** pop, struct cset* co, + unsigned short val, int padstyle) +{ + unsigned short outword=0; + int i=co->nbytes*8; + while(i--) + /* 108 is 'l' in Latin-1 */ + if(co->bitorder[i]>108) + { + if((padstyle==1&&(i==1||i==9)&&!(outword&(1<<(co->nbytes*8-i))))|| + (padstyle==2&&(rand()>RAND_MAX/2||!outword))) + outword |= 1<<(co->nbytes*8-i-1); + } + /* Copy the appropriate bit from val to outword. */ + else outword |= ((val>>(co->bitorder[i]-97))&1)<<(co->nbytes*8-i-1); + if(co->nbytes==2) *(*pop)++=outword/256; + *(*pop)++=outword%256; +} + +/* padstyle is 0 to pad with zeros, 1 to pad to make the output + * printable characters, or 2 to pad with garbage, avoiding 0s. + * Return value is the number of characters in the output string, + * which may contain embedded NULs if the input contained invalid + * characters. Returns -1 on error. The caller is responsible for + * making sure that out is big enough, but as a check, no more than + * outsize-1 characters and a NUL will be written to out. The code is + * conservative about this; to be safe, make outsize six times as long + * as the in is (including in's terminal NUL), plus 6. */ +int clc_cset_convert(char* in, char* out, char* incset, char* outcset, + int padstyle, int outsize, FILE* errsto) +{ + int ic=-1, oc=-1; + int i; + int ssi, sso; + unsigned short tus, csi; + char* ip, *op; + struct cset *csri, *csro; + int noconvwarn=0; + int substwarn=0; + /* First, see if we have a recently-used version of incset or outcset. */ + i=NCSETRECENT; + while(i--) + { + (void)(strcmp(incset,cset_recent[i].setname) || (ic=i)); + (void)(strcmp(outcset,cset_recent[i].setname) || (oc=i)); + } + /* Find a blank entry to load on top of. */ + if(ic==-1) for(i=NCSETRECENT;i--;) if(!cset_recent[i].nbytes) ic=i; + if(oc==-1) for(i=NCSETRECENT;i--;) if(!cset_recent[i].nbytes&&i!=ic) oc=i; + /* Failing that, find any entry to load on top of. */ + (void)(ic==-1 && (cset_recent[ic=csetow++].nbytes=0)); + if(csetow==ic) csetow++; + csetow%=NCSETRECENT; + (void)(oc==-1 && (cset_recent[oc=csetow++].nbytes=0)); + csetow%=NCSETRECENT; + /* If the character set hasn't been loaded, load it now. */ + cset_recent[ic].nbytes || (clc_cset_load(cset_recent+ic,incset),0); + cset_recent[oc].nbytes || (clc_cset_load(cset_recent+oc,outcset),0); + csri=cset_recent+ic; + csro=cset_recent+oc; + /* If a character set failed to load, bail out. */ + if(!csri->nbytes) + { + if(errsto) fprintf(errsto,"Error: Nonexistent input character set.\n"); + return -1; + } + if(!csro->nbytes) + { + if(errsto) fprintf(errsto,"Error: Nonexistent output character set.\n"); + return -1; + } + /* There is no initial shift state. */ + ssi=sso=0; + csri->shifts==1 && (ssi=1); + csro->shifts==1 && (sso=1); + ip=in; op=out; + while(*ip&&(op-out)nbytes==2) + { + tus*=256; + tus+=(unsigned char)*ip++; + } + i=csri->nbytes*8; + csi=0; + while(i--) + { + /* 108 is 'l' in Latin-1 */ + if(csri->bitorder[i]>108) continue; + /* Copy the appropriate bit from tus to csi. */ + csi |= ((tus>>(csri->nbytes*8-i-1))&1)<<(csri->bitorder[i]-97); + } + if(csi>csri->setlen) + { + bitencout(&op,csro,0,padstyle); /* not in the charset */ + if(!noconvwarn&&errsto) + fprintf(errsto,"Warning: some characters could not be translated," + " they were replaced with NUL.\n"); + noconvwarn=1; + } + else + { + /* The more interesting case. */ + csi*=csri->shifts; + if(!ssi) + { + /* We're at the start of a shift-stated string, but not + actually in any shift state. There is no general solution + here, so use one that works for Baudot: starting in each + state in turn, choose the option that takes the longest + until it ends up not changing shift state, then perform one + shift from that option. */ + int sstesting, ssbestsf, ssrecord, j; + sstesting=csri->shifts+1; ssbestsf=ssrecord=0; + while(--sstesting) + { + i=sstesting; j=0; + while(csri->set[csi+i-1]&& + csri->set[csi+i-1]!=i&& + csri->set[csi+i-1]<=csri->shifts) + {i=csri->set[csi+i-1]; j++;} + if(ssbestsfset[csi]; /* we now have the Latin-1 conversion! */ + if(tus>=1&&tus<=csri->shifts&&csri->shifts>1) + { + /* That wasn't a character, but a shift command. */ + ssi=tus; + continue; + } + /* Look for the character in the output's character + * set. Preferably we want something in the current shift + * state, but failing that, any character will do. */ + spacenowtab: + i=csro->shifts*csro->setlen; + csi=10000; + while(i--) + (void)(csro->set[i]==tus && (csi==10000||csi%csro->shifts!=sso-1) + && (csi=i)); + if(csi==10000&&tus==9 /* latin-1 tab */) + { + if(!substwarn&&errsto) + fprintf(errsto,"Warning: no tab in output character set," + " space was used instead.\n"); + substwarn=1; + tus=32; /* latin-1 space */ + goto spacenowtab; + } + if(csi==10000) + { + bitencout(&op,csro,0,padstyle); /* not in the charset */ + if(!noconvwarn&&errsto) + fprintf(errsto,"Warning: some characters could not be translated," + " they were replaced with NUL.\n"); + noconvwarn=1; + } + else if(csi%csro->shifts==sso-1) + /* in the right shift state already */ + bitencout(&op,csro,csi/csro->shifts,padstyle); + else + { + int tempi; + /* Generate shift codes. If sso isn't 0, generate from where + * we are at the moment; if it is 0, generate worse-case + * shifts by assuming we're in a shift state that can't shift + * to the state we want directly, if possible. */ + if(!sso) + { + int j=csro->shifts+1; + while(--j>0) + { + if(j-1==csi%csro->shifts) continue; + i=csro->setlen; + while(i--) + if(csro->set[i*csro->shifts+j-1]==csi%csro->shifts+1) + {j=-j; break; /* there is one in this set */}; + j=-j; + if(j<0) break; + } + /* Pick the worst-case if we found one, or otherwise just + * any state we aren't in at the moment. */ + sso=(j<0?-j:csi%csro->shifts); + if(!sso) sso=csro->shifts; + } + /* Look for the shift code, if there is one. */ + i=csro->setlen; + while(i--) + if(csro->set[i*csro->shifts+sso-1]==csi%csro->shifts+1) break; + tempi=i*csro->shifts+sso-1; + if(i==-1) + { + int intershift=-1; + /* That didn't work. Look for the shift code in some shift + * state other than the one we're aiming for. */ + retry: + i=csro->setlen*csro->shifts; + while(i--) + if(csro->set[i]==csi%csro->shifts+1&& + i%csro->shifts!=csi%csro->shifts&& + i%csro->shifts+1!=intershift) break; + if(i==-1) return -1; /* no way to get into the right state */ + intershift=i%csro->shifts+1; + tempi=i; + i=csro->setlen; + while(i--) + if(csro->set[i*csro->shifts+sso-1]==intershift) break; + if(i==-1) goto retry; /* try once more */ + bitencout(&op,csro,i,padstyle); + /* sso=intershift here but we're going to overwrite it + * immediately anyway, so no point in the assignment */ + } + bitencout(&op,csro,tempi/csro->shifts,padstyle); + bitencout(&op,csro,csi/csro->shifts,padstyle); + sso=csi%csro->shifts+1; + } + } + } + *op=0; + return op-out; +} diff --git a/src/convickt.c b/src/convickt.c new file mode 100644 index 0000000..3c498b4 --- /dev/null +++ b/src/convickt.c @@ -0,0 +1,113 @@ +/***************************************************************************** + +NAME + convickt.c -- translate between various INTERCAL formats + +LICENSE TERMS + Copyright (C) 2007 Alex Smith + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +***************************************************************************/ + +#include +#include +#include +#include +#include + +int clc_cset_convert(char* in, char* out, char* incset, char* outcset, + int padstyle, int outsize, FILE* errsto); + +/* For communication with clc_cset.c */ +char* globalargv0; +char* datadir; +/* We want to read the latest versions of the character sets from disk. */ +char* clc_cset_atari=0; +char* clc_cset_baudot=0; +char* clc_cset_ebcdic=0; +char* clc_cset_latin1=0; + +#ifndef ICKDATADIR +#define ICKDATADIR "/usr/local/share/ick-0.27" +#endif + +int main(int argc, char** argv) +{ + int allocsize=100; + char* in; + char* out; + int i=0; + int c; + int padding=-1; + globalargv0=argv[0]; + srand(time(NULL)); + if(argc!=3&&argc!=4) + { + fprintf(stderr,"Usage: convickt informat outformat [padding]\n"); + fprintf(stderr,"Available formats are:\n"); + fprintf(stderr,"\tPrinceton: latin1, baudot, ebcdic\n"); + fprintf(stderr,"\tAtari: atari (7-bit ASCII)\n"); + fprintf(stderr,"Possible values for padding are:\n"); + fprintf(stderr,"\tprintable: try to leave the output in char range " + "32-126\n"); + fprintf(stderr,"\tzero: leave the output with 0s in the high bits\n"); + fprintf(stderr,"\trandom: pad with random data\n"); + fprintf(stderr,"Padding only has an effect on character sets with less\n"); + fprintf(stderr,"than 8 bits used per bytes; default is 'printable'.\n"); + return 0; + } + if(argc==4&&!strcmp(argv[3],"printable")) padding=1; + if(argc==4&&!strcmp(argv[3],"zero")) padding=0; + if(argc==4&&!strcmp(argv[3],"random")) padding=2; + if(argc==4&&padding==-1) + { + fprintf(stderr,"Error: padding value not recognized.\n"); + return 1; + } + if(!(datadir=getenv("ICKDATADIR"))) + datadir=ICKDATADIR; + in=malloc(allocsize); + if(!in) {perror("Error: Memory allocation failure"); return 0;} + while((c=getchar())!=EOF) + { + in[i++]=c; + if(i+1>=allocsize) + { + char* temp=in; + allocsize*=2; + in=realloc(in,allocsize); + if(!in) + { + perror("Error: Memory allocation failure"); + free(temp); + return 0; + } + } + } + in[i]=0; + out=malloc(allocsize*6+6); + if(!out) + { + perror("Error: Memory allocation failure"); + free(in); + return 0; + } + i=clc_cset_convert(in,out,argv[1],argv[2],padding,allocsize*6+6,stderr); + if(i>=0) fwrite(out,1,i,stdout); + free(in); + free(out); + return i<0; +} diff --git a/src/ebcdic.bin b/src/ebcdic.bin new file mode 100644 index 0000000000000000000000000000000000000000..84f5a95db8b32465dca5a297cb00932da8ec3be2 GIT binary patch literal 271 zcmXpqHRCem%1BR3O-W8lb;Tv6W#tu> zRbcsbaf=xkRw4{xU~qJDc5!uc_wa-YdU^Z!`uPV01~D+yf`x)ZLc_u%BBLPk28Kq) NCZ=ZQ7M5UsJpd^qB{~2A literal 0 HcmV?d00001 diff --git a/src/ick-wrap.c b/src/ick-wrap.c index 6b6cdd5..0e99060 100644 --- a/src/ick-wrap.c +++ b/src/ick-wrap.c @@ -27,7 +27,7 @@ jmp_buf cjb; int ccfc; unsigned skipto=0; $O - +char* globalargv0; int oldabstain; int abstained[$B]$C; $D @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) next = calloc(80, sizeof *next); $N - + globalargv0=argv[0]; #ifdef YUK yuklines = $J; yukcommands = $B; diff --git a/src/idiotism.oil b/src/idiotism.oil index 2a7af1a..b364f5e 100644 --- a/src/idiotism.oil +++ b/src/idiotism.oil @@ -22,7 +22,8 @@ ; Optimizer Idiom Language input file for C-INTERCAL -; See the file ../doc/oil.txt for information about the format of this file. +; See the appendix "Optimizer Idiom Language" in the Revamped manual +; for information about the format of this file. ; Some useful constants: ; 0x55555555 1431655765 @@ -36,25 +37,18 @@ (#{1}1$#{1}2)->(#{mingle(x1,x2)}0) [selectfold] (#{1}1~#{1}2)->(#{iselect(x1,x2)}0) -; Strangely, due to a deficiency in OIL, and16fold can't be expressed easily. -; But it's possible to verify that a constant is 32-bit by checking that its -; value is greater than 65535. (A 32-bit constant could have a value lower as -; well, which is why this isn't perfect and why and16, etc., aren't here.) [and32fold] -(& #{x>65535LU}1)->(#{and32(x1)}0) +(&32 #{1}1)->(#{and32(x1)}0) [or32fold] -(V #{x>65535LU}1)->(#{or32(x1)}0) +(V32 #{1}1)->(#{or32(x1)}0) [xor32fold] -(? #{x>65535LU}1)->(#{xor32(x1)}0) -; On the other hand... it's possible to do a 15-bit and, or 14-bit or/xor, by -; observing that in certain cases it doesn't matter whether the and/or/xor is -; 16 or 32 bits. +(?32 #{1}1)->(#{xor32(x1)}0) [and15fold] -(& #{!(x&~32767LU)}1)->(#{and16(x1)}0) +(&16 #{1}1)->(#{and16(x1)}0) [or14fold] -(V #{!(x&~32766LU)}1)->(#{or16(x1)}0) +(V16 #{1}1)->(#{or16(x1)}0) [xor14fold] -(? #{!(x&~32766LU)}1)->(#{xor16(x1)}0) +(?16 #{1}1)->(#{xor16(x1)}0) ; C operations can, and should, be folded too [cfold] (#{1}1 & #{1}2)->(#{x1 & x2}0) @@ -75,70 +69,70 @@ ; Binary bitwise optimizations [cbinand] -((&(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ +((&32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->((_1 & _2) & #{iselect(x3,1431655765LU)}0) [cbinor] -((V(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ +((V32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->((_1 | _2) & #{iselect(x3,1431655765LU)}0) [cbinxor] -((?(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ +((?32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->((_1 ^ _2) & #{iselect(x3,1431655765LU)}0) ; Sometimes, an expanded output is wanted, optimizations happen in the wrong ; order, and we end up with & rather than ~ on the previous idiom. Correct ; such situations now. [cbinandnoselect] -((&(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& +((&32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(#0 $ ((_1 & _2) & #{iselect(x3,1431655765LU)}0)) [cbinornoselect] -((&(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& +((V32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(#0 $ ((_1 | _2) & #{iselect(x3,1431655765LU)}0)) [cbinxornoselect] -((&(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& +((?32(_{!(c&4294901760LU)}1$_{!(c&4294901760LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(#0 $ ((_1 ^ _2) & #{iselect(x3,1431655765LU)}0)) ; Sometimes, there isn't even a mingle... [cbinandnomingle] -((&(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ +((&32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) & _1) ~ _3) -((&(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ +((&32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) & _1) ~ _3) -((&(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& +((&32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) & _1) & _3) -((&(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& +((&32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) & _1) & _3) [cbinornomingle] -((V(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ +((V32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) | _1) ~ _3) -((V(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ +((V32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) | _1) ~ _3) -((V(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& +((V32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) | _1) & _3) -((V(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& +((V32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) | _1) & _3) [cbinxornomingle] -((?(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ +((?32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) ^ _1) ~ _3) -((?(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ +((?32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))~ #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) ^ _1) ~ _3) -((?(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& +((?32(_{!(c&2863311530LU)}1|_{!(c&1431655765LU)}2))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) ^ _1) & _3) -((?(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& +((?32(_{!(c&1431655765LU)}2|_{!(c&2863311530LU)}1))& #{!(x&2863311530LU)&&iselect(x,1431655765LU)==xselx(iselect(x,1431655765LU))}3 )->(((_2 >> #1) ^ _1) & _3) @@ -266,8 +260,8 @@ ; INTERCAL logical values are 1 and 2. [xorto1or2] -((?(_1$#1)))->((_1)+#1) -((?(_1$#2)))->(#2-(_1)) +((?32(_1$#1)))->((_1)+#1) +((?32(_1$#2)))->(#2-(_1)) ; Removing, combining and weakening unneeded C_ANDs [unneededand] @@ -286,27 +280,27 @@ ; Complement odd bits, zero even bits [com1z0] -(((?(_1|#1431655765))�)<<#1)->((_1�)^#2863311530) -(((?(#1431655765|_1))�)<<#1)->((_1�)^#2863311530) -((#1431655765&(?(_1|#1431655765)))<<#1)->((_1�)^#2863311530) -((#1431655765&(?(#1431655765|_1)))<<#1)->((_1�)^#2863311530) +(((?32(_1|#1431655765))�)<<#1)->((_1�)^#2863311530) +(((?32(#1431655765|_1))�)<<#1)->((_1�)^#2863311530) +((#1431655765&(?32(_1|#1431655765)))<<#1)->((_1�)^#2863311530) +((#1431655765&(?32(#1431655765|_1)))<<#1)->((_1�)^#2863311530) ; Complement even bits, zero odd bits [com0z1] -((?(((_1�)<<#1)|#1431655765))�) +((?32(((_1�)<<#1)|#1431655765))�) ->((_1�)^#1431655765) -((?(((#1431655765&_1)<<#1)|#1431655765))�) +((?32(((#1431655765&_1)<<#1)|#1431655765))�) ->((_1�)^#1431655765) -((?(#1431655765|((_1�)<<#1)))�) +((?32(#1431655765|((_1�)<<#1)))�) ->((_1�)^#1431655765) -((?(#1431655765|((#1431655765&_1)<<#1)))�) +((?32(#1431655765|((#1431655765&_1)<<#1)))�) ->((_1�)^#1431655765) -(#1431655765&(?(((_1�)<<#1)|#1431655765))) +(#1431655765&(?32(((_1�)<<#1)|#1431655765))) ->((_1�)^#1431655765) -(#1431655765&(?(((#1431655765&_1)<<#1)|#1431655765))) +(#1431655765&(?32(((#1431655765&_1)<<#1)|#1431655765))) ->((_1�)^#1431655765) -(#1431655765&(?(#1431655765|((_1�)<<#1)))) +(#1431655765&(?32(#1431655765|((_1�)<<#1)))) ->((_1�)^#1431655765) -(#1431655765&(?(#1431655765|((#1431655765&_1)<<#1)))) +(#1431655765&(?32(#1431655765|((#1431655765&_1)<<#1)))) ->((_1�)^#1431655765) ; 32-bit complements, in full [cnot5] @@ -504,11 +498,11 @@ ; Greater than and less than [greaterthan32] -((_1~:2)~((?(:2~:2))^#2147483648))->(_1>(:2^_1)) -((_1~:2)~(#2147483648^(?(:2~:2))))->(_1>(:2^_1)) +((_1~:2)~((?32(:2~:2))^#2147483648))->(_1>(:2^_1)) +((_1~:2)~(#2147483648^(?32(:2~:2))))->(_1>(:2^_1)) [greaterthan16] -((_1~.2)~((?(.2~.2))^#32768))->(_1>(.2^_1)) -((_1~.2)~(#32768^(?(.2~.2))))->(_1>(.2^_1)) +((_1~.2)~((?16(.2~.2))^#32768))->(_1>(.2^_1)) +((_1~.2)~(#32768^(?16(.2~.2))))->(_1>(.2^_1)) ; Consistency in C logical operation nesting, when it doesn't matter [xoroutsideand] diff --git a/src/latin1.bin b/src/latin1.bin new file mode 100644 index 0000000000000000000000000000000000000000..62a0032a026dc4416dd46b9431636a824f1edd56 GIT binary patch literal 271 zcmV+q0r37ZH8u({3TS6$Wn^PwVF~~N0s{mE1_uZU3JVMk4i69!5)%{^78e*98XFuP z9v>hfA|oUvCMPHs;jK6uCK7Mva__cwzs&s zy1Tr+zQ4f1!o$SH#>dFX%FE2n&d<=%($mz{*4NnC+S}aS-rwNi;^XAy=I7|?>g(+7 V?(gvN^7Hid_V@Vt`uqI-{{P!VgOLCL literal 0 HcmV?d00001 diff --git a/src/lexer.l b/src/lexer.l index 17f1df3..81acbc6 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -2,12 +2,15 @@ %p 4000 %n 1000 %{ +/* the directives above are for Solaris lex, and will be ignored by + * flex */ + /* * NAME * lexer.l -- source for the C-INTERCAL lexical analyzer. * LICENSE TERMS - Copyright (C) 1996 Eric S. Raymond + Copyright (C) 1996 Eric S. Raymond This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -233,7 +236,7 @@ D [0-9][\ \t\n0-9]* \xBD | "c^H/" | -"c^H|" {return(MINGLE); /* AIS: CLC-INTERCAL mingle symbols. +"c^H|" {return(MINGLE); /* AIS: CLC-INTERCAL mingle symbols. The \xBD is ISO-8859-1 for cent. */} \$ | \xA2 | @@ -269,7 +272,7 @@ V {yylval.numval = OR; return(UNARY);} \xA5 | \xBE | "V^H-" | -\xE2\x88\x80 {yylval.numval = XOR; return(UNARY); +\xE2\x88\x80 {yylval.numval = XOR; return(UNARY); /* AIS: CLC-INTERCAL uses \xBE, ISO-8859-1 for yen; for some reason, \xA5 is what was detected by the compiler during my tests, so that's here too */} @@ -283,7 +286,7 @@ V {yylval.numval = OR; return(UNARY);} else {yylval.numval = WHIRL; return(UNARY);}} [2-5]{W}@ {yylval.numval = WHIRL + myatoi(yytext) - 1; return(UNARY);} -\' {char temp = sparkearsstack[sparkearslev/32]&1; +\' {char temp = sparkearsstack[sparkearslev/32]&1; STACKSPARKEARS(0); /* AIS: I added all mentions of STACKSPARKEARS, OPEN\(SPARK\|EARS\), CLOSE\(SPARK\|EARS\), @@ -374,6 +377,8 @@ WRITE{W}IN {return(WRITE_IN);} SCRIBENDUM | WRITING{W}IN {yylval.numval = WRITE_IN; return(GERUND);} COMMEMERO | +COMMENTS | +COMMENTING | COMMENT {yylval.numval = UNKNOWN; return(GERUND); /* AIS: An idea stolen from CLC-INTERCAL. The Latin means literally 'remind' or 'mention'. */} diff --git a/src/lose.h b/src/lose.h index 4549ece..4b3102c 100644 --- a/src/lose.h +++ b/src/lose.h @@ -92,6 +92,9 @@ /* Out of stash space */ #define E222 "222 BUMMER, DUDE!\n\ ON THE WAY TO %d\n" +/* (AIS) Out of memory during I/O */ +#define E252 "252 I'VE FORGOTTEN WHAT I WAS ABOUT TO SAY\n\ + ON THE WAY TO %d\n" /* (AIS) Can't reverse an expression in an assignment. This is the same error number as in CLC-INTERCAL, but the message is different. */ #define E277 "277 YOU CAN ONLY DISTORT THE LAWS OF MATHEMATICS SO FAR\n\ diff --git a/src/oil.y b/src/oil.y index 2eb36e6..79eb5ee 100644 --- a/src/oil.y +++ b/src/oil.y @@ -83,6 +83,8 @@ struct ickstype to the node itself to form the condition and c and x aren't needed */ mybool width32; /* Generate a 32-bit node? */ + mybool ublo; /* Is this a UBLO (if set, generate conditions + to check width)? */ unsigned long c; /* The value to append to the condition */ int replnum; /* Number of this group for replacements */ struct ickstype *n1;/* n1 and n2 are pointers to other conditions that */ @@ -126,11 +128,12 @@ struct ickstype m->path=0; \ m->replnum=0; \ m->width32=w; \ + m->ublo=0; \ treedepthup(m->n1,0); \ treedepthup(m->n2,1); \ } while(0) -#define UNARYEXPR(s,m,r,w) do{ \ +#define UNARYEXPR(s,m,r,w,u) do{ \ m=malloc(sizeof(struct ickstype)); \ m->n1=0; \ m->n2=r; \ @@ -143,6 +146,7 @@ struct ickstype m->path=0; \ m->replnum=0; \ m->width32=w; \ + m->ublo=u; \ treedepthup(m->n2,1); \ } while(0) @@ -259,33 +263,24 @@ expr2: expr '$' expr {BINARYEXPR("MINGLE",$$,$1,$3,1);} | expr '~' expr {BINARYEXPR("SELECT",$$,$1,$3,1);} | expr '~' '1' '6' expr {BINARYEXPR("SELECT",$$,$1,$5,0);} | expr '~' '3' '2' expr {BINARYEXPR("SELECT",$$,$1,$5,1);} -| '&' expr {UNARYEXPR("AND",$$,$2,1);} -| '&' '1' '6' expr {UNARYEXPR("AND",$$,$4,0);} -| '&' '3' '2' expr {UNARYEXPR("AND",$$,$4,1);} -| 'V' expr {UNARYEXPR("OR",$$,$2,1);} -| 'V' '1' '6' expr {UNARYEXPR("OR",$$,$4,0);} -| 'V' '3' '2' expr {UNARYEXPR("OR",$$,$4,1);} -| '?' expr {UNARYEXPR("XOR",$$,$2,1);} -| '?' '1' '6' expr {UNARYEXPR("XOR",$$,$4,0);} -| '?' '3' '2' expr {UNARYEXPR("XOR",$$,$4,1);} -| '^' expr {UNARYEXPR("FIN",$$,$2,1);} -| '^' '1' '6' expr {UNARYEXPR("FIN",$$,$4,0);} -| '^' '3' '2' expr {UNARYEXPR("FIN",$$,$4,1);} -| '@' expr {UNARYEXPR("WHIRL",$$,$2,1);} -| '@' '2' expr {UNARYEXPR("WHIRL2",$$,$3,1);} -| '@' '3' expr {UNARYEXPR("WHIRL3",$$,$3,1);} -| '@' '4' expr {UNARYEXPR("WHIRL4",$$,$3,1);} -| '@' '5' expr {UNARYEXPR("WHIRL5",$$,$3,1);} -| '@' '1' '6' expr {UNARYEXPR("WHIRL",$$,$4,0);} -| '@' '2' '1' '6' expr {UNARYEXPR("WHIRL2",$$,$5,0);} -| '@' '3' '1' '6' expr {UNARYEXPR("WHIRL3",$$,$5,0);} -| '@' '4' '1' '6' expr {UNARYEXPR("WHIRL4",$$,$5,0);} -| '@' '5' '1' '6' expr {UNARYEXPR("WHIRL5",$$,$5,0);} -| '@' '3' '2' expr {UNARYEXPR("WHIRL",$$,$4,1);} -| '@' '2' '3' '2' expr {UNARYEXPR("WHIRL2",$$,$5,1);} -| '@' '3' '3' '2' expr {UNARYEXPR("WHIRL3",$$,$5,1);} -| '@' '4' '3' '2' expr {UNARYEXPR("WHIRL4",$$,$5,1);} -| '@' '5' '3' '2' expr {UNARYEXPR("WHIRL5",$$,$5,1);} +| '&' '1' '6' expr {UNARYEXPR("AND",$$,$4,0,1);} +| '&' '3' '2' expr {UNARYEXPR("AND",$$,$4,1,1);} +| 'V' '1' '6' expr {UNARYEXPR("OR",$$,$4,0,1);} +| 'V' '3' '2' expr {UNARYEXPR("OR",$$,$4,1,1);} +| '?' '1' '6' expr {UNARYEXPR("XOR",$$,$4,0,1);} +| '?' '3' '2' expr {UNARYEXPR("XOR",$$,$4,1,1);} +| '^' '1' '6' expr {UNARYEXPR("FIN",$$,$4,0,1);} +| '^' '3' '2' expr {UNARYEXPR("FIN",$$,$4,1,1);} +| '@' '1' '6' expr {UNARYEXPR("WHIRL",$$,$4,0,1);} +| '@' '2' '1' '6' expr {UNARYEXPR("WHIRL2",$$,$5,0,1);} +| '@' '3' '1' '6' expr {UNARYEXPR("WHIRL3",$$,$5,0,1);} +| '@' '4' '1' '6' expr {UNARYEXPR("WHIRL4",$$,$5,0,1);} +| '@' '5' '1' '6' expr {UNARYEXPR("WHIRL5",$$,$5,0,1);} +| '@' '3' '2' expr {UNARYEXPR("WHIRL",$$,$4,1,1);} +| '@' '2' '3' '2' expr {UNARYEXPR("WHIRL2",$$,$5,1,1);} +| '@' '3' '3' '2' expr {UNARYEXPR("WHIRL3",$$,$5,1,1);} +| '@' '4' '3' '2' expr {UNARYEXPR("WHIRL4",$$,$5,1,1);} +| '@' '5' '3' '2' expr {UNARYEXPR("WHIRL5",$$,$5,1,1);} | expr '&' expr {BINARYEXPR("C_AND",$$,$1,$3,1);} | expr '&' '1' '6' expr {BINARYEXPR("C_AND",$$,$1,$5,0);} | expr '&' '3' '2' expr {BINARYEXPR("C_AND",$$,$1,$5,1);} @@ -316,8 +311,8 @@ expr2: expr '$' expr {BINARYEXPR("MINGLE",$$,$1,$3,1);} | expr '<' expr {BINARYEXPR("C_LESS",$$,$1,$3,1);} | expr '<' '1' '6' expr {BINARYEXPR("C_LESS",$$,$1,$5,0);} | expr '<' '3' '2' expr {BINARYEXPR("C_LESS",$$,$1,$5,1);} -| '~' '1' '6' expr {UNARYEXPR("C_NOT",$$,$4,0);} -| '~' '3' '2' expr {UNARYEXPR("C_NOT",$$,$4,1);} +| '~' '1' '6' expr {UNARYEXPR("C_NOT",$$,$4,0,1);} +| '~' '3' '2' expr {UNARYEXPR("C_NOT",$$,$4,1,1);} | expr '!' '=' expr {BINARYEXPR("C_NOTEQUAL",$$,$1,$4,0);} | expr '!' '=' '1' '6' expr {BINARYEXPR("C_NOTEQUAL",$$,$1,$6,0);} | expr '!' '=' '3' '2' expr {BINARYEXPR("C_NOTEQUAL",$$,$1,$6,1);} @@ -336,9 +331,9 @@ expr2: expr '$' expr {BINARYEXPR("MINGLE",$$,$1,$3,1);} | expr '<' '<' expr {BINARYEXPR("C_LSHIFTBY",$$,$1,$4,1);} | expr '<' '<' '1' '6' expr {BINARYEXPR("C_LSHIFTBY",$$,$1,$6,0);} | expr '<' '<' '3' '2' expr {BINARYEXPR("C_LSHIFTBY",$$,$1,$6,1);} -| '!' expr {UNARYEXPR("C_LOGICALNOT",$$,$2,0);} -| '!' '1' '6' expr {UNARYEXPR("C_LOGICALNOT",$$,$4,0);} -| '!' '3' '2' expr {UNARYEXPR("C_LOGICALNOT",$$,$4,1);} +| '!' expr {UNARYEXPR("C_LOGICALNOT",$$,$2,0,0);} +| '!' '1' '6' expr {UNARYEXPR("C_LOGICALNOT",$$,$4,0,0);} +| '!' '3' '2' expr {UNARYEXPR("C_LOGICALNOT",$$,$4,1,0);} | expr ; replacement: expr3; @@ -411,6 +406,7 @@ int yylex(void) yylval->replnum=0; yylval->n1=0; yylval->n2=0; + yylval->ublo=0; yylval->width32=1; /* generate MESH32 not MESH; we can still AND16 it, etc., if necessary */ countungetc(c, stdin); @@ -426,7 +422,9 @@ int yylex(void) yylval->depth=0; yylval->path=0; yylval->condition=0; /* _ or # */ - yylval->width32=1; /* should never matter, but you never know... */ + yylval->width32=1; /* should never matter, but you never + know... */ + yylval->ublo=0; if(c==':') yylval->condition="->width==32"; if(c=='.') {yylval->condition="->width==16"; yylval->width32=0;} yylval->nodetypename=0; @@ -461,6 +459,8 @@ int yylex(void) yylval->n1->cxneeded=1; yylval->n1->n1=0; yylval->n1->n2=0; + yylval->n1->width32=yylval->width32; + yylval->n1->ublo=0; } else yylval->n1=0; yylval->replnum=0; @@ -521,6 +521,13 @@ mybool treeshapecond(YYSTYPE v, mybool firstopt) if(v->usec) printf("%luLU",v->c); firstopt=0; } + if(v->ublo) /* generate a width check */ + { + printf(firstopt?" if(np":" &&\n np"); + gennodepath(v->depth,v->path); + printf("->width==%d",v->width32?32:16); + firstopt=0; + } firstopt=treeshapecond(v->n1,firstopt); return treeshapecond(v->n2,firstopt); } diff --git a/src/parser.y b/src/parser.y index f6520d8..7162cdf 100644 --- a/src/parser.y +++ b/src/parser.y @@ -3,13 +3,13 @@ NAME parser.y -- grammar for the INTERCAL language -DESCRIPTION +DESCRIPTION This YACC grammar parses the INTERCAL language by designed by Don R. Woods and James M. Lyon. There are several syntax extensions over the original INTERCAL-72 language. LICENSE TERMS - Copyright (C) 1996 Eric S. Raymond + Copyright (C) 1996 Eric S. Raymond This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ static int thisline; /* line number of beginning of current statement */ extern int mark112; /* AIS: Mark the tuple for W112 when it's created. */ static int lineuid=65537; /* AIS: a line number not used anywhere else */ - + static tuple *splat(void); #define GETLINENO \ @@ -65,7 +65,7 @@ static tuple *splat(void); #define ACTARGET(x, nt, nn, nn2)\ {x = newtuple(); x->type = nt; x->lineno = thisline;\ x->u.node = nn; x->u.target = nn2;} -/* AIS : The macro above was added for ABSTAIN expr FROM. */ +/* AIS : The macro above was added for ABSTAIN expr FROM. */ #define NEWFANGLED mark112 = 1; /* AIS: Added the mention of mark112 */ \ if (traditional) lose(E111,iyylineno,(char*)NULL); else @@ -302,12 +302,12 @@ gerunds : GERUND np->rval = newnode(); np = np->rval; np->constant = $3; - } + } ; /* OK, here's what a variable reference looks like */ variable: scalar | array; - + lvalue : scalar | subscr; scalar2s: TWOSPOT NUMBER /* AIS: for TWOSPOTs only */ diff --git a/src/perpet.c b/src/perpet.c index b1f5dc8..b316028 100644 --- a/src/perpet.c +++ b/src/perpet.c @@ -7,7 +7,7 @@ DESCRIPTION This is where all the dirty work begins and ends. LICENSE TERMS - Copyright (C) 1996 Eric S. Raymond + Copyright (C) 1996 Eric S. Raymond This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,11 +41,15 @@ LICENSE TERMS #include "lose.h" #include "uncommon.h" +/* AIS: split ICKDATADIR from ICKLIBDIR */ #ifndef ICKINCLUDEDIR #define ICKINCLUDEDIR "/usr/local/include" #endif +#ifndef ICKDATADIR +#define ICKDATADIR "/usr/local/share" +#endif #ifndef ICKLIBDIR -#define ICKLIBDIR "/usr/local/share" +#define ICKLIBDIR "/usr/local/lib" #endif #ifndef ICKBINDIR #define ICKBINDIR "/usr/local/bin" @@ -54,7 +58,7 @@ LICENSE TERMS #define CC "gcc" #endif -#define ARGSTRING "bcdfghlmoptuvyCFHOPUX@" +#define ARGSTRING "bcdfghlmoptuvxyCFHOPUX@" #ifdef USE_YYRESTART /* function supplied by lex */ @@ -87,6 +91,7 @@ extern int printfopens; /* AIS: Print messages whenever attempting to open a extern int checkforbugs;/* AIS: Try to find possible bugs in the source code */ int pickcompile; /* AIS: Compile for PIC? */ int clclex; /* AIS: 1 means use CLC-INTERCAL meanings for @, ? */ +int clcsemantics; /* AIS: CLC semantics for I/O, abstaining GIVE UP, &c*/ int outtostdout; /* AIS: Output on stdout rather than the output file */ /* AIS: Autodetected compilation options */ @@ -182,7 +187,6 @@ static void print_usage(char *prog, char *options) fprintf(stderr,"Usage: %s [-%s] \n",prog,options); fprintf(stderr,"\t-b\t:reduce the probability of E774 to zero\n"); fprintf(stderr,"\t-c\t:compile INTERCAL to C, but don't compile C\n"); - fprintf(stderr,"\t-o\t:output to stdout, not to file (implies -c)\n"); fprintf(stderr,"\t-d\t:print yacc debugging information (implies -c)\n"); fprintf(stderr,"\t-t\t:traditional mode, accept only INTERCAL-72\n"); fprintf(stderr,"\t-C\t:clockface output (e.g. use IIII instead of IV)\n"); @@ -222,8 +226,12 @@ static void print_usage(char *prog, char *options) "is required\n\t\tif you want operand overloading to change " "meshes.\n\t\t(prevents -fFOP)\n"); fprintf(stderr,"\t-P\t:compile PIC-INTERCAL rather than INTERCAL\n"); + fprintf(stderr,"\t\t(prevents -mFvx, implies -cfO)\n"); fprintf(stderr,"\t-o\t:output to stdout rather than .c (implies -c)\n"); - fprintf(stderr,"\t-X\t:aim for CLC-INTERCAL compatibility\n"); + fprintf(stderr,"\t-X\t:interpret ambiguous syntax as Princeton not\n" + "\t\tAtari (i.e. CLC-INTERCAL not C-INTERCAL)\n"); + fprintf(stderr,"\t-x\t:use CLC-INTERCAL rules for I/O and abstaining\n" + "\t\tfrom a GIVE UP by label (prevents -P)\n"); fprintf(stderr,"\t-u\t:print a message whenever the compiler tries to " "open a file\n"); fprintf(stderr,"\t-U\t:dump core on E778 after printing an error\n"); @@ -231,8 +239,8 @@ static void print_usage(char *prog, char *options) fprintf(stderr,"\t-l\t:attempt to report likely bugs " "and nonportabilities (implies -O)\n"); /* AIS: End of options I added. */ - fprintf(stderr,"\t\tINTERCAL source file(s) (use extension .i)\n"); - fprintf(stderr,"\t\teach file produces a separate output program.\n"); + fprintf(stderr,"\t\tINTERCAL source file (use extension .i\n"); + fprintf(stderr,"\t\tfor base 2 or .3i, etc., for base 3, etc.).\n"); } /* AIS: Determine whether an environment variable exists (this is used to @@ -250,8 +258,9 @@ int main(int argc, char *argv[]) tuple *tp; atom *op; int c, i; - char *includedir, *libdir; /* AIS: , *getenv(); */ - char *bindir, *cooptsh; + char *includedir, *datadir, *libdir; + /* AIS: removed getenv(), added datadir on the line above */ + char *cooptsh; /* AIS */ FILE *ifp, *ofp; int maxabstain, /* nextcount, AIS */ bugline; bool needsyslib, firstfile; @@ -263,8 +272,15 @@ int main(int argc, char *argv[]) includedir = ICKINCLUDEDIR; if (!(libdir = getenv("ICKLIBDIR"))) libdir = ICKLIBDIR; - if (!(bindir = getenv("ICKBINDIR"))) /* AIS */ - bindir = ICKBINDIR; + if (!(datadir = getenv("ICKDATADIR"))) /* AIS */ + datadir = ICKDATADIR; +/* + AIS: nothing actually uses this at the moment, + commenting it out for future use + + if (!(bindir = getenv("ICKBINDIR"))) + bindir = ICKBINDIR; +*/ if (!(compiler = getenv("CC"))) compiler = CC; @@ -312,7 +328,7 @@ int main(int argc, char *argv[]) yukdebug = yukprofile = FALSE; variableconstants = FALSE; break; - + case 'F': /* By AIS */ coopt = flowoptimize = dooptimize = TRUE; variableconstants = FALSE; @@ -320,7 +336,7 @@ int main(int argc, char *argv[]) compile_only = cdebug = FALSE; if(pickcompile) lose(E256, 1, (char*) NULL); break; - + case 'h': /* By AIS */ optdebug|=1; compile_only=dooptimize=TRUE; @@ -332,7 +348,7 @@ int main(int argc, char *argv[]) compile_only=dooptimize=TRUE; coopt=FALSE; break; - + case 'y': /* By AIS */ #ifdef HAVE_UNISTD_H yukdebug=TRUE; @@ -361,7 +377,7 @@ int main(int argc, char *argv[]) coopt=FALSE; pickcompile=FALSE; break; - + case 'l': /* By AIS */ checkforbugs=TRUE; dooptimize=TRUE; @@ -378,19 +394,25 @@ int main(int argc, char *argv[]) case 'P': /* By AIS */ pickcompile=TRUE; multithread=coopt=variableconstants=FALSE; + clcsemantics=FALSE; compile_only=TRUE; dooptimize=flowoptimize=TRUE; /* needed for PICs */ break; - + case 'X': /* By AIS */ clclex=TRUE; break; + case 'x': /* By AIS */ + clcsemantics=TRUE; + pickcompile=FALSE; + break; + case 'g': /* By AIS */ cdebug=TRUE; coopt=FALSE; break; - + case '?': default: case '@': @@ -423,9 +445,9 @@ int main(int argc, char *argv[]) /* AIS: New function for enhanced file-finding */ if ((ifp = findandfopen(pickcompile?PSKELETON:SKELETON, - libdir, "r", argv[0])) == 0) + datadir, "r", argv[0])) == 0) lose(E999, 1, (char *)NULL); - + /* now substitute in tokens in the skeleton */ buf[strlen(buf) - 2] = '\0'; @@ -549,7 +571,7 @@ int main(int argc, char *argv[]) (void) sprintf(buf2, "%s.i", SYSLIB); else (void) sprintf(buf2, "%s.%di", SYSLIB, Base); - if (findandfreopen(buf2, libdir, "r", argv[0], stdin) == 0) + if (findandfreopen(buf2, datadir, "r", argv[0], stdin) == 0) lose(E127, 1, (char*) NULL); #ifdef USE_YYRESTART yyrestart(stdin); @@ -611,15 +633,15 @@ int main(int argc, char *argv[]) if(outtostdout) ofp=stdout; /* AIS */ else if((ofp = debfopen(buf, "w")) == (FILE *)NULL) lose(E888, 1, (char *)NULL); - + fseek(ifp,0L,0); /* rewind skeleton file */ /* AIS: Before changing argv[0], locate coopt.sh. */ - cooptsh = findandtestopen("coopt.sh", bindir, "rb", argv[0]); + cooptsh = findandtestopen("coopt.sh", datadir, "rb", argv[0]); /* AIS: and calculate yukcmdstr. */ sprintf(yukcmdstr,"%s" EXEEXT " %s %s", - argv[optind],libdir,argv[0]); - + argv[optind],datadir,argv[0]); + /* AIS: Remove the filename from argv[0], leaving only a directory. If this would leave it blank, change argv[0] to '.'. This is so gcc can find the includes/libraries the same way that @@ -977,15 +999,17 @@ int main(int argc, char *argv[]) "type32 og2spot%d(type32 t)\n{\n (void)t;\n return twospots[%d];\n}\n" "void os2spot%d(type32 val,void(*f)())\n{\n (void)f;\n if(!ignoretwospots%d)" " twospots[%d]=val;\n}\n",temp,temp,temp,temp,temp); - } + } } (void) fprintf(ofp, "#include \"pick2.h\"\n"); } break; - case 'F': /* set clockface option? */ + case 'F': /* set options from command line */ if (clockface) - (void) fprintf(ofp, "clockface(TRUE);"); + (void) fprintf(ofp, "clockface(TRUE);\n"); + if (clcsemantics) /* AIS */ + (void) fprintf(ofp, "clcsemantics(TRUE);\n"); break; case 'G': /* degenerated code */ @@ -1173,7 +1197,7 @@ int main(int argc, char *argv[]) " hyforget = calloc(" "%d, sizeof *hyforget);\n", nhybrids); - } + } break; case 'O': /* AIS; for GERUCOME and operand overloading */ if(gerucomesused || nextfromsused) @@ -1255,7 +1279,7 @@ int main(int argc, char *argv[]) remove(buf); } } -#endif +#endif #ifdef HAVE_PROG_SH # ifdef HAVE_SYS_INTERPRETER if(coopt) /* AIS */ diff --git a/src/pick1.h b/src/pick1.h index 31ded99..31a0b5f 100644 --- a/src/pick1.h +++ b/src/pick1.h @@ -57,7 +57,9 @@ LICENSE TERMS #define TRISA *(volatile ICK_INT8*)0x85 #define TRISB *(volatile ICK_INT8*)0x86 -/* Volatility is important; some compilers don't notice this. */ +/* This is a hack for compilers that don't interpret volatile correctly. + The uncommented code assumes your compiler knows how to work it + correctly; use the replacement below if it doesn't. */ #define seq(a) a /* You may need to use the commented-out code instead if your compiler is confused about volatile. diff --git a/src/pick2.h b/src/pick2.h index a8c0066..8fedb87 100644 --- a/src/pick2.h +++ b/src/pick2.h @@ -134,16 +134,6 @@ ICK_INT1 roll(ICK_INT8 n) return n>50; } -/* Volatility is important; some compilers don't notice this. */ -#define seq(a) a -/* You may need to use the commented-out code instead if your compiler - is confused about volatile. - ICK_INT8 seq(ICK_INT8 n) - { - return n; - } -*/ - /* Syslib, implemented in C to save ROM space. */ #if defined(ONESPOT1)&&defined(ONESPOT2)&&defined(TWOSPOT1) void syslibopt1050() diff --git a/src/uncommon.c b/src/uncommon.c index ce6fa3a..b7bf2e1 100644 --- a/src/uncommon.c +++ b/src/uncommon.c @@ -1,5 +1,5 @@ /* - * uncommon.c -- functions needed by both the compiler and debugger + * uncommon.c -- functions used by ick, convickt, yuk and compiled programs * LICENSE TERMS Copyright (C) 2007 Alex Smith diff --git a/src/yuk.c b/src/yuk.c index 07a69ea..5dab430 100644 --- a/src/yuk.c +++ b/src/yuk.c @@ -7,7 +7,7 @@ DESCRIPTION File linked into programs as a debugger or profiler. LICENSE TERMS - Copyright (C) 2006 Alex Smith + Copyright (C) 2006 Alex Smith This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ static sig_atomic_t writelines = 1; /* whether to display executed lines onscree static int breakpoints[80]; /* initialised to all 0s. Breakpoint locations */ static int nbreakpoints = 1; /* how many breakpoints we have */ static int monitors[80]; /* monitors give a message when program flow passes them */ -static int nmonitors = 0; +static int nmonitors = 0; static int untilnext = -1; /* NEXTING level to break the program at */ static int firstrun = 1; /* first time an interactive command point is reached */ static int yukerrcmdg = -1; /* the aboff that indicates an error in the 'g' command */ -- 2.43.0