summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/asymptote/ChangeLog1434
-rw-r--r--Build/source/utils/asymptote/Makefile.in50
-rw-r--r--Build/source/utils/asymptote/ReleaseNotes67
-rw-r--r--Build/source/utils/asymptote/TODO21
-rw-r--r--Build/source/utils/asymptote/access.cc48
-rw-r--r--Build/source/utils/asymptote/access.h16
-rw-r--r--Build/source/utils/asymptote/application.cc29
-rw-r--r--Build/source/utils/asymptote/application.h3
-rw-r--r--Build/source/utils/asymptote/asy-keywords.el6
-rw-r--r--Build/source/utils/asymptote/asy.list3734
-rw-r--r--Build/source/utils/asymptote/asymptote.nsi3
-rw-r--r--Build/source/utils/asymptote/asymptote.spec2
-rw-r--r--Build/source/utils/asymptote/base/bsp.asy6
-rw-r--r--Build/source/utils/asymptote/base/embed.asy4
-rw-r--r--Build/source/utils/asymptote/base/flowchart.asy8
-rw-r--r--Build/source/utils/asymptote/base/geometry.asy104
-rw-r--r--Build/source/utils/asymptote/base/graph.asy130
-rw-r--r--Build/source/utils/asymptote/base/graph3.asy132
-rw-r--r--Build/source/utils/asymptote/base/grid3.asy48
-rw-r--r--Build/source/utils/asymptote/base/math.asy27
-rw-r--r--Build/source/utils/asymptote/base/palette.asy12
-rw-r--r--Build/source/utils/asymptote/base/plain_arrows.asy115
-rw-r--r--Build/source/utils/asymptote/base/plain_bounds.asy783
-rw-r--r--Build/source/utils/asymptote/base/plain_constants.asy2
-rw-r--r--Build/source/utils/asymptote/base/plain_pens.asy6
-rw-r--r--Build/source/utils/asymptote/base/plain_picture.asy1118
-rw-r--r--Build/source/utils/asymptote/base/plain_prethree.asy224
-rw-r--r--Build/source/utils/asymptote/base/plain_scaling.asy246
-rw-r--r--Build/source/utils/asymptote/base/plain_shipout.asy16
-rw-r--r--Build/source/utils/asymptote/base/plain_strings.asy20
-rw-r--r--Build/source/utils/asymptote/base/plain_xasy.asy6
-rw-r--r--Build/source/utils/asymptote/base/simplex.asy6
-rw-r--r--Build/source/utils/asymptote/base/slide.asy21
-rw-r--r--Build/source/utils/asymptote/base/solids.asy1
-rw-r--r--Build/source/utils/asymptote/base/three.asy24
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy26
-rw-r--r--Build/source/utils/asymptote/base/trembling.asy492
-rw-r--r--Build/source/utils/asymptote/builtin.cc111
-rw-r--r--Build/source/utils/asymptote/builtin.h2
-rw-r--r--Build/source/utils/asymptote/camp.l3
-rw-r--r--Build/source/utils/asymptote/camp.tab.cc2082
-rw-r--r--Build/source/utils/asymptote/camp.tab.h15
-rw-r--r--Build/source/utils/asymptote/camp.y58
-rw-r--r--Build/source/utils/asymptote/coder.cc160
-rw-r--r--Build/source/utils/asymptote/coder.h123
-rw-r--r--Build/source/utils/asymptote/common.h4
-rw-r--r--Build/source/utils/asymptote/config.h.in3
-rwxr-xr-xBuild/source/utils/asymptote/configure8554
-rw-r--r--Build/source/utils/asymptote/configure.ac2
-rw-r--r--Build/source/utils/asymptote/dec.cc18
-rw-r--r--Build/source/utils/asymptote/doc/CAD.pdfbin67565 -> 67539 bytes
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn3
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.info5
-rwxr-xr-xBuild/source/utils/asymptote/doc/FAQ/install-sh29
-rw-r--r--Build/source/utils/asymptote/doc/Makefile.in36
-rw-r--r--Build/source/utils/asymptote/doc/TeXShopAndAsymptote.tex96
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.dtx710
-rw-r--r--Build/source/utils/asymptote/doc/asy.1287
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.pdfbin1705483 -> 1762062 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.sty606
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi109
-rw-r--r--Build/source/utils/asymptote/doc/diatom.asy2
-rw-r--r--Build/source/utils/asymptote/doc/extra/intro.asy1
-rwxr-xr-xBuild/source/utils/asymptote/doc/install-sh29
-rw-r--r--Build/source/utils/asymptote/doc/latexusage.pre3
-rw-r--r--Build/source/utils/asymptote/doc/latexusage.tex10
-rw-r--r--Build/source/utils/asymptote/doc/options88
-rw-r--r--Build/source/utils/asymptote/doc/penfunctionimage.asy27
-rw-r--r--Build/source/utils/asymptote/doc/png/Makefile.in10
-rw-r--r--Build/source/utils/asymptote/doc/png/asymptote.info836
-rw-r--r--Build/source/utils/asymptote/doc/square.asy2
-rw-r--r--Build/source/utils/asymptote/drawgroup.h2
-rw-r--r--Build/source/utils/asymptote/drawimage.h115
-rw-r--r--Build/source/utils/asymptote/drawlabel.cc82
-rw-r--r--Build/source/utils/asymptote/drawsurface.cc87
-rw-r--r--Build/source/utils/asymptote/drawsurface.h62
-rw-r--r--Build/source/utils/asymptote/entry.cc26
-rw-r--r--Build/source/utils/asymptote/entry.h4
-rw-r--r--Build/source/utils/asymptote/env.cc8
-rw-r--r--Build/source/utils/asymptote/env.h2
-rw-r--r--Build/source/utils/asymptote/errormsg.h24
-rw-r--r--Build/source/utils/asymptote/errors45
-rw-r--r--Build/source/utils/asymptote/errortest.asy49
-rw-r--r--Build/source/utils/asymptote/examples/NURBScurve.asy2
-rw-r--r--Build/source/utils/asymptote/examples/NURBSsurface.asy11
-rw-r--r--Build/source/utils/asymptote/examples/SierpinskiSponge.asy119
-rw-r--r--Build/source/utils/asymptote/examples/extrudedcontour.asy3
-rw-r--r--Build/source/utils/asymptote/examples/filesurface.asy4
-rw-r--r--Build/source/utils/asymptote/examples/floatingdisk.asy10
-rw-r--r--Build/source/utils/asymptote/examples/interpolate1.asy29
-rw-r--r--Build/source/utils/asymptote/examples/orthocenter.asy3
-rw-r--r--Build/source/utils/asymptote/examples/pdb.asy14
-rw-r--r--Build/source/utils/asymptote/examples/slidedemo.asy2
-rw-r--r--Build/source/utils/asymptote/examples/vertexshading.asy1
-rw-r--r--Build/source/utils/asymptote/examples/worksheet.asy3
-rw-r--r--Build/source/utils/asymptote/examples/worldmap.asy87
-rw-r--r--Build/source/utils/asymptote/exp.cc42
-rw-r--r--Build/source/utils/asymptote/exp.h28
-rw-r--r--Build/source/utils/asymptote/fftw++.h2
-rw-r--r--Build/source/utils/asymptote/fileio.cc2
-rwxr-xr-xBuild/source/utils/asymptote/findsym.pl6
-rw-r--r--Build/source/utils/asymptote/fpu.h4
-rw-r--r--Build/source/utils/asymptote/frame.h57
-rw-r--r--Build/source/utils/asymptote/fundec.cc43
-rw-r--r--Build/source/utils/asymptote/fundec.h34
-rw-r--r--Build/source/utils/asymptote/glrender.cc7
-rw-r--r--Build/source/utils/asymptote/inst.h54
-rwxr-xr-xBuild/source/utils/asymptote/install-sh29
-rw-r--r--Build/source/utils/asymptote/item.h28
-rw-r--r--Build/source/utils/asymptote/lex.yy.cc295
-rw-r--r--Build/source/utils/asymptote/main.cc10
-rw-r--r--Build/source/utils/asymptote/mathop.h3
-rw-r--r--Build/source/utils/asymptote/memory.h20
-rw-r--r--Build/source/utils/asymptote/opcodes.h46
-rwxr-xr-xBuild/source/utils/asymptote/opsymbols.pl7
-rw-r--r--Build/source/utils/asymptote/path.cc1
-rw-r--r--Build/source/utils/asymptote/picture.cc76
-rw-r--r--Build/source/utils/asymptote/prc/Makefile8
-rw-r--r--Build/source/utils/asymptote/prc/PRC.h13
-rw-r--r--Build/source/utils/asymptote/prc/PRCbitStream.cc13
-rw-r--r--Build/source/utils/asymptote/prc/PRCbitStream.h16
-rw-r--r--Build/source/utils/asymptote/prc/oPRCFile.cc1119
-rw-r--r--Build/source/utils/asymptote/prc/oPRCFile.h408
-rw-r--r--Build/source/utils/asymptote/prc/test.cc816
-rw-r--r--Build/source/utils/asymptote/prc/writePRC.cc81
-rw-r--r--Build/source/utils/asymptote/prc/writePRC.h52
-rw-r--r--Build/source/utils/asymptote/prcfile.h5
-rw-r--r--Build/source/utils/asymptote/profile.py96
-rw-r--r--Build/source/utils/asymptote/profiler.h434
-rw-r--r--Build/source/utils/asymptote/program.cc71
-rw-r--r--Build/source/utils/asymptote/program.h6
-rw-r--r--Build/source/utils/asymptote/psfile.cc52
-rw-r--r--Build/source/utils/asymptote/psfile.h4
-rw-r--r--Build/source/utils/asymptote/record.cc2
-rw-r--r--Build/source/utils/asymptote/runarray.cc649
-rw-r--r--Build/source/utils/asymptote/runarray.h4
-rw-r--r--Build/source/utils/asymptote/runarray.in32
-rw-r--r--Build/source/utils/asymptote/runfile.cc305
-rw-r--r--Build/source/utils/asymptote/runfile.in17
-rw-r--r--Build/source/utils/asymptote/runlabel.cc2
-rw-r--r--Build/source/utils/asymptote/runlabel.in2
-rw-r--r--Build/source/utils/asymptote/runpath.cc424
-rw-r--r--Build/source/utils/asymptote/runpath.in113
-rw-r--r--Build/source/utils/asymptote/runpicture.cc487
-rw-r--r--Build/source/utils/asymptote/runpicture.in37
-rw-r--r--Build/source/utils/asymptote/runstring.cc59
-rw-r--r--Build/source/utils/asymptote/runstring.in11
-rw-r--r--Build/source/utils/asymptote/settings.cc2
-rw-r--r--Build/source/utils/asymptote/stack.cc430
-rw-r--r--Build/source/utils/asymptote/stack.h18
-rw-r--r--Build/source/utils/asymptote/stm.cc90
-rw-r--r--Build/source/utils/asymptote/symbol.cc2
-rw-r--r--Build/source/utils/asymptote/tests/Makefile2
-rw-r--r--Build/source/utils/asymptote/tests/array/fields.asy4
-rw-r--r--Build/source/utils/asymptote/tests/frames/loop.asy167
-rw-r--r--Build/source/utils/asymptote/tests/output/Makefile2
-rw-r--r--Build/source/utils/asymptote/tests/types/keyword.asy197
-rw-r--r--Build/source/utils/asymptote/texfile.cc30
-rw-r--r--Build/source/utils/asymptote/texfile.h14
-rw-r--r--Build/source/utils/asymptote/types.cc64
-rw-r--r--Build/source/utils/asymptote/types.h43
-rw-r--r--Build/source/utils/asymptote/virtualfieldaccess.cc8
-rw-r--r--Build/source/utils/asymptote/virtualfieldaccess.h23
164 files changed, 18347 insertions, 12691 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index 1c941761c2e..49d81913979 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -4,7 +4,7 @@ Public domain. Originally written 2005 by Karl Berry.
Extra utilities we (optionally) compile for TeX Live.
See comments in ../texk/README.
-asymptote 2.02 - checked 12jul10
+asymptote 2.10 - checked 28may11
update to TL from CTAN, to include prebuilt doc.
see http://tug.org/texlive/build.html#asymptote
and tlpkg/bin/tl-update-asy
diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog
index 314464fc01c..8efa8bdefb6 100644
--- a/Build/source/utils/asymptote/ChangeLog
+++ b/Build/source/utils/asymptote/ChangeLog
@@ -1,4 +1,1438 @@
------------------------------------------------------------------------
+r5284 | jcbowman | 2011-05-26 23:29:46 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/examples/extrudedcontour.asy
+
+Speed up example.
+
+------------------------------------------------------------------------
+r5283 | jcbowman | 2011-05-26 23:25:08 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/base/graph.asy
+
+Use complete userMax/userMin functions.
+
+------------------------------------------------------------------------
+r5282 | jcbowman | 2011-05-26 19:43:31 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/drawimage.h
+
+Fix rendered preview images.
+
+------------------------------------------------------------------------
+r5281 | jcbowman | 2011-05-26 18:21:42 -0600 (Thu, 26 May 2011) | 1 line
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.10svn.
+------------------------------------------------------------------------
+r5280 | jcbowman | 2011-05-26 14:06:11 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+
+Add missing index entries.
+
+------------------------------------------------------------------------
+r5279 | jcbowman | 2011-05-26 12:37:41 -0600 (Thu, 26 May 2011) | 4 lines
+Changed paths:
+ M /trunk/asymptote/base/three_surface.asy
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/drawsurface.cc
+ M /trunk/asymptote/drawsurface.h
+ M /trunk/asymptote/examples/pdb.asy
+ M /trunk/asymptote/runpicture.in
+
+Implement
+void pixel(picture pic=currentpicture, triple v, pen p=currentpen,
+ real width=1);
+
+------------------------------------------------------------------------
+r5278 | jcbowman | 2011-05-26 02:58:37 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/prc/oPRCFile.cc
+
+Map [0,1] uniformly to [0,255].
+
+------------------------------------------------------------------------
+r5277 | jcbowman | 2011-05-26 02:50:51 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Don't apply picture transform when computing limits of hyperbola.
+
+------------------------------------------------------------------------
+r5276 | jcbowman | 2011-05-26 01:28:15 -0600 (Thu, 26 May 2011) | 7 lines
+Changed paths:
+ M /trunk/asymptote/base/palette.asy
+ M /trunk/asymptote/doc/asymptote.texi
+ A /trunk/asymptote/doc/penfunctionimage.asy
+ M /trunk/asymptote/drawimage.h
+ M /trunk/asymptote/glrender.cc
+ M /trunk/asymptote/psfile.cc
+ M /trunk/asymptote/psfile.h
+ M /trunk/asymptote/runpicture.in
+
+Check that arrays passed to the image routines are rectangular.
+
+Implement general pen image routine, along with an example:
+
+void image(picture pic=currentpicture, pen f(int,int), int width, int height,
+ pair initial, pair final, bool antialias=false);
+
+------------------------------------------------------------------------
+r5275 | jcbowman | 2011-05-26 01:22:42 -0600 (Thu, 26 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/simplex.asy
+
+Fix validity test in simplex.asy.
+
+------------------------------------------------------------------------
+r5274 | jcbowman | 2011-05-25 14:46:20 -0600 (Wed, 25 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_picture.asy
+ M /trunk/asymptote/base/plain_scaling.asy
+
+Simplify code.
+
+------------------------------------------------------------------------
+r5273 | jcbowman | 2011-05-25 14:19:16 -0600 (Wed, 25 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Fix bug in optimized sizing routines.
+
+------------------------------------------------------------------------
+r5272 | jcbowman | 2011-05-25 08:07:29 -0600 (Wed, 25 May 2011) | 4 lines
+Changed paths:
+ M /trunk/asymptote/drawsurface.cc
+ M /trunk/asymptote/drawsurface.h
+ M /trunk/asymptote/examples/vertexshading.asy
+ M /trunk/asymptote/prc/Makefile
+ M /trunk/asymptote/prc/PRC.h
+ M /trunk/asymptote/prc/PRCbitStream.cc
+ M /trunk/asymptote/prc/PRCbitStream.h
+ M /trunk/asymptote/prc/oPRCFile.cc
+ M /trunk/asymptote/prc/oPRCFile.h
+ M /trunk/asymptote/prc/test.cc
+ M /trunk/asymptote/prc/writePRC.cc
+ M /trunk/asymptote/prc/writePRC.h
+
+Add Michail's recent PRC enhancements.
+
+Implement PRC vertex-shading for straight patches.
+
+------------------------------------------------------------------------
+r5271 | jcbowman | 2011-05-16 00:06:31 -0600 (Mon, 16 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/camp.l
+
+Eliminate gcc warning about unused yyunput routine.
+
+------------------------------------------------------------------------
+r5270 | jcbowman | 2011-05-15 10:29:31 -0600 (Sun, 15 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+ M /trunk/asymptote/doc/asymptote.texi
+
+Implement keepAspect keyval option in asymptote.sty.
+
+------------------------------------------------------------------------
+r5269 | jcbowman | 2011-05-15 08:54:13 -0600 (Sun, 15 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_arrows.asy
+
+Test for null Label in arrow().
+
+------------------------------------------------------------------------
+r5268 | jcbowman | 2011-05-14 00:52:04 -0600 (Sat, 14 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runstring.in
+
+Check translation table size.
+
+------------------------------------------------------------------------
+r5267 | jcbowman | 2011-05-13 02:51:05 -0600 (Fri, 13 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three.asy
+
+Don't strip directory for .js and .prc file names.
+
+------------------------------------------------------------------------
+r5266 | jcbowman | 2011-05-13 01:45:05 -0600 (Fri, 13 May 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/examples/orthocenter.asy
+ M /trunk/asymptote/picture.cc
+
+Support PDF TeX engines in xasy.
+
+------------------------------------------------------------------------
+r5265 | hammera | 2011-04-13 21:49:11 -0600 (Wed, 13 Apr 2011) | 3 lines
+Changed paths:
+ M /trunk/asymptote/camp.y
+
+Removed old rules.
+
+
+------------------------------------------------------------------------
+r5264 | jcbowman | 2011-04-06 20:49:10 -0600 (Wed, 06 Apr 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/drawsurface.cc
+ M /trunk/asymptote/examples/NURBScurve.asy
+ M /trunk/asymptote/examples/NURBSsurface.asy
+
+Remove unused code.
+
+------------------------------------------------------------------------
+r5263 | jcbowman | 2011-03-30 09:24:10 -0600 (Wed, 30 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+
+Increment asymptote.sty version.
+
+------------------------------------------------------------------------
+r5262 | jcbowman | 2011-03-30 09:21:48 -0600 (Wed, 30 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+ M /trunk/asymptote/doc/asymptote.texi
+
+Allow leading spaces before \end{asy}.
+
+------------------------------------------------------------------------
+r5261 | jcbowman | 2011-03-30 09:07:07 -0600 (Wed, 30 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/slide.asy
+ M /trunk/asymptote/examples/slidedemo.asy
+
+Add step option to indexedfigure.
+
+------------------------------------------------------------------------
+r5260 | jcbowman | 2011-03-30 09:00:57 -0600 (Wed, 30 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/item.h
+
+Simplify item casts.
+
+------------------------------------------------------------------------
+r5259 | jcbowman | 2011-03-11 00:19:33 -0700 (Fri, 11 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/Makefile.in
+ A /trunk/asymptote/doc/TeXShopAndAsymptote.tex
+
+Update TeXShopAndAsymptote instructions.
+
+------------------------------------------------------------------------
+r5258 | hammera | 2011-03-06 08:18:26 -0700 (Sun, 06 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+
+Add documentation for keyword-only arguments.
+
+------------------------------------------------------------------------
+r5257 | hammera | 2011-03-06 07:58:46 -0700 (Sun, 06 Mar 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/application.cc
+ M /trunk/asymptote/camp.y
+ M /trunk/asymptote/entry.cc
+ M /trunk/asymptote/errors
+ M /trunk/asymptote/errortest.asy
+ M /trunk/asymptote/exp.h
+ M /trunk/asymptote/fundec.cc
+ M /trunk/asymptote/fundec.h
+ A /trunk/asymptote/tests/types/keyword.asy
+ M /trunk/asymptote/types.cc
+ M /trunk/asymptote/types.h
+
+Add keyword only formals.
+
+------------------------------------------------------------------------
+r5256 | jcbowman | 2011-02-24 23:04:21 -0700 (Thu, 24 Feb 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/examples/SierpinskiSponge.asy
+
+Update example.
+
+------------------------------------------------------------------------
+r5255 | hammera | 2011-02-24 16:17:48 -0700 (Thu, 24 Feb 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/errors
+ M /trunk/asymptote/errortest.asy
+ M /trunk/asymptote/exp.cc
+
+Fixed assert on array assignment.
+
+------------------------------------------------------------------------
+r5254 | jcbowman | 2011-02-22 16:45:01 -0700 (Tue, 22 Feb 2011) | 6 lines
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Avoid overloading built-in circle and ellipse functions.
+
+Remove unused code.
+
+Fix transform bug in drawline.
+
+------------------------------------------------------------------------
+r5253 | jcbowman | 2011-02-22 16:34:59 -0700 (Tue, 22 Feb 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/math.asy
+
+Fix transform bug in drawline.
+
+------------------------------------------------------------------------
+r5252 | jcbowman | 2011-02-22 16:34:03 -0700 (Tue, 22 Feb 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/trembling.asy
+ M /trunk/asymptote/examples/floatingdisk.asy
+
+Improve interface to trembling routine.
+
+------------------------------------------------------------------------
+r5251 | jcbowman | 2011-02-12 08:28:39 -0700 (Sat, 12 Feb 2011) | 1 line
+Changed paths:
+ M /trunk/asymptote/drawgroup.h
+
+Remove unused member of drawBegin3.
+------------------------------------------------------------------------
+r5250 | jcbowman | 2011-02-06 16:42:39 -0700 (Sun, 06 Feb 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/prc/writePRC.cc
+ M /trunk/asymptote/prcfile.h
+
+Move unit constant into constructor.
+
+------------------------------------------------------------------------
+r5249 | jcbowman | 2011-01-27 12:38:09 -0700 (Thu, 27 Jan 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/common.h
+ M /trunk/asymptote/mathop.h
+
+Speed up long long integer multiplication.
+
+------------------------------------------------------------------------
+r5248 | jcbowman | 2011-01-25 08:19:29 -0700 (Tue, 25 Jan 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/fpu.h
+
+Change Int to int.
+
+------------------------------------------------------------------------
+r5247 | jcbowman | 2011-01-20 07:54:32 -0700 (Thu, 20 Jan 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/texfile.cc
+ M /trunk/asymptote/texfile.h
+
+Always output preamble definitions.
+
+------------------------------------------------------------------------
+r5246 | jcbowman | 2011-01-08 17:08:39 -0700 (Sat, 08 Jan 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/doc/diatom.asy
+ M /trunk/asymptote/examples/filesurface.asy
+
+Update examples.
+
+------------------------------------------------------------------------
+r5245 | jcbowman | 2011-01-08 15:36:57 -0700 (Sat, 08 Jan 2011) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/bsp.asy
+ M /trunk/asymptote/base/geometry.asy
+ M /trunk/asymptote/base/graph.asy
+ M /trunk/asymptote/base/graph3.asy
+ M /trunk/asymptote/base/grid3.asy
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_picture.asy
+ D /trunk/asymptote/base/plain_repicture.asy
+ D /trunk/asymptote/base/regraph.asy
+ D /trunk/asymptote/base/regraph3.asy
+ D /trunk/asymptote/base/regrid3.asy
+ D /trunk/asymptote/base/rethree.asy
+ M /trunk/asymptote/base/three.asy
+
+Enable Andy's new sizing routines.
+
+------------------------------------------------------------------------
+r5244 | jcbowman | 2010-12-30 22:58:29 -0700 (Thu, 30 Dec 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/regraph.asy
+ M /trunk/asymptote/base/regraph3.asy
+ M /trunk/asymptote/base/regrid3.asy
+ M /trunk/asymptote/base/rethree.asy
+
+Update refactored files.
+
+------------------------------------------------------------------------
+r5243 | jcbowman | 2010-12-27 18:50:38 -0700 (Mon, 27 Dec 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/exp.cc
+
+Use a temporary expression for self operators to avoid side effects, as
+suggested by Orest.
+
+------------------------------------------------------------------------
+r5242 | jcbowman | 2010-12-22 05:40:48 -0700 (Wed, 22 Dec 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/texfile.cc
+
+It is no longer necessary to append to an existing preamble.
+
+------------------------------------------------------------------------
+r5241 | hammera | 2010-11-30 06:34:19 -0700 (Tue, 30 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/bsp.asy
+
+Add commented out code in bsp for new sizing routines.
+
+------------------------------------------------------------------------
+r5240 | hammera | 2010-11-30 05:55:53 -0700 (Tue, 30 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+No error on userMin of empty data.
+
+------------------------------------------------------------------------
+r5239 | hammera | 2010-11-29 15:02:26 -0700 (Mon, 29 Nov 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Fix merge typo.
+------------------------------------------------------------------------
+r5238 | jcbowman | 2010-11-28 10:41:26 -0700 (Sun, 28 Nov 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/examples/interpolate1.asy
+
+Move limits commands to after draw commands to work with recoded picture
+sizing routines.
+
+------------------------------------------------------------------------
+r5237 | jcbowman | 2010-11-28 10:37:44 -0700 (Sun, 28 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+ M /trunk/asymptote/base/plain_scaling.asy
+ M /trunk/asymptote/base/regraph.asy
+ A /trunk/asymptote/base/regraph3.asy
+ A /trunk/asymptote/base/regrid3.asy
+ A /trunk/asymptote/base/rethree.asy
+
+Begin to port graph, graph3, and three to use recoded picture sizing routines.
+
+------------------------------------------------------------------------
+r5236 | jcbowman | 2010-11-28 10:07:58 -0700 (Sun, 28 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runstring.in
+
+Fix unused value warnings.
+
+------------------------------------------------------------------------
+r5235 | hammera | 2010-11-22 18:33:07 -0700 (Mon, 22 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Fix userMin calculation.
+
+------------------------------------------------------------------------
+r5234 | hammera | 2010-11-22 05:41:12 -0700 (Mon, 22 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Add fill paths to userMin calculation.
+
+------------------------------------------------------------------------
+r5233 | jcbowman | 2010-11-21 09:29:59 -0700 (Sun, 21 Nov 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/plain_pens.asy
+
+Fix definition of heavygrey.
+------------------------------------------------------------------------
+r5232 | hammera | 2010-11-15 20:17:37 -0700 (Mon, 15 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Emulate old userMin/Max behaviour after transform.
+
+------------------------------------------------------------------------
+r5231 | hammera | 2010-11-15 19:38:23 -0700 (Mon, 15 Nov 2010) | 2 lines
+Changed paths:
+ A /trunk/asymptote/base/regraph.asy
+
+Changes to userMin/userMax interface for graph.
+
+------------------------------------------------------------------------
+r5230 | hammera | 2010-11-15 19:36:57 -0700 (Mon, 15 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Re-implement userMin/userMax in repicture.
+
+------------------------------------------------------------------------
+r5229 | jcbowman | 2010-11-15 18:10:19 -0700 (Mon, 15 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Fix horizontal and vertical lines in Drawline.
+
+------------------------------------------------------------------------
+r5228 | jcbowman | 2010-11-14 10:43:27 -0700 (Sun, 14 Nov 2010) | 4 lines
+Changed paths:
+ M /trunk/asymptote/base/math.asy
+ M /trunk/asymptote/doc/FAQ/asy-faq.bfnn
+
+Update FAQ.
+
+Add integer version of partialsum routines.
+
+------------------------------------------------------------------------
+r5227 | hammera | 2010-11-06 07:19:07 -0600 (Sat, 06 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/stack.cc
+
+Fix SIMPLE_FRAME flags.
+
+------------------------------------------------------------------------
+r5226 | jcbowman | 2010-11-03 21:22:25 -0600 (Wed, 03 Nov 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.09svn.
+------------------------------------------------------------------------
+r5225 | jcbowman | 2010-11-02 22:50:12 -0600 (Tue, 02 Nov 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_arrows.asy
+
+Fix incorrect marker optimization in r5194.
+
+------------------------------------------------------------------------
+r5224 | jcbowman | 2010-10-30 21:40:15 -0600 (Sat, 30 Oct 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.08svn.
+------------------------------------------------------------------------
+r5223 | jcbowman | 2010-10-30 19:20:47 -0600 (Sat, 30 Oct 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/runfile.in
+
+Work around missing CYGWIN prototype.
+------------------------------------------------------------------------
+r5222 | hammera | 2010-10-30 12:53:00 -0600 (Sat, 30 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/frames/loop.asy
+
+Test while and do loops.
+
+------------------------------------------------------------------------
+r5221 | hammera | 2010-10-30 12:43:15 -0600 (Sat, 30 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/stm.cc
+
+Fix loop ordering.
+
+------------------------------------------------------------------------
+r5220 | jcbowman | 2010-10-30 08:56:41 -0600 (Sat, 30 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/runfile.in
+
+Implement string mktemp(string).
+
+------------------------------------------------------------------------
+r5219 | jcbowman | 2010-10-30 08:53:08 -0600 (Sat, 30 Oct 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+
+Improve asyinclude so that asy source file is not required by publisher;
+make .asy extension optional.
+
+------------------------------------------------------------------------
+r5218 | hammera | 2010-10-30 08:00:30 -0600 (Sat, 30 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/coder.cc
+ M /trunk/asymptote/frame.h
+ M /trunk/asymptote/item.h
+ M /trunk/asymptote/record.cc
+ M /trunk/asymptote/stack.cc
+ M /trunk/asymptote/stack.h
+
+Experimental closure implementation.
+
+------------------------------------------------------------------------
+r5217 | hammera | 2010-10-30 06:01:39 -0600 (Sat, 30 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/access.cc
+
+Refactoring of variable access.
+
+------------------------------------------------------------------------
+r5216 | hammera | 2010-10-27 18:44:51 -0600 (Wed, 27 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/coder.cc
+ M /trunk/asymptote/coder.h
+ M /trunk/asymptote/inst.h
+ M /trunk/asymptote/opcodes.h
+ M /trunk/asymptote/stack.cc
+ M /trunk/asymptote/stack.h
+
+Removes inst::alloc.
+
+------------------------------------------------------------------------
+r5215 | jcbowman | 2010-10-27 16:51:40 -0600 (Wed, 27 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/picture.cc
+
+Add -P option required by gs 9.00.
+
+------------------------------------------------------------------------
+r5214 | hammera | 2010-10-27 16:30:35 -0600 (Wed, 27 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/TODO
+ M /trunk/asymptote/access.cc
+ M /trunk/asymptote/builtin.h
+ M /trunk/asymptote/coder.h
+ M /trunk/asymptote/frame.h
+ M /trunk/asymptote/inst.h
+ M /trunk/asymptote/item.h
+ M /trunk/asymptote/stack.cc
+ M /trunk/asymptote/stack.h
+
+Allocates closures only when needed.
+
+------------------------------------------------------------------------
+r5213 | hammera | 2010-10-26 17:35:37 -0600 (Tue, 26 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/coder.cc
+ M /trunk/asymptote/coder.h
+ M /trunk/asymptote/frame.h
+ M /trunk/asymptote/stack.cc
+ M /trunk/asymptote/stm.cc
+
+Don't push a frame on every loop iteration.
+
+------------------------------------------------------------------------
+r5212 | jcbowman | 2010-10-26 10:36:51 -0600 (Tue, 26 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/graph.asy
+ M /trunk/asymptote/base/graph3.asy
+
+Make limits work with reversed axes.
+
+------------------------------------------------------------------------
+r5211 | hammera | 2010-10-26 08:23:51 -0600 (Tue, 26 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/inst.h
+ A /trunk/asymptote/opcodes.h
+ M /trunk/asymptote/program.cc
+
+Defines opcodes in a header.
+
+------------------------------------------------------------------------
+r5210 | hammera | 2010-10-26 07:40:00 -0600 (Tue, 26 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/frames/loop.asy
+
+Additional for loop testing.
+
+------------------------------------------------------------------------
+r5209 | hammera | 2010-10-25 20:31:29 -0600 (Mon, 25 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/drawlabel.cc
+ M /trunk/asymptote/path.cc
+
+Refactoring of texpipe queries.
+
+------------------------------------------------------------------------
+r5208 | hammera | 2010-10-25 19:53:13 -0600 (Mon, 25 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/env.cc
+
+Removes dead code.
+
+------------------------------------------------------------------------
+r5207 | jcbowman | 2010-10-23 19:11:32 -0600 (Sat, 23 Oct 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.07svn.
+------------------------------------------------------------------------
+r5206 | jcbowman | 2010-10-23 16:14:41 -0600 (Sat, 23 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/Makefile.in
+
+Force generation of asymptote.sty when building documentation.
+
+------------------------------------------------------------------------
+r5205 | jcbowman | 2010-10-19 08:07:30 -0600 (Tue, 19 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/memory.h
+
+Add missing CONST qualifier.
+
+------------------------------------------------------------------------
+r5204 | jcbowman | 2010-10-18 19:08:41 -0600 (Mon, 18 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+
+Add missing sty targets.
+
+------------------------------------------------------------------------
+r5203 | jcbowman | 2010-10-18 02:17:25 -0600 (Mon, 18 Oct 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.06svn.
+------------------------------------------------------------------------
+r5202 | jcbowman | 2010-10-17 23:58:30 -0600 (Sun, 17 Oct 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/doc/Makefile.in
+ A /trunk/asymptote/doc/asy-latex.dtx
+ D /trunk/asymptote/doc/asymptote.sty
+ M /trunk/asymptote/doc/asymptote.texi
+
+Replace asymptote.sty with auto-generated version 1.21 contributed by Will
+Robertson, with a new latexmk-compatible asyinclude feature.
+
+------------------------------------------------------------------------
+r5201 | jcbowman | 2010-10-17 21:44:20 -0600 (Sun, 17 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/picture.cc
+
+In inlinetex mode, avoid interference from pre-existing aux file.
+
+------------------------------------------------------------------------
+r5200 | hammera | 2010-10-10 08:31:10 -0600 (Sun, 10 Oct 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/picture.cc
+
+Faster texprocess string matching.
+
+------------------------------------------------------------------------
+r5199 | jcbowman | 2010-09-27 20:59:34 -0600 (Mon, 27 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.sty
+
+Remove quotes from textattachfile.
+
+------------------------------------------------------------------------
+r5198 | jcbowman | 2010-09-27 01:50:25 -0600 (Mon, 27 Sep 2010) | 4 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.sty
+
+Allow spaces in file names.
+
+Support attaching of eps files when using dvips driver.
+
+------------------------------------------------------------------------
+r5197 | hammera | 2010-09-25 22:43:34 -0600 (Sat, 25 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/coder.cc
+ M /trunk/asymptote/coder.h
+ M /trunk/asymptote/exp.cc
+ M /trunk/asymptote/exp.h
+ M /trunk/asymptote/fundec.cc
+ M /trunk/asymptote/program.h
+ M /trunk/asymptote/stm.cc
+
+Re-implement label system in coder.
+
+------------------------------------------------------------------------
+r5196 | hammera | 2010-09-24 16:43:08 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/array/fields.asy
+
+Faster fields test.
+
+------------------------------------------------------------------------
+r5195 | hammera | 2010-09-24 16:42:13 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Optimizations in plain_repicture.
+
+------------------------------------------------------------------------
+r5194 | hammera | 2010-09-24 10:12:24 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_arrows.asy
+ M /trunk/asymptote/base/plain_picture.asy
+
+Handles default draw calls more efficiently.
+
+------------------------------------------------------------------------
+r5193 | hammera | 2010-09-24 09:06:05 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_shipout.asy
+ M /trunk/asymptote/base/plain_xasy.asy
+ M /trunk/asymptote/runpicture.in
+
+Avoid calling xasy commands during shipout.
+
+------------------------------------------------------------------------
+r5192 | hammera | 2010-09-24 08:59:21 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Crazy optimizations for plain_bounds.
+
+------------------------------------------------------------------------
+r5191 | hammera | 2010-09-24 08:49:59 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+
+Adds printBytecode function.
+
+------------------------------------------------------------------------
+r5190 | hammera | 2010-09-24 08:33:57 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/application.h
+ M /trunk/asymptote/fundec.cc
+ M /trunk/asymptote/inst.h
+ M /trunk/asymptote/program.cc
+ M /trunk/asymptote/stack.cc
+
+Opcodes for default arguments.
+
+------------------------------------------------------------------------
+r5189 | hammera | 2010-09-24 08:32:42 -0600 (Fri, 24 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/errormsg.h
+
+Terse position info output by profiler.
+
+------------------------------------------------------------------------
+r5188 | hammera | 2010-09-24 08:29:48 -0600 (Fri, 24 Sep 2010) | 5 lines
+Changed paths:
+ M /trunk/asymptote/profiler.h
+
+Profiler improvements.
+
+Adds timing of builtin function. Now gives output directly readable by
+kcachegrind.
+
+------------------------------------------------------------------------
+r5187 | hammera | 2010-09-20 09:26:06 -0600 (Mon, 20 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/profiler.h
+
+Use old, deprecated timer for profiling for compatibility.
+
+------------------------------------------------------------------------
+r5186 | hammera | 2010-09-20 08:36:00 -0600 (Mon, 20 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_Label.asy
+ M /trunk/asymptote/base/plain_arrows.asy
+
+Change NullLabel to just null.
+
+------------------------------------------------------------------------
+r5185 | hammera | 2010-09-20 08:12:23 -0600 (Mon, 20 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/profiler.h
+
+Test for clock_gettime support.
+
+------------------------------------------------------------------------
+r5184 | jcbowman | 2010-09-19 20:20:43 -0600 (Sun, 19 Sep 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/plain_picture.asy
+ M /trunk/asymptote/examples/worksheet.asy
+
+Handle above argument.
+------------------------------------------------------------------------
+r5183 | hammera | 2010-09-19 18:45:23 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Re-implement userMin/userMax.
+
+------------------------------------------------------------------------
+r5182 | hammera | 2010-09-19 17:56:37 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Renamed smartBounds to just bounds.
+
+------------------------------------------------------------------------
+r5181 | hammera | 2010-09-19 17:47:48 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/runpath.in
+
+Sizing of transformed path arrays handled in C++.
+
+------------------------------------------------------------------------
+r5180 | hammera | 2010-09-19 17:34:34 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_Label.asy
+ M /trunk/asymptote/base/plain_arrows.asy
+
+Use NullLabel to avoid Label instantiation.
+
+------------------------------------------------------------------------
+r5179 | hammera | 2010-09-19 17:04:56 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/profile.py
+ M /trunk/asymptote/profiler.h
+
+Add nanosecond counter to profiler.
+
+------------------------------------------------------------------------
+r5178 | hammera | 2010-09-19 16:12:17 -0600 (Sun, 19 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+ M /trunk/asymptote/runpath.in
+
+Calculate bounds of path arrays in C++.
+
+------------------------------------------------------------------------
+r5177 | hammera | 2010-09-18 17:51:11 -0600 (Sat, 18 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+More efficient calculation of extremes.
+
+------------------------------------------------------------------------
+r5176 | hammera | 2010-09-18 17:08:14 -0600 (Sat, 18 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/dec.cc
+
+Avoid creating arrays of celltype error.
+
+------------------------------------------------------------------------
+r5175 | hammera | 2010-09-18 16:29:25 -0600 (Sat, 18 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_scaling.asy
+
+Adds calculation of extremal bounds.
+
+------------------------------------------------------------------------
+r5174 | hammera | 2010-09-17 19:03:15 -0600 (Fri, 17 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Stores paths for sizing data.
+
+------------------------------------------------------------------------
+r5173 | hammera | 2010-09-17 18:21:16 -0600 (Fri, 17 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Reimplementation of transforms of pictures.
+
+------------------------------------------------------------------------
+r5172 | hammera | 2010-09-17 18:20:27 -0600 (Fri, 17 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/profile.py
+ M /trunk/asymptote/profiler.h
+ M /trunk/asymptote/stack.cc
+
+Dump profile to a file.
+
+------------------------------------------------------------------------
+r5171 | hammera | 2010-09-15 17:41:34 -0600 (Wed, 15 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+
+Adds transformedBounds.
+
+------------------------------------------------------------------------
+r5170 | hammera | 2010-09-15 15:52:30 -0600 (Wed, 15 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Adds freezableBounds.
+
+------------------------------------------------------------------------
+r5169 | hammera | 2010-09-14 08:34:57 -0600 (Tue, 14 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+More sizing refactoring.
+
+------------------------------------------------------------------------
+r5168 | hammera | 2010-09-14 07:43:00 -0600 (Tue, 14 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_bounds.asy
+ M /trunk/asymptote/base/plain_repicture.asy
+
+Minor refactoring.
+
+------------------------------------------------------------------------
+r5167 | hammera | 2010-09-14 07:21:37 -0600 (Tue, 14 Sep 2010) | 2 lines
+Changed paths:
+ A /trunk/asymptote/base/plain_bounds.asy
+ A /trunk/asymptote/base/plain_prethree.asy
+ A /trunk/asymptote/base/plain_repicture.asy
+ A /trunk/asymptote/base/plain_scaling.asy
+
+Start of refactoring of plain_picture.
+
+------------------------------------------------------------------------
+r5166 | hammera | 2010-09-11 16:21:45 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/findsym.pl
+ M /trunk/asymptote/opsymbols.pl
+ M /trunk/asymptote/symbol.cc
+
+PRESYM is no longer an option.
+
+------------------------------------------------------------------------
+r5165 | hammera | 2010-09-11 16:07:45 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/exp.cc
+ M /trunk/asymptote/exp.h
+
+NO_FUNC_OPS is no longer an option.
+
+------------------------------------------------------------------------
+r5164 | hammera | 2010-09-11 16:01:33 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/builtin.cc
+
+TEST_ADDED_OPS no longer an option.
+
+------------------------------------------------------------------------
+r5163 | hammera | 2010-09-11 15:54:55 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/application.cc
+
+EXACT_MATCH is no longer an option.
+
+------------------------------------------------------------------------
+r5162 | hammera | 2010-09-11 15:49:22 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/entry.cc
+ M /trunk/asymptote/entry.h
+ M /trunk/asymptote/exp.cc
+
+CALLEE_SEARCH is no longer an option.
+
+------------------------------------------------------------------------
+r5161 | hammera | 2010-09-11 15:31:32 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/application.cc
+ M /trunk/asymptote/env.cc
+ M /trunk/asymptote/env.h
+ M /trunk/asymptote/exp.cc
+
+FASTCAST no longer an option.
+
+------------------------------------------------------------------------
+r5160 | hammera | 2010-09-11 14:50:43 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/output/Makefile
+
+Avoid false positives in output testing.
+
+------------------------------------------------------------------------
+r5159 | hammera | 2010-09-11 14:48:52 -0600 (Sat, 11 Sep 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/application.cc
+
+Remove inappropriate comment.
+
+------------------------------------------------------------------------
+r5158 | jcbowman | 2010-08-28 09:42:09 -0600 (Sat, 28 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/solids.asy
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/runarray.in
+
+Update documentation.
+
+------------------------------------------------------------------------
+r5157 | hammera | 2010-08-27 21:39:49 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/main.cc
+ A /trunk/asymptote/profile.py
+ A /trunk/asymptote/profiler.h
+ M /trunk/asymptote/stack.cc
+
+A nascant profiler.
+
+------------------------------------------------------------------------
+r5156 | hammera | 2010-08-27 21:36:43 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runarray.in
+
+Also needed for arbitrary depth array constructors.
+
+------------------------------------------------------------------------
+r5155 | hammera | 2010-08-27 21:35:28 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+
+Re-implement arbitrary depth array constructors.
+
+------------------------------------------------------------------------
+r5154 | hammera | 2010-08-27 21:34:39 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/access.cc
+ M /trunk/asymptote/access.h
+
+Implement callableAccess.
+
+------------------------------------------------------------------------
+r5153 | hammera | 2010-08-27 21:34:08 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/program.cc
+
+Re-implement item printing.
+
+------------------------------------------------------------------------
+r5152 | hammera | 2010-08-27 16:28:35 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/TODO
+
+Remove TODO items we have no plans to implement.
+
+------------------------------------------------------------------------
+r5151 | hammera | 2010-08-27 16:11:52 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/TODO
+
+Add TODO item.
+
+------------------------------------------------------------------------
+r5150 | hammera | 2010-08-27 11:46:45 -0600 (Fri, 27 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/TODO
+
+Add TODO item.
+
+------------------------------------------------------------------------
+r5149 | jcbowman | 2010-08-20 16:48:08 -0600 (Fri, 20 Aug 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.05svn.
+------------------------------------------------------------------------
+r5148 | jcbowman | 2010-08-20 00:26:35 -0600 (Fri, 20 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/picture.cc
+ M /trunk/asymptote/texfile.cc
+
+Fix jobname extraction.
+
+------------------------------------------------------------------------
+r5147 | jcbowman | 2010-08-20 00:25:24 -0600 (Fri, 20 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/embed.asy
+
+Avoid hyperref/fp conflicts.
+
+------------------------------------------------------------------------
+r5146 | jcbowman | 2010-08-19 14:17:55 -0600 (Thu, 19 Aug 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/picture.cc
+
+Work around MikTeX jobname bug.
+------------------------------------------------------------------------
+r5145 | jcbowman | 2010-08-19 09:42:38 -0600 (Thu, 19 Aug 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_strings.asy
+ M /trunk/asymptote/base/three.asy
+ M /trunk/asymptote/doc/asymptote.sty
+ M /trunk/asymptote/picture.cc
+ M /trunk/asymptote/texfile.cc
+
+Use \jobname in generated TeX files in inlinetex mode (to allow renaming
+of files).
+
+------------------------------------------------------------------------
+r5144 | jcbowman | 2010-08-17 07:14:43 -0600 (Tue, 17 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_strings.asy
+ M /trunk/asymptote/base/three.asy
+ M /trunk/asymptote/doc/latexusage.tex
+
+Make asyprefix work with obsolete versions of graphicx package.
+
+------------------------------------------------------------------------
+r5143 | jcbowman | 2010-08-17 06:12:53 -0600 (Tue, 17 Aug 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/embed.asy
+
+Suppress messages from FP package.
+------------------------------------------------------------------------
+r5142 | jcbowman | 2010-08-13 06:05:44 -0600 (Fri, 13 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three.asy
+
+Fix documentation of render.merge=default.
+
+------------------------------------------------------------------------
+r5141 | jcbowman | 2010-08-13 06:04:46 -0600 (Fri, 13 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three_surface.asy
+
+Do not fill subdivision cracks in transparent labels.
+
+------------------------------------------------------------------------
+r5140 | jcbowman | 2010-08-10 13:37:07 -0600 (Tue, 10 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_strings.asy
+
+Revert r5139.
+
+------------------------------------------------------------------------
+r5139 | jcbowman | 2010-08-10 13:27:42 -0600 (Tue, 10 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_strings.asy
+ M /trunk/asymptote/fftw++.h
+
+Work around quoting problems with obsolete versions of graphicx.sty.
+
+------------------------------------------------------------------------
+r5138 | jcbowman | 2010-08-05 13:57:53 -0600 (Thu, 05 Aug 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/settings.cc
+
+Fix man page.
+------------------------------------------------------------------------
+r5137 | jcbowman | 2010-08-05 03:23:38 -0600 (Thu, 05 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_constants.asy
+ M /trunk/asymptote/doc/asymptote.texi
+
+Add DOSendl and DOSnewl line xterminators.
+
+------------------------------------------------------------------------
+r5136 | jcbowman | 2010-08-04 14:56:21 -0600 (Wed, 04 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/fileio.cc
+
+Handle MSDOS line terminators.
+
+------------------------------------------------------------------------
+r5135 | jcbowman | 2010-08-03 13:10:10 -0600 (Tue, 03 Aug 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.04svn.
+------------------------------------------------------------------------
+r5134 | jcbowman | 2010-08-03 06:14:46 -0600 (Tue, 03 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runlabel.in
+
+Fix blank 3D labels.
+
+------------------------------------------------------------------------
+r5133 | jcbowman | 2010-08-03 06:07:51 -0600 (Tue, 03 Aug 2010) | 2 lines
+Changed paths:
+ A /trunk/asymptote/examples/worldmap.asy
+
+Add world map example, courtesy of Jens Schwaiger.
+
+------------------------------------------------------------------------
+r5132 | jcbowman | 2010-08-03 02:54:52 -0600 (Tue, 03 Aug 2010) | 3 lines
+Changed paths:
+ M /trunk/asymptote/base/three.asy
+ M /trunk/asymptote/doc/asymptote.sty
+ M /trunk/asymptote/doc/latexusage.tex
+ M /trunk/asymptote/texfile.cc
+ M /trunk/asymptote/texfile.h
+
+Add latexusage \asydir support for putting asy files in a subdirectory
+(within which one then runs asy latexusage-*.asy).
+
+------------------------------------------------------------------------
+r5131 | jcbowman | 2010-08-02 21:28:08 -0600 (Mon, 02 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_shipout.asy
+
+Fix inlineimage option.
+
+------------------------------------------------------------------------
+r5130 | jcbowman | 2010-08-01 01:42:17 -0600 (Sun, 01 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/Makefile.in
+
+Use $(MAKE) everywhere.
+
+------------------------------------------------------------------------
+r5129 | jcbowman | 2010-08-01 01:08:42 -0600 (Sun, 01 Aug 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/doc/Makefile.in
+ M /trunk/asymptote/doc/png/Makefile.in
+
+Clean up auto-generated files.
+
+------------------------------------------------------------------------
+r5128 | jcbowman | 2010-07-29 06:26:17 -0600 (Thu, 29 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/flowchart.asy
+
+Add missing pen and margin parameters to blockconnector function calls.
+
+------------------------------------------------------------------------
+r5127 | jcbowman | 2010-07-26 11:45:32 -0600 (Mon, 26 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_pens.asy
+
+Improve definition of Dotted.
+
+------------------------------------------------------------------------
+r5126 | pivaldi | 2010-07-25 06:48:26 -0600 (Sun, 25 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Implement fix of Olivier
+------------------------------------------------------------------------
+r5125 | pivaldi | 2010-07-25 06:33:27 -0600 (Sun, 25 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Remove trailing code
+------------------------------------------------------------------------
+r5124 | pivaldi | 2010-07-25 05:41:48 -0600 (Sun, 25 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Fix casting degenerated ellipse to path
+------------------------------------------------------------------------
+r5123 | jcbowman | 2010-07-24 00:09:39 -0600 (Sat, 24 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_shipout.asy
+
+Add missing arguments.
+
+------------------------------------------------------------------------
+r5122 | jcbowman | 2010-07-22 23:30:17 -0600 (Thu, 22 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.sty
+ M /trunk/asymptote/doc/asymptote.texi
+
+Fix typo in asymptote.sty.
+
+------------------------------------------------------------------------
+r5121 | jcbowman | 2010-07-22 11:32:23 -0600 (Thu, 22 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.sty
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/doc/latexusage.tex
+
+Remove unwanted blank lines from asymptote.sty; support XeLaTeX again.
+
+------------------------------------------------------------------------
+r5120 | jcbowman | 2010-07-17 21:24:51 -0600 (Sat, 17 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_shipout.asy
+ M /trunk/asymptote/base/three.asy
+
+Support nonrendered preview images via render=0.
+
+------------------------------------------------------------------------
+r5119 | hammera | 2010-07-17 13:36:06 -0600 (Sat, 17 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/types.cc
+ M /trunk/asymptote/virtualfieldaccess.cc
+ M /trunk/asymptote/virtualfieldaccess.h
+
+Optimize virtual methods.
+
+------------------------------------------------------------------------
+r5118 | jcbowman | 2010-07-15 14:36:44 -0600 (Thu, 15 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/doc/Makefile.in
+
+Fix man page.
+------------------------------------------------------------------------
+r5117 | jcbowman | 2010-07-15 14:27:57 -0600 (Thu, 15 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+
+Improve documentation.
+
+------------------------------------------------------------------------
+r5116 | jcbowman | 2010-07-13 13:40:55 -0600 (Tue, 13 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/doc/square.asy
+
+Update documentation.
+
+------------------------------------------------------------------------
+r5115 | jcbowman | 2010-07-13 11:29:26 -0600 (Tue, 13 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+
+Update MSWindows documentation on setting environment variables.
+------------------------------------------------------------------------
+r5114 | jcbowman | 2010-07-13 11:24:33 -0600 (Tue, 13 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.nsi
+
+Automatically add Asymptote installation directory to MSWindows path.
+------------------------------------------------------------------------
+r5113 | pivaldi | 2010-07-12 16:23:41 -0600 (Mon, 12 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Fix directions with arcs in geometry.asy module
+------------------------------------------------------------------------
+r5112 | jcbowman | 2010-07-12 01:52:22 -0600 (Mon, 12 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/Makefile
+
+Add output test to make check-all.
+
+------------------------------------------------------------------------
+r5111 | jcbowman | 2010-07-12 01:11:22 -0600 (Mon, 12 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/doc/Makefile.in
+
+Fix latexusage Makefile dependencies.
+
+------------------------------------------------------------------------
+r5110 | jcbowman | 2010-07-11 23:33:06 -0600 (Sun, 11 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+
+Fix makefile dependency.
+
+------------------------------------------------------------------------
+r5109 | jcbowman | 2010-07-11 22:54:35 -0600 (Sun, 11 Jul 2010) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ M /trunk/asymptote/doc/extra/intro.asy
+
+Remove perl dependence from source tarball.
+
+------------------------------------------------------------------------
+r5108 | jcbowman | 2010-07-11 09:52:09 -0600 (Sun, 11 Jul 2010) | 1 line
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.03svn.
+------------------------------------------------------------------------
r5107 | jcbowman | 2010-07-11 01:42:54 -0600 (Sun, 11 Jul 2010) | 2 lines
Changed paths:
M /trunk/asymptote/doc/latexmkrc
diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in
index e33778b1806..b57dfc988d7 100644
--- a/Build/source/utils/asymptote/Makefile.in
+++ b/Build/source/utils/asymptote/Makefile.in
@@ -33,13 +33,13 @@ FILES = $(CAMP) $(SYMBOL_FILES) env genv main stm dec errormsg \
envcompleter process constructor array Delaunay predicates \
$(PRC) glrender tr arcball algebra3 quaternion svnrevision
-DIST = camp.tab.h camp.tab.cc lex.yy.cc runtime.h runtime.cc keywords.cc \
- asy-keywords.el
+DIST = camp.tab.h camp.tab.cc lex.yy.cc runtime.cc keywords.cc \
+ asy-keywords.el $(RUNTIME_FILES:=.cc) $(RUNTIME_FILES:=.h) asy.list \
+ allsymbols.h opsymbols.h $(SYMBOL_FILES:=.symbols.h)
NAME = asy
XNAME = x$(NAME)
-CLEAN = camp.output asy.list svnrevision.cc doc/version.texi \
- $(SYMBOL_FILES:=.symbols.h) allsymbols.h opsymbols.h \
- GUI/xasyVersion.py $(XNAME)
+CLEAN = camp.output svnrevision.cc base/version.asy doc/version.texi \
+ GUI/xasyVersion.py $(XNAME) doc/asy-latex.pdf
EXTRA = asy-mode.el asy-init.el asy.vim asy-kate.sh asymptote.py reload.js \
nopapersize.ps
EXEXTRA = piicon.eps *.views *.dat
@@ -50,8 +50,7 @@ CONTEXTFILES = colo-asy.tex
ASY = ./asy -dir base -config "" -render=0
DEFS = @DEFS@ @OPTIONS@ \
- -DPRESYM -DFASTCAST -DCALLEE_SEARCH -DEXACT_MATCH -DTEST_ADDED_OPS \
- -DNO_FUNC_OPS -DTRANSJUMP
+ -DTRANSJUMP
CFLAGS = @CPPFLAGS@ @CFLAGS@
OPTS = $(DEFS) $(CFLAGS)
INCL = -I . @INCL@
@@ -111,7 +110,7 @@ asy.o: asy.rc asy.ico Makefile
cat asy.rc | sed -e "s/ASYMPTOTE_VERSION/@VERSION@$(revision)/" | \
windres -o asy.o
-all: asy man faq asy-keywords.el
+all: asy sty man faq asy-keywords.el
$(GCLIB): $(GC).tar.gz
gunzip -c $(GC).tar.gz > $(GC).tar
@@ -122,7 +121,7 @@ $(GCLIB): $(GC).tar.gz
fi
if test "$(GC)" = "gc-7.0"; then \
cd $(GC)/include/private && \
- patch < ../../../patches/gc-7.0nomem.patch;\
+ patch < ../../../patches/gc-7.0nomem.patch; \
fi
cd $(GC); \
./configure $(GCOPTIONS); \
@@ -130,30 +129,33 @@ $(GCLIB): $(GC).tar.gz
$(GCPPLIB): $(GCLIB)
-dvi: asy
+sty:
+ cd doc && $(MAKE) asy-latex.pdf
+
+dvi: asy sty
cd doc && $(MAKE) dvi
-html: asy
+html: asy sty
cd doc && $(MAKE) doc
-man: asy
+man: asy sty
cd doc && $(MAKE) man
-faq: asy
+faq: asy sty
cd doc && $(MAKE) faq
$(RUNTIME_FILES:=.cc): %.cc: runtime.pl opsymbols.h runtimebase.in %.in
- ./runtime.pl $(@:.cc=)
+ perl ./runtime.pl $(@:.cc=)
$(SYMBOL_FILES:=.symbols.h): %.symbols.h: findsym.pl %.cc
$(CXX) -E -DNOSYM $(OPTS) $(INCL) $(@:.symbols.h=.cc) | \
- ./findsym.pl $@ -
+ perl ./findsym.pl $@ -
$(SYMBOL_FILES:=.o): %.o: %.symbols.h
allsymbols.h: findsym.pl $(SYMBOL_FILES:=.cc)
$(CXX) -E -DNOSYM $(OPTS) $(INCL) $(SYMBOL_FILES:=.cc) | \
- ./findsym.pl $@ -
+ perl ./findsym.pl $@ -
symbol.o: opsymbols.h allsymbols.h
@@ -168,10 +170,10 @@ lex.yy.cc: camp.l
lex.yy.d: $(GCLIB) lex.yy.cc camp.tab.h
keywords.cc: keywords.pl camp.l process.cc
- ./keywords.pl
+ perl ./keywords.pl
opsymbols.h: opsymbols.pl camp.l
- ./opsymbols.pl
+ perl ./opsymbols.pl
envcompleter.d: keywords.cc
@@ -180,25 +182,25 @@ asy-keywords.el: asy
$(ASY) -l > asy.list
ls $(addsuffix /*.asy,$(KEYWORDS)) | grep -v plain\* | \
grep -v three_\* | grep -v featpost3D | xargs $(ASY) -l >> asy.list
- ./asy-list.pl asy.list @VERSION@
+ perl ./asy-list.pl asy.list @VERSION@
-install: asy-keywords.el install-texhash install-man
+install: asy-keywords.el install-man install-texhash
+ ${INSTALL} -p -m 644 asy-keywords.el $(asydir)
-install-all: asy-keywords.el install-texhash install-html
+install-all: install install-html
install-texhash: install-asy
-if test -z "$(DESTDIR)"; then \
texhash; \
fi
-install-asy: asy
+install-asy: asy sty
${INSTALL} -d $(bindir) $(asydir) $(GUIdir) $(exampledir) \
$(animationsdir)
-${INSTALL} -d $(latexdir)
-${INSTALL} -d $(contextdir)
${INSTALL} -p -m 755 $(NAME) $(bindir)
- ${INSTALL} -p -m 644 asy-keywords.el base/*.asy \
- $(addprefix base/,$(EXTRA)) $(asydir)
+ ${INSTALL} -p -m 644 base/*.asy $(addprefix base/,$(EXTRA)) $(asydir)
${INSTALL} -p -m 755 GUI/*.py $(GUIdir)
ln -sf @datadir@/asymptote/GUI/xasy.py $(bindir)/$(XNAME)
${INSTALL} -p -m 644 examples/*.asy $(addprefix examples/,$(EXEXTRA)) \
diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes
index 48b3d7c3d63..3597fe0855c 100644
--- a/Build/source/utils/asymptote/ReleaseNotes
+++ b/Build/source/utils/asymptote/ReleaseNotes
@@ -1,3 +1,68 @@
+Release Notes for Version 2.10
+
+PRC vertex-shading for straight patches was implemented. A general image
+routine that uses a pen function of two integer parameters was implemented.
+A 3D pixel routine was added. A temporary expression is now used to avoid
+side effects in self operators. Keyword-only function arguments were
+implemented. The sizing routines were recoded. Bugs in drawline and
+geometry were fixed. The geometry module no longer overloads the built-in
+circle and ellipse functions. PDF TeX engines are now supported in xasy.
+Directory prefixes are no longer stripped from .js and .prc file names.
+The TeXShop instructions were updated. The asymptote.sty LaTeX style file
+was updated to allow leading spaces before \end{asy} and to introduce a
+keepAspect keyval option. Segmentation faults were fixed.
+Unwanted state-dependency was removed from the startTrembling function of
+the contributed trembling module by introducing a tremble structure
+(backwards incompatible change); see the example floatingdisk.asy.
+
+Release Notes for Version 2.08
+
+Legend markers now work again.
+
+Release Notes for Version 2.07
+
+The -P option required by ghostscript 9.00 was added. The limits command
+now works correctly with reversed axes. The asyinclude command of
+asymptote.sty was improved so that asy source files do not need to be sent
+to publishers; the asy extension is now optional. A mktemp function was
+implemented. Further MSWindows installer problems were addressed.
+
+Release Notes for Version 2.06
+
+Compilation problems and build issues were fixed.
+
+Release Notes for Version 2.05
+
+Arbitrary depth array constructors were re-instated. Profiling code was
+added. Spaces within file names and eps file attachments are now supported
+in inlinetex mode, and interference from any pre-existing aux file is
+avoided. A new auto-generated version (1.21) of asymptote.sty contributed
+by Will Robertson features a latexmk-compatible asyinclude command.
+Path-overwriting bugs in the NSIS MSWindows installer were circumvented.
+
+Release Notes for Version 2.04
+
+Subdivision cracks in transparent labels are no longer filled.
+Warning messages from the FP package are suppressed. MSDOS line terminators
+are now handled; DOSendl and DOSnewl line terminators were added.
+Files generated in inlinetex mode can now be renamed without editing their
+contents (using asymptote.sty version 1.19). The man page was fixed.
+The documentation of render.merge was fixed.
+
+Release Notes for Version 2.03
+
+An optional asydir parameter that allows asy files to be generated in a
+subdirectory was added to version 1.18 of asymptote.sty; XeLaTeX support was
+fixed. Nonrendered preview images via render=0 are now implemented.
+Blank 3D labels were fixed. Problems with arc directions and ellipses in
+the geometry module were fixed. The definition of the Dotted linetype was
+improved. Missing pen and margin parameters were added to the blockconnector
+function calls. Virtual methods were optimized. Makefile dependencies were
+fixed and autogenerated files are cleaned up. The dependence of the source
+tarball on perl was removed. Minor improvements were made to the
+documentation and man page. The Asymptote installation directory is now
+automatically added to the MSWindows path.
+
Release Notes for Version 2.02
A global latexusage.asy file is no longer generated, in favour of
@@ -52,7 +117,7 @@ zoom bugs in the OpenGL renderer were fixed. Three-dimensional grouping was
improved. The symbol table was replaced with a custom hash table. Portability
updates were made. The Cygwin memory limit fix for MSWindows now works even on
systems that lack a complete Cygwin installation. The examples were updated to
-exploit the new PRC rendering options
+exploit the new PRC rendering options.
Release Notes for Version 1.96
diff --git a/Build/source/utils/asymptote/TODO b/Build/source/utils/asymptote/TODO
index 98c1c8195fa..d04483b9780 100644
--- a/Build/source/utils/asymptote/TODO
+++ b/Build/source/utils/asymptote/TODO
@@ -1,10 +1,17 @@
-Andy: Investigate bbox error in uofa-talk Shadowing slide
+Andy: add keyword-only arguments
+
+Andy: Arbitrary depth copying of arrays.
-Andy: make var work in extended for
+Andy: Investigate bbox error in uofa-talk Shadowing slide
Andy: change label in coder to a class not an Int
+Andy: look at label alignment in rotvenn
+
Andy: possible optimizations:
+ eliminate frame copying in picture.add(picture pic, ...)
+ varpush+popcall --> varcall?
+ fieldpush+popcall --> fieldcall?
overloaded::simplify copies
straight guide which references a subset of a pair vector.
Is it cheaper to import a bltin module than to call base_venv again?
@@ -23,16 +30,6 @@ ambiguities, and whatever else you can think of
Andy: operator tuple, to let people define their own tuples
-Andy: implement operator init(A a) copy constructors.
-
-Andy and John: (if possible) automatically turn expressions with array
-sub-expressions into iteration over the array(s)
-
Andy: Decide if we should change vm::error to em in application.cc
John or Andy: Add unit test for AddOps.
-
-Andy: Fix: void f(int x=blah);
-
-Andy: Investigate adding unicode support for identifiers, using iswalpha,
-mbtowc, etc.
diff --git a/Build/source/utils/asymptote/access.cc b/Build/source/utils/asymptote/access.cc
index b3935fed922..f71dba71bf3 100644
--- a/Build/source/utils/asymptote/access.cc
+++ b/Build/source/utils/asymptote/access.cc
@@ -57,6 +57,29 @@ void bltinAccess::encode(action act, position pos, coder &e, frame *)
encode(act, pos, e);
}
+/* callableAccess */
+void callableAccess::encode(action act, position pos, coder &e)
+{
+ switch (act) {
+ case READ:
+ e.encode(inst::constpush, (item)f);
+ break;
+ case WRITE:
+ bltinError(pos);
+ break;
+ case CALL:
+ this->encode(READ, pos, e);
+ e.encode(inst::popcall);
+ break;
+ }
+}
+
+void callableAccess::encode(action act, position pos, coder &e, frame *)
+{
+ e.encode(inst::pop);
+ encode(act, pos, e);
+}
+
/* frameAccess */
void frameAccess::encode(action act, position pos, coder &e)
@@ -84,6 +107,12 @@ void frameAccess::encode(action act, position pos, coder &e, frame *top)
}
/* localAccess */
+static void frameError(position pos) {
+ // A local variable is being used when its frame is not active.
+ em.error(pos);
+ em << "static use of dynamic variable";
+}
+
void localAccess::encode(action act, position pos, coder &e)
{
// Get the active frame of the virtual machine.
@@ -91,16 +120,17 @@ void localAccess::encode(action act, position pos, coder &e)
if (level == active) {
e.encode(act == WRITE ? inst::varsave : inst::varpush,
offset);
- if (act == CALL)
- e.encode(inst::popcall);
+ }
+ else if (e.encode(level)) {
+ e.encode(act == WRITE ? inst::fieldsave : inst::fieldpush,
+ offset);
}
else {
- // Put the parent frame (in local variable 0) on the stack.
- e.encode(inst::varpush,0);
-
- // Encode the access from that frame.
- this->encode(act, pos, e, active->getParent());
+ frameError(pos);
}
+
+ if (act == CALL)
+ e.encode(inst::popcall);
}
void localAccess::encode(action act, position pos, coder &e, frame *top)
@@ -112,9 +142,7 @@ void localAccess::encode(action act, position pos, coder &e, frame *top)
e.encode(inst::popcall);
}
else {
- // The local variable is being used when its frame is not active.
- em.error(pos);
- em << "static use of dynamic variable";
+ frameError(pos);
}
}
diff --git a/Build/source/utils/asymptote/access.h b/Build/source/utils/asymptote/access.h
index 440ca172aef..eabd5a527ac 100644
--- a/Build/source/utils/asymptote/access.h
+++ b/Build/source/utils/asymptote/access.h
@@ -16,6 +16,10 @@
#include "item.h"
#include "vm.h"
+namespace vm {
+ class callable;
+}
+
namespace trans {
class frame;
@@ -72,6 +76,18 @@ public:
void encode(action act, position pos, coder &e, frame *);
};
+// Similar to bltinAccess, but works for any callable.
+class callableAccess : public access {
+ vm::callable *f;
+
+public:
+ callableAccess(vm::callable *f)
+ : f(f) {}
+
+ void encode(action act, position pos, coder &e);
+ void encode(action act, position pos, coder &e, frame *);
+};
+
// An access that puts a frame on the top of the stack.
class frameAccess : public access {
frame *f;
diff --git a/Build/source/utils/asymptote/application.cc b/Build/source/utils/asymptote/application.cc
index 0e6ad4421f6..25221357010 100644
--- a/Build/source/utils/asymptote/application.cc
+++ b/Build/source/utils/asymptote/application.cc
@@ -34,11 +34,7 @@ bool castable(env &e, formal& target, formal& source) {
score castScore(env &e, formal& target, formal& source) {
return equivalent(target.t,source.t) ? EXACT :
(!target.Explicit &&
-#ifdef FASTCAST
e.fastCastable(target.t,source.t)) ? CAST : FAIL;
-#else
- e.castable(target.t,source.t, symbol::castsym)) ? CAST : FAIL;
-#endif
}
@@ -189,7 +185,12 @@ bool application::matchAtSpot(size_t spot, env &e, formal &source,
{
formal &target=sig->getFormal(spot);
score s=castScore(e, target, source);
- if (s!=FAIL) {
+
+ if (s == FAIL)
+ return false;
+ else if (sig->formalIsKeywordOnly(spot) && source.name == symbol::nullsym)
+ return false;
+ else {
// The argument matches.
args[spot]=seq.addArg(a, target.t, evalIndex);
if (spot==index)
@@ -197,8 +198,6 @@ bool application::matchAtSpot(size_t spot, env &e, formal &source,
scores.push_back(s);
return true;
}
- else
- return false;
}
bool application::matchArgument(env &e, formal &source,
@@ -257,6 +256,7 @@ bool application::matchSignature(env &e, types::signature *source,
#if 0
cout << "num args: " << f.size() << endl;
+ cout << "num keyword-only: " << sig->numKeywordOnly << endl;
#endif
// First, match all of the named (non-rest) arguments.
@@ -485,20 +485,13 @@ bool halfExactMightMatch(env &e,
assert(formals[0].t);
assert(formals[1].t);
-#ifdef FASTCAST
-# define CASTABLE fastCastable
-#else
-# define CASTABLE castable
-#endif
-
// These casting tests if successful will be repeated again by
// application::match. It would be nice to avoid this somehow, but the
// additional complexity is probably not worth the minor speed improvement.
if (equivalent(formals[0].t, t1))
- return e.CASTABLE(formals[1].t, t2);
+ return e.fastCastable(formals[1].t, t2);
else
- return equivalent(formals[1].t, t2) && e.CASTABLE(formals[0].t, t1);
-#undef CASTABLE
+ return equivalent(formals[1].t, t2) && e.fastCastable(formals[0].t, t1);
}
// Most common after exact matches are cases such as
@@ -666,7 +659,6 @@ app_list multimatch(env &e,
types::signature *source,
arglist &al)
{
-#ifdef EXACT_MATCH
app_list a = exactMultimatch(e, o, source, al);
if (!a.empty()) {
#if DEBUG_CACHE
@@ -681,14 +673,11 @@ app_list multimatch(env &e,
a = halfExactMultimatch(e, o, source, al);
if (!a.empty()) {
#if DEBUG_CACHE
- // Make sure that exactMultimatch and the fallback return the same
- // application(s).
sameApplications(a, inexactMultimatch(e, o, source, al), DONT_TEST_EXACT);
#endif
return a;
}
-#endif
// Slow but most general method.
return inexactMultimatch(e, o, source, al);
diff --git a/Build/source/utils/asymptote/application.h b/Build/source/utils/asymptote/application.h
index 13302453b5b..0e283d66daa 100644
--- a/Build/source/utils/asymptote/application.h
+++ b/Build/source/utils/asymptote/application.h
@@ -78,7 +78,8 @@ struct defaultArg : public arg {
: arg(t) {}
virtual void trans(coenv &e, temp_vector &) {
- e.c.encode(inst::builtin, run::pushDefault);
+ //e.c.encode(inst::builtin, run::pushDefault);
+ e.c.encode(inst::push_default);
}
};
diff --git a/Build/source/utils/asymptote/asy-keywords.el b/Build/source/utils/asymptote/asy-keywords.el
index bce38beaa05..6ab0cf8f752 100644
--- a/Build/source/utils/asymptote/asy-keywords.el
+++ b/Build/source/utils/asymptote/asy-keywords.el
@@ -2,7 +2,7 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "2.02")
+(defvar asy-keywords-version "2.10")
(defvar asy-keyword-name '(
and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator ))
@@ -11,7 +11,7 @@ and controls tension atleast curl if else while for do return break continue str
Braid FitResult Label Legend Segment Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
(defvar asy-function-name '(
-AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Segment Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addnode addnodes addpenarc addpenline adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit atime attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint bispline blend blockconnector boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 case4 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect connected connectedindex containmentTree contains contour contour3 contouredges controlSpecifier convert coordinates coordsys copy cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isCCW isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup magnetize makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minbezier minbound minipage minratio mintimes miterlimit momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation orig_circlenodesnumber orig_circlenodesnumber1 orig_draw orig_ellipsenodesnumber orig_ellipsenodesnumber1 orig_hyperbolanodesnumber orig_parabolanodesnumber origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle same samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchindex searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setcontour setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin single sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript startTrembling stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose tremble trembleFuzz tremble_circlenodesnumber tremble_circlenodesnumber1 tremble_draw tremble_ellipsenodesnumber tremble_ellipsenodesnumber1 tremble_hyperbolanodesnumber tremble_marknodes tremble_markuniform tremble_parabolanodesnumber triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim trueMagnetize truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
+AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Segment Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint bispline blend blockconnector boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 case4 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect connected connectedindex containmentTree contains contour contour3 contouredges controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isCCW isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend printBytecode print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle same samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchindex searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setcontour setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz edge ellipsenodesnumberfactor eps epsgeo epsilon evenodd extendcap exterior fermionpen figureborder figuremattpen firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbola hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin interior invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow line linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticPoints magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tremblingMode undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
+AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz edge ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap exterior fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbola hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin interior invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow line linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
diff --git a/Build/source/utils/asymptote/asy.list b/Build/source/utils/asymptote/asy.list
new file mode 100644
index 00000000000..4ec363ddcd6
--- /dev/null
+++ b/Build/source/utils/asymptote/asy.list
@@ -0,0 +1,3734 @@
+string stripfile(string s);
+string stripsuffix(string f, string suffix=<default>);
+real cbrt(real x);
+real[] cbrt(real[] a);
+cputime cputime();
+string stripdirectory(string s);
+real sqrtEpsilon;
+string stripextension(string s);
+version version;
+void texpreamble(string s);
+pen beveljoin;
+string cputimeformat;
+real Cos(real deg);
+string insert(string s, int pos, string t);
+marginT EndDotMargin(path, pen);
+pen heavyred;
+pen black;
+pen heavyblue;
+file xoutput(string name, bool update=<default>);
+pen heavygreen;
+pen heavycyan;
+marginT PenMargin(path, pen)(real begin, real end);
+marginT PenMargin(path, pen);
+int realDigits;
+pen heavymagenta;
+marginT PenMargins(path, pen);
+void newl(file file);
+void seek(file f, int pos);
+string verbatim(string s);
+pen heavygray;
+pen heavygrey;
+void markuniform(picture pic=<default>, frame f, path g)(pair z(real t), real a, real b, int n);
+void markuniform(picture pic=<default>, frame f, path g)(bool centered=<default>, int n, bool rotated=<default>);
+real[] mintimes(path p);
+real[] mintimes(path3 p);
+bool straight(path p, int t);
+bool straight(path3 p, int t);
+pen makepen(path p);
+real dotsize(pen p=<default>);
+real[] curlSpecifier(guide g, int t);
+real straightness(path3 p, int t);
+real straightness(triple z0, triple c0, triple c1, triple z1);
+real log10(real x);
+real[] log10(real[] a);
+pen paleblue;
+bool prc0(string format=<default>);
+int CTZ(int a);
+real barfactor;
+pen Magenta;
+real cos(real x);
+real[] cos(real[] a);
+pair cos(explicit pair z);
+int intMax;
+bool cyclic(guide g);
+bool cyclic(path p);
+bool cyclic(path3 p);
+void printBytecode(<open>);
+transform Rotate(transform)(pair z);
+transform Rotate(transform t);
+bool inXasyMode;
+path subpath(path p, int a, int b);
+path subpath(path p, real a, real b);
+path3 subpath(path3 p, int a, int b);
+path3 subpath(path3 p, real a, real b);
+string jobname(string name);
+void print_random_addresses(int n=<default>);
+void attach(picture dest=<default>, frame src, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void attach(picture dest=<default>, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+real[] quadraticroots(real a, real b, real c);
+pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);
+pen darkcyan;
+string[] file3;
+real[] maxtimes(path p);
+real[] maxtimes(path3 p);
+filltype FillDraw;
+filltype FillDraw(real xmargin=<default>, real ymargin=<default>, pen fillpen=<default>, pen drawpen=<default>);
+void initdefaults();
+void erase(frame f);
+string erase(string s, int pos, int n);
+void erase(picture pic=<default>);
+pair E;
+int Ceil(real x);
+pair I;
+pair SSW;
+pen magenta;
+pair WSW;
+pair N;
+bool view();
+void usersetting();
+pair S;
+void nowarn(string s);
+transform rotate(real angle, pair z=<default>);
+transform rotate(explicit pair dir);
+int quotient(int x, int y);
+transform rotation(transform t);
+pair W;
+int rand();
+pen ZapfChancery(string series=<default>, string shape=<default>);
+int XOR(int a, int b);
+void atupdate(void f());
+void atupdate()();
+void unfill(frame f, path[] g, bool copy=<default>);
+void unfill(picture pic=<default>, path[] g, bool copy=<default>);
+bool Bar(picture, path, pen, marginT(path, pen))(real size=<default>);
+bool Bar(picture, path, pen, marginT(path, pen));
+bool eol(file f);
+pen zerowinding;
+void atbreakpoint(string f(string, int, int, code));
+void savedefaults()();
+bool MidArrow(picture, path, pen, marginT(path, pen));
+bool MidArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+void exitXasyMode();
+bool MidArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool MidArcArrow(picture, path, pen, marginT(path, pen));
+void grestore(frame f);
+pair extension(pair p, pair q, pair p, pair q);
+pen extendcap;
+int ceil(real x);
+pen thick(pen p=<default>);
+pair left;
+int Suppress;
+file input(string name, bool check=<default>, string comment=<default>);
+int SuppressQuiet;
+real[] texsize(string s, pen p=<default>);
+string nativeformat();
+bool invisible(pen p);
+pen invisible();
+pen invisible;
+bool CCW;
+void usetypescript(string s, string encoding=<default>);
+path randompath(int n, bool cumulate=<default>, guide join(... guide[])=<default>);
+int system(string[] s);
+int system(string s);
+void bar(picture pic, pair a, pair d, pen p=<default>);
+picture bar(pair a, pair d, pen p=<default>);
+side NoSide;
+file stdout;
+transform Shift(transform t);
+real fmod(real x, real y);
+real offset(pen p);
+pen rgb(pen p);
+pen rgb(real r, real g, real b);
+pen rgb(string s);
+real inch;
+bool ArcArrow(picture, path, pen, marginT(path, pen));
+bool ArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool ArcArrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool ArcArrows(picture, path, pen, marginT(path, pen));
+pen currentpen;
+pair precontrol(path p, int t);
+pair precontrol(path p, real t);
+triple precontrol(path3 p, int t);
+triple precontrol(path3 p, real t);
+light currentlight;
+pen royalblue;
+picture currentpicture;
+frame currentpatterns;
+int JOIN_IN;
+int JOIN_OUT;
+projection currentprojection;
+void endScript();
+pen linetype(real[] pattern, real offset=<default>, bool scale=<default>, bool adjust=<default>);
+real[] linetype(pen p=<default>);
+pen linetype(string pattern, real offset=<default>, bool scale=<default>, bool adjust=<default>);
+real xpart(pair z);
+real xpart(triple v);
+side Center;
+real ypart(pair z);
+real ypart(triple v);
+real zpart(triple v);
+frame orientation(frame);
+pen Courier(string series=<default>, string shape=<default>);
+real simpson(real f(real), real a, real b, real acc=<default>, real dxmax=<default>);
+transform shift(transform t);
+transform shift(pair z);
+transform shift(real x, real y);
+transform shift(frame f, pair align);
+real asinh(real x);
+real[] asinh(real[] a);
+pen orange;
+pen darkgray;
+slice lastcut(path p, path knife);
+pen darkgreen;
+pen darkgrey;
+transform xscale(real x);
+transform shiftless(transform t);
+real[][] shiftless(real[][] t);
+transform yscale(real y);
+void usleep(int microseconds);
+real cosh(real x);
+real[] cosh(real[] a);
+position MidPoint;
+real Sin(real deg);
+void assert(bool b, string s=<default>);
+pen Palatino(string series=<default>, string shape=<default>);
+real incircle(pair a, pair b, pair c, pair d);
+frame Landscape(frame f);
+pen purple;
+string italic(string s);
+real atan(real x);
+real[] atan(real[] a);
+real acos(real x);
+real[] acos(real[] a);
+pair minbound(pair a, pair b);
+triple minbound(triple a, triple b);
+pair minbound(pair[] a);
+pair minbound(pair[][] a);
+pair minbound(pair[][][] a);
+triple minbound(triple[] a);
+triple minbound(triple[][] a);
+triple minbound(triple[][][] a);
+void restore();
+pen basealign(int n);
+int basealign(pen p=<default>);
+pen basealign;
+int min(int a, int b);
+int[] min(int a, int[] b);
+int[] min(int[] a, int b);
+int[] min(int[] a, int[] b);
+int min(int[] a);
+int min(int[][] a);
+int min(int[][][] a);
+real min(real a, real b);
+real[] min(real a, real[] b);
+real[] min(real[] a, real b);
+real[] min(real[] a, real[] b);
+real min(real[] a);
+real min(real[][] a);
+real min(real[][][] a);
+string min(string a, string b);
+string[] min(string a, string[] b);
+string[] min(string[] a, string b);
+string[] min(string[] a, string[] b);
+string min(string[] a);
+string min(string[][] a);
+string min(string[][][] a);
+pair min(pen p);
+pair min(frame f);
+pair min(path p);
+pair min(explicit path[] p);
+triple min(path3 p);
+pair min(picture pic, bool user=<default>);
+real min(real m, scaling s, coord[] c);
+real min(... real[] a);
+real min(real m, scaling s, coord[] c);
+int min(... int[] a);
+filltype RadialShade(pen penc, pen penr);
+int search(int[] a, int key);
+int search(real[] a, real key);
+int search(string[] a, string key);
+int search(void()()[] a, void key()(), bool less(void()(), void()()));
+int search(real[] a, real key, bool less(real, real));
+int search(guide[] a, guide key, bool less(guide, guide));
+int search(object[] a, object key, bool less(object, object));
+int search(coord[] a, coord key, bool less(coord, coord));
+int search(pair[] a, pair key, bool less(pair, pair));
+int search(coord[] a, coord key, bool less(coord, coord));
+int search(marker[] a, marker key, bool less(marker, marker));
+int search(frame[] a, frame key, bool less(frame, frame));
+int search(int[] a, int key, bool less(int, int));
+int search(picture[] a, picture key, bool less(picture, picture));
+int search(Legend[] a, Legend key, bool less(Legend, Legend));
+int search(string[] a, string key, bool less(string, string));
+int search(path[] a, path key, bool less(path, path));
+int search(Label[] a, Label key, bool less(Label, Label));
+int search(pen[] a, pen key, bool less(pen, pen));
+int search(bool3[] a, bool3 key, bool less(bool3, bool3));
+int search(bool[] a, bool key, bool less(bool, bool));
+int search(triple[] a, triple key, bool less(triple, triple));
+filltype RadialShadeDraw(real xmargin=<default>, real ymargin=<default>, pen penc, pen penr, pen drawpen=<default>);
+real sin(real x);
+real[] sin(real[] a);
+pair sin(explicit pair z);
+pen deepcyan;
+void restoredefaults();
+path[] plus;
+pair expi(real angle);
+triple expi(real polar, real azimuth);
+void endclip(frame f);
+void endclip(picture pic=<default>);
+pen opacity(real opacity=<default>, string blend=<default>);
+real opacity(pen p);
+real[] solve(real[][] a, real[] b, bool warn=<default>);
+real[][] solve(real[][] a, real[][] b, bool warn=<default>);
+int rename(string from, string to);
+void DOSendl(file file);
+string debugger(string file, int line, int column, code s=<default>);
+string getc(file f);
+bool debugging;
+void shipout(string prefix=<default>, frame f, frame preamble=<default>, string format=<default>, bool wait=<default>, bool view=<default>, transform xform());
+void shipout(string prefix=<default>, frame f, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
+void shipout(string prefix=<default>, picture pic=<default>, frame orientation(frame)=<default>, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
+void shipout3(string prefix, frame f, string format=<default>, real width, real height, real angle, real zoom, triple m, triple m, pair shift, real[][] t, real[] background, triple[] lights, real[][] diffuse, real[][] ambient, real[][] specular, bool viewportlighting, bool view=<default>);
+void shipout3(string prefix, frame f, int[] index, triple[] center);
+string getstring(string name=<default>, string default=<default>, string prompt=<default>, bool store=<default>);
+int debuggerlines;
+frame bbox(picture pic=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
+real radians(real degrees);
+bool pdf();
+void _eval(string s, bool embedded, bool interactivewrite=<default>);
+void _eval(code s, bool embedded);
+path[][] textpath(string[] s, pen[] p);
+void radialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, real ra, pen penb, pair b, real rb, bool copy=<default>);
+void radialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, real ra, pen penb, pair b, real rb, bool copy=<default>);
+pair maxbound(pair a, pair b);
+triple maxbound(triple a, triple b);
+pair maxbound(pair[] a);
+pair maxbound(pair[][] a);
+pair maxbound(pair[][][] a);
+triple maxbound(triple[] a);
+triple maxbound(triple[][] a);
+triple maxbound(triple[][][] a);
+string Embed(string name, string options=<default>, real width=<default>, real height=<default>);
+pair postcontrol(path p, int t);
+pair postcontrol(path p, real t);
+triple postcontrol(path3 p, int t);
+triple postcontrol(path3 p, real t);
+int max(int a, int b);
+int[] max(int a, int[] b);
+int[] max(int[] a, int b);
+int[] max(int[] a, int[] b);
+int max(int[] a);
+int max(int[][] a);
+int max(int[][][] a);
+real max(real a, real b);
+real[] max(real a, real[] b);
+real[] max(real[] a, real b);
+real[] max(real[] a, real[] b);
+real max(real[] a);
+real max(real[][] a);
+real max(real[][][] a);
+string max(string a, string b);
+string[] max(string a, string[] b);
+string[] max(string[] a, string b);
+string[] max(string[] a, string[] b);
+string max(string[] a);
+string max(string[][] a);
+string max(string[][][] a);
+pair max(pen p);
+pair max(frame f);
+pair max(path p);
+pair max(explicit path[] p);
+triple max(path3 p);
+int max(... int[] a);
+pair max(picture pic, bool user=<default>);
+real max(real M, scaling s, coord[] c);
+real max(... real[] a);
+real max(real M, scaling s, coord[] c);
+Label Label(Label L, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(explicit pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(string s=<default>, string size=<default>, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(string s, string size=<default>, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(Label L, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label;
+Label Label(Label L, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(string s, string size=<default>, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+string font(pen p=<default>);
+pen font(string name, string options=<default>);
+pen font(string encoding, string family, string series, string shape);
+pen font(string name, real size, string options=<default>);
+int intMin;
+pen white;
+side RightSide;
+string replace(string s, string[][] translate);
+string replace(string s, string before, string after);
+transform fixedscaling(picture pic=<default>, pair min, pair max, pen p=<default>, bool warn=<default>);
+pen Symbol(string series=<default>, string shape=<default>);
+slice firstcut(path p, path knife);
+pen squarecap;
+pen squarepen;
+real barsize(pen p=<default>);
+bool EndArrow(picture, path, pen, marginT(path, pen));
+bool EndArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool EndArcArrow(picture, path, pen, marginT(path, pen));
+bool EndArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
+string[] split(string s, string delimiter=<default>);
+void addSaveFunction(void s()());
+object embed3(string, frame, string, string, string, light, projection);
+filltype NoFill;
+real colatitude(triple v, bool warn=<default>);
+void label(frame f, string s, string size, transform t, pair position, pair align, pen p);
+void label(picture pic=<default>, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(frame f, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(frame f, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, explicit guide g, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, explicit path g, align align=<default>, pen p=<default>, filltype filltype=<default>);
+real fabs(real x);
+real[] fabs(real[] a);
+bool labels(frame f);
+light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default> ... triple[] position);
+light light(explicit light light);
+light light(pen[] diffuse, pen[] ambient=<default>, pen[] specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default>, triple[] position);
+light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, bool viewport=<default>, real x, real y, real z);
+real remainder(real x, real y);
+int byte(real x);
+real camerafactor;
+pen lightred;
+real labelmargin;
+real labelmargin(pen p=<default>);
+pen lightblue;
+pen lightgreen;
+pair right;
+string outformat(string format=<default>);
+pen lightcyan;
+pen lightmagenta;
+pen lightyellow;
+pen lightgray;
+pen lightolive;
+pen lightgrey;
+string upcase(string s);
+pen darkblue;
+pen darkbrown;
+path[] strokepath(path g, pen p=<default>);
+real erf(real x);
+void saveline(string name, string value, bool store=<default>);
+pen fuchsia;
+bool needshipout();
+filltype filltype(int type=<default>, pen fillpen=<default>, pen drawpen=<default>, void fill2(frame f, path[] g, pen fillpen));
+path box(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path box(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path box(pair a, pair b);
+pen Bookman(string series=<default>, string shape=<default>);
+frame[] fit(string prefix=<default>, picture[] pictures, string format=<default>, bool view=<default>, string options=<default>, string script=<default>, projection P=<default>);
+void seekeof(file f);
+path unitcircle;
+framedTransformStack xformStack;
+pair[] conj(pair[] a);
+pair[][] conj(pair[][] a);
+pair conj(pair z);
+pen deepgray;
+pen deepgreen;
+pen deepgrey;
+marker[] Mark;
+marker Mark(int n);
+real aTan(real x);
+void _begingroup3(frame f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, int interaction);
+string graphic(string name, string options=<default>);
+real aCos(real x);
+void texreset();
+int[] complement(int[] a, int n);
+path[] complement(frame f, path[] g);
+pen Cyan;
+marginT NoMargin(path, pen);
+marginT NoMargin(path, pen)();
+path[][] _texpath(string[] s, pen[] p);
+real sinh(real x);
+real[] sinh(real[] a);
+real[] _cputime();
+position EndPoint;
+hsv hsv(real h, real s, real v);
+hsv hsv(pen p);
+void deconstruct(frame f, frame preamble=<default>, real magnification=<default>, transform xform());
+void deconstruct(picture pic=<default>, real magnification=<default>);
+int sgn(real x);
+pair minAfterTransform(transform t, path[] a);
+int seconds(string t=<default>, string format=<default>);
+pen cyan;
+pen grey;
+real cm;
+filltype Fill;
+filltype Fill(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
+pen olive;
+pen darkolive;
+real arcarrowangle;
+real arcarrowfactor;
+real mm;
+real arcarrowsize(pen p=<default>);
+real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
+triple gettriple(string name=<default>, triple default=<default>, string prompt=<default>, bool store=<default>);
+void drawpixel(frame f, triple v, pen p, real width=<default>);
+pen fontsize(real size, real lineskip);
+real fontsize(pen p=<default>);
+pen fontsize(real size);
+string Link(string label, string text, string options=<default>);
+void close(file f);
+real lineskip(pen p=<default>);
+pen dashed;
+pair maxAfterTransform(transform t, path[] a);
+int[][] triangulate(pair[] z);
+void fill(frame f, path[] g, pen p=<default>, bool copy=<default>);
+path fill(frame dest, frame src, filltype filltype=<default>, real xmargin=<default>, real ymargin=<default>);
+void fill(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
+void fill(pair origin, picture pic=<default>, path[] g, pen p=<default>);
+pair midpoint(path p);
+real exp(real x);
+real[] exp(real[] a);
+pair exp(explicit pair z);
+pen linejoin(int n);
+int linejoin(pen p=<default>);
+real ldexp(real x, int e);
+pen rgba(real[] a);
+real[] rgba(pen p);
+string time(string format=<default>);
+string time(int seconds, string format=<default>);
+void prepend(frame dest, frame src);
+real pt;
+settings settings;
+int MoveQuiet;
+marginT EndMargin(path, pen);
+pen nullpen;
+side LeftSide;
+path nullpath;
+real[][] copy(real[][] a);
+guide[] copy(guide[] a);
+string[] copy(string[] a);
+pair[][] copy(pair[][] a);
+void()()[] copy(void()()[] a);
+marker[] copy(marker[] a);
+pen[][] copy(pen[][] a);
+path[] copy(path[] a);
+bool3[] copy(bool3[] a);
+pair[] copy(pair[] a);
+bool[] copy(bool[] a);
+coord[] copy(coord[] a);
+Legend[] copy(Legend[] a);
+pen[] copy(pen[] a);
+picture[] copy(picture[] a);
+triple[] copy(triple[] a);
+int[] copy(int[] a);
+string[][] copy(string[][] a);
+frame[] copy(frame[] a);
+coord[] copy(coord[] a);
+real[] copy(real[] a);
+Label[] copy(Label[] a);
+object[] copy(object[] a);
+real[] abs(pair[] a);
+real[] abs(triple[] a);
+real abs(real x);
+real[] abs(real[] a);
+real abs(pair z);
+real abs(triple v);
+int abs(int x);
+pen pink;
+real inches;
+path ellipse(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path ellipse(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path ellipse(pair c, real a, real b);
+pair getpair(string name=<default>, pair default=<default>, string prompt=<default>, bool store=<default>);
+void axialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, pen penb, pair b, bool copy=<default>);
+void axialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, pen penb, pair b, bool copy=<default>);
+string locale(string s=<default>);
+real dirtime(path p, pair z);
+void copyPairOrTriple(pairOrTriple dest, pairOrTriple src);
+real[] colors(pen p);
+void filloutside(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
+void filloutside(frame f, path[] g, pen p=<default>, bool copy=<default>);
+pen[] colorPen;
+pen colorless(pen p);
+pen solid;
+string colorspace(pen p);
+void warn(string s);
+pen deepblue;
+pen palered;
+real[] map(real f(pair), pair[] a);
+int[] map(int f(real), real[] a);
+picture[] map(picture f(picture), picture[] a);
+frame[] map(frame f(frame), frame[] a);
+marker[] map(marker f(marker), marker[] a);
+triple[] map(triple f(triple), triple[] a);
+pen[] map(pen f(pen), pen[] a);
+coord[] map(coord f(coord), coord[] a);
+coord[] map(coord f(coord), coord[] a);
+pair[] map(pair f(pair), pair[] a);
+object[] map(object f(object), object[] a);
+string[] map(string f(string), string[] a);
+void()()[] map(void f()()(void()()), void()()[] a);
+real[] map(real f(real), real[] a);
+int[] map(int f(int), int[] a);
+bool3[] map(bool3 f(bool3), bool3[] a);
+Label[] map(Label f(Label), Label[] a);
+bool[] map(bool f(bool), bool[] a);
+path[] map(path f(path), path[] a);
+Legend[] map(Legend f(Legend), Legend[] a);
+guide[] map(guide f(guide), guide[] a);
+path unstraighten(path p);
+path3 unstraighten(path3 p);
+void _image(frame f, real[][] data, pair initial, pair final, pen[] palette=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+void _image(frame f, pen[][] data, pair initial, pair final, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+void _image(frame f, pen f(int, int), int width, int height, pair initial, pair final, transform t=<default>, bool antialias=<default>);
+pair arcpoint(path p, real L);
+pen Pen(int n);
+int rfind(string s, string t, int pos=<default>);
+pair minratio(frame f);
+pair minratio(triple[][] p, pair b);
+pair minratio(path3 g);
+int[] sequence(int n);
+object[] sequence(object f(int), int n);
+Legend[] sequence(Legend f(int), int n);
+int[] sequence(int f(int), int n);
+pair[] sequence(pair f(int), int n);
+guide[] sequence(guide f(int), int n);
+pen[] sequence(pen f(int), int n);
+marker[] sequence(marker f(int), int n);
+void()()[] sequence(void f()()(int), int n);
+bool[] sequence(bool f(int), int n);
+string[] sequence(string f(int), int n);
+bool3[] sequence(bool3 f(int), int n);
+coord[] sequence(coord f(int), int n);
+picture[] sequence(picture f(int), int n);
+real[] sequence(real f(int), int n);
+int[] sequence(int n, int m);
+coord[] sequence(coord f(int), int n);
+Label[] sequence(Label f(int), int n);
+triple[] sequence(triple f(int), int n);
+path[] sequence(path f(int), int n);
+frame[] sequence(frame f(int), int n);
+triple minbezier(triple[][] p, triple b);
+path trim(path g, real begin, real end);
+marginT DotMargin(path, pen)(real begin, real end);
+marginT DotMargin(path, pen);
+marginT DotMargins(path, pen);
+string string(int x);
+string string(real x, int digits=<default>);
+string cd(string s=<default>);
+int size(guide g);
+pair size(frame f);
+int size(path p);
+int size(path3 p);
+void size(picture dest, picture src);
+pair size(picture pic, bool user=<default>);
+void size(picture pic=<default>, real x, real y=<default>, bool keepAspect=<default>);
+void size(picture pic=<default>, real xsize, real ysize, pair min, pair max);
+void clear(file f);
+void clear(string file, int line);
+void clear();
+void clear(string file, string text);
+pen mediumred;
+pen mediumblue;
+pen mediumgreen;
+pen mediumcyan;
+pen mediummagenta;
+pair arcdir(path p, real L);
+pen mediumyellow;
+pen mediumgray;
+string downcase(string s);
+pen mediumgrey;
+transform transform(pen p);
+string readline(string prompt=<default>, string name=<default>, bool tabcompletion=<default>);
+void beep();
+pair relpoint(path p, real l);
+pair[][] transpose(pair[][] a);
+pen[][] transpose(pen[][] a);
+string[][] transpose(string[][] a);
+real[][] transpose(real[][] a);
+pen overwrite(int n);
+int overwrite(pen p=<default>);
+pen linewidth(real x);
+real linewidth(pen p=<default>);
+transformation transformation(real[][] modelview);
+transformation transformation(real[][] modelview, real[][] projection);
+pair maxratio(frame f);
+pair maxratio(triple[][] p, pair b);
+pair maxratio(path3 g);
+triple maxbezier(triple[][] p, triple b);
+void layer(frame f);
+void layer(picture pic=<default>);
+void DOSnewl(file file);
+pen cmyk(pen p);
+pen cmyk(real c, real m, real y, real k);
+pen blue;
+pen evenodd;
+int precision(file f=<default>, int digits=<default>);
+path3 path3(triple[] pre, triple[] point, triple[] post, bool[] straight, bool cyclic);
+bool piecewisestraight(path p);
+bool piecewisestraight(path3 p);
+void stop(string file, int line, code s=<default>);
+void stop(string file, string text, code s=<default>);
+pair reldir(path p, real l);
+slice cut(path p, path knife, int n);
+pen TimesRoman(string series=<default>, string shape=<default>);
+bool is3D(frame f);
+bool is3D(string format=<default>);
+void report(string text);
+void report(int i);
+void report(transform t);
+void add(frame dest, frame src);
+void add(picture pic=<default>, void d(frame f, transform t), bool exact=<default>);
+void add(picture pic=<default>, void d(frame f, real[][] t, picture pic, projection P), bool exact=<default>);
+void add(picture pic=<default>, void d(picture, real[][]), bool exact=<default>);
+void add(picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest=<default>, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(frame dest, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest, picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture pic=<default>, Label L);
+void add(picture dest, picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest=<default>, object F, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture pic=<default>, void d(picture, transform), bool exact=<default>);
+void add(frame f, transform t=<default>, Label L);
+void add(frame dest, frame src, filltype filltype, bool above=<default>);
+void add(frame dest, frame src, bool group, filltype filltype=<default>, bool above=<default>);
+void add(frame dest, frame src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest=<default>, frame src, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+plain plain;
+void purge(int divisor=<default>);
+int Round(real x);
+real sqrt(real x);
+real[] sqrt(real[] a);
+pair sqrt(explicit pair z);
+real[] times(path p, real x);
+real[] times(path p, explicit pair z);
+void Draw(picture pic=<default>, path g, pen p=<default>);
+filltype Draw;
+void Draw(picture pic=<default>, explicit path[] g, pen p=<default>);
+filltype Draw(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
+void tab(file file);
+plain_scaling plain_scaling;
+string file(string s);
+plain_bounds plain_bounds;
+string outprefix(string prefix=<default>);
+object object(frame f);
+object object(Label L);
+object object(Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+file stdin;
+void()()[] array(int n, void value()(), int depth=<default>);
+bool[] array(int n, bool value, int depth=<default>);
+string[] array(int n, string value, int depth=<default>);
+pair[][] array(int n, pair[] value, int depth=<default>);
+bool3[] array(int n, bool3 value, int depth=<default>);
+coord[] array(int n, coord value, int depth=<default>);
+picture[] array(int n, picture value, int depth=<default>);
+real[][] array(int n, real[] value, int depth=<default>);
+real[] array(int n, real value, int depth=<default>);
+coord[] array(int n, coord value, int depth=<default>);
+Label[] array(int n, Label value, int depth=<default>);
+triple[] array(int n, triple value, int depth=<default>);
+path[] array(int n, path value, int depth=<default>);
+frame[] array(int n, frame value, int depth=<default>);
+pen[][] array(int n, pen[] value, int depth=<default>);
+object[] array(int n, object value, int depth=<default>);
+Legend[] array(int n, Legend value, int depth=<default>);
+int[] array(int n, int value, int depth=<default>);
+string[][] array(int n, string[] value, int depth=<default>);
+pair[] array(int n, pair value, int depth=<default>);
+guide[] array(int n, guide value, int depth=<default>);
+pen[] array(int n, pen value, int depth=<default>);
+marker[] array(int n, marker value, int depth=<default>);
+file binput(string name, bool check=<default>);
+bool BeginBar(picture, path, pen, marginT(path, pen))(real size=<default>);
+bool BeginBar(picture, path, pen, marginT(path, pen));
+triple perp(triple v, triple u);
+int find(bool[] a, int n=<default>);
+int find(string s, string t, int pos=<default>);
+position BeginPoint;
+marginT BeginMargin(path, pen);
+path buildcycle(... path[] p);
+bool BeginArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool BeginArrow(picture, path, pen, marginT(path, pen));
+marginT BeginPenMargin(path, pen);
+int round(real x);
+marginT BeginDotMargin(path, pen);
+bool BeginArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool BeginArcArrow(picture, path, pen, marginT(path, pen));
+pen roundcap;
+void buildRestoreThunk()();
+pen roundjoin;
+int sourceline(string file, string text);
+void buildRestoreDefaults()();
+path roundbox(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path roundbox(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+real asin(real x);
+real[] asin(real[] a);
+pair endpoint(path p);
+real latitude(triple v, bool warn=<default>);
+int sum(int[] a);
+real sum(real[] a);
+pair sum(pair[] a);
+triple sum(triple[] a);
+int sum(bool[] a);
+real inf;
+real arctime(path p, real dval);
+real arctime(path3 p, real dval);
+pen palemagenta;
+file xinput(string name, bool check=<default>);
+void draw(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real prcshininess, triple normal, pen[] colors, bool lighton, int interaction, bool prc=<default>);
+void draw(frame f, triple[] p, real[] knot, real[] weights=<default>, pen p);
+void draw(frame f, triple[][] p, real[] uknot, real[] vknot, real[][] weights=<default>, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors, bool lighton);
+void draw(picture pic=<default>, path[] g, pen fillrule=<default>, pen[] p);
+void draw(frame f, explicit path[] g, pen p=<default>);
+void draw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), pair position, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+void draw(picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(frame f, guide[] g, pen p=<default>);
+void draw(frame f, path g, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen)));
+object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+void draw(frame f, path g, pen p=<default>);
+int mantissaBits;
+real identity(real x);
+real[] identity(real[] a);
+transform identity();
+real[][] identity(int n);
+real[][] identity4;
+marker[] MarkFill;
+pen pattern(string s);
+string pattern(pen p);
+transform invert;
+transform inverse(transform t);
+real[][] inverse(real[][] a);
+pair unit(pair z);
+triple unit(triple v);
+triple min3(frame f);
+triple min3(pen p);
+void begin(picture pic=<default>, string name, string id=<default>, bool visible=<default>);
+void drawPRCdisk(frame f, real[][] t, pen[] p, real opacity, real shininess);
+void drawPRCtube(frame f, path3 center, path3 g, pen[] p, real opacity, real shininess);
+int CLZ(int a);
+void drawPRCsphere(frame f, real[][] t, bool half=<default>, pen[] p, real opacity, real shininess, int type);
+arrowhead DefaultHead;
+void drawPRCcylinder(frame f, real[][] t, pen[] p, real opacity, real shininess);
+void beginclip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+void beginclip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+void begingroup(frame f);
+void begingroup(picture pic=<default>);
+marker nomarker;
+pair beginpoint(path p);
+real azimuth(triple v, bool warn=<default>);
+real angle(pair z, bool warn=<default>);
+real angle(transform t);
+pair ENE;
+frame pack(pair align=<default> ... object[] inset);
+void gsave(frame f);
+void write(file file=<default>, string s=<default>, bool x, void suffix(file)=<default> ... bool[]);
+void write(file file=<default>, string s=<default>, explicit bool[] a ... bool[][]);
+void write(file file=<default>, bool[][]);
+void write(file file=<default>, bool[][][]);
+void write(file file=<default>, string s=<default>, int x, void suffix(file)=<default> ... int[]);
+void write(file file=<default>, string s=<default>, explicit int[] a ... int[][]);
+void write(file file=<default>, int[][]);
+void write(file file=<default>, int[][][]);
+void write(file file=<default>, string s=<default>, real x, void suffix(file)=<default> ... real[]);
+void write(file file=<default>, string s=<default>, explicit real[] a ... real[][]);
+void write(file file=<default>, real[][]);
+void write(file file=<default>, real[][][]);
+void write(file file=<default>, string s=<default>, pair x, void suffix(file)=<default> ... pair[]);
+void write(file file=<default>, string s=<default>, explicit pair[] a ... pair[][]);
+void write(file file=<default>, pair[][]);
+void write(file file=<default>, pair[][][]);
+void write(file file=<default>, string s=<default>, triple x, void suffix(file)=<default> ... triple[]);
+void write(file file=<default>, string s=<default>, explicit triple[] a ... triple[][]);
+void write(file file=<default>, triple[][]);
+void write(file file=<default>, triple[][][]);
+void write(file file=<default>, string s=<default>, string x, void suffix(file)=<default> ... string[]);
+void write(file file=<default>, string s=<default>, explicit string[] a ... string[][]);
+void write(file file=<default>, string[][]);
+void write(file file=<default>, string[][][]);
+void write(file file=<default>, string s, void suffix(file)=<default>);
+void write(file file=<default>, string s=<default>, transform x, void suffix(file)=<default> ... transform[]);
+void write(file file=<default>, string s=<default>, guide x, void suffix(file)=<default> ... guide[]);
+void write(file file=<default>, string s=<default>, pen x, void suffix(file)=<default> ... pen[]);
+void write(file file, string s=<default>, explicit guide[] x, void suffix(file)=<default>);
+void write(string s=<default>, cputime c, string format=<default>, void suffix(file)=<default>);
+void write(file file=<default>, Label L, void suffix(file)=<default>);
+void write(string s=<default>, explicit path[] x, void suffix(file)=<default>);
+void write(file file, void suffix(file)=<default>);
+void write(file file=<default>, string s=<default>, pen[] p);
+void write(void suffix(file)=<default>);
+void write(file file, string s=<default>, explicit path[] x, void suffix(file)=<default>);
+void write(file file=<default>, align align, void suffix(file)=<default>);
+void write(file file, string s=<default>, cputime c, string format=<default>, void suffix(file)=<default>);
+void write(string s=<default>, bool3 b, void suffix(file)=<default>);
+void write(file file, string s=<default>, bool3 b, void suffix(file)=<default>);
+void write(string s=<default>, explicit guide[] x, void suffix(file)=<default>);
+void write(pairOrTriple a);
+void save()();
+marginT EndPenMargin(path, pen);
+pair NNE;
+real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);
+pen Dotted;
+pen Dotted(pen p=<default>);
+pair dir(real degrees);
+pair dir(explicit pair z);
+triple dir(explicit triple z);
+triple dir(real colatitude, real longitude);
+pair dir(path p, int t, int sign=<default>, bool normalize=<default>);
+pair dir(path p, real t, bool normalize=<default>);
+triple dir(path3 p, int t, int sign=<default>, bool normalize=<default>);
+triple dir(path3 p, real t, bool normalize=<default>);
+pair dir(path p);
+pair dir(path p, path g);
+int[][] diagonal(... int[]);
+real[][] diagonal(... real[]);
+pair[][] diagonal(... pair[]);
+real reltime(path p, real l);
+void marknodes(picture pic=<default>, frame f, path g);
+real newton(int iterations=<default>, real f(real), real fprime(real), real x, bool verbose=<default>);
+real newton(int iterations=<default>, real f(real), real fprime(real), real x1, real x2, bool verbose=<default>);
+string TeXify(string s);
+bool3 default;
+pair[] controlSpecifier(guide g, int t);
+void defaultpen(pen p);
+pen defaultpen();
+pen defaultpen;
+void defaultpen(real w);
+transform Slant(transform t);
+triple max3(frame f);
+triple max3(pen p);
+string defaultformat(int n, string trailingzero=<default>, bool fixed=<default>, bool signed=<default>);
+string defaultformat;
+pen dashdotted;
+string asydir();
+string defaultfilename;
+real longitude(triple v, bool warn=<default>);
+bool Blank(picture, path, pen, marginT(path, pen));
+tensionSpecifier tensionSpecifier(guide g, int t);
+marker marker(frame f=<default>, void markroutine(picture pic=<default>, frame f, path g)=<default>, bool above=<default>);
+marker marker(path[] g, void markroutine(picture pic=<default>, frame f, path g)=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+int Move;
+string location();
+string locatefile(string file);
+pen dotted;
+string blend(pen p);
+arrowhead HookHead;
+arrowhead HookHead(real dir=<default>, real barb=<default>);
+real[] concat(... real[][]);
+pair[] concat(... pair[][]);
+object[] concat(... object[][]);
+Label[] concat(... Label[][]);
+pen[] concat(... pen[][]);
+coord[] concat(... coord[][]);
+path[] concat(... path[][]);
+int[] concat(... int[][]);
+void()()[] concat(... void()()[][]);
+picture[] concat(... picture[][]);
+string[] concat(... string[][]);
+Legend[] concat(... Legend[][]);
+triple[] concat(... triple[][]);
+coord[] concat(... coord[][]);
+bool3[] concat(... bool3[][]);
+frame[] concat(... frame[][]);
+guide[] concat(... guide[][]);
+bool[] concat(... bool[][]);
+marker[] concat(... marker[][]);
+int OR(int a, int b);
+real log1p(real x);
+real[] log1p(real[] a);
+real infinity;
+bool alias(pair[][] a, pair[][] b);
+bool alias(guide[] a, guide[] b);
+bool alias(coords2 a, coords2 b);
+bool alias(Legend a, Legend b);
+bool alias(cputime a, cputime b);
+bool alias(light a, light b);
+bool alias(framedTransformStack a, framedTransformStack b);
+bool alias(pair[] a, pair[] b);
+bool alias(bool3[] a, bool3[] b);
+bool alias(coord a, coord b);
+bool alias(position a, position b);
+bool alias(int[] a, int[] b);
+bool alias(string[][] a, string[][] b);
+bool alias(hsv a, hsv b);
+bool alias(scaling a, scaling b);
+bool alias(pairOrTriple a, pairOrTriple b);
+bool alias(coords3 a, coords3 b);
+bool alias(object[] a, object[] b);
+bool alias(real[][] a, real[][] b);
+bool alias(coords2 a, coords2 b);
+bool alias(Label a, Label b);
+bool alias(marker[] a, marker[] b);
+bool alias(slice a, slice b);
+bool alias(freezableBounds a, freezableBounds b);
+bool alias(picture a, picture b);
+bool alias(picture[] a, picture[] b);
+bool alias(string[] a, string[] b);
+bool alias(scaleT a, scaleT b);
+bool alias(marker a, marker b);
+bool alias(Label[] a, Label[] b);
+bool alias(frame[] a, frame[] b);
+bool alias(scaling a, scaling b);
+bool alias(bounds a, bounds b);
+bool alias(object a, object b);
+bool alias(bool[] a, bool[] b);
+bool alias(void()()[] a, void()()[] b);
+bool alias(filltype a, filltype b);
+bool alias(pen[][] a, pen[][] b);
+bool alias(bool3 a, bool3 b);
+bool alias(coord[] a, coord[] b);
+bool alias(autoscaleT a, autoscaleT b);
+bool alias(arrowhead a, arrowhead b);
+bool alias(path[] a, path[] b);
+bool alias(transformation a, transformation b);
+bool alias(triple[] a, triple[] b);
+bool alias(marginT a, marginT b);
+bool alias(align a, align b);
+bool alias(Legend[] a, Legend[] b);
+bool alias(real[] a, real[] b);
+bool alias(coord a, coord b);
+bool alias(ScaleT a, ScaleT b);
+bool alias(processtime a, processtime b);
+bool alias(pen[] a, pen[] b);
+bool alias(projection a, projection b);
+bool alias(indexedTransform a, indexedTransform b);
+bool alias(coord[] a, coord[] b);
+bool alias(side a, side b);
+real pi;
+int getint(string name=<default>, int default=<default>, string prompt=<default>, bool store=<default>);
+bool IgnoreAspect;
+void postscript(frame f, string s);
+void postscript(frame f, string s, pair min, pair max);
+void postscript(picture pic=<default>, string s);
+void postscript(picture pic=<default>, string s, pair min, pair max);
+transform slant(real s);
+void breakpoint(code s=<default>);
+void breakpoints();
+void endgroup(frame f);
+void endgroup(picture pic=<default>);
+void endgroup3(frame f);
+int Floor(real x);
+pair gamma(explicit pair z);
+real gamma(real x);
+real pow10(real x);
+real[] pow10(real[] a);
+real bp;
+int[] sort(int[] a);
+int[][] sort(int[][] a);
+real[] sort(real[] a);
+real[][] sort(real[][] a);
+string[] sort(string[] a);
+string[][] sort(string[][] a);
+bool3[] sort(bool3[] a, bool less(bool3, bool3));
+path[] sort(path[] a, bool less(path, path));
+marker[] sort(marker[] a, bool less(marker, marker));
+pair[] sort(pair[] a, bool less(pair, pair));
+void()()[] sort(void()()[] a, bool less(void()(), void()()));
+real[] sort(real[] a, bool less(real, real));
+bool[] sort(bool[] a, bool less(bool, bool));
+object[] sort(object[] a, bool less(object, object));
+Label[] sort(Label[] a, bool less(Label, Label));
+pen[] sort(pen[] a, bool less(pen, pen));
+coord[] sort(coord[] a, bool less(coord, coord));
+guide[] sort(guide[] a, bool less(guide, guide));
+triple[] sort(triple[] a, bool less(triple, triple));
+string[] sort(string[] a, bool less(string, string));
+int[] sort(int[] a, bool less(int, int));
+picture[] sort(picture[] a, bool less(picture, picture));
+Legend[] sort(Legend[] a, bool less(Legend, Legend));
+coord[] sort(coord[] a, bool less(coord, coord));
+frame[] sort(frame[] a, bool less(frame, frame));
+pen salmon;
+bool ignore;
+pen Pentype(int n);
+pen chartreuse;
+void latticeshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, transform t=<default>, bool copy=<default>);
+void latticeshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, bool copy=<default>);
+pair[] pairs(real[] x, real[] y);
+void eval(code s, bool embedded=<default>);
+void eval(string s, bool embedded=<default>);
+bool Arrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool Arrow(picture, path, pen, marginT(path, pen));
+bool Arrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool Arrows(picture, path, pen, marginT(path, pen));
+int tell(file f);
+pen Yellow;
+pair up;
+guide reverse(guide g);
+string reverse(string s);
+path reverse(path p);
+path3 reverse(path3 p);
+triple[] reverse(triple[] a);
+int[] reverse(int[] a);
+real[] reverse(real[] a);
+int[] reverse(int n);
+string[] reverse(string[] a);
+pair[] reverse(pair[] a);
+bool[] reverse(bool[] a);
+void _labelpath(frame f, string s, string size, path g, string justify, pair offset, pen p);
+int floor(real x);
+void resetdefaultpen();
+real aSin(real x);
+pen darkred;
+transform Scale(transform t);
+pen mean(pen[] p, real opacity(real[])=<default>);
+pen[] mean(pen[][] palette, real opacity(real[])=<default>);
+string mktemp(string s);
+void sleep(int seconds);
+void unitsize(picture pic=<default>, real x, real y=<default>, real z=<default>);
+void arrow(picture pic=<default>, Label L=<default>, pair b, pair dir, real length=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
+picture arrow(arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>, bool forwards=<default>, marginT margin(path, pen)=<default>, bool center=<default>);
+picture arrow2(arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>);
+path unitsquare;
+real arrowdir;
+real arrowbarb;
+pen yellow;
+int delete(string s);
+pen miterjoin;
+arrowhead SimpleHead;
+real arrowangle;
+real arrowlength;
+pen miterlimit(real x);
+real miterlimit(pen p=<default>);
+real arrowfactor;
+real arrowsize(pen p=<default>);
+real Tan(real deg);
+real arrowsizelimit;
+real arrow2sizelimit;
+real arrowhookfactor;
+real arrowtexfactor;
+void comma(file file);
+void deletepreamble();
+real[] arrowbasepoints(path base, path left, path right);
+path arrowbase(path r, pair y, real t, real size);
+int choose(int n, int k);
+real hypot(real x, real y);
+path[] _strokepath(path g, pen p=<default>);
+void pause(string w=<default>);
+int ocgindex;
+pen springgreen;
+pen brown;
+bool scale(pen p);
+transform scale(real x);
+transform scale(real x, real y);
+real[][] scale(real x, real y, real z);
+scaleT scaleT(real T(real x), real Tinv(real x), bool logarithmic=<default>, bool automin=<default>, bool automax=<default>);
+string baseline(string s, string template=<default>);
+real[][] scale3(real s);
+int AND(int a, int b);
+real polar(triple v, bool warn=<default>);
+real radius(path p, real t);
+real radius(path3 p, real t);
+real radius(triple z0, triple c0, triple c1, triple z1, real t);
+transform scaleless(transform t);
+void makedraw(frame f, path g, pen p, int depth=<default>);
+pair down;
+path arc(pair c, real r, real angle1, real angle2);
+path arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>);
+path arc(pair c, real r, real angle1, real angle2, bool direction);
+real[] cubicroots(real a, real b, real c, real d);
+pen green;
+real tan(real x);
+real[] tan(real[] a);
+pen longdashed;
+pair point(guide g, int t);
+pair point(path p, int t);
+pair point(path p, real t);
+triple point(path3 p, int t);
+triple point(path3 p, real t);
+pair point(picture pic=<default>, pair dir, bool user=<default>);
+pair point(object F, pair dir, transform t=<default>);
+pair point(frame f, pair dir);
+pen longdashdotted;
+void usepackage(string s, string options=<default>);
+real side(pair a, pair b, pair c);
+void drawarrow(frame f, arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>, bool forwards=<default>, marginT margin(path, pen)=<default>, bool center=<default>);
+void drawarrow2(frame f, arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>);
+pen fillrule(int n);
+int fillrule(pen p);
+pair ESE;
+pair project(triple v, real[][] t);
+bool prc(string format=<default>);
+projection projection(triple camera, triple up=<default>, triple target=<default>, triple normal=<default>, real zoom=<default>, real angle=<default>, pair viewportshift=<default>, bool showtarget=<default>, bool autoadjust=<default>, bool center=<default>, transformation projector(triple camera, triple up, triple target));
+void endl(file file);
+marginT TrueMargin(path, pen)(real begin, real end);
+pair bezier(pair a, pair b, pair c, pair d, real t);
+triple bezier(triple a, triple b, triple c, triple d, real t);
+pair SSE;
+pair bezierP(pair a, pair b, pair c, pair d, real t);
+triple bezierP(triple a, triple b, triple c, triple d, real t);
+pair bezierPP(pair a, pair b, pair c, pair d, real t);
+triple bezierPP(triple a, triple b, triple c, triple d, real t);
+real[] _projection();
+pair bezierPPP(pair a, pair b, pair c, pair d);
+triple bezierPPP(triple a, triple b, triple c, triple d);
+real Jn(int n, real x);
+void initXasyMode();
+int randMax;
+path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, int m);
+align NoAlign;
+bool EndBar(picture, path, pen, marginT(path, pen));
+bool EndBar(picture, path, pen, marginT(path, pen))(real size=<default>);
+Legend Legend(string label, pen plabel=<default>, pen p=<default>, frame mark=<default>, bool above=<default>);
+real Yn(int n, real x);
+int NOT(int a);
+pen[] monoPen;
+bool CW;
+bool all(bool[] a);
+real atanh(real x);
+real[] atanh(real[] a);
+frame UpsideDown(frame f);
+pair realmult(pair z, pair w);
+triple realmult(triple u, triple v);
+real acosh(real x);
+real[] acosh(real[] a);
+real realEpsilon;
+pair NW;
+real norm(real[] a);
+real norm(real[][] a);
+real norm(triple[][] a);
+int length(guide g);
+int length(string s);
+real length(pair z);
+real length(triple v);
+int length(path p);
+int length(path3 p);
+pair SW;
+void flush(file f);
+pen thin();
+pen palecyan;
+void warning(string s, string t, bool position=<default>);
+frame legend(picture pic=<default>, int perline=<default>, real xmargin=<default>, real ymargin=<default>, real linelength=<default>, real hskip=<default>, real vskip=<default>, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>, pen p=<default>);
+picture legend(Legend[] Legend, int perline=<default>, real linelength, real hskip, real vskip, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>);
+real Degrees(real radians);
+picture legenditem(Legend legenditem, real linelength);
+real legendhskip;
+real legendvskip;
+pen darkmagenta;
+real change2(triple[][] a);
+bool None(picture, path, pen, marginT(path, pen));
+real legendmargin;
+real dotfactor;
+real legendlinelength;
+bool diagnostics;
+string minipage(string s, real width=<default>);
+real legendmaxrelativewidth;
+triple cross(triple u, triple v);
+path cross(int n, bool round=<default>, real r=<default>);
+string operator +(string a, string b);
+int operator +(int a, int b);
+int[] operator +(int a, int[] b);
+int[] operator +(int[] a, int b);
+int[] operator +(int[] a, int[] b);
+int[][] operator +(int[][] a, int[][] b);
+int operator +(int a);
+int[] operator +(int[] a);
+real operator +(real a, real b);
+real[] operator +(real a, real[] b);
+real[] operator +(real[] a, real b);
+real[] operator +(real[] a, real[] b);
+real[][] operator +(real[][] a, real[][] b);
+real operator +(real a);
+real[] operator +(real[] a);
+pair operator +(pair a, pair b);
+pair[] operator +(pair a, pair[] b);
+pair[] operator +(pair[] a, pair b);
+pair[] operator +(pair[] a, pair[] b);
+pair[][] operator +(pair[][] a, pair[][] b);
+pair operator +(pair a);
+pair[] operator +(pair[] a);
+triple operator +(triple a, triple b);
+triple[] operator +(triple a, triple[] b);
+triple[] operator +(triple[] a, triple b);
+triple[] operator +(triple[] a, triple[] b);
+triple[][] operator +(triple[][] a, triple[][] b);
+triple operator +(triple a);
+triple[] operator +(triple[] a);
+pen operator +(pen a, pen b);
+transform operator +(transform a, transform b);
+pen operator +(pen p, real w);
+pen[] operator +(pen a, pen[] b);
+marginT operator +(path, pen)(marginT ma(path, pen), marginT mb(path, pen));
+pen operator +(real w, pen p);
+pen[] operator +(pen[] a, pen b);
+int operator -(int a, int b);
+int[] operator -(int a, int[] b);
+int[] operator -(int[] a, int b);
+int[] operator -(int[] a, int[] b);
+int[][] operator -(int[][] a, int[][] b);
+int operator -(int a);
+int[] operator -(int[] a);
+int[][] operator -(int[][] a);
+real operator -(real a, real b);
+real[] operator -(real a, real[] b);
+real[] operator -(real[] a, real b);
+real[] operator -(real[] a, real[] b);
+real[][] operator -(real[][] a, real[][] b);
+real operator -(real a);
+real[] operator -(real[] a);
+real[][] operator -(real[][] a);
+pair operator -(pair a, pair b);
+pair[] operator -(pair a, pair[] b);
+pair[] operator -(pair[] a, pair b);
+pair[] operator -(pair[] a, pair[] b);
+pair[][] operator -(pair[][] a, pair[][] b);
+pair operator -(pair a);
+pair[] operator -(pair[] a);
+pair[][] operator -(pair[][] a);
+triple operator -(triple a, triple b);
+triple[] operator -(triple a, triple[] b);
+triple[] operator -(triple[] a, triple b);
+triple[] operator -(triple[] a, triple[] b);
+triple[][] operator -(triple[][] a, triple[][] b);
+triple operator -(triple a);
+triple[] operator -(triple[] a);
+triple[][] operator -(triple[][] a);
+int operator *(int a, int b);
+int[] operator *(int a, int[] b);
+int[] operator *(int[] a, int b);
+int[] operator *(int[] a, int[] b);
+int[][] operator *(int a, int[][] b);
+int[][] operator *(int[][] a, int b);
+real operator *(real a, real b);
+real[] operator *(real a, real[] b);
+real[] operator *(real[] a, real b);
+real[] operator *(real[] a, real[] b);
+real[][] operator *(real a, real[][] b);
+real[][] operator *(real[][] a, real b);
+pair operator *(pair a, pair b);
+pair[] operator *(pair a, pair[] b);
+pair[] operator *(pair[] a, pair b);
+pair[] operator *(pair[] a, pair[] b);
+pair[][] operator *(pair a, pair[][] b);
+pair[][] operator *(pair[][] a, pair b);
+triple[] operator *(real a, triple[] b);
+triple[][] operator *(real a, triple[][] b);
+triple[] operator *(triple[] a, real b);
+triple[][] operator *(triple[][] a, real b);
+pen operator *(real a, pen b);
+pen operator *(pen a, real b);
+transform operator *(transform a, transform b);
+pair operator *(transform t, pair z);
+path operator *(transform t, path g);
+pen operator *(transform t, pen p);
+frame operator *(transform t, frame f);
+frame operator *(real[][] t, frame f);
+real[] operator *(real[][] a, real[] b);
+real[] operator *(real[] a, real[][] b);
+int[][] operator *(int[][] a, int[][] b);
+real[][] operator *(real[][] a, real[][] b);
+pair[][] operator *(pair[][] a, pair[][] b);
+triple operator *(real[][] t, triple v);
+triple operator *(real x, triple v);
+triple operator *(triple v, real x);
+path3 operator *(real[][] t, path3 g);
+Label operator *(real[][] t, Label L);
+picture operator *(real[][] t, picture orig);
+bounds operator *(transform t, bounds b);
+object operator *(transform t, explicit object F);
+Label operator *(transform t, Label L);
+path[] operator *(transform t, explicit path[] p);
+pair[] operator *(transform t, pair[] z);
+picture operator *(transform t, picture orig);
+side operator *(real x, side s);
+bool operator init();
+int operator init();
+real operator init();
+string operator init();
+pair operator init();
+triple operator init();
+transform operator init();
+guide operator init();
+path operator init();
+path3 operator init();
+pen operator init();
+frame operator init();
+file operator init();
+hsv operator init();
+scaling operator init();
+pairOrTriple operator init();
+coords2 operator init();
+Legend operator init();
+cputime operator init();
+coord operator init();
+ScaleT operator init();
+processtime operator init();
+bool3 operator init();
+autoscaleT operator init();
+arrowhead operator init();
+scaleT operator init();
+marker operator init();
+coords3 operator init();
+light operator init();
+framedTransformStack operator init();
+projection operator init();
+indexedTransform operator init();
+transformation operator init();
+scaling operator init();
+bounds operator init();
+object operator init();
+coords2 operator init();
+Label operator init();
+coord operator init();
+position operator init();
+side operator init();
+marginT operator init();
+align operator init();
+filltype operator init();
+slice operator init();
+picture operator init();
+real operator cast(int);
+pair operator cast(int);
+pair operator cast(real);
+path operator cast(pair);
+guide operator cast(pair);
+guide operator cast(path);
+path operator cast(guide);
+file operator cast(null);
+real[] operator cast(int[]);
+pair[] operator cast(int[]);
+pair[] operator cast(real[]);
+real[][] operator cast(int[][]);
+pair[][] operator cast(int[][]);
+pair[][] operator cast(real[][]);
+bool operator cast(file);
+bool[] operator cast(file);
+bool[][] operator cast(file);
+bool[][][] operator cast(file);
+int operator cast(file);
+int[] operator cast(file);
+int[][] operator cast(file);
+int[][][] operator cast(file);
+real operator cast(file);
+real[] operator cast(file);
+real[][] operator cast(file);
+real[][][] operator cast(file);
+pair operator cast(file);
+pair[] operator cast(file);
+pair[][] operator cast(file);
+pair[][][] operator cast(file);
+triple operator cast(file);
+triple[] operator cast(file);
+triple[][] operator cast(file);
+triple[][][] operator cast(file);
+string operator cast(file);
+string[] operator cast(file);
+string[][] operator cast(file);
+string[][][] operator cast(file);
+guide operator cast(cycleToken tok);
+guide operator cast(curlSpecifier spec);
+guide operator cast(tensionSpecifier t);
+guide[] operator cast(path[] g);
+frame operator cast(object F);
+bool3 operator cast(bool b);
+position operator cast(pair x);
+pair operator cast(position P);
+object operator cast(Label L);
+Label operator cast(object F);
+align operator cast(pair dir);
+object operator cast(frame f);
+guide[] operator cast(pair[] z);
+align operator cast(triple dir);
+path[] operator cast(guide[] g);
+bool[] operator cast(bool3[] b);
+pair operator cast(pairOrTriple a);
+triple operator cast(pairOrTriple a);
+pen operator cast(hsv hsv);
+path[] operator cast(guide g);
+align operator cast(side side);
+path[] operator cast(pair[] z);
+path[] operator cast(path p);
+hsv operator cast(pen p);
+bool operator cast(bool3 b);
+position operator cast(int x);
+position operator cast(real x);
+object operator cast(string s);
+Label operator cast(string s);
+bool3[] operator cast(bool[] b);
+pen deepred;
+bool error(file f);
+string operator ecast(int);
+string operator ecast(real);
+string operator ecast(pair);
+string operator ecast(triple);
+int operator ecast(string);
+real operator ecast(string);
+pair operator ecast(string);
+triple operator ecast(string);
+int operator ecast(real);
+int[] operator ecast(real[]);
+real[] operator ecast(string[] a);
+int[] operator ecast(string[] a);
+real operator /(real a, real b);
+real[] operator /(real a, real[] b);
+real[] operator /(real[] a, real b);
+real[] operator /(real[] a, real[] b);
+real[][] operator /(real[][] a, real b);
+pair operator /(pair a, pair b);
+pair[] operator /(pair a, pair[] b);
+pair[] operator /(pair[] a, pair b);
+pair[] operator /(pair[] a, pair[] b);
+pair[][] operator /(pair[][] a, pair b);
+triple[] operator /(triple[] a, real b);
+real operator /(int a, int b);
+real[] operator /(int[] a, int b);
+real[] operator /(int a, int[] b);
+real[] operator /(int[] a, int[] b);
+triple operator /(triple v, real x);
+int operator %(int a, int b);
+int[] operator %(int a, int[] b);
+int[] operator %(int[] a, int b);
+int[] operator %(int[] a, int[] b);
+real operator %(real a, real b);
+real[] operator %(real a, real[] b);
+real[] operator %(real[] a, real b);
+real[] operator %(real[] a, real[] b);
+path[] texpath(Label L, bool tex=<default>, bool bbox=<default>);
+bool uptodate();
+bool operator ^(bool a, bool b);
+bool[] operator ^(bool a, bool[] b);
+bool[] operator ^(bool[] a, bool b);
+bool[] operator ^(bool[] a, bool[] b);
+int operator ^(int a, int b);
+int[] operator ^(int a, int[] b);
+int[] operator ^(int[] a, int b);
+int[] operator ^(int[] a, int[] b);
+real operator ^(real a, real b);
+real[] operator ^(real a, real[] b);
+real[] operator ^(real[] a, real b);
+real[] operator ^(real[] a, real[] b);
+pair operator ^(pair a, pair b);
+pair[] operator ^(pair a, pair[] b);
+pair[] operator ^(pair[] a, pair b);
+pair[] operator ^(pair[] a, pair[] b);
+transform operator ^(transform t, int n);
+real operator ^(real x, int y);
+pair operator ^(pair z, int y);
+bool operator ==(bool a, bool b);
+bool[] operator ==(bool a, bool[] b);
+bool[] operator ==(bool[] a, bool b);
+bool[] operator ==(bool[] a, bool[] b);
+bool operator ==(bool[][] a, bool[][] b);
+bool operator ==(int a, int b);
+bool[] operator ==(int a, int[] b);
+bool[] operator ==(int[] a, int b);
+bool[] operator ==(int[] a, int[] b);
+bool operator ==(int[][] a, int[][] b);
+bool operator ==(real a, real b);
+bool[] operator ==(real a, real[] b);
+bool[] operator ==(real[] a, real b);
+bool[] operator ==(real[] a, real[] b);
+bool operator ==(real[][] a, real[][] b);
+bool operator ==(pair a, pair b);
+bool[] operator ==(pair a, pair[] b);
+bool[] operator ==(pair[] a, pair b);
+bool[] operator ==(pair[] a, pair[] b);
+bool operator ==(pair[][] a, pair[][] b);
+bool operator ==(triple a, triple b);
+bool[] operator ==(triple a, triple[] b);
+bool[] operator ==(triple[] a, triple b);
+bool[] operator ==(triple[] a, triple[] b);
+bool operator ==(triple[][] a, triple[][] b);
+bool operator ==(string a, string b);
+bool[] operator ==(string a, string[] b);
+bool[] operator ==(string[] a, string b);
+bool[] operator ==(string[] a, string[] b);
+bool operator ==(string[][] a, string[][] b);
+bool[] operator ==(pen[] a, pen[] b);
+bool operator ==(pen a, pen b);
+bool operator ==(transform a, transform b);
+bool operator ==(file a, file b);
+bool operator ==(path a, path b);
+bool operator ==(path3 a, path3 b);
+bool operator ==(slice a, slice b);
+bool operator ==(freezableBounds a, freezableBounds b);
+bool operator ==(picture a, picture b);
+bool operator ==(scaleT a, scaleT b);
+bool operator ==(marker a, marker b);
+bool operator ==(bool a, bool3 b);
+bool operator ==(scaling a, scaling b);
+bool operator ==(bounds a, bounds b);
+bool operator ==(object a, object b);
+bool operator ==(filltype a, filltype b);
+bool operator ==(bool3 a, bool3 b);
+bool operator ==(autoscaleT a, autoscaleT b);
+bool operator ==(arrowhead a, arrowhead b);
+bool operator ==(transformation a, transformation b);
+bool operator ==(marginT a, marginT b);
+bool operator ==(align a, align b);
+bool operator ==(coord a, coord b);
+bool operator ==(ScaleT a, ScaleT b);
+bool operator ==(processtime a, processtime b);
+bool operator ==(projection a, projection b);
+bool operator ==(indexedTransform a, indexedTransform b);
+bool operator ==(bool3 a, bool b);
+bool operator ==(side a, side b);
+bool operator ==(coords2 a, coords2 b);
+bool operator ==(Legend a, Legend b);
+bool operator ==(cputime a, cputime b);
+bool operator ==(light a, light b);
+bool operator ==(framedTransformStack a, framedTransformStack b);
+bool operator ==(coord a, coord b);
+bool operator ==(position a, position b);
+bool operator ==(hsv a, hsv b);
+bool operator ==(scaling a, scaling b);
+bool operator ==(pairOrTriple a, pairOrTriple b);
+bool operator ==(coords3 a, coords3 b);
+bool operator ==(coords2 a, coords2 b);
+bool operator ==(Label a, Label b);
+bool operator !=(bool a, bool b);
+bool[] operator !=(bool a, bool[] b);
+bool[] operator !=(bool[] a, bool b);
+bool[] operator !=(bool[] a, bool[] b);
+bool operator !=(bool[][] a, bool[][] b);
+bool operator !=(int a, int b);
+bool[] operator !=(int a, int[] b);
+bool[] operator !=(int[] a, int b);
+bool[] operator !=(int[] a, int[] b);
+bool operator !=(int[][] a, int[][] b);
+bool operator !=(real a, real b);
+bool[] operator !=(real a, real[] b);
+bool[] operator !=(real[] a, real b);
+bool[] operator !=(real[] a, real[] b);
+bool operator !=(real[][] a, real[][] b);
+bool operator !=(pair a, pair b);
+bool[] operator !=(pair a, pair[] b);
+bool[] operator !=(pair[] a, pair b);
+bool[] operator !=(pair[] a, pair[] b);
+bool operator !=(pair[][] a, pair[][] b);
+bool operator !=(triple a, triple b);
+bool[] operator !=(triple a, triple[] b);
+bool[] operator !=(triple[] a, triple b);
+bool[] operator !=(triple[] a, triple[] b);
+bool operator !=(triple[][] a, triple[][] b);
+bool operator !=(string a, string b);
+bool[] operator !=(string a, string[] b);
+bool[] operator !=(string[] a, string b);
+bool[] operator !=(string[] a, string[] b);
+bool operator !=(string[][] a, string[][] b);
+bool[] operator !=(pen[] a, pen[] b);
+bool operator !=(pen a, pen b);
+bool operator !=(transform a, transform b);
+bool operator !=(file a, file b);
+bool operator !=(path a, path b);
+bool operator !=(path3 a, path3 b);
+bool operator !=(slice a, slice b);
+bool operator !=(freezableBounds a, freezableBounds b);
+bool operator !=(picture a, picture b);
+bool operator !=(scaleT a, scaleT b);
+bool operator !=(marker a, marker b);
+bool operator !=(bool a, bool3 b);
+bool operator !=(scaling a, scaling b);
+bool operator !=(bounds a, bounds b);
+bool operator !=(object a, object b);
+bool operator !=(filltype a, filltype b);
+bool operator !=(bool3 a, bool3 b);
+bool operator !=(autoscaleT a, autoscaleT b);
+bool operator !=(arrowhead a, arrowhead b);
+bool operator !=(transformation a, transformation b);
+bool operator !=(marginT a, marginT b);
+bool operator !=(align a, align b);
+bool operator !=(coord a, coord b);
+bool operator !=(ScaleT a, ScaleT b);
+bool operator !=(processtime a, processtime b);
+bool operator !=(projection a, projection b);
+bool operator !=(indexedTransform a, indexedTransform b);
+bool operator !=(bool3 a, bool b);
+bool operator !=(side a, side b);
+bool operator !=(coords2 a, coords2 b);
+bool operator !=(Legend a, Legend b);
+bool operator !=(cputime a, cputime b);
+bool operator !=(light a, light b);
+bool operator !=(framedTransformStack a, framedTransformStack b);
+bool operator !=(coord a, coord b);
+bool operator !=(position a, position b);
+bool operator !=(hsv a, hsv b);
+bool operator !=(scaling a, scaling b);
+bool operator !=(pairOrTriple a, pairOrTriple b);
+bool operator !=(coords3 a, coords3 b);
+bool operator !=(coords2 a, coords2 b);
+bool operator !=(Label a, Label b);
+bool operator <(int a, int b);
+bool[] operator <(int a, int[] b);
+bool[] operator <(int[] a, int b);
+bool[] operator <(int[] a, int[] b);
+bool operator <(real a, real b);
+bool[] operator <(real a, real[] b);
+bool[] operator <(real[] a, real b);
+bool[] operator <(real[] a, real[] b);
+bool operator <(string a, string b);
+bool[] operator <(string a, string[] b);
+bool[] operator <(string[] a, string b);
+bool[] operator <(string[] a, string[] b);
+bool operator <=(int a, int b);
+bool[] operator <=(int a, int[] b);
+bool[] operator <=(int[] a, int b);
+bool[] operator <=(int[] a, int[] b);
+bool operator <=(real a, real b);
+bool[] operator <=(real a, real[] b);
+bool[] operator <=(real[] a, real b);
+bool[] operator <=(real[] a, real[] b);
+bool operator <=(string a, string b);
+bool[] operator <=(string a, string[] b);
+bool[] operator <=(string[] a, string b);
+bool[] operator <=(string[] a, string[] b);
+bool operator <=(coord a, coord b);
+bool operator <=(coord a, coord b);
+bool operator >(int a, int b);
+bool[] operator >(int a, int[] b);
+bool[] operator >(int[] a, int b);
+bool[] operator >(int[] a, int[] b);
+bool operator >(real a, real b);
+bool[] operator >(real a, real[] b);
+bool[] operator >(real[] a, real b);
+bool[] operator >(real[] a, real[] b);
+bool operator >(string a, string b);
+bool[] operator >(string a, string[] b);
+bool[] operator >(string[] a, string b);
+bool[] operator >(string[] a, string[] b);
+bool operator >=(int a, int b);
+bool[] operator >=(int a, int[] b);
+bool[] operator >=(int[] a, int b);
+bool[] operator >=(int[] a, int[] b);
+bool operator >=(real a, real b);
+bool[] operator >=(real a, real[] b);
+bool[] operator >=(real[] a, real b);
+bool[] operator >=(real[] a, real[] b);
+bool operator >=(string a, string b);
+bool[] operator >=(string a, string[] b);
+bool[] operator >=(string[] a, string b);
+bool[] operator >=(string[] a, string[] b);
+bool operator >=(coord a, coord b);
+bool operator >=(coord a, coord b);
+void srand(int seed);
+bool[] operator !(bool[] a);
+bool operator !(bool b);
+filltype UnFill(real xmargin=<default>, real ymargin=<default>);
+filltype UnFill;
+path[] operator ^^(path p, path q);
+path[] operator ^^(explicit path[] p, path q);
+path[] operator ^^(path p, explicit path[] q);
+path[] operator ^^(explicit path[] p, explicit path[] q);
+guide operator ::(... guide[]);
+real degrees(pair z, bool warn=<default>);
+real degrees(real radians);
+pen Helvetica(string series=<default>, string shape=<default>);
+transform reflect(pair a, pair b);
+guide operator ..(... guide[]);
+guide operator ..(... guide[])(tensionSpecifier t);
+bool Bars(picture, path, pen, marginT(path, pen))(real size=<default>);
+bool Bars(picture, path, pen, marginT(path, pen));
+guide operator --(... guide[]);
+void none(file file);
+guide operator ---(... guide[]);
+int factorial(int n);
+real log(real x);
+real[] log(real[] a);
+pair log(explicit pair z);
+path polygon(int n);
+bool operator &(bool a, bool b);
+bool[] operator &(bool a, bool[] b);
+bool[] operator &(bool[] a, bool b);
+bool[] operator &(bool[] a, bool[] b);
+path operator &(path p, path q);
+path3 operator &(path3 p, path3 q);
+path operator &(path p, cycleToken tok);
+bool operator |(bool a, bool b);
+bool[] operator |(bool a, bool[] b);
+bool[] operator |(bool[] a, bool b);
+bool[] operator |(bool[] a, bool[] b);
+pen NewCenturySchoolBook(string series=<default>, string shape=<default>);
+void()()[] saveFunctions;
+guide operator controls(pair zout, pair zin);
+guide operator controls(pair z);
+tensionSpecifier operator tension(real tout, real tin, bool atleast);
+tensionSpecifier operator tension(real t, bool atLeast);
+string texify(string s);
+bool empty(frame f);
+curlSpecifier operator curl(real gamma, int p);
+guide operator spec(pair z, int p);
+void end(picture pic=<default>);
+string substr(string s, int pos, int n=<default>);
+pen paleyellow;
+file output(string name, bool update=<default>, string comment=<default>);
+pen ZapfDingbats(string series=<default>, string shape=<default>);
+real tanh(real x);
+real[] tanh(real[] a);
+real interp(real a, real b, real t);
+pair interp(explicit pair a, explicit pair b, real t);
+triple interp(triple a, triple b, real t);
+pen interp(pen a, pen b, real t);
+frame Seascape(frame f);
+bool interior(int windingnumber, pen fillrule);
+real[] intersect(path p, path q, real fuzz=<default>);
+real[] intersect(path3 p, path3 q, real fuzz=<default>);
+bool interactive();
+real[][] intersections(path p, path q, real fuzz=<default>);
+real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=<default>);
+real[][] intersections(path3 p, path3 q, real fuzz=<default>);
+real[][] intersections(path3 p, triple[][] p, real fuzz=<default>);
+int animate(string args=<default>, string file=<default>, string format=<default>);
+void generate_random_backtrace();
+pair intersectionpoint(path p, path q, real fuzz=<default>);
+pair[] intersectionpoints(path p, path q, real fuzz=<default>);
+pair[] intersectionpoints(explicit path[] p, explicit path[] q, real fuzz=<default>);
+void asy(string format, bool overwrite=<default> ... string[] s);
+bool latex();
+void startScript();
+bool adjust(pen p);
+pen adjust(pen p, real arclength, bool cyclic);
+pair Align;
+void exit();
+real[] uniform(real a, real b, int n);
+pair viewportsize;
+pair viewportmargin;
+string VERSION;
+void filldraw(picture pic=<default>, path[] g, pen fillpen=<default>, pen drawpen=<default>);
+void filldraw(frame f, path[] g, pen fillpen=<default>, pen drawpen=<default>);
+real dot(real[] a, real[] b);
+pair dot(pair[] a, pair[] b);
+real dot(explicit pair z, explicit pair w);
+real dot(triple u, triple v);
+void dot(frame f, pair z, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, Label L, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, Label[] L=<default>, pair[] z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, path[] g, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, Label L, pair z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+marker dot;
+void dot(picture pic=<default>, Label[] L=<default>, explicit path g, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+marker dot(pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, pair z, pen p=<default>, filltype filltype=<default>);
+void list(string s, bool imports=<default>);
+pair NNW;
+string phantom(string s);
+void atexit(void f());
+void atexit()();
+real getreal(string name=<default>, real default=<default>, string prompt=<default>, bool store=<default>);
+int convert(string args=<default>, string file=<default>, string format=<default>);
+pair WNW;
+pen palegray;
+pen palegreen;
+pen palegrey;
+void clip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+void clip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+marginT Margin(path, pen)(real begin, real end);
+marginT Margin(path, pen);
+position Relative(real position);
+side Relative(explicit pair align);
+marginT Margins(path, pen);
+pair truepoint(picture pic=<default>, pair dir, bool user=<default>);
+real arclength(path p);
+real arclength(path3 p);
+indexedTransform indexedTransform(int index, transform t, bool active=<default>);
+bool finite(real x);
+bool finite(pair z);
+bool finite(triple v);
+void updatefunction();
+void _draw(frame f, path g, pen p);
+void _draw(frame f, path3 g, triple center=<default>, pen p, int interaction=<default>);
+void _draw(picture pic, path g, pen p, marginT margin(path, pen));
+frame align(frame f, pair align);
+object align(object F, pair align);
+path[] align(path[] g, transform t=<default>, pair position, pair align, pen p=<default>);
+real unitrand();
+string[] history(string name, int n=<default>);
+string[] history(int n=<default>);
+coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
+coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
+pen AvantGarde(string series=<default>, string shape=<default>);
+frame enclose(string prefix=<default>, object F, string format=<default>);
+int count;
+real atan2(real y, real x);
+bool inside(explicit path[] g, pair z, pen fillrule=<default>);
+bool inside(path g, pair z, pen fillrule=<default>);
+int inside(path p, path q, pen fillrule=<default>);
+pair inside(path p, pen fillrule=<default>);
+pair rectify(pair dir);
+arrowhead TeXHead;
+path[] margin(path[] g, real xmargin, real ymargin);
+pair relative(picture pic=<default>, pair z);
+real expansionfactor;
+real erfc(real x);
+int windingnumber(path[] p, pair z);
+void addArrow(picture pic, arrowhead arrowhead, path g, pen p, real size, real angle, filltype filltype, real position);
+void exitfunction();
+pen gray(pen p);
+pen gray(real gray);
+pen gray;
+real relativedistance(real theta, real phi, real t, bool atleast);
+path circle(pair c, real r);
+void overloadedMessage(file file);
+pen deepmagenta;
+real circlescale;
+string math(real x);
+string math(string s);
+real circleprecision;
+int Allow;
+real determinant(real[][] a);
+void functionshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader=<default>, bool copy=<default>);
+void functionshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader, bool copy=<default>);
+pen red;
+pair[] dirSpecifier(guide g, int t);
+void abort(string s=<default>);
+bool Aspect;
+string hex(pen p);
+int hex(string s);
+void deactivatequote(picture pic=<default>);
+string format(string format, int x);
+string format(string format, real x, string locale=<default>);
+string format(real x, string locale=<default>);
+real expm1(real x);
+real[] expm1(real[] a);
+void activatequote(picture pic=<default>);
+int undefined;
+string ask(string prompt);
+frame[] fit2(picture[] pictures, picture all);
+pen linecap(int n);
+int linecap(pen p=<default>);
+string outname();
+void newpage(frame f);
+void newpage(picture pic=<default>);
+pen fontcommand(string s);
+pair accel(path p, int t, int sign=<default>);
+pair accel(path p, real t);
+triple accel(path3 p, int t, int sign=<default>);
+triple accel(path3 p, real t);
+frame Portrait(frame f);
+void tex(frame f, string s);
+void tex(frame f, string s, pair min, pair max);
+void tex(picture pic=<default>, string s);
+void tex(picture pic=<default>, string s, pair min, pair max);
+pen Black;
+triple size3(frame f);
+void size3(picture pic=<default>, real x, real y=<default>, real z=<default>, bool keepAspect=<default>);
+bool eof(file f);
+frame dotframe;
+frame dotframe(pen p=<default>, filltype filltype=<default>);
+real realMax;
+pair NE;
+real realMin;
+path nib(pen p);
+void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
+void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
+void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
+void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
+bool shipped;
+file boutput(string name, bool update=<default>);
+pair[] fft(pair[] a, int sign=<default>);
+pair SE;
+pen nobasealign;
+sCAD operator init();
+real animationdelay;
+animation operator init();
+frame NoBox(frame f);
+frame BBox(frame)(real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
+void annotate(picture pic=<default>, string title, string text, pair position);
+void babel(string s);
+path removeDuplicates(path p);
+path uncycle(path p, real t);
+path[] bezulate(path[] p);
+real[][] intersections(pair a, pair b, path p);
+void connect(path[] paths, path[] result, path[] patch);
+int countIntersections(path[] p, pair start, pair end);
+real duplicateFuzz;
+path subdivide(path p);
+bool isDuplicate(pair a, pair b, real relSize);
+bool checkSegment(path g, pair p, pair q);
+path section(path p, real t1, real t2, bool loop=<default>);
+real fuzz;
+path[][] containmentTree(path[] paths);
+binarytree searchtree(... int[] keys);
+object draw(picture pic=<default>, binarytreeNode node, pair pos, int height, real minDist, real levelDist, real nodeDiameter, pen p=<default>);
+void draw(picture pic=<default>, binarytree tree, real minDist=<default>, real nodeMargin=<default>, pen p=<default>);
+real nodeMarginDefault;
+key key(int n, bool active=<default>);
+binarytree binarytree(... key[] keys);
+binarytreeNode binarytreeNode(int key);
+key nil;
+real minDistDefault;
+binarytreeNode operator init();
+key operator init();
+binarytree operator init();
+key operator cast(int n);
+int operator cast(key k);
+int[] operator cast(key[] k);
+line intersection(face a, face b);
+real epsilon;
+splitface split(face a, face cut, projection P);
+face operator init();
+line operator init();
+half operator init();
+splitface operator init();
+bsp operator init();
+picture operator cast(face f);
+face operator cast(path3 p);
+void add(picture pic=<default>, face[] faces, projection P=<default>);
+void searchindex(boxcontour bc, bool forward, void f(int i, int j));
+segment case1(pair p0, pair p1, pair p2, real v0, real v1, real v2);
+void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen[] p);
+void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen p=<default>);
+void draw(picture pic=<default>, Label L, guide[] g, pen p=<default>);
+int interior;
+pen[][] interior(picture pic=<default>, guide[][] g, pen[] palette);
+pen[] extend(pen[] palette, pen below, pen above);
+bool same(gridpoint gp1, gridpoint gp2);
+guide connect(Segment S, pair[][] z, guide join(... guide[]));
+guide[] connect(Segment[] S, pair[][] z, guide join(... guide[]));
+guide[][] connect(Segment[][] S, pair[][] z, guide join(... guide[]));
+guide[][] connect(pair[][][] points, real[] c, guide join(... guide[]));
+bool connected(boxcontour bc1, boxcontour bc2);
+int exterior;
+int connectedindex(boxcontour bc, boxcontour[] bca, bool activeonly=<default>);
+int connectedindex(boxcontour[] bca, boxcontour bc, bool activeonly=<default>);
+segment case2(pair p0, pair p1, pair p2, real v0, real v1, real v2);
+void collect(pair[][][] points, real[] c);
+int hyperbola;
+int edge;
+int line;
+segment case3(pair p0, pair p1, pair p2, real v0, real v1, real v2);
+segment checktriangle(pair p0, pair p1, pair p2, real v0, real v1, real v2);
+gridpoint operator init();
+boxcontour operator init();
+boxdata operator init();
+segment operator init();
+Segment operator init();
+segment operator init();
+void fill(picture pic=<default>, guide[][] g, pen[][] palette);
+guide[][] contour(pair[][] z, real[][] f, real[] c, guide join(... guide[])=<default>, int subsample=<default>);
+guide[][] contour(real[][] f, pair a, pair b, real[] c, guide join(... guide[])=<default>, int subsample=<default>);
+guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=<default>, int ny=<default>, guide join(... guide[])=<default>, int subsample=<default>);
+guide[][] contour(real f(pair), pair a, pair b, real[] c, int nx=<default>, int ny=<default>, guide join(... guide[])=<default>, int subsample=<default>);
+guide[][] contour(pair[] z, real[] f, real[] c, guide join(... guide[])=<default>);
+segment[][] contouredges(real[][] f, real[] c, int subsample=<default>);
+void setcontour(real f00, real f10, real f01, real f11, real epsf, boxdata bd, int i, int j, int index);
+Segment[] Segment(segment[] s);
+Segment[][] Segment(segment[][] s);
+real eps;
+segment case4(pair p0, pair p1, pair p2, real v0, real v1, real v2);
+bool isCCW(pair p0, pair p1, pair p2);
+surface surface(vertex[][] g);
+weighted operator init();
+bucket operator init();
+vertex operator init();
+object operator init();
+vertex[][] contour3(triple[][][] v, real[][][] f, real[][][] midpoint=<default>, projection P=<default>);
+vertex[][] contour3(real[][][] f, real[][][] midpoint=<default>, triple a, triple b, projection P=<default>);
+vertex[][] contour3(real f(real, real, real), triple a, triple b, int nx=<default>, int ny=<default>, int nz=<default>, projection P=<default>);
+real eps;
+void draw(TreeNode root, pair pos);
+real treeNodeStep;
+void drawAll(TreeNode node, frame f);
+real layout(int level, TreeNode node);
+TreeNode operator init();
+void add(TreeNode child, TreeNode parent);
+real treeLevelStep;
+real treeMinNodeWidth;
+TreeNode makeNode(TreeNode parent=<default>, frame f);
+TreeNode makeNode(TreeNode parent=<default>, Label label);
+string link(string label, string text, string options=<default>);
+string embed(string name, string options=<default>, real width=<default>, real height=<default>);
+string hyperlink(string url, string text);
+string link(string url, string text, string options=<default>);
+string embed(string name, string options=<default>, real width=<default>, real height=<default>, string image=<default>);
+string hyperlink(string url, string text);
+real gluonratio;
+real gluonamplitude;
+void drawGluon(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+void drawGhost(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+void drawVertex(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
+void drawVertexO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawVertexX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
+void drawVertexBox(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
+void drawVertexBoxO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+bool XYAlign;
+void drawVertexOX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawVertexTriangle(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
+void drawVertexTriangleO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawVertexBoxX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void do_overpaint(picture pic, path p, pen bgpen, real halfwidth, real vertexangle);
+void texshipout(string stem, picture pic=<default>, bool xalign=<default>);
+void drawDoubleLine(picture pic=<default>, path p, pen fgpen=<default>, real dlspacing=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+void drawScalar(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+bool overpaint;
+path photon(path p, real amp=<default>, real width=<default>);
+pen photonpen;
+real photonratio;
+real photonamplitude;
+string includegraphicscommand;
+pen momarrowpen;
+real momarrowsize(pen p=<default>);
+real momarrowlength;
+real momarrowoffset;
+real momarrowmargin;
+real momarrowfactor;
+pen vertexpen;
+real vertexsize;
+path momArrowPath(path p, align align, position pos, real offset=<default>, real length=<default>);
+void drawPhoton(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+bool YAlign;
+pen ghostpen;
+pen backgroundpen;
+pen scalarpen;
+pen fermionpen;
+pen bigvertexpen;
+real bigvertexsize;
+real minvertexangle;
+void drawMomArrow(picture pic=<default>, path p, align align, position pos=<default>, real offset=<default>, real length=<default>, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real margin=<default>);
+void fmdefaults();
+real linemargin;
+void drawFermion(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+bool currentarrow(picture, path, pen, marginT(path, pen));
+bool currentmomarrow(picture, path, pen, marginT(path, pen));
+bool appendsuffix;
+pen doublelinepen;
+real doublelinespacing;
+path gluon(path p, real amp=<default>, real width=<default>);
+pen gluonpen;
+Dir Left;
+block roundrectangle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real ds=<default>, real dw=<default>, real minwidth=<default>, real minheight=<default>);
+block diamond(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real ds=<default>, real dw=<default>, real height=<default>, real minwidth=<default>, real minheight=<default>);
+void draw(picture pic=<default>, block block, pen p=<default>);
+real defaultexcursion;
+real minblockwidth;
+real minblockheight;
+path path(pair[] point ... flowdir[] dir);
+Dir Up;
+real mincirclediameter;
+flowdir Vertical;
+block rectangle(object header, object body, pair center=<default>, pen headerpen=<default>, pen bodypen=<default>, pen drawpen=<default>, real dx=<default>, real minheaderwidth=<default>, real minheaderheight=<default>, real minbodywidth=<default>, real minbodyheight=<default>);
+block rectangle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real minwidth=<default>, real minheight=<default>);
+block parallelogram(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real slope=<default>, real minwidth=<default>, real minheight=<default>);
+block blockconnector(block, block)(picture pic, transform t, pen p=<default>, marginT margin(path, pen)=<default>);
+block circle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dr=<default>, real mindiameter=<default>);
+flowdir operator init();
+block operator init();
+Dir operator init();
+block operator --(block b1, Label label);
+block operator --(block b1, Dir dir);
+block operator --(block b, bool arrowbar(picture, path, pen, marginT(path, pen)));
+flowdir Horizontal;
+block bevel(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dh=<default>, real dw=<default>, real minwidth=<default>, real minheight=<default>);
+Dir Right;
+Dir Down;
+int[] numarray;
+point midpoint(segment s);
+point midpoint(side side);
+point isotomicconjugate(triangle t, point M);
+line altitude(vertex V);
+line altitude(side side);
+real rd(real x, real y, real z);
+point circumcenter(point A, point B, point C);
+point circumcenter(triangle t);
+circle circumcircle(point A, point B, point C);
+circle circumcircle(triangle t);
+point point(coordsys R, pair p, real m=<default>);
+point point(explicit pair p, real m);
+point point(coordsys R, explicit point M, real m=<default>);
+point point(explicit vector u);
+point point(circle c, abscissa l);
+point point(ellipse el, abscissa l);
+point point(parabola p, abscissa l);
+point point(hyperbola h, abscissa l);
+point point(explicit conic co, abscissa l);
+point point(line l, abscissa x);
+point point(line l, explicit real x);
+point point(line l, explicit int x);
+point point(explicit circle c, explicit real x);
+point point(explicit circle c, explicit int x);
+point point(explicit ellipse el, explicit real x);
+point point(explicit ellipse el, explicit int x);
+point point(explicit parabola p, explicit real x);
+point point(explicit parabola p, explicit int x);
+point point(explicit hyperbola h, explicit real x);
+point point(explicit hyperbola h, explicit int x);
+point point(explicit conic co, explicit real x);
+point point(explicit conic co, explicit int x);
+point point(arc a, abscissa l);
+point point(arc a, real x);
+pair point(explicit arc a, int x);
+point point(explicit mass m);
+point point(explicit vertex V);
+point point(trilinear tri);
+point point(circle c, point M);
+point point(circle c, explicit vector v);
+bool finite(explicit point p);
+void dot(picture pic=<default>, Label L, explicit point Z, align align=<default>, string format=<default>, pen p=<default>);
+real dot(point A, point B);
+real dot(point A, explicit pair B);
+real dot(explicit pair A, point B);
+void dot(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>);
+void dot(picture pic=<default>, triangle t, pen p=<default>);
+real[] realquarticroots(real a, real b, real c, real d, real e);
+point origin;
+point origin(coordsys R=<default>);
+void draw(picture pic=<default>, Label L=<default>, line l, bool dirA=<default>, bool dirB=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen[] p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen p, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label L=<default>, circle c, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, ellipse el, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, parabola parabola, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, hyperbola h, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, explicit conic co, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, arc a, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, triangle t, pen p=<default>, marker marker=<default>);
+void draw(picture pic=<default>, triangle[] t, pen p=<default>, marker marker=<default>);
+point[] standardizecoordsys(coordsys R=<default>, bool warn=<default> ... point[] M);
+coordsys defaultcoordsys;
+string defaultmassformat;
+line radicalline(circle c1, circle c2);
+point radicalcenter(circle c1, circle c2);
+point radicalcenter(circle c1, circle c2, circle c3);
+ellipse ellipse(point F1, point F2, real a);
+ellipse ellipse(point F1, point F2, point M);
+ellipse ellipse(point C, real a, real b, real angle=<default>);
+ellipse ellipse(bqe bqe);
+ellipse ellipse(point M1, point M2, point M3, point M4, point M5);
+path arctopath(arc a, int n);
+bool inside(ellipse el, point M);
+bool inside(parabola p, point M);
+int ellipsenodesnumber(real a, real b);
+int ellipsenodesnumber(real a, real b, real angle1, real angle2, bool dir);
+int ellipsenodesnumberfactor;
+bool byfoci;
+transform reflect(line l);
+transform reflect(line l1, line l2, bool safe=<default>);
+abscissa relabscissa(real x);
+abscissa relabscissa(int x);
+abscissa relabscissa(line l, point M);
+abscissa relabscissa(circle c, point M);
+abscissa relabscissa(ellipse el, point M);
+abscissa relabscissa(conic co, point M);
+abscissa relabscissa(arc a, point M);
+circle incircle(point A, point B, point C);
+circle incircle(triangle t);
+mass masscenter(... mass[] M);
+vector unit(point M);
+vector unit(vector u);
+line Ox(coordsys R=<default>);
+line Ox;
+conic conic(point F, line l, real e);
+conic conic(point M1, point M2, point M3, point M4, point M5);
+conic conic(bqe bqe);
+bool defined(point P);
+string conictype(bqe bqe);
+triangle antipedal(triangle t, point M);
+void clipdraw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, real xmargin=<default>, real ymargin=<default>, Label legend=<default>, marker marker=<default>);
+real perpfactor;
+int conicnodesfactor;
+int conicnodesnumber(conic co, real angle1, real angle2, bool dir=<default>);
+line hline(coordsys R=<default>);
+line hline;
+int[] tricoef(side side);
+path arcfromfocus(conic co, real angle1, real angle2, int n=<default>, bool direction=<default>);
+line sector(int n=<default>, int p=<default>, line l1, line l2, real angle=<default>, bool sharp=<default>);
+path arcfromcenter(ellipse el, real angle1, real angle2, bool direction=<default>, int n=<default>);
+path arcfromcenter(hyperbola h, real angle1, real angle2, int n=<default>, bool direction=<default>);
+path arcfromcenter(explicit conic co, real angle1, real angle2, int n, bool direction=<default>);
+line vline(coordsys R=<default>);
+line vline;
+vector vector(coordsys R=<default>, pair v);
+vector vector(point M);
+real[] intersect(path g, explicit pair p, real fuzz=<default>);
+real[] intersect(path g, explicit point P, real fuzz=<default>);
+int sgnd(real x);
+int sgnd(int x);
+circle excircle(point A, point B, point C);
+circle excircle(side side);
+line extend(line l);
+point intersectionpoint(line l1, line l2);
+pair[] intersectionpoints(pair A, pair B, real a, real b, real c, real d, real f, real g);
+pair[] intersectionpoints(pair A, pair B, real[] equation);
+point[] intersectionpoints(line l, path g);
+point[] intersectionpoints(bqe bqe1, bqe bqe2);
+point[] intersectionpoints(triangle t, line l, bool extended=<default>);
+point[] intersectionpoints(line l, triangle t, bool extended=<default>);
+point[] intersectionpoints(line l, circle c);
+point[] intersectionpoints(circle c, line l);
+point[] intersectionpoints(line l, ellipse el);
+point[] intersectionpoints(ellipse el, line l);
+point[] intersectionpoints(line l, parabola p);
+point[] intersectionpoints(parabola p, line l);
+point[] intersectionpoints(line l, hyperbola h);
+point[] intersectionpoints(hyperbola h, line l);
+point[] intersectionpoints(line l, conic co);
+point[] intersectionpoints(conic co, line l);
+point[] intersectionpoints(conic co1, conic co2);
+point[] intersectionpoints(triangle t, conic co, bool extended=<default>);
+point[] intersectionpoints(conic co, triangle t, bool extended=<default>);
+point[] intersectionpoints(ellipse a, ellipse b);
+point[] intersectionpoints(ellipse a, circle b);
+point[] intersectionpoints(circle a, ellipse b);
+point[] intersectionpoints(ellipse a, parabola b);
+point[] intersectionpoints(parabola a, ellipse b);
+point[] intersectionpoints(ellipse a, hyperbola b);
+point[] intersectionpoints(hyperbola a, ellipse b);
+point[] intersectionpoints(circle a, parabola b);
+point[] intersectionpoints(parabola a, circle b);
+point[] intersectionpoints(circle a, hyperbola b);
+point[] intersectionpoints(hyperbola a, circle b);
+point[] intersectionpoints(parabola a, parabola b);
+point[] intersectionpoints(parabola a, hyperbola b);
+point[] intersectionpoints(hyperbola a, parabola b);
+point[] intersectionpoints(hyperbola a, hyperbola b);
+point[] intersectionpoints(circle c1, circle c2);
+point[] intersectionpoints(conic co, arc a);
+point[] intersectionpoints(arc a, conic co);
+point[] intersectionpoints(arc a1, arc a2);
+point[] intersectionpoints(line l, arc a);
+point[] intersectionpoints(arc a, line l);
+point intouch(side side);
+triangle intouch(triangle t);
+point orthocentercenter(point A, point B, point C);
+point orthocentercenter(triangle t);
+real rf(real x, real y, real z);
+bool concurrent(... line[] l);
+bool between(point M, point O, point N);
+real inradius(point A, point B, point C);
+real inradius(triangle t);
+pen addpenline;
+pen addpenline(pen p);
+pen addpenarc;
+pen addpenarc(pen p);
+void label(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, vertex V, pair align=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, triangle t, real alignAngle=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
+real abs(coordsys R, pair m);
+real abs(explicit point M);
+point curpoint(line l, real x);
+point curpoint(explicit circle c, real x);
+point curpoint(explicit ellipse el, real x);
+point curpoint(explicit parabola p, real x);
+point curpoint(conic co, real x);
+point curpoint(arc a, real x);
+line bisector(line l1, line l2, real angle=<default>, bool sharp=<default>);
+line bisector(point A, point B, point C, point D, real angle=<default>, bool sharp=<default>);
+line bisector(segment s, real angle=<default>);
+line bisector(point A, point B, real angle=<default>);
+line bisector(vertex V, real angle=<default>);
+line bisector(side side);
+bqe canonical(bqe bqe);
+point bisectorpoint(side side);
+abscissa angabscissa(real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(int x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(circle c, point M);
+abscissa angabscissa(ellipse el, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(hyperbola h, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(parabola p, point M);
+abscissa angabscissa(explicit conic co, point M);
+abscissa angabscissa(arc a, point M);
+pair locate(point P);
+point locate(pair p);
+pair locate(explicit vector v);
+bool samecoordsys(bool warn=<default> ... point[] M);
+bool samecoordsys(bool warn=<default> ... bqe[] bqes);
+triangle extouch(triangle t);
+triangle extouch(side side);
+coordsys canonicalcartesiansystem(ellipse el);
+coordsys canonicalcartesiansystem(parabola p);
+coordsys canonicalcartesiansystem(hyperbola h);
+coordsys canonicalcartesiansystem(explicit conic co);
+arc arc(ellipse el, real angle1, real angle2, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>, bool direction=<default>);
+arc arc(ellipse el, explicit abscissa x1, explicit abscissa x2, bool direction=<default>);
+arc arc(ellipse el, point M, point N, bool direction=<default>);
+arc arc(explicit arc a, abscissa x1, abscissa x2);
+arc arc(explicit arc a, point M, point N);
+path arc(explicit pair B, explicit pair A, explicit pair C, real r);
+void markrightangle(picture pic=<default>, point A, point O, point B, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+real epsgeo;
+real sharpangle(line l1, line l2);
+bool isparabola(bqe bqe);
+real sharpdegrees(line l1, line l2);
+real exradius(point A, point B, point C);
+real exradius(side side);
+abscissa nodabscissa(real x);
+abscissa nodabscissa(int x);
+abscissa nodabscissa(line l, point M);
+abscissa nodabscissa(circle c, point M);
+abscissa nodabscissa(ellipse el, point M);
+abscissa nodabscissa(parabola p, point M);
+abscissa nodabscissa(conic co, point M);
+abscissa nodabscissa(arc a, point M);
+coordsys coordsys(line l);
+coordsys coordsys(conic co);
+coordsys coordsys(ellipse el);
+pair coordinates(point M);
+real length(explicit point M);
+real length(segment s);
+int arcnodesnumber(explicit arc a);
+int nodesystem;
+bool collinear(vector u, vector v);
+point centroid(point A, point B, point C);
+point centroid(triangle t);
+int angularsystem;
+path square(pair z1, pair z2);
+point symmedian(triangle t);
+point symmedian(side side);
+line symmedian(vertex V);
+triangle symmedial(triangle t);
+int curvilinearsystem;
+bqe bqe(coordsys R=<default>, real a, real b, real c, real d, real e, real f);
+bqe bqe(point M1, point M2, point M3, point M4, point M5);
+arc arccircle(point A, point M, point B);
+arc arccircle(point A, point B, real angle, bool direction=<default>);
+point relpoint(line l, real x);
+point relpoint(explicit circle c, real x);
+point relpoint(explicit ellipse el, real x);
+point relpoint(explicit parabola p, real x);
+point relpoint(explicit hyperbola h, real x);
+point relpoint(explicit conic co, explicit real x);
+point relpoint(explicit conic co, explicit int x);
+point relpoint(arc a, real x);
+point changecoordsys(coordsys R, point M);
+vector changecoordsys(coordsys R, vector v);
+line changecoordsys(coordsys R, line l);
+bqe changecoordsys(coordsys R, bqe bqe);
+conic changecoordsys(coordsys R, conic co);
+real angle(explicit point M, coordsys R=<default>, bool warn=<default>);
+real angle(explicit vector v, coordsys R=<default>, bool warn=<default>);
+real angle(line l, coordsys R=<default>);
+real angle(line l1, line l2);
+real angle(arc a);
+point[] fermat(triangle t);
+real arclength(circle c);
+real arclength(ellipse el);
+real arclength(ellipse el, real angle1, real angle2, bool direction=<default>, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+real arclength(parabola p, real angle);
+real arclength(parabola p, real angle1, real angle2);
+real arclength(parabola p);
+real arclength(arc a);
+line reverse(line l);
+arc reverse(arc a);
+point gergonne(triangle t);
+real focusToCenter(ellipse el, real a);
+hyperbola hyperbola(point P1, point P2, real ae, bool byfoci=<default>);
+hyperbola hyperbola(point C, real a, real b, real angle=<default>);
+hyperbola hyperbola(bqe bqe);
+hyperbola hyperbola(point M1, point M2, point M3, point M4, point M5);
+side opposite(vertex V);
+vertex opposite(side side);
+int hyperbolanodesnumber(hyperbola h, real angle1, real angle2);
+path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)(conic co);
+int hyperbolanodesnumberfactor;
+line parallel(point M, line l);
+line parallel(point M, explicit vector dir);
+line parallel(point M, explicit pair dir);
+bool parallel(line l1, line l2, bool strictly=<default>);
+transform projection(point A, point B);
+transform projection(point A, point B, point C, point D, bool safe=<default>);
+transform projection(line l);
+transform projection(line l1, line l2, bool safe=<default>);
+bool degenerate(conic c);
+bool degenerate(circle c);
+bool degenerate(ellipse el);
+line line(point A, bool extendA=<default>, point B, bool extendB=<default>);
+line line(segment s);
+line line(real a, point A=<default>);
+line line(point A=<default>, real a);
+line line(int a, point A=<default>);
+line line(coordsys R=<default>, real slope, real origin);
+line line(coordsys R=<default>, real a, real b, real c);
+line line(circle c);
+line line(explicit side side);
+line complementary(explicit line l);
+line[] complementary(explicit segment s);
+arc complementary(arc a);
+point ppoint(arc a, real x);
+path fromFocus(conic co, real angle1, real angle2, int n, bool direction);
+bool sameside(point M, point N, point O);
+bool sameside(point M, point P, line l);
+point[] sameside(point M, line l1, line l2);
+arc arcsubtended(point A, point B, real angle);
+void distance(picture pic=<default>, Label L=<default>, point A, point B, bool rotated=<default>, real offset=<default>, pen p=<default>, pen joinpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+real distance(point M, line l);
+real distance(line l, point M);
+point incenter(point A, point B, point C);
+point incenter(triangle t);
+void write(explicit line l);
+void write(explicit segment s);
+void write(trilinear tri);
+triangle incentral(triangle t);
+point arcsubtendedcenter(point A, point B, real angle);
+circle circle(explicit point C, real r);
+circle circle(point A, point B);
+circle circle(segment s);
+circle circle(point A, point B, point C);
+circle circle(triangle t);
+circle circle(inversion i);
+point angpoint(conic co, real angle);
+point angpoint(explicit circle c, real x);
+point angpoint(explicit ellipse el, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+point angpoint(explicit parabola p, real x);
+point angpoint(explicit hyperbola h, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+point angpoint(arc a, real angle);
+triangle orthic(triangle t);
+int circlenodesnumber(real r);
+int circlenodesnumber(real r, real angle1, real angle2);
+segment segment(point A, point B);
+segment segment(line l);
+segment segment(explicit side side);
+path compassmark(pair O, pair A, real position, real angle=<default>);
+bool byvertices;
+int circlenodesnumberfactor;
+transform xscale(real k, point M);
+transform yscale(real k, point M);
+transform scale(real k, point M);
+transform scale(real k, point A, point B, point C, point D, bool safe=<default>);
+transform scale(real k, line l1, line l2, bool safe=<default>);
+point operator +(explicit point P1, explicit point P2);
+point operator +(explicit point P1, explicit pair p2);
+point operator +(explicit pair p1, explicit point p2);
+point operator +(point M, explicit vector v);
+point operator +(explicit pair m, explicit vector v);
+vector operator +(explicit vector v1, explicit vector v2);
+line operator +(line l, vector u);
+conic operator +(conic c, explicit point M);
+conic operator +(conic c, explicit pair m);
+conic operator +(conic c, vector v);
+circle operator +(explicit circle c, explicit point M);
+circle operator +(explicit circle c, pair m);
+circle operator +(explicit circle c, vector m);
+abscissa operator +(real x, explicit abscissa a);
+abscissa operator +(explicit abscissa a, real x);
+abscissa operator +(int x, explicit abscissa a);
+arc operator +(explicit arc a, point M);
+arc operator +(explicit arc a, vector v);
+mass operator +(mass M1, mass M2);
+mass operator +(explicit mass M, real x);
+mass operator +(explicit mass M, int x);
+point operator -(explicit point P);
+point operator -(explicit point P1, explicit point P2);
+point operator -(explicit point P1, explicit pair p2);
+point operator -(explicit pair p1, explicit point P2);
+point operator -(point M, explicit vector v);
+vector operator -(explicit vector v);
+point operator -(explicit pair m, explicit vector v);
+vector operator -(explicit vector v1, explicit vector v2);
+line operator -(line l, vector u);
+conic operator -(conic c, explicit point M);
+conic operator -(conic c, explicit pair m);
+conic operator -(conic c, vector v);
+circle operator -(explicit circle c, explicit point M);
+circle operator -(explicit circle c, pair m);
+circle operator -(explicit circle c, vector m);
+abscissa operator -(explicit abscissa a);
+abscissa operator -(real x, explicit abscissa a);
+abscissa operator -(explicit abscissa a, real x);
+abscissa operator -(int x, explicit abscissa a);
+arc operator -(explicit arc a, point M);
+arc operator -(explicit arc a, vector v);
+mass operator -(mass M1, mass M2);
+mass operator -(explicit mass M, real x);
+mass operator -(explicit mass M, int x);
+transform xscaleO(real x);
+pair operator *(coordsys R, pair p);
+path operator *(coordsys R, path g);
+coordsys operator *(transform t, coordsys R);
+point operator *(real x, explicit point P);
+point operator *(transform t, explicit point P);
+point operator *(explicit point P1, explicit point P2);
+point operator *(explicit point P1, explicit pair p2);
+point operator *(explicit pair p1, explicit point p2);
+vector operator *(real x, explicit vector v);
+vector operator *(transform t, explicit vector v);
+vector operator *(explicit point M, explicit vector v);
+line operator *(transform t, line l);
+line operator *(real x, line l);
+line operator *(int x, line l);
+line operator *(point M, line l);
+circle operator *(real x, explicit circle c);
+circle operator *(int x, explicit circle c);
+ellipse operator *(transform t, ellipse el);
+parabola operator *(transform t, parabola p);
+ellipse operator *(transform t, circle c);
+hyperbola operator *(transform t, hyperbola h);
+conic operator *(transform t, conic co);
+ellipse operator *(real x, ellipse el);
+abscissa operator *(real x, explicit abscissa a);
+abscissa operator *(explicit abscissa a, real x);
+arc operator *(transform t, explicit arc a);
+arc operator *(real x, explicit arc a);
+arc operator *(int x, explicit arc a);
+mass operator *(real x, explicit mass M);
+mass operator *(int x, explicit mass M);
+mass operator *(transform t, mass M);
+triangle operator *(transform T, triangle t);
+point operator *(inversion i, point P);
+circle operator *(inversion i, line l);
+circle operator *(inversion i, circle c);
+arc operator *(inversion i, segment s);
+path operator *(inversion i, triangle t);
+transform yscaleO(real x);
+coordsys operator init();
+point operator init();
+vector operator init();
+line operator init();
+segment operator init();
+bqe operator init();
+conic operator init();
+circle operator init();
+ellipse operator init();
+parabola operator init();
+hyperbola operator init();
+abscissa operator init();
+arc operator init();
+mass operator init();
+triangle operator init();
+trilinear operator init();
+inversion operator init();
+triangle cevian(triangle t, point P);
+point cevian(side side, point P);
+line cevian(vertex V, point P);
+pair operator cast(point P);
+pair[] operator cast(point[] P);
+point operator cast(pair p);
+point[] operator cast(pair[] p);
+guide operator cast(point p);
+path operator cast(point p);
+point operator cast(vector v);
+vector operator cast(pair v);
+vector operator cast(explicit point v);
+pair operator cast(explicit vector v);
+align operator cast(vector v);
+line operator cast(segment s);
+segment operator cast(line l);
+ellipse operator cast(circle c);
+circle operator cast(ellipse el);
+ellipse operator cast(conic co);
+parabola operator cast(conic co);
+conic operator cast(parabola p);
+hyperbola operator cast(conic co);
+conic operator cast(hyperbola h);
+conic operator cast(ellipse el);
+conic operator cast(circle c);
+circle operator cast(conic c);
+path operator cast(ellipse el);
+path operator cast(circle c);
+path operator cast(parabola p);
+path operator cast(hyperbola h);
+path operator cast(conic co);
+abscissa operator cast(explicit position position);
+abscissa operator cast(real x);
+abscissa operator cast(int x);
+path operator cast(explicit arc a);
+guide operator cast(explicit arc a);
+point operator cast(mass m);
+mass operator cast(point M);
+point[] operator cast(mass[] m);
+mass[] operator cast(point[] P);
+mass operator cast(pair m);
+path operator cast(mass M);
+guide operator cast(mass M);
+line operator cast(side side);
+point operator cast(vertex V);
+point operator cast(trilinear tri);
+circle operator cast(inversion i);
+inversion operator cast(circle c);
+void lineinversion();
+pair operator /(pair p, coordsys R);
+point operator /(explicit point P, real x);
+point operator /(real x, explicit point P);
+vector operator /(explicit vector v, real x);
+line operator /(line l, real x);
+line operator /(line l, int x);
+circle operator /(explicit circle c, real x);
+circle operator /(explicit circle c, int x);
+ellipse operator /(ellipse el, real x);
+abscissa operator /(real x, explicit abscissa a);
+abscissa operator /(explicit abscissa a, real x);
+abscissa operator /(int x, explicit abscissa a);
+arc operator /(explicit arc a, real x);
+mass operator /(explicit mass M, real x);
+mass operator /(explicit mass M, int x);
+real operator ^(point M, explicit circle c);
+transform scaleO(real x);
+bool operator ==(coordsys c1, coordsys c2);
+bool operator ==(explicit point M, explicit point N);
+bool operator ==(explicit vector u, explicit vector v);
+bool operator ==(line l1, line l2);
+bool operator !=(explicit point M, explicit point N);
+bool operator !=(line l1, line l2);
+line[] operator ^^(line l1, line l2);
+line[] operator ^^(line l1, line[] l2);
+line[] operator ^^(line[] l2, line l1);
+line[] operator ^^(line[] l1, line[] l2);
+triangle[] operator ^^(triangle[] t1, triangle t2);
+triangle[] operator ^^(... triangle[] t);
+real elle(real phi, real k);
+point excenter(point A, point B, point C);
+point excenter(side side);
+mass mass(point M, real m);
+mass mass(explicit point P);
+mass mass(coordsys R, explicit pair p, real m);
+bool operator @(point m, line l);
+bool operator @(point M, conic co);
+bool operator @(point M, explicit circle c);
+bool operator @(point M, arc a);
+triangle triangle(line l1, line l2, line l3);
+trilinear trilinear(triangle t, real a, real b, real c);
+trilinear trilinear(triangle t, point M);
+trilinear trilinear(triangle t, real f(real, real, real), real a=<default>, real b=<default>, real c=<default>);
+triangle triangleAbc(real alpha, real b, real c, real angle=<default>, point A=<default>);
+triangle triangleabc(real a, real b, real c, real angle=<default>, point A=<default>);
+triangle anticomplementary(triangle t);
+vector dir(vertex V);
+real degrees(explicit point M, coordsys R=<default>, bool warn=<default>);
+real degrees(vector v, coordsys R=<default>, bool warn=<default>);
+real degrees(line l, coordsys R=<default>);
+real degrees(line l1, line l2);
+real degrees(arc a);
+real linemargin;
+real linemargin();
+line Oy(coordsys R=<default>);
+line Oy;
+path fromCenter(conic co, real angle1, real angle2, int n, bool direction);
+void markarc(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, arc a, pen sectorpen=<default>, pen markpen=<default>, marginT margin(path, pen)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marker marker=<default>);
+real approximate(real t);
+real[] approximate(real[] T);
+void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, line l1, line l2, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
+transform hprojection(line l, bool safe=<default>);
+point conj(explicit point M);
+vector conj(explicit vector u);
+hyperbola conj(hyperbola h);
+transform vprojection(line l, bool safe=<default>);
+real[] bangles(picture pic=<default>, parabola p);
+real[][] bangles(picture pic=<default>, hyperbola h);
+parabola parabola(point F, line l);
+parabola parabola(point F, point vertex);
+parabola parabola(point F, real a, real angle);
+parabola parabola(bqe bqe);
+parabola parabola(point M1, point M2, point M3, line l);
+parabola parabola(point M1, point M2, point M3, point M4, point M5);
+bool onpath(picture pic=<default>, path g, point M, pen p=<default>);
+int parabolanodesnumber(parabola p, real angle1, real angle2);
+int parabolanodesnumberfactor;
+path NoModifier(path);
+point isogonalconjugate(triangle t, point M);
+point isogonal(side side, point M);
+line isogonal(vertex V, point M);
+triangle isogonal(triangle t, point M);
+coordsys currentcoordsys;
+point foot(vertex V);
+point foot(side side);
+path currentpolarconicroutine(conic co, real angle1, real angle2, int n, bool direction);
+transform rotate(explicit vector dir);
+transform rotate(explicit point dir);
+real EPS;
+transform rotateO(real a);
+pair attract(pair m, path g, real fuzz=<default>);
+point attract(point M, path g, real fuzz=<default>);
+line perpendicular(point M, line l);
+line perpendicular(point M, explicit vector normal);
+line perpendicular(point M, explicit pair normal);
+bool perpendicular(line l1, line l2);
+void perpendicular(picture pic=<default>, pair z, pair align, pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicular(picture pic=<default>, pair z, pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+real binomial(real n, real k);
+void perpendicularmark(picture pic=<default>, point z, explicit pair align, explicit pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, vector align, vector dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, explicit pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, vector align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, line l1, line l2, real size=<default>, pen p=<default>, int quarter=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void Drawline(picture pic=<default>, Label L=<default>, pair P, bool dirP=<default>, pair Q, bool dirQ=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+bool simeq(point A, point B, real fuzz=<default>);
+bool simeq(point a, real b, real fuzz=<default>);
+point inverse(real k, point A, point M);
+circle inverse(real k, point A, line l);
+circle inverse(real k, point A, circle c);
+arc inverse(real k, point A, segment s);
+inversion inversion(real k, point C);
+inversion inversion(point C, real k);
+inversion inversion(circle c1, circle c2, real sgn=<default>);
+inversion inversion(circle c1, circle c2, circle c3);
+inversion inversion(circle c);
+coordsys cartesiansystem(pair O=<default>, pair i, pair j);
+line tangent(circle c, abscissa x);
+line tangent(circle c, point M);
+line tangent(circle c, explicit vector v);
+line tangent(ellipse el, abscissa x);
+line tangent(parabola p, abscissa x);
+line tangent(hyperbola h, abscissa x);
+line tangent(explicit arc a, abscissa x);
+line tangent(explicit arc a, point M);
+line[] tangents(circle c, point M);
+line[] tangents(ellipse el, point M);
+line[] tangents(parabola p, point M);
+line[] tangents(hyperbola h, point M);
+real centerToFocus(ellipse el, real a);
+bqe equation(ellipse el);
+bqe equation(parabola p);
+bqe equation(hyperbola h);
+bqe equation(explicit conic co);
+triangle tangential(triangle t);
+triangle pedal(triangle t, point M);
+line pedal(side side, point M);
+string massformat(string format=<default>, string s, mass M);
+int relativesystem;
+void drawline(picture pic=<default>, triangle t, pen p=<default>);
+void addMargins(picture pic=<default>, real lmargin=<default>, real bmargin=<default>, real rmargin=<default>, real tmargin=<default>, bool rigid=<default>, bool allObject=<default>);
+triangle medial(triangle t);
+line median(vertex V);
+line median(side side);
+void show(picture pic=<default>, Label lo=<default>, Label li=<default>, Label lj=<default>, coordsys R, pen dotpen=<default>, pen xpen=<default>, pen ypen=<default>, pen ipen=<default>, pen jpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+void show(Label L, vector v, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+void show(picture pic=<default>, line l, pen p=<default>);
+void show(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, Label La=<default>, Label Lb=<default>, Label Lc=<default>, triangle t, pen p=<default>, filltype filltype=<default>);
+line isotomic(vertex V, point M);
+point isotomic(side side, point M);
+triangle isotomic(triangle t, point M);
+abscissa curabscissa(real x);
+abscissa curabscissa(int x);
+abscissa curabscissa(line l, point M);
+abscissa curabscissa(circle c, point M);
+abscissa curabscissa(ellipse el, point M);
+abscissa curabscissa(parabola p, point M);
+abscissa curabscissa(conic co, point M);
+abscissa curabscissa(arc a, point M);
+string DefaultFormat(real);
+string DefaultLogFormat(real)(int base);
+string DefaultLogFormat(real);
+guide graph(pair f(real), real, real, int)(guide join(... guide[]));
+guide[] graph(pair f(real), real, real, int)(guide join(... guide[]), bool3 cond(real));
+guide graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, pair[] z, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, pair[] z, bool3[] cond, guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, real[] x, real[] y, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real[] x, real[] y, bool3[] cond, guide join(... guide[])=<default>);
+tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
+tickvalues OmitTickInterval(tickvalues)(real a, real b);
+tickvalues OmitTick(tickvalues)(... real[] x);
+scientific scientific(real x);
+void Left(picture, axisT)(bool extend=<default>);
+void Left(picture, axisT);
+autoscaleT defaultS;
+void XEquals(picture, axisT)(real x, bool extend=<default>);
+void YEquals(picture, axisT)(real y, bool extend=<default>);
+string LogFormat(real)(int base);
+string LogFormat(real);
+axisT axis;
+void axis(picture pic=<default>, Label L=<default>, path g, path g2=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>), ticklocate locate, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
+void drawtick(frame f, transform T, path g, path g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
+real maxlength(pair a, pair b, int nx, int ny);
+void errorbar(picture pic, pair z, pair dp, pair dm, pen p=<default>, real size=<default>);
+void errorbars(picture pic=<default>, pair[] z, pair[] dp, pair[] dm=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
+void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpx, real[] dpy, real[] dmx=<default>, real[] dmy=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
+void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpy, bool[] cond=<default>, pen p=<default>, real size=<default>);
+void xlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+string conditionlength;
+void ylimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+tickvalues None(tickvalues v);
+scaleT Logarithmic;
+void limits(picture pic=<default>, pair min, pair max, bool crop=<default>);
+void crop(picture pic=<default>);
+picture vectorfield(path vector(real), path g, int n, bool truesize=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
+picture vectorfield(path vector(pair), pair a, pair b, int nx=<default>, int ny=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
+string OmitFormat(real)(string s=<default> ... real[] x);
+guide Straight(... guide[]);
+int Min;
+void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
+void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
+string trailingzero;
+void label(picture pic, Label L, pair z, real x, align align, string format, pen p);
+void labelx(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
+void labelx(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+void labelx(picture pic=<default>, Label L, string format=<default>, explicit pen p=<default>);
+path Arc(pair c, real r, real angle1, real angle2, bool direction, int n=<default>);
+path Arc(pair c, real r, real angle1, real angle2, int n=<default>);
+path Arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>, int n=<default>);
+void labely(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
+void labely(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
+void labely(picture pic=<default>, Label L, string format=<default>, explicit pen p=<default>);
+pair labeltick(frame d, transform T, path g, ticklocate locate, real val, pair side, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
+void xtick(picture pic=<default>, explicit pair z, pair dir=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, real x, pair dir=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, Label L, explicit pair z, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, Label L, real x, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, explicit pair z, pair dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, real y, pair dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, Label L, explicit pair z, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, Label L, real y, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+picture secondaryX(picture primary=<default>, void f(picture));
+picture secondaryY(picture primary=<default>, void f(picture));
+Label Break;
+tickvalues Break(tickvalues)(real, real);
+scaleT Linear;
+scaleT Linear(bool automin=<default>, bool automax=<default>, real s=<default>, real intercept=<default>);
+pair tickMin(picture pic);
+pair tickMax(picture pic);
+string autoformat(string format=<default>, real norm ... real[] a);
+real linear(real)(real S(real x)=<default>, real Min, real Max);
+pair polar(real r, real theta);
+string Format(real)(string s=<default>);
+guide polargraph(picture pic=<default>, real r(real), real a, real b, int n=<default>, guide join(... guide[])=<default>);
+guide polargraph(picture pic=<default>, real[] r, real[] theta, guide join(... guide[])=<default>);
+void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+tickvalues NoZero(tickvalues);
+string NoZeroFormat(real);
+guide Hermite(... guide[])(real[] splinetype(real[], real[]));
+guide Hermite(... guide[]);
+path Circle(pair c, real r, int n=<default>);
+bool axiscoverage(int N, transform T, path g, ticklocate locate, real Step, pair side, int sign, real Size, Label F, string ticklabel(real), real norm, real limit);
+scaleT Broken(real a, real b, bool automin=<default>, bool automax=<default>);
+scaleT BrokenLog(real a, real b, bool automin=<default>, bool automax=<default>);
+void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+string noprimary;
+void xequals(picture pic=<default>, Label L=<default>, real x, bool extend=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
+void yequals(picture pic=<default>, Label L=<default>, real y, bool extend=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
+pair Scale(picture pic=<default>, pair z);
+real ScaleX(picture pic=<default>, real x);
+real ScaleY(picture pic=<default>, real y);
+tickvalues generateticks(int sign, Label F=<default>, string ticklabel(real)=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, real Size=<default>, real size=<default>, transform T, pair side, path g, real limit, pen p, ticklocate locate, int[] divisor, bool opposite);
+void checkconditionlength(int x, int y);
+real xtrans(transform t, real x);
+void Top(picture, axisT)(bool extend=<default>);
+void Top(picture, axisT);
+path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
+real ytrans(transform t, real y);
+void scale(picture pic=<default>, scaleT x, scaleT y=<default>, scaleT z=<default>);
+void scale(picture pic=<default>, bool xautoscale=<default>, bool yautoscale=<default>, bool zautoscale=<default>);
+int[] divisors(int a, int b);
+scientific operator init();
+bounds operator init();
+ticklocate operator init();
+locateT operator init();
+tickvalues operator init();
+axisT operator init();
+int Both;
+void axes(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, pair min=<default>, pair max=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
+string signedtrailingzero;
+ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, pair dir(real)=<default>);
+pair ticklabelshift(pair align, pen p=<default>);
+pair zero(real);
+void Bottom(picture, axisT)(bool extend=<default>);
+void Bottom(picture, axisT);
+void BottomTop(picture, axisT)(bool extend=<default>);
+void BottomTop(picture, axisT);
+real zerotickfuzz;
+real upscale(real b, real a);
+bool logaxiscoverage(int N, transform T, path g, ticklocate locate, pair side, int sign, real Size, Label F, string ticklabel(real), real limit, int first, int last);
+string baselinetemplate;
+void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)();
+void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+void tick(picture pic=<default>, pair z, pair dir, real size=<default>, pen p=<default>);
+void tick(picture pic=<default>, Label L, real value, explicit pair z, pair dir, string format=<default>, real size=<default>, pen p=<default>);
+int Value;
+scaleT Log;
+scaleT Log(bool automin=<default>, bool automax=<default>);
+void Right(picture, axisT)(bool extend=<default>);
+void Right(picture, axisT);
+void RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+int Max;
+void XZero(picture, axisT)(bool extend=<default>);
+void XZero(picture, axisT);
+void YZero(picture, axisT)(bool extend=<default>);
+void YZero(picture, axisT);
+bounds autoscale(real Min, real Max, scaleT scale=<default>);
+void autoscale(picture pic=<default>, void axis(picture, axisT));
+guide Spline(... guide[]);
+void LeftRight(picture, axisT)(bool extend=<default>);
+void LeftRight(picture, axisT);
+locateT operator init();
+void Straight(flatguide3)(... void(flatguide3)[]);
+void graph(flatguide3)(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]));
+void(flatguide3)[] graph(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]), bool3 cond(real));
+void graph(flatguide3)(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple v(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple v(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple[] v, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple[] v, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real[] x, real[] y, real[] z, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real[] x, real[] y, real[] z, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(path, real), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real f(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(real f(pair), path p, int n=<default>, real T(pair), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(real x, real y), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(pair z), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+triple polar(real r, real theta, real phi);
+void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void xaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void yaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void zaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+bool uperiodic(triple[][] a);
+bool vperiodic(triple[][] a);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axis(picture pic=<default>, Label L=<default>, path3 g, path3 g2=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>), ticklocate locate, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
+void Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
+void Bounds(picture, axisT);
+void XZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XZZero(picture, axisT);
+void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void YZZero(picture, axisT);
+surface surface(triple[][] f, bool[][] cond=<default>);
+surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
+void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
+triple Dir(real)(triple dir);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen p=<default>, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+real maxlength(triple f(pair z), pair a, pair b, int nu, int nv);
+void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
+triple tickMin3(picture pic);
+triple tickMax3(picture pic);
+triple Scale(picture pic=<default>, triple v);
+real ScaleZ(picture pic=<default>, real z);
+picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
+path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void Spline(flatguide3)(... void(flatguide3)[]);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axes3(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, Label zlabel=<default>, triple min=<default>, triple max=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>);
+void label(picture pic, Label L, triple v, real x, align align, string format, pen p);
+void labelx(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labely(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(picture pic, real[][] T, Label L, path3 g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
+void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+void labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
+void labelz(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labelz3(picture pic=<default>, Label L=<default>, real z, align align=<default>, string format=<default>, pen p=<default>);
+void autoscale3(picture pic=<default>, void axis(picture, axisT));
+void xtick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, real y, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, real x, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, Label L, real x, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, real z, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick3(picture pic=<default>, Label L, real y, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick3(picture pic=<default>, Label L, real z, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+triple zero3(real);
+triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
+real xtrans(real[][] t, real x);
+real ytrans(real[][] t, real y);
+real ztrans(real[][] t, real z);
+ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, triple dir(real));
+triple ticklabelshift(triple align, pen p=<default>);
+path3 Arc(triple c, triple v1, triple v2, triple normal=<default>, bool direction=<default>, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, bool direction, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, int n=<default>);
+void limits(picture pic=<default>, triple min, triple max);
+void XZEquals(picture, axisT)(real x, real z, triple align=<default>, bool extend=<default>);
+void YZEquals(picture, axisT)(real y, real z, triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT);
+void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+void tick(picture pic=<default>, triple v, triple dir, real size=<default>, pen p=<default>);
+void tick(picture pic=<default>, Label L, real value, triple v, triple dir, string format=<default>, real size=<default>, pen p=<default>);
+surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
+path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+bool Crop;
+int ngraph;
+real epsilon;
+real axiscoverage;
+real Ticksize;
+bool NoCrop;
+real ticksize;
+int nCircle;
+int nmesh;
+real ylabelwidth;
+real axislabelfactor;
+real[] clamped(real[], real[])(real slopea, real slopeb);
+real[] natural(real[] x, real[] y);
+real[] monotonic(real[] x, real[] y);
+real[] notaknot(real[] x, real[] y);
+real[] linear(real[] x, real[] y);
+string morepoints;
+guide hermite(real[] x, real[] y, real[] splinetype(real[], real[])=<default>);
+void checklengths(int x, int y, string text=<default>);
+void checkincreasing(real[] x);
+real[] periodic(real[] x, real[] y);
+string differentlengths;
+real[] Spline(real[] x, real[] y);
+real[](real[], real[])[] Spline;
+grid3(picture pic)[] YXYgrid(position pos=<default>);
+grid3(picture pic)[] YXYgrid;
+grid3 operator init();
+ticksgridT operator init();
+grid3(picture pic)[] operator cast(grid3 gridroutine(picture pic));
+grid3(picture pic)[][] operator cast(grid3(picture pic)[] gridroutine);
+grid3(picture pic)[][] operator cast(grid3 gridroutine(picture pic));
+triple X(picture pic);
+triple Y(picture pic);
+triple Z(picture pic);
+grid3(picture pic)[] XYXgrid(position pos=<default>);
+grid3(picture pic)[] XYXgrid;
+grid3(picture pic)[] XY_XZgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] XY_XZgrid;
+grid3(picture pic)[] ZX_ZYgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] ZX_ZYgrid;
+void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+grid3 XYgrid(picture pic)(position pos=<default>);
+grid3 XYgrid(picture pic);
+grid3 ZYgrid(picture pic)(position pos=<default>);
+grid3 ZYgrid(picture pic);
+void grid3(picture pic=<default>, grid3(picture pic)[][] gridroutine=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, pen pGrid=<default>, pen pgrid=<default>, bool above=<default>);
+void grid3(picture pic=<default>, grid3(picture pic)[][] gridroutine, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, pen[] pGrid, pen[] pgrid, bool above=<default>);
+ticksgridT OutTicks()(Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, pen pTick=<default>, pen ptick=<default>, grid3(picture pic)[][] gridroutine, pen pGrid=<default>, pen pgrid=<default>);
+triple YZ(picture pic);
+grid3(picture pic)[] XZXgrid(position pos=<default>);
+grid3(picture pic)[] XZXgrid;
+triple ZX(picture pic);
+grid3(picture pic)[] ZXZgrid(position pos=<default>);
+grid3(picture pic)[] ZXZgrid;
+position top;
+ticksgridT InTicks()(Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, pen pTick=<default>, pen ptick=<default>, grid3(picture pic)[][] gridroutine, pen pGrid=<default>, pen pgrid=<default>);
+ticksgridT InOutTicks()(Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, pen pTick=<default>, pen ptick=<default>, grid3(picture pic)[][] gridroutine, pen pGrid=<default>, pen pgrid=<default>);
+grid3(picture pic)[] YX_YZgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] YX_YZgrid;
+position bottom;
+grid3 YXgrid(picture pic)(position pos=<default>);
+grid3 YXgrid(picture pic);
+grid3 ZXgrid(picture pic)(position pos=<default>);
+grid3 ZXgrid(picture pic);
+grid3 XZgrid(picture pic)(position pos=<default>);
+grid3 XZgrid(picture pic);
+grid3 YZgrid(picture pic)(position pos=<default>);
+grid3 YZgrid(picture pic);
+position middle;
+triple XY(picture pic);
+grid3(picture pic)[][] XYZgrid(position pos=<default>);
+grid3(picture pic)[][] XYZgrid;
+grid3(picture pic)[] ZYZgrid(position pos=<default>);
+grid3(picture pic)[] ZYZgrid;
+grid3(picture pic)[] YZYgrid(position pos=<default>);
+grid3(picture pic)[] YZYgrid;
+real fspline(real)(real[] x, real[] y, real[] splinetype(real[], real[])=<default>);
+real pwhermite(real)(real[] x, real[] y, real[] dy);
+horner diffdiv(real[] x, real[] y);
+horner hdiffdiv(real[] x, real[] y, real[] dy);
+horner operator init();
+real fhorner(real)(horner sh);
+void labelpath(frame f, Label L, path g, string justify=<default>, pen p=<default>);
+void labelpath(picture pic=<default>, Label L, path g, string justify=<default>, pen p=<default>);
+string LeftJustified;
+string Centered;
+string RightJustified;
+surface labelpath(string s, path3 p, real angle=<default>, triple optional=<default>);
+triple[] firstframe(path3 p, triple optional=<default>);
+triple[] nextframe(path3 p, real reltimestart, triple[] start, real reltimeend, int subdiv=<default>);
+real eps;
+triple nextnormal(triple p, triple q);
+string[] lm_infmsg;
+FitControl defaultControl;
+void lm_qrfac(int m, int n, real[] a, bool pivot, int[] ipvt, real[] rdiag, real[] acnorm, real[] wa);
+void lm_qrsolv(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real[] x, real[] sdiag, real[] wa);
+real LM_MACHEP;
+real LM_SQRT_DWARF;
+real LM_SQRT_GIANT;
+void lm_lmpar(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real delta, lm_real_type par, real[] x, real[] sdiag, real[] wa1, real[] wa2);
+void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gtol, int maxfev, real epsfcn, real[] diag, int mode, real factor, lm_int_type info, lm_int_type nfev, real[] fjac, int[] ipvt, real[] qtf, real[] wa1, real[] wa2, real[] wa3, real[] wa4, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data);
+void lm_minimize(int m_dat, int n_par, real[] par, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data, lm_control_type control);
+FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], real), real[] parameters, FitControl control=<default>);
+FitResult fit(real[] xdata, real[] ydata, real function(real[], real), real[] parameters, FitControl control=<default>);
+real lm_enorm(int n, real[] x, int offset=<default>);
+lm_data_type operator init();
+lm_int_type operator init();
+lm_real_type operator init();
+lm_control_type operator init();
+FitControl operator init();
+FitResult operator init();
+real SQR(real x);
+string[] lm_shortmsg;
+void lm_evaluate_default(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info);
+string pad(string str, int count, string pad=<default>);
+string pad(int num, int digits, string pad=<default>);
+string pad(real num, int digits, string pad=<default>);
+real LM_USERTOL;
+real LM_DWARF;
+void lm_print_quiet(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
+void lm_print_default(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
+real barmarksize(pen p=<default>);
+real barmarksizefactor;
+marker CrossIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+marker StickIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+frame crossframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
+real crossmarksize(pen p=<default>);
+real crossmarksizefactor;
+frame stickframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
+frame stickframe;
+real stickmarksize(pen p=<default>);
+real stickmarkspace(pen p=<default>);
+real stickmarksizefactor;
+real stickmarkspacefactor;
+frame duplicate(path g, int n=<default>, pair space=<default>, pen p=<default>);
+marker CircleBarIntervalMarker(int i=<default>, int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, filltype filltype=<default>, bool circleabove=<default>, frame uniform=<default>, bool above=<default>);
+frame circlebarframe(int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+real circlemarkradius(pen p=<default>);
+real circlemarkradiusfactor;
+marker operator *(transform T, marker m);
+marker TildeIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+frame tildeframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
+frame tildeframe;
+real tildemarksize(pen p=<default>);
+real tildemarksizefactor;
+void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, pair A, pair O, pair B, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
+real markanglespace(pen p=<default>);
+real markanglespace;
+real markangleradius(pen p=<default>);
+real markangleradius;
+real markanglespacefactor;
+real markangleradiusfactor;
+void markinterval(picture pic=<default>, frame f, path g)(int n=<default>, frame f, bool rotated=<default>);
+real[] partialsum(real[] a);
+real[] partialsum(real[] a, real[] dx);
+int[] partialsum(int[] a);
+int[] partialsum(int[] a, int[] dx);
+real cot(real x);
+int unique(real[] a, real x);
+int unique(string[] a, string x);
+int quadrant(real degrees);
+pair exp(explicit pair z);
+string nopoint;
+real intersect(pair p, pair q, pair z);
+real intersect(triple P, triple Q, triple n, triple Z);
+real interpolate(real[] x, real[] y, real x0, int i);
+real interpolate(real[] x, real[] y, real x0);
+triple intersectionpoint(triple n0, triple P0, triple n1, triple P1);
+pair[] quarticroots(real a, real b, real c, real d, real e);
+bool lexorder(pair a, pair b);
+bool lexorder(triple a, triple b);
+bool square(real[][] m);
+real sec(real x);
+bool rectangular(real[][] m);
+bool rectangular(pair[][] m);
+bool rectangular(triple[][] m);
+bool polygon(path p);
+pair unityroot(int n, int k=<default>);
+real acot(real x);
+pair[][] fft(pair[][] a, int sign=<default>);
+real slope(path g, real x, int n=<default>);
+real slope(path g, explicit pair z, int n=<default>);
+int[][] segment(bool[] b);
+picture grid(int Nx, int Ny, pen p=<default>);
+real frac(real x);
+real asec(real x);
+real time(path g, real x, int n=<default>);
+real time(path g, explicit pair z, int n=<default>);
+bool increasing(real[] a, bool strict=<default>);
+real[] zero(int n);
+real[][] zero(int n, int m);
+real acsc(real x);
+real value(path g, real x, int n=<default>);
+real value(path g, explicit pair z, int n=<default>);
+real csc(real x);
+pair log(explicit pair z);
+void drawline(picture pic=<default>, pair P, pair Q, pen p=<default>);
+path cutbefore(path p, path q);
+path cutafter(path p, path q);
+path cuttings;
+void draw(picture pic=<default>, obj o, light light=<default>);
+obj operator *(real[][] T, obj o);
+obj operator init();
+real[][] finiteDifferenceJacobian(real[] f(real[]), real[] t, real[] h=<default>);
+RKTableau E_Euler;
+real error(real error, real initial, real lowOrder, real norm, real diff);
+RKTableau RK5;
+real stepfactor;
+solution integrate(real y, real c=<default>, real g(real t, real y), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>);
+Solution integrate(real[] y, real[] f(real t, real[] y), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>);
+RKTableau RK4;
+real[] newton(int iterations=<default>, real[] f(real[]), real[][] jacobian(real[]), real[] t);
+real phi1(real x);
+RKTableau RK3;
+void expfactors(real x, coefficients a);
+real phi2(real x);
+void report(real old, real h, real t);
+real[] solveBVP(real[] f(real, real[]), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>, real[] initial(real[]), real[] discrepancy(real[]), real[] guess, int iterations=<default>);
+RKTableau Euler;
+RKTableau E_PC;
+RKTableau RK2;
+real phi3(real x);
+void write(solution S);
+void write(Solution S);
+coefficients operator init();
+RKTableau operator init();
+solution operator init();
+Solution operator init();
+RKTableau E_RK2;
+RKTableau RK3BS;
+RKTableau RK5F;
+real adjust(real h, real error, real tolmin, real tolmax, RKTableau tableau);
+RKTableau RK5DP;
+real[] Coeff;
+RKTableau PC;
+RKTableau E_RK3BS;
+pen[] Grayscale(int NColors=<default>);
+pen[] Wheel(int NColors=<default>);
+void image(frame f, real[][] data, pair initial, pair final, pen[] palette, bool transpose=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+void image(frame f, pen[][] data, pair initial, pair final, bool transpose=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+bounds image(picture pic=<default>, real[][] f, bounds range(picture pic, real min, real max)=<default>, pair initial, pair final, pen[] palette, bool transpose=<default>, bool copy=<default>, bool antialias=<default>);
+bounds image(picture pic=<default>, real f(real, real), bounds range(picture pic, real min, real max)=<default>, pair initial, pair final, int nx=<default>, int ny=<default>, pen[] palette, bool antialias=<default>);
+void image(picture pic=<default>, pen[][] data, pair initial, pair final, bool transpose=<default>, bool copy=<default>, bool antialias=<default>);
+void image(picture pic=<default>, pen f(int, int), int width, int height, pair initial, pair final, bool antialias=<default>);
+bounds image(picture pic=<default>, pair[] z, real[] f, bounds range(picture pic, real min, real max)=<default>, pen[] palette);
+bounds image(picture pic=<default>, real[] x, real[] y, real[] f, bounds range(picture pic, real min, real max)=<default>, pen[] palette);
+pen[] cmyk(pen[] Palette);
+pen[] BWRainbow(int NColors, bool two);
+pen[] BWRainbow(int NColors=<default>);
+pen[] BWRainbow2(int NColors=<default>);
+bounds Automatic(picture pic, real min, real max);
+real[] sequencereal;
+pen[] Rainbow(int NColors=<default>);
+pen[] adjust(picture pic, real min, real max, real rmin, real rmax, pen[] palette);
+pen[] Gradient(int NColors=<default> ... pen[] p);
+pen[] quantize(pen[] Palette, int n);
+bounds Range(picture pic, real min, real max)(bool automin=<default>, real min=<default>, bool automax=<default>, real max=<default>);
+bounds Full(picture pic, real min, real max);
+void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, pen pTick=<default>, pen ptick=<default>);
+void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>);
+pen[] palette(real[] f, pen[] palette);
+pen[][] palette(real[][] f, pen[] palette);
+void palette(picture pic=<default>, Label L=<default>, bounds bounds, pair initial, pair final, void axis(picture, axisT)=<default>, pen[] palette, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>)=<default>, bool copy=<default>, bool antialias=<default>);
+picture brick(real Hx=<default>, real Hy=<default>, pen p=<default>);
+picture crosshatch(real H=<default>, pen p=<default>);
+picture hatch(real H=<default>, pair dir=<default>, pen p=<default>);
+real hatchepsilon;
+picture checker(real Hx=<default>, real Hy=<default>, pen p=<default>);
+void add(string name, picture pic, pair lb=<default>, pair rt=<default>);
+frame tiling(string name, picture pic, pair lb=<default>, pair rt=<default>);
+picture tile(real Hx=<default>, real Hy=<default>, pen p=<default>, filltype filltype=<default>);
+void grestore(picture pic=<default>);
+void gsave(picture pic=<default>);
+pair align;
+pen textpen;
+path roundedpath(path A, real R, real S=<default>);
+problem operator init();
+real infinity;
+pen authorpen;
+void display(frame[] f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(frame f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(string[] s, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(string s, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void multifigure(string[] slist, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
+void subitem(string s, pen p=<default>);
+pen pagenumberpen;
+pair pagenumberalign;
+pair pagenumberposition;
+void indexedfigure(string prefix, int first, int last, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
+string texcolor(pen p);
+int page;
+void color(string name, string color);
+pen foregroundcolor;
+void bibliography(string name);
+void bibliographystyle(string name);
+int[] lastnode;
+void asyfigure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, filltype filltype=<default>, bool newslide=<default>);
+void asyfilecode(bool center=<default>, string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
+bool itemstep;
+real itemskip;
+void remark(bool center=<default>, string s, pair align=<default>, pen p=<default>, real indent=<default>, bool minipage=<default>, real skip=<default>, filltype filltype=<default>, bool step=<default>);
+void usersetting();
+void nextpage(pen p=<default>);
+bool landscape;
+void filecode(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
+real codeskip;
+void newslide(bool stepping=<default>);
+pen itempen;
+bool reverse;
+void reversevideo();
+void vbox(string s, pen p=<default>);
+void asycode(bool center=<default>, string s, string options=<default>, string caption=<default>, string preamble=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
+void exitfunction();
+bool havepagenumber;
+real pageheight;
+real pagewidth;
+picture background;
+void background();
+pen backgroundcolor;
+void normalvideo();
+void title(string s, pair position=<default>, pair align=<default>, pen p=<default>, bool newslide=<default>);
+pen titlepen;
+real titleskip;
+pair dateskip;
+pair titlealign;
+pen titlepagepen;
+void titlepage(string title, string author, string institution=<default>, string date=<default>, string url=<default>, bool newslide=<default>);
+pair titlepageposition;
+pen codepen;
+void item(string s, pen p=<default>, bool step=<default>);
+void erasestep(int erasenode);
+bool checkposition();
+void setpens(pen red=<default>, pen blue=<default>, pen steppen=<default>);
+void code(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
+transform tinv;
+pair urlskip;
+void numberpage(pen p=<default>);
+pen urlpen;
+string cropcode(string s);
+int[] firstnode;
+bool firststep;
+string asywrite(string s, string preamble=<default>);
+pair startposition;
+string oldbulletcolor;
+bool allowstepping;
+pair currentposition;
+string newbulletcolor;
+pen datepen;
+void incrementposition(pair z);
+pen institutionpen;
+void skip(real n=<default>);
+bool stepping;
+real pagemargin;
+pen steppagenumberpen;
+bool empty();
+void currentexitfunction();
+void step();
+string[] codefile;
+void outline(string s=<default>, pair position=<default>, pair align=<default>, pen p=<default>);
+void center(string s, pen p=<default>);
+void equation(string s, pen p=<default>);
+void equations(string s, pen p=<default>);
+void asyinclude(string s, real xsize=<default>, real ysize=<default>);
+void figure(string[] s, string options=<default>, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void figure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+real figureborder;
+pen figuremattpen;
+string bullet;
+int preamblenodes;
+string bulletcolor(string color);
+real minipagewidth;
+real minipagemargin;
+real stepfraction;
+path curve(pair c, real f(real, real), pair a, pair b);
+path curve(pair c, real f(real), pair a, pair b);
+picture slopefield(real f(real, real), pair a, pair b, int nx=<default>, int ny=<default>, real tickfactor=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+picture slopefield(real f(real), pair a, pair b, int nx=<default>, int ny=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+revolution operator *(real[][] t, revolution r);
+skeleton operator init();
+revolution operator init();
+revolution sphere(triple c=<default>, real r, int n=<default>);
+path line(path p, path q, real[] t);
+surface surface(revolution r, int n=<default>, pen color(int i, real j)=<default>);
+void draw(picture pic=<default>, revolution r, int m=<default>, int n=<default>, pen frontpen=<default>, pen backpen=<default>, pen longitudinalpen=<default>, pen longitudinalbackpen=<default>, light light=<default>, string name=<default>, render render=<default>, projection P=<default>);
+real[] tangent(path p, path q, bool side);
+pen defaultbackpen;
+path[] cylinder(path3 base, real h, triple axis=<default>, projection P=<default>);
+revolution cylinder(triple c=<default>, real r, real h, triple axis=<default>);
+revolution cone(triple c=<default>, real r, real h, triple axis=<default>, int n=<default>);
+real rms(real[] A);
+int[] frequency(real[] data, real[] bins);
+int[] frequency(real[] data, real a, real b, int n);
+int[][] frequency(real[] x, real[] y, real[] xbins, real[] ybins);
+int[][] frequency(real[] x, real[] y, pair a, pair b, int nx, int ny=<default>);
+int[][] frequency(pair[] z, pair a, pair b, int nx, int ny=<default>);
+real mean(real[] A);
+int bins(real[] data, int max=<default>);
+real stdev(real[] A);
+path topbox(pair a, pair b);
+path halfbox(pair a, pair b);
+real Gaussian(real x, real sigma);
+real Gaussian(real x);
+pair Gaussrandpair();
+real Gaussrand();
+real variance(real[] A);
+real legendmarkersize;
+real variancebiased(real[] A);
+linefit operator init();
+real skewness(real[] A);
+linefit leastsquares(real[] x, real[] y);
+void histogram(picture pic=<default>, real[] bins, real[] count, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
+void histogram(picture pic=<default>, real[] data, real a, real b, int n, bool normalize=<default>, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
+real kurtosis(real[] A);
+real kurtosisexcess(real[] A);
+pair[] endpoints(guide[] a);
+Relation r3;
+Braid apply(Relation r, Braid b, int step, int place);
+picture tableau(frame[] cards, bool number=<default>);
+pair min(pair[] z);
+Component bp;
+Component phi;
+real gapfactor;
+Component bm;
+Component wye;
+Relation operator -(Relation r);
+Component operator init();
+Braid operator init();
+Relation operator init();
+Syzygy operator init();
+real hwratio;
+Relation r4a;
+Relation r4b;
+pair max(pair[] z);
+pen Orchid;
+pen Aquamarine;
+pen Magenta;
+pen BrickRed;
+pen Lavender;
+pen CadetBlue;
+pen CarnationPink;
+pen SpringGreen;
+pen MidnightBlue;
+pen OliveGreen;
+pen Apricot;
+pen Cyan;
+pen Red;
+pen YellowOrange;
+pen Maroon;
+pen RawSienna;
+pen YellowGreen;
+pen Mahogany;
+pen Gray;
+pen Plum;
+pen BlueGreen;
+pen Cerulean;
+pen Blue;
+pen BlueViolet;
+pen RedOrange;
+pen Goldenrod;
+pen ForestGreen;
+pen BurntOrange;
+pen Sepia;
+pen Tan;
+pen Brown;
+pen VioletRed;
+pen Violet;
+pen RubineRed;
+pen TealBlue;
+pen White;
+pen Purple;
+pen Bittersweet;
+pen Orange;
+pen OrangeRed;
+pen Fuchsia;
+pen Peach;
+pen Thistle;
+pen PineGreen;
+pen Dandelion;
+pen Black;
+pen DarkOrchid;
+pen NavyBlue;
+pen Rhodamine;
+pen ProcessBlue;
+pen LimeGreen;
+pen WildStrawberry;
+pen Green;
+pen GreenYellow;
+pen Emerald;
+pen Mulberry;
+pen RedViolet;
+pen SkyBlue;
+pen SeaGreen;
+pen Salmon;
+pen Periwinkle;
+pen Yellow;
+pen JungleGreen;
+pen CornflowerBlue;
+pen RoyalBlue;
+pen Melon;
+pen RoyalPurple;
+pen Turquoise;
+int lookup(tree t, int key);
+tree newtree();
+void write(file out=<default>, tree t);
+tree operator init();
+tree add(tree t, int key, int value);
+bool contains(tree t, int key);
+real trembleFuzz();
+real trembleAngle;
+real trembleRandom;
+real trembleFrequency;
+tremble operator init();
+real magneticRadius;
+real[] sample(path3 g, real r, real relstep=<default>);
+path3 roundedpath(path3 A, real r);
+int coloredNodes;
+int coloredSegments;
+surface surface(rmf[] R, real[] t, coloredpath cp, transform T(real), bool cyclic);
+surface tube(path3 g, coloredpath section, transform T(real)=<default>, real corner=<default>, real relstep=<default>);
+coloredpath operator init();
+coloredpath operator cast(path p);
+coloredpath operator cast(guide p);
+real degrees(rmf a, rmf b);
+string VERSION;
+pen Orchid;
+pen LemonChiffon;
+pen Indigo;
+pen Beige;
+pen Aquamarine;
+pen SlateBlue;
+pen SlateGray;
+pen Aqua;
+pen Magenta;
+pen Lavender;
+pen CadetBlue;
+pen DeepPink;
+pen SpringGreen;
+pen MidnightBlue;
+pen Olive;
+pen OliveDrab;
+pen Chocolate;
+pen Cyan;
+pen Gainsboro;
+pen Ivory;
+pen PapayaWhip;
+pen Red;
+pen Pink;
+pen Maroon;
+pen MintCream;
+pen YellowGreen;
+pen DarkTurquoise;
+pen Gray;
+pen MediumBlue;
+pen MediumOrchid;
+pen MediumPurple;
+pen MediumSeaGreen;
+pen MediumSlateBlue;
+pen MediumAquamarine;
+pen MediumSpringGreen;
+pen MediumTurquoise;
+pen MediumVioletRed;
+pen Plum;
+pen Blue;
+pen Gold;
+pen Sienna;
+pen DarkOliveGreen;
+pen DarkOrange;
+pen BlueViolet;
+pen Goldenrod;
+pen ForestGreen;
+pen Chartreuse;
+pen NavajoWhite;
+pen Tan;
+pen DarkMagenta;
+pen Silver;
+pen AntiqueWhite;
+pen PaleTurquoise;
+pen IndianRed;
+pen Crimson;
+pen Azure;
+pen LawnGreen;
+pen Brown;
+pen BurlyWood;
+pen Moccasin;
+pen Violet;
+pen DarkBlue;
+pen Peru;
+pen SandyBrown;
+pen White;
+pen Purple;
+pen WhiteSmoke;
+pen DimGray;
+pen Orange;
+pen OrangeRed;
+pen Fuchsia;
+pen Thistle;
+pen PeachPuff;
+pen DeepSkyBlue;
+pen Honeydew;
+pen Bisque;
+pen RosyBrown;
+pen Black;
+pen Khaki;
+pen DarkOrchid;
+pen FireBrick;
+pen Cornsilk;
+pen Snow;
+pen LimeGreen;
+pen Lime;
+pen OldLace;
+pen Seashell;
+pen Green;
+pen GreenYellow;
+pen DarkCyan;
+pen FloralWhite;
+pen GhostWhite;
+pen DarkRed;
+pen BlanchedAlmond;
+pen PowderBlue;
+pen DarkGray;
+pen DarkGreen;
+pen DarkGoldenrod;
+pen SkyBlue;
+pen SeaGreen;
+pen DarkViolet;
+pen Teal;
+pen Salmon;
+pen AliceBlue;
+pen LavenderBlush;
+pen HotPink;
+pen Wheat;
+pen DodgerBlue;
+pen SaddleBrown;
+pen Tomato;
+pen DarkKhaki;
+pen LightBlue;
+pen LightCoral;
+pen LightCyan;
+pen Yellow;
+pen SteelBlue;
+pen LightGreen;
+pen PaleGreen;
+pen Linen;
+pen LightGoldenrodYellow;
+pen LightGrey;
+pen LightPink;
+pen PaleGoldenrod;
+pen LightSalmon;
+pen LightSeaGreen;
+pen Navy;
+pen LightSkyBlue;
+pen LightSlateGray;
+pen PaleVioletRed;
+pen LightSteelBlue;
+pen LightYellow;
+pen CornflowerBlue;
+pen rgbint(int r, int g, int b);
+pen Coral;
+pen MistyRose;
+pen DarkSalmon;
+pen DarkSeaGreen;
+pen RoyalBlue;
+pen DarkSlateBlue;
+pen DarkSlateGray;
+pen Turquoise;
diff --git a/Build/source/utils/asymptote/asymptote.nsi b/Build/source/utils/asymptote/asymptote.nsi
index 453a420aa67..953b44e6346 100644
--- a/Build/source/utils/asymptote/asymptote.nsi
+++ b/Build/source/utils/asymptote/asymptote.nsi
@@ -14,6 +14,7 @@ XPStyle On
; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "LogicLib.nsh"
+!include "EnvVarUpdate.nsh"
; MUI Settings
!define MUI_ABORTWARNING
@@ -70,6 +71,7 @@ ShowUnInstDetails show
Section "Asymptote" SEC01
SetOutPath "$INSTDIR"
+ ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
Delete "$INSTDIR\_imagingtk.pyd"
SetOverwrite try
File /r build-${PRODUCT_VERSION}\*
@@ -159,6 +161,7 @@ Section Uninstall
Delete "$INSTDIR\uninst.exe"
!include AsymptoteUninstallList.nsi
Delete "$INSTDIR\asy.bat"
+ ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
RMDir "$INSTDIR"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec
index 965cde91187..3c7b4ebc2e0 100644
--- a/Build/source/utils/asymptote/asymptote.spec
+++ b/Build/source/utils/asymptote/asymptote.spec
@@ -1,7 +1,7 @@
%{!?_texmf: %define _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")}
Name: asymptote
-Version: 2.02
+Version: 2.10
Release: 1%{?dist}
Summary: Descriptive vector graphics language
diff --git a/Build/source/utils/asymptote/base/bsp.asy b/Build/source/utils/asymptote/base/bsp.asy
index a744da522cc..2a4d93daa81 100644
--- a/Build/source/utils/asymptote/base/bsp.asy
+++ b/Build/source/utils/asymptote/base/bsp.asy
@@ -201,7 +201,9 @@ void add(picture pic=currentpicture, face[] faces,
for(int i=0; i < n; ++i) {
picture F=Faces[i].pic;
- pic.userBox(F.userMin,F.userMax);
- pic.append(pic.bounds.point,pic.bounds.min,pic.bounds.max,F.T,F.bounds);
+ pic.userBox3(F.userMin3(), F.userMax3());
+ pic.bounds.append(F.T, F.bounds);
+ // The above 2 lines should be replaced with a routine in picture which
+ // copies only sizing data from another picture.
}
}
diff --git a/Build/source/utils/asymptote/base/embed.asy b/Build/source/utils/asymptote/base/embed.asy
index dc6c7d4101a..165de0b7534 100644
--- a/Build/source/utils/asymptote/base/embed.asy
+++ b/Build/source/utils/asymptote/base/embed.asy
@@ -6,7 +6,9 @@ if(latex()) {
\usepackage[3D,dvipdfmx]{movie15}
\else%
\usepackage[3D]{movie15}
-\fi%");
+\fi%
+\FPmessagesfalse%
+");
}
// See http://www.ctan.org/tex-archive/macros/latex/contrib/movie15/README
diff --git a/Build/source/utils/asymptote/base/flowchart.asy b/Build/source/utils/asymptote/base/flowchart.asy
index bb8fe21a4d6..3db66173755 100644
--- a/Build/source/utils/asymptote/base/flowchart.asy
+++ b/Build/source/utils/asymptote/base/flowchart.asy
@@ -424,20 +424,20 @@ blockconnector blockconnector(picture pic, transform t, pen p=currentpen,
if(abs(b1.center.y-b2.center.y) < sqrtEpsilon) {
// horizontally aligned
b1.dirs[0]=b1.center.x < b2.center.x ? right : left;
- blockconnector(pic,t)(b1,b2);
+ blockconnector(pic,t,p,margin)(b1,b2);
} else if(abs(b1.center.x-b2.center.x) < sqrtEpsilon) {
// vertically aligned
b1.dirs[0]=b1.center.y < b2.center.y ? up : down;
- blockconnector(pic,t)(b1,b2);
+ blockconnector(pic,t,p,margin)(b1,b2);
} else {
if(abs(b1.center.y-b2.center.y) < abs(b1.center.x-b2.center.x)) {
b1.dirs[0]=b1.center.x < b2.center.x ? right : left;
b1.dirs[1]=b1.center.y < b2.center.y ? up : down;
- blockconnector(pic,t)(b1,b2);
+ blockconnector(pic,t,p,margin)(b1,b2);
} else {
b1.dirs[0]=b1.center.y < b2.center.y ? up : down;
b1.dirs[1]=b1.center.x < b2.center.x ? right : left;
- blockconnector(pic,t)(b1,b2);
+ blockconnector(pic,t,p,margin)(b1,b2);
}
}
return b2;
diff --git a/Build/source/utils/asymptote/base/geometry.asy b/Build/source/utils/asymptote/base/geometry.asy
index 41a6397de64..61ff1ba8e8f 100644
--- a/Build/source/utils/asymptote/base/geometry.asy
+++ b/Build/source/utils/asymptote/base/geometry.asy
@@ -433,10 +433,6 @@ point point(explicit pair p, real m)
op.init(currentcoordsys, p, m);
return op;
}
-point point(explicit pair p, int m)
-{// Handle ambiguity
- return point(p,(real)m);
-}
/*<asyxml><function type="point" signature="point(coordsys,explicit point,real)"><code></asyxml>*/
point point(coordsys R, explicit point M, real m=M.m)
@@ -1150,17 +1146,18 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
Label legend="", marker marker=nomarker,
pathModifier pathModifier=NoModifier)
{/* Add the two parameters 'dirP' and 'dirQ' to the native routine
- 'drawline' of the module 'maths'.
+ 'drawline' of the module 'math'.
Segment [PQ] will be prolonged in direction of P if 'dirP=true', in
direction of Q if 'dirQ=true'.
If 'dirP=dirQ=true', the behavior is that of the native 'drawline'.
Add all the other parameters of 'Draw'.*/
- pic.add(new void (frame f, transform t, transform, pair m, pair M) {
+ pic.add(new void (frame f, transform t, transform T, pair m, pair M) {
picture opic;
// Reduce the bounds by the size of the pen.
m -= min(p)-(linemargin(),linemargin()); M -= max(p)+(linemargin(),linemargin());
// Calculate the points and direction vector in the transformed space.
+ t=t*T;
pair z=t*P;
pair q=t*Q;
pair v=q-z;
@@ -1175,16 +1172,16 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
ptp=(z.x,z.y+cp*(m.y-z.y));
ptq=(z.x,q.y+cq*(M.y-q.y));
} else {
- ptp=(z.x,q.y+cq*(m.y-q.y));
- ptq=(z.x,z.y+cp*(M.y-z.y));
+ ptq=(z.x,q.y+cq*(m.y-q.y));
+ ptp=(z.x,z.y+cp*(M.y-z.y));
}
} else if(v.y == 0) {
if (dot(v,m-z) < 0) {
ptp=(z.x+cp*(m.x-z.x),z.y);
ptq=(q.x+cq*(M.x-q.x),z.y);
} else {
- ptp=(q.x+cq*(m.x-q.x),z.y);
- ptq=(z.x+cp*(M.x-z.x),z.y);
+ ptq=(q.x+cq*(m.x-q.x),z.y);
+ ptp=(z.x+cp*(M.x-z.x),z.y);
}
} else {
// Calculate the maximum and minimum t values allowed for the
@@ -1239,12 +1236,12 @@ void clipdraw(picture pic=currentpicture, Label L="", path g,
label(tmp,L,g,p);
add(pic,tmp);
}
- pic.add(new void (frame f, transform t, transform, pair m, pair M) {
+ pic.add(new void (frame f, transform t, transform T, pair m, pair M) {
// Reduce the bounds by the size of the pen and the margins.
m += min(p)+(xmargin,ymargin); M -= max(p)+(xmargin,ymargin);
path bound=box(m,M);
picture tmp;
- draw(tmp,"",t*g,align,p,arrow,bar,NoMargin,legend,marker);
+ draw(tmp,"",t*T*g,align,p,arrow,bar,NoMargin,legend,marker);
clip(tmp,bound);
add(f,tmp.fit());
});
@@ -2963,13 +2960,6 @@ ellipse ellipse(point C, real a, real b, real angle=0)
return oe;
}
-/*<asyxml><function type="ellipse" signature="ellipse(explicit pair,real,real)"><code></asyxml>*/
-ellipse ellipse(explicit pair C, real a, real b)=
- new ellipse(explicit pair C, real a, real b)
-{/*<asyxml></code><documentation>Overwrite the default routine.</documentation></function></asyxml>*/
- return ellipse((point)C,a,b,0);
-};
-
/*<asyxml><function type="ellipse" signature="ellipse(bqe)"><code></asyxml>*/
ellipse ellipse(bqe bqe)
{/*<asyxml></code><documentation>Return the ellipse a[0]*x^2 + a[1]*xy + a[2]*y^2 + a[3]*x + a[4]*y + a[5]=0
@@ -3204,16 +3194,6 @@ circle circle(explicit point C, real r)
if(!finite(r)) oc.l=line(C,C+vector(C.coordsys,(1,0)));
return oc;
}
-circle circle(explicit point C, int r)
-{
- return circle(C,(real) r);
-}
-
-/*<asyxml><function type="circle" signature="circle(pair,real)"><code></asyxml>*/
-circle circle(pair c, real r)=new circle(pair c, real r)
-{/*<asyxml></code><documentation>Overwrite 'circle(pair,real)'</documentation></function></asyxml>*/
- return circle(locate(c),r);
-};
/*<asyxml><function type="circle" signature="circle(point,point)"><code></asyxml>*/
circle circle(point A, point B)
@@ -3526,18 +3506,30 @@ path arcfromcenter(ellipse el, real angle1, real angle2,
The angles are mesured relatively to the axis (C,x-axis) where C is
the center of the ellipse.</documentation></function></asyxml>*/
if(degenerate(el)) abort("arcfromcenter: can not convert degenerated ellipse to path.");
- guide op;
- coordsys Rp=coordsys(el);
- if (n < 1) return op;
if (angle1 > angle2)
return reverse(arcfromcenter(el,angle2,angle1,!direction,n));
+ path op;
+ coordsys Rp=coordsys(el);
+ if (n < 1) return op;
+ interpolate join = operator ..;
+ real stretch = max(el.a/el.b, el.b/el.a);
+ if (stretch > 10) {
+ n *= floor(stretch/5);
+ join=operator --;
+ }
real a1=direction ? radians(angle1) : radians(angle2);
real a2=direction ? radians(angle2) : radians(angle1)+2*pi;
real step=(a2-a1)/(n != 1 ? n-1 : 1);
real a,r;
real da=radians(el.angle);
+ real a3=angle((cos(a1)/el.a,sin(a1)/el.b));
+ real a3=(a3>=0) ? a3 : a3+2pi;
+ real a4=angle((cos(a2)/el.a,sin(a2)/el.b));
+ real a4=(a4>=0) ? a4 : a4+2pi;
+ real step=(a4-a3)/(n != 1 ? n-1 : 1);
for (int i=0; i < n; ++i) {
- a=a1+i*step;
+ a=a3+i*step;
+ a=angle((el.a*cos(a),el.b*sin(a)));
r=el.b/sqrt(1-(el.e*cos(a))^2);
op=op..Rp*Rp.polar(r,a+da);
}
@@ -3782,16 +3774,17 @@ void draw(picture pic=currentpicture, Label L="",parabola parabola,
margin margin=NoMargin, Label legend="", marker marker=nomarker)
{/*<asyxml></code><documentation>Draw the parabola 'p' on 'pic' without (if possible) altering the
size of picture pic.</documentation></function></asyxml>*/
- pic.add(new void (frame f, transform t, transform, pair m, pair M) {
+ pic.add(new void (frame f, transform t, transform T, pair m, pair M) {
// Reduce the bounds by the size of the pen and the margins.
m -= min(p); M -= max(p);
parabola.bmin=inverse(t)*m; parabola.bmax=inverse(t)*M;
picture tmp;
- draw(tmp,L,t*(path) parabola,align,p,arrow,bar,NoMargin,legend,marker);
+ draw(tmp,L,t*T*(path) parabola,align,p,arrow,bar,NoMargin,legend,marker);
add(f,tmp.fit());
});
- if(pic.userMin.x != pic.userMax.x & pic.userMin.y != pic.userMax.y &
- !finite(abs(pic.userMin)) & !finite(abs(pic.userMax)))
+ pair m=pic.userMin();
+ pair M=pic.userMax();
+ if(m != M)
pic.addBox(truepoint(SW), truepoint(NE));
}
@@ -3814,19 +3807,21 @@ void draw(picture pic=currentpicture, Label L="", hyperbola h,
margin margin=NoMargin, Label legend="", marker marker=nomarker)
{/*<asyxml></code><documentation>Draw the hyperbola 'h' on 'pic' without (if possible) altering the
size of the picture pic.</documentation></function></asyxml>*/
- pic.add(new void (frame f, transform t, transform, pair m, pair M) {
+ pic.add(new void (frame f, transform t, transform T, pair m, pair M) {
// Reduce the bounds by the size of the pen and the margins.
m -= min(p); M -= max(p);
h.bmin=inverse(t)*m; h.bmax=inverse(t)*M;
picture tmp;
- draw(tmp,L,t*(path) h,align,p,arrow,bar,NoMargin,legend,marker);
+ transform tT=t*T;
+ draw(tmp,L,tT*(path) h,align,p,arrow,bar,NoMargin,legend,marker);
hyperbola ht=hyperbola(h.F2,h.F1,h.a);
ht.bmin=inverse(t)*m; ht.bmax=inverse(t)*M;
- draw(tmp,"",t*(path) ht,align,p,arrow,bar,NoMargin,marker);
+ draw(tmp,"",tT*(path) ht,align,p,arrow,bar,NoMargin,marker);
add(f,tmp.fit());
});
- if(pic.userMin.x != pic.userMax.x & pic.userMin.y != pic.userMax.y &
- !finite(abs(pic.userMin)) & !finite(abs(pic.userMax)))
+ pair m=pic.userMin();
+ pair M=pic.userMax();
+ if(m != M)
pic.addBox(truepoint(SW), truepoint(NE));
}
@@ -4158,10 +4153,6 @@ abscissa operator +(int x, explicit abscissa a)
{
return ((real)x)+a;
}
-abscissa operator +(explicit abscissa a, int x)
-{
- return ((real)x)+a;
-}
/*<asyxml><operator type="abscissa" signature="-(explicit abscissa a)"><code></asyxml>*/
abscissa operator -(explicit abscissa a)
@@ -4190,10 +4181,6 @@ abscissa operator -(int x, explicit abscissa a)
{
return ((real)x)-a;
}
-abscissa operator -(explicit abscissa a, int x)
-{
- return a-((real)x);
-}
/*<asyxml><operator type="abscissa" signature="*(real,abscissa)"><code></asyxml>*/
abscissa operator *(real x, explicit abscissa a)
@@ -4210,15 +4197,6 @@ abscissa operator *(explicit abscissa a, real x)
return x*a;
}
-abscissa operator *(int x, explicit abscissa a)
-{
- return ((real)x)*a;
-}
-abscissa operator *(explicit abscissa a, int x)
-{
- return ((real)x)*a;
-}
-
abscissa operator /(real x, explicit abscissa a)
{
abscissa oa;
@@ -4238,10 +4216,6 @@ abscissa operator /(int x, explicit abscissa a)
{
return ((real)x)/a;
}
-abscissa operator /(explicit abscissa a, int x)
-{
- return a/((real)x);
-}
/*<asyxml><function type="abscissa" signature="relabscissa(real)"><code></asyxml>*/
abscissa relabscissa(real x)
@@ -4832,6 +4806,10 @@ struct arc {
/*<asyxml><method type="void" signature="setangles(real,real,real)"><code></asyxml>*/
void setangles(real a0, real a1, real a2)
{/*<asyxml></code><documentation>Set the angles.</documentation></method></asyxml>*/
+ if (a1 < 0 && a2 < 0) {
+ a1 += 360;
+ a2 += 360;
+ }
this.angle0=a0%(sgnd(a0)*360);
this.angle1=a1%(sgnd(a1)*360);
this.angle2=a2%(sgnd(2)*360);
diff --git a/Build/source/utils/asymptote/base/graph.asy b/Build/source/utils/asymptote/base/graph.asy
index 9ac9983ddef..a7ffabc6220 100644
--- a/Build/source/utils/asymptote/base/graph.asy
+++ b/Build/source/utils/asymptote/base/graph.asy
@@ -1203,17 +1203,17 @@ void xaxisAt(picture pic=currentpicture, Label L="", axis axis,
void bounds() {
if(type == Min)
- y=pic.scale.y.automin() ? tickMin(pic).y : pic.userMin.y;
+ y=pic.scale.y.automin() ? tickMin(pic).y : pic.userMin().y;
else if(type == Max)
- y=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax.y;
+ y=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax().y;
else if(type == Both) {
- y2=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax.y;
+ y2=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax().y;
y=opposite ? y2 :
- (pic.scale.y.automin() ? tickMin(pic).y : pic.userMin.y);
+ (pic.scale.y.automin() ? tickMin(pic).y : pic.userMin().y);
}
- real Xmin=finite(xmin) ? xmin : pic.userMin.x;
- real Xmax=finite(xmax) ? xmax : pic.userMax.x;
+ real Xmin=finite(xmin) ? xmin : pic.userMin().x;
+ real Xmax=finite(xmax) ? xmax : pic.userMax().x;
pair a=(Xmin,y);
pair b=(Xmax,y);
@@ -1297,17 +1297,17 @@ void yaxisAt(picture pic=currentpicture, Label L="", axis axis,
void bounds() {
if(type == Min)
- x=pic.scale.x.automin() ? tickMin(pic).x : pic.userMin.x;
+ x=pic.scale.x.automin() ? tickMin(pic).x : pic.userMin().x;
else if(type == Max)
- x=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax.x;
+ x=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax().x;
else if(type == Both) {
- x2=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax.x;
+ x2=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax().x;
x=opposite ? x2 :
- (pic.scale.x.automin() ? tickMin(pic).x : pic.userMin.x);
+ (pic.scale.x.automin() ? tickMin(pic).x : pic.userMin().x);
}
- real Ymin=finite(ymin) ? ymin : pic.userMin.y;
- real Ymax=finite(ymax) ? ymax : pic.userMax.y;
+ real Ymin=finite(ymin) ? ymin : pic.userMin().y;
+ real Ymax=finite(ymax) ? ymax : pic.userMax().y;
pair a=(x,Ymin);
pair b=(x,Ymax);
@@ -1363,21 +1363,22 @@ void xlimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bounds mx;
if(pic.scale.x.automin() || pic.scale.x.automax())
- mx=autoscale(pic.userMin.x,pic.userMax.x,pic.scale.x.scale);
+ mx=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
if(pic.scale.x.automin) {
if(pic.scale.x.automin()) pic.userMinx(mx.min);
- } else pic.userMinx(pic.scale.x.T(min));
+ } else pic.userMinx(min(pic.scale.x.T(min),pic.scale.x.T(max)));
if(pic.scale.x.automax) {
if(pic.scale.x.automax()) pic.userMaxx(mx.max);
- } else pic.userMaxx(pic.scale.x.T(max));
+ } else pic.userMaxx(max(pic.scale.x.T(min),pic.scale.x.T(max)));
if(crop) {
pair userMin=pic.userMin();
pair userMax=pic.userMax();
pic.bounds.xclip(userMin.x,userMax.x);
- pic.clip(new void (frame f, transform t, transform T, pair, pair) {
+ pic.clip(userMin, userMax,
+ new void (frame f, transform t, transform T, pair, pair) {
frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
clip(f,T*box(((t*userMin).x,(min(Tinvf)).y),
((t*userMax).x,(max(Tinvf)).y)));
@@ -1396,21 +1397,22 @@ void ylimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bounds my;
if(pic.scale.y.automin() || pic.scale.y.automax())
- my=autoscale(pic.userMin.y,pic.userMax.y,pic.scale.y.scale);
+ my=autoscale(pic.userMin().y,pic.userMax().y,pic.scale.y.scale);
if(pic.scale.y.automin) {
if(pic.scale.y.automin()) pic.userMiny(my.min);
- } else pic.userMiny(pic.scale.y.T(min));
+ } else pic.userMiny(min(pic.scale.y.T(min),pic.scale.y.T(max)));
if(pic.scale.y.automax) {
if(pic.scale.y.automax()) pic.userMaxy(my.max);
- } else pic.userMaxy(pic.scale.y.T(max));
+ } else pic.userMaxy(max(pic.scale.y.T(min),pic.scale.y.T(max)));
if(crop) {
pair userMin=pic.userMin();
pair userMax=pic.userMax();
pic.bounds.yclip(userMin.y,userMax.y);
- pic.clip(new void (frame f, transform t, transform T, pair, pair) {
+ pic.clip(userMin, userMax,
+ new void (frame f, transform t, transform T, pair, pair) {
frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
clip(f,T*box(((min(Tinvf)).x,(t*userMin).y),
((max(Tinvf)).x,(t*userMax).y)));
@@ -1423,7 +1425,7 @@ void crop(picture pic=currentpicture)
{
xlimits(pic,false);
ylimits(pic,false);
- if(pic.userSetx && pic.userSety)
+ if(pic.userSetx() && pic.userSety())
clip(pic,box(pic.userMin(),pic.userMax()));
}
@@ -1432,7 +1434,7 @@ void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop)
{
xlimits(pic,min.x,max.x);
ylimits(pic,min.y,max.y);
- if(crop && pic.userSetx && pic.userSety)
+ if(crop && pic.userSetx() && pic.userSety())
clip(pic,box(pic.userMin(),pic.userMax()));
}
@@ -1443,25 +1445,25 @@ void autoscale(picture pic=currentpicture, axis axis)
bounds mx,my;
pic.scale.set=true;
- if(pic.userSetx) {
- mx=autoscale(pic.userMin.x,pic.userMax.x,pic.scale.x.scale);
+ if(pic.userSetx()) {
+ mx=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
if(pic.scale.x.scale.logarithmic &&
- floor(pic.userMin.x) == floor(pic.userMax.x)) {
+ floor(pic.userMin().x) == floor(pic.userMax().x)) {
if(pic.scale.x.automin())
- pic.userMinx(floor(pic.userMin.x));
+ pic.userMinx(floor(pic.userMin().x));
if(pic.scale.x.automax())
- pic.userMaxx(ceil(pic.userMax.x));
+ pic.userMaxx(ceil(pic.userMax().x));
}
} else {mx.min=mx.max=0; pic.scale.set=false;}
- if(pic.userSety) {
- my=autoscale(pic.userMin.y,pic.userMax.y,pic.scale.y.scale);
+ if(pic.userSety()) {
+ my=autoscale(pic.userMin().y,pic.userMax().y,pic.scale.y.scale);
if(pic.scale.y.scale.logarithmic &&
- floor(pic.userMin.y) == floor(pic.userMax.y)) {
+ floor(pic.userMin().y) == floor(pic.userMax().y)) {
if(pic.scale.y.automin())
- pic.userMiny(floor(pic.userMin.y));
+ pic.userMiny(floor(pic.userMin().y));
if(pic.scale.y.automax())
- pic.userMaxy(ceil(pic.userMax.y));
+ pic.userMaxy(ceil(pic.userMax().y));
}
} else {my.min=my.max=0; pic.scale.set=false;}
@@ -1503,9 +1505,9 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
newticks=true;
}
- if(newticks && pic.userSetx && ticks != NoTicks) {
- if(xmin == -infinity) xmin=pic.userMin.x;
- if(xmax == infinity) xmax=pic.userMax.x;
+ if(newticks && pic.userSetx() && ticks != NoTicks) {
+ if(xmin == -infinity) xmin=pic.userMin().x;
+ if(xmax == infinity) xmax=pic.userMax().x;
bounds mx=autoscale(xmin,xmax,pic.scale.x.scale);
pic.scale.x.tickMin=mx.min;
pic.scale.x.tickMax=mx.max;
@@ -1517,15 +1519,15 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
if(xmin == -infinity && !axis.extend) {
if(pic.scale.set)
xmin=pic.scale.x.automin() ? pic.scale.x.tickMin :
- max(pic.scale.x.tickMin,pic.userMin.x);
- else xmin=pic.userMin.x;
+ max(pic.scale.x.tickMin,pic.userMin().x);
+ else xmin=pic.userMin().x;
}
if(xmax == infinity && !axis.extend) {
if(pic.scale.set)
xmax=pic.scale.x.automax() ? pic.scale.x.tickMax :
- min(pic.scale.x.tickMax,pic.userMax.x);
- else xmax=pic.userMax.x;
+ min(pic.scale.x.tickMax,pic.userMax().x);
+ else xmax=pic.userMax().x;
}
if(L.defaultposition) L.position(axis.position);
@@ -1565,9 +1567,9 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
newticks=true;
}
- if(newticks && pic.userSety && ticks != NoTicks) {
- if(ymin == -infinity) ymin=pic.userMin.y;
- if(ymax == infinity) ymax=pic.userMax.y;
+ if(newticks && pic.userSety() && ticks != NoTicks) {
+ if(ymin == -infinity) ymin=pic.userMin().y;
+ if(ymax == infinity) ymax=pic.userMax().y;
bounds my=autoscale(ymin,ymax,pic.scale.y.scale);
pic.scale.y.tickMin=my.min;
pic.scale.y.tickMax=my.max;
@@ -1579,16 +1581,16 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
if(ymin == -infinity && !axis.extend) {
if(pic.scale.set)
ymin=pic.scale.y.automin() ? pic.scale.y.tickMin :
- max(pic.scale.y.tickMin,pic.userMin.y);
- else ymin=pic.userMin.y;
+ max(pic.scale.y.tickMin,pic.userMin().y);
+ else ymin=pic.userMin().y;
}
if(ymax == infinity && !axis.extend) {
if(pic.scale.set)
ymax=pic.scale.y.automax() ? pic.scale.y.tickMax :
- min(pic.scale.y.tickMax,pic.userMax.y);
- else ymax=pic.userMax.y;
+ min(pic.scale.y.tickMax,pic.userMax().y);
+ else ymax=pic.userMax().y;
}
if(L.defaultposition) L.position(axis.position);
@@ -1784,23 +1786,23 @@ picture secondaryX(picture primary=currentpicture, void f(picture))
{
if(!primary.scale.set) abort(noprimary);
picture pic;
- if(primary.userMax.x == primary.userMin.x) return pic;
+ if(primary.userMax().x == primary.userMin().x) return pic;
f(pic);
- if(!pic.userSetx) return pic;
- bounds a=autoscale(pic.userMin.x,pic.userMax.x,pic.scale.x.scale);
- real bmin=pic.scale.x.automin() ? a.min : pic.userMin.x;
- real bmax=pic.scale.x.automax() ? a.max : pic.userMax.x;
+ if(!pic.userSetx()) return pic;
+ bounds a=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
+ real bmin=pic.scale.x.automin() ? a.min : pic.userMin().x;
+ real bmax=pic.scale.x.automax() ? a.max : pic.userMax().x;
real denom=bmax-bmin;
if(denom != 0) {
pic.erase();
- real m=(primary.userMax.x-primary.userMin.x)/denom;
- pic.scale.x.postscale=Linear(m,bmin-primary.userMin.x/m);
+ real m=(primary.userMax().x-primary.userMin().x)/denom;
+ pic.scale.x.postscale=Linear(m,bmin-primary.userMin().x/m);
pic.scale.set=true;
pic.scale.x.tickMin=pic.scale.x.postscale.T(a.min);
pic.scale.x.tickMax=pic.scale.x.postscale.T(a.max);
- pic.scale.y.tickMin=primary.userMin.y;
- pic.scale.y.tickMax=primary.userMax.y;
+ pic.scale.y.tickMin=primary.userMin().y;
+ pic.scale.y.tickMax=primary.userMax().y;
axis.xdivisor=a.divisor;
f(pic);
}
@@ -1813,21 +1815,21 @@ picture secondaryY(picture primary=currentpicture, void f(picture))
{
if(!primary.scale.set) abort(noprimary);
picture pic;
- if(primary.userMax.y == primary.userMin.y) return pic;
+ if(primary.userMax().y == primary.userMin().y) return pic;
f(pic);
- if(!pic.userSety) return pic;
- bounds a=autoscale(pic.userMin.y,pic.userMax.y,pic.scale.y.scale);
- real bmin=pic.scale.y.automin() ? a.min : pic.userMin.y;
- real bmax=pic.scale.y.automax() ? a.max : pic.userMax.y;
+ if(!pic.userSety()) return pic;
+ bounds a=autoscale(pic.userMin().y,pic.userMax().y,pic.scale.y.scale);
+ real bmin=pic.scale.y.automin() ? a.min : pic.userMin().y;
+ real bmax=pic.scale.y.automax() ? a.max : pic.userMax().y;
real denom=bmax-bmin;
if(denom != 0) {
pic.erase();
- real m=(primary.userMax.y-primary.userMin.y)/denom;
- pic.scale.y.postscale=Linear(m,bmin-primary.userMin.y/m);
+ real m=(primary.userMax().y-primary.userMin().y)/denom;
+ pic.scale.y.postscale=Linear(m,bmin-primary.userMin().y/m);
pic.scale.set=true;
- pic.scale.x.tickMin=primary.userMin.x;
- pic.scale.x.tickMax=primary.userMax.x;
+ pic.scale.x.tickMin=primary.userMin().x;
+ pic.scale.x.tickMax=primary.userMax().x;
pic.scale.y.tickMin=pic.scale.y.postscale.T(a.min);
pic.scale.y.tickMax=pic.scale.y.postscale.T(a.max);
axis.ydivisor=a.divisor;
diff --git a/Build/source/utils/asymptote/base/graph3.asy b/Build/source/utils/asymptote/base/graph3.asy
index e588c8aa4d6..391b72ca87a 100644
--- a/Build/source/utils/asymptote/base/graph3.asy
+++ b/Build/source/utils/asymptote/base/graph3.asy
@@ -363,14 +363,14 @@ InOutTicks=InOutTicks();
triple tickMin3(picture pic)
{
- return minbound(pic.userMin,(pic.scale.x.tickMin,pic.scale.y.tickMin,
- pic.scale.z.tickMin));
+ return minbound(pic.userMin(),(pic.scale.x.tickMin,pic.scale.y.tickMin,
+ pic.scale.z.tickMin));
}
triple tickMax3(picture pic)
{
- return maxbound(pic.userMax,(pic.scale.x.tickMax,pic.scale.y.tickMax,
- pic.scale.z.tickMax));
+ return maxbound(pic.userMax(),(pic.scale.x.tickMax,pic.scale.y.tickMax,
+ pic.scale.z.tickMax));
}
axis Bounds(int type=Both, int type2=Both, triple align=O, bool extend=false)
@@ -570,27 +570,27 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
void bounds() {
if(type == Min)
- y=pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin.y;
+ y=pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y;
else if(type == Max)
- y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax.y;
+ y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
else if(type == Both) {
- y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax.y;
+ y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
y=opposite ? y2 :
- (pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin.y);
+ (pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y);
}
if(type2 == Min)
- z=pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin.z;
+ z=pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z;
else if(type2 == Max)
- z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax.z;
+ z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
else if(type2 == Both) {
- z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax.z;
+ z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
z=opposite2 ? z2 :
- (pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin.z);
+ (pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z);
}
- real Xmin=finite(xmin) ? xmin : pic.userMin.x;
- real Xmax=finite(xmax) ? xmax : pic.userMax.x;
+ real Xmin=finite(xmin) ? xmin : pic.userMin().x;
+ real Xmax=finite(xmax) ? xmax : pic.userMax().x;
triple a=(Xmin,y,z);
triple b=(Xmax,y,z);
@@ -692,27 +692,27 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
void bounds() {
if(type == Min)
- x=pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin.x;
+ x=pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x;
else if(type == Max)
- x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax.x;
+ x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
else if(type == Both) {
- x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax.x;
+ x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
x=opposite ? x2 :
- (pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin.x);
+ (pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x);
}
if(type2 == Min)
- z=pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin.z;
+ z=pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z;
else if(type2 == Max)
- z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax.z;
+ z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
else if(type2 == Both) {
- z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax.z;
+ z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
z=opposite2 ? z2 :
- (pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin.z);
+ (pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z);
}
- real Ymin=finite(ymin) ? ymin : pic.userMin.y;
- real Ymax=finite(ymax) ? ymax : pic.userMax.y;
+ real Ymin=finite(ymin) ? ymin : pic.userMin().y;
+ real Ymax=finite(ymax) ? ymax : pic.userMax().y;
triple a=(x,Ymin,z);
triple b=(x,Ymax,z);
@@ -814,27 +814,27 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
void bounds() {
if(type == Min)
- x=pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin.x;
+ x=pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x;
else if(type == Max)
- x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax.x;
+ x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
else if(type == Both) {
- x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax.x;
+ x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
x=opposite ? x2 :
- (pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin.x);
+ (pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x);
}
if(type2 == Min)
- y=pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin.y;
+ y=pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y;
else if(type2 == Max)
- y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax.y;
+ y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
else if(type2 == Both) {
- y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax.y;
+ y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
y=opposite2 ? y2 :
- (pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin.y);
+ (pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y);
}
- real Zmin=finite(zmin) ? zmin : pic.userMin.z;
- real Zmax=finite(zmax) ? zmax : pic.userMax.z;
+ real Zmin=finite(zmin) ? zmin : pic.userMin().z;
+ real Zmax=finite(zmax) ? zmax : pic.userMax().z;
triple a=(x,y,Zmin);
triple b=(x,y,Zmax);
@@ -893,14 +893,14 @@ void autoscale3(picture pic=currentpicture, axis axis)
if(!set) {
bounds mz;
- if(pic.userSetz) {
- mz=autoscale(pic.userMin.z,pic.userMax.z,pic.scale.z.scale);
+ if(pic.userSetz()) {
+ mz=autoscale(pic.userMin().z,pic.userMax().z,pic.scale.z.scale);
if(pic.scale.z.scale.logarithmic &&
- floor(pic.userMin.z) == floor(pic.userMax.z)) {
+ floor(pic.userMin().z) == floor(pic.userMax().z)) {
if(pic.scale.z.automin())
- pic.userMinz(floor(pic.userMin.z));
+ pic.userMinz(floor(pic.userMin().z));
if(pic.scale.z.automax())
- pic.userMaxz(ceil(pic.userMax.z));
+ pic.userMaxz(ceil(pic.userMax().z));
}
} else {mz.min=mz.max=0; pic.scale.set=false;}
@@ -938,9 +938,9 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
newticks=true;
}
- if(newticks && pic.userSetx && ticks != NoTicks3) {
- if(xmin == -infinity) xmin=pic.userMin.x;
- if(xmax == infinity) xmax=pic.userMax.x;
+ if(newticks && pic.userSetx() && ticks != NoTicks3) {
+ if(xmin == -infinity) xmin=pic.userMin().x;
+ if(xmax == infinity) xmax=pic.userMax().x;
bounds mx=autoscale(xmin,xmax,pic.scale.x.scale);
pic.scale.x.tickMin=mx.min;
pic.scale.x.tickMax=mx.max;
@@ -952,15 +952,15 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
if(xmin == -infinity && !axis.extend) {
if(pic.scale.set)
xmin=pic.scale.x.automin() ? pic.scale.x.tickMin :
- max(pic.scale.x.tickMin,pic.userMin.x);
- else xmin=pic.userMin.x;
+ max(pic.scale.x.tickMin,pic.userMin().x);
+ else xmin=pic.userMin().x;
}
if(xmax == infinity && !axis.extend) {
if(pic.scale.set)
xmax=pic.scale.x.automax() ? pic.scale.x.tickMax :
- min(pic.scale.x.tickMax,pic.userMax.x);
- else xmax=pic.userMax.x;
+ min(pic.scale.x.tickMax,pic.userMax().x);
+ else xmax=pic.userMax().x;
}
if(L.defaultposition) {
@@ -971,7 +971,7 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.normal;
- back=dot((0,pic.userMax.y-pic.userMin.y,0),v)*sgn(v.z) > 0;
+ back=dot((0,pic.userMax().y-pic.userMin().y,0),v)*sgn(v.z) > 0;
}
xaxis3At(pic,L,axis,xmin,xmax,p,ticks,arrow,margin,above,false,false,!back);
@@ -1012,9 +1012,9 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
newticks=true;
}
- if(newticks && pic.userSety && ticks != NoTicks3) {
- if(ymin == -infinity) ymin=pic.userMin.y;
- if(ymax == infinity) ymax=pic.userMax.y;
+ if(newticks && pic.userSety() && ticks != NoTicks3) {
+ if(ymin == -infinity) ymin=pic.userMin().y;
+ if(ymax == infinity) ymax=pic.userMax().y;
bounds my=autoscale(ymin,ymax,pic.scale.y.scale);
pic.scale.y.tickMin=my.min;
pic.scale.y.tickMax=my.max;
@@ -1026,16 +1026,16 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
if(ymin == -infinity && !axis.extend) {
if(pic.scale.set)
ymin=pic.scale.y.automin() ? pic.scale.y.tickMin :
- max(pic.scale.y.tickMin,pic.userMin.y);
- else ymin=pic.userMin.y;
+ max(pic.scale.y.tickMin,pic.userMin().y);
+ else ymin=pic.userMin().y;
}
if(ymax == infinity && !axis.extend) {
if(pic.scale.set)
ymax=pic.scale.y.automax() ? pic.scale.y.tickMax :
- min(pic.scale.y.tickMax,pic.userMax.y);
- else ymax=pic.userMax.y;
+ min(pic.scale.y.tickMax,pic.userMax().y);
+ else ymax=pic.userMax().y;
}
if(L.defaultposition) {
@@ -1046,7 +1046,7 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.normal;
- back=dot((pic.userMax.x-pic.userMin.x,0,0),v)*sgn(v.z) > 0;
+ back=dot((pic.userMax().x-pic.userMin().x,0,0),v)*sgn(v.z) > 0;
}
yaxis3At(pic,L,axis,ymin,ymax,p,ticks,arrow,margin,above,false,false,!back);
@@ -1087,9 +1087,9 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
newticks=true;
}
- if(newticks && pic.userSetz && ticks != NoTicks3) {
- if(zmin == -infinity) zmin=pic.userMin.z;
- if(zmax == infinity) zmax=pic.userMax.z;
+ if(newticks && pic.userSetz() && ticks != NoTicks3) {
+ if(zmin == -infinity) zmin=pic.userMin().z;
+ if(zmax == infinity) zmax=pic.userMax().z;
bounds mz=autoscale(zmin,zmax,pic.scale.z.scale);
pic.scale.z.tickMin=mz.min;
pic.scale.z.tickMax=mz.max;
@@ -1101,15 +1101,15 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
if(zmin == -infinity && !axis.extend) {
if(pic.scale.set)
zmin=pic.scale.z.automin() ? pic.scale.z.tickMin :
- max(pic.scale.z.tickMin,pic.userMin.z);
- else zmin=pic.userMin.z;
+ max(pic.scale.z.tickMin,pic.userMin().z);
+ else zmin=pic.userMin().z;
}
if(zmax == infinity && !axis.extend) {
if(pic.scale.set)
zmax=pic.scale.z.automax() ? pic.scale.z.tickMax :
- min(pic.scale.z.tickMax,pic.userMax.z);
- else zmax=pic.userMax.z;
+ min(pic.scale.z.tickMax,pic.userMax().z);
+ else zmax=pic.userMax().z;
}
if(L.defaultposition) {
@@ -1120,7 +1120,7 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.vector();
- back=dot((pic.userMax.x-pic.userMin.x,0,0),v)*sgn(v.y) > 0;
+ back=dot((pic.userMax().x-pic.userMin().x,0,0),v)*sgn(v.y) > 0;
}
zaxis3At(pic,L,axis,zmin,zmax,p,ticks,arrow,margin,above,false,false,!back);
@@ -1144,15 +1144,15 @@ void zlimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bounds mz;
if(pic.scale.z.automin() || pic.scale.z.automax())
- mz=autoscale(pic.userMin.z,pic.userMax.z,pic.scale.z.scale);
+ mz=autoscale(pic.userMin().z,pic.userMax().z,pic.scale.z.scale);
if(pic.scale.z.automin) {
if(pic.scale.z.automin()) pic.userMinz(mz.min);
- } else pic.userMinz(pic.scale.z.T(min));
+ } else pic.userMinz(min(pic.scale.z.T(min),pic.scale.z.T(max)));
if(pic.scale.z.automax) {
if(pic.scale.z.automax()) pic.userMaxz(mz.max);
- } else pic.userMaxz(pic.scale.z.T(max));
+ } else pic.userMaxz(max(pic.scale.z.T(min),pic.scale.z.T(max)));
}
// Restrict the x, y, and z limits to box(min,max).
diff --git a/Build/source/utils/asymptote/base/grid3.asy b/Build/source/utils/asymptote/base/grid3.asy
index afd621eb741..98e043a71d7 100644
--- a/Build/source/utils/asymptote/base/grid3.asy
+++ b/Build/source/utils/asymptote/base/grid3.asy
@@ -33,18 +33,20 @@ struct grid3 {
typedef grid3 grid3routine(picture pic);
-triple X(picture pic) {return (pic.userMax.x,pic.userMin.y,pic.userMin.z);}
-triple XY(picture pic) {return (pic.userMax.x,pic.userMax.y,pic.userMin.z);}
-triple Y(picture pic) {return (pic.userMin.x,pic.userMax.y,pic.userMin.z);}
-triple YZ(picture pic) {return (pic.userMin.x,pic.userMax.y,pic.userMax.z);}
-triple Z(picture pic) {return (pic.userMin.x,pic.userMin.y,pic.userMax.z);}
-triple ZX(picture pic) {return (pic.userMax.x,pic.userMin.y,pic.userMax.z);}
+triple X(picture pic) {return (pic.userMax().x,pic.userMin().y,pic.userMin().z);}
+triple XY(picture pic) {return (pic.userMax().x,pic.userMax().y,pic.userMin().z);}
+triple Y(picture pic) {return (pic.userMin().x,pic.userMax().y,pic.userMin().z);}
+triple YZ(picture pic) {return (pic.userMin().x,pic.userMax().y,pic.userMax().z);}
+triple Z(picture pic) {return (pic.userMin().x,pic.userMin().y,pic.userMax().z);}
+triple ZX(picture pic) {return (pic.userMax().x,pic.userMin().y,pic.userMax().z);}
grid3routine XYgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--X(pic),Y(pic)--XY(pic),pic.userMin--Z(pic),
- pic.userMin.x,pic.userMax.x,pos,pic.scale.x);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--X(pic),Y(pic)--XY(pic),m--Z(pic),
+ m.x,M.x,pos,pic.scale.x);
return og;
};
};
@@ -53,8 +55,10 @@ grid3routine XYgrid=XYgrid();
grid3routine YXgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--Y(pic),X(pic)--XY(pic),pic.userMin--Z(pic),
- pic.userMin.y,pic.userMax.y,pos,pic.scale.y);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--Y(pic),X(pic)--XY(pic),m--Z(pic),
+ m.y,M.y,pos,pic.scale.y);
return og;
};
};
@@ -64,8 +68,10 @@ grid3routine YXgrid=YXgrid();
grid3routine XZgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--X(pic),Z(pic)--ZX(pic),pic.userMin--Y(pic),
- pic.userMin.x,pic.userMax.x,pos,pic.scale.x);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--X(pic),Z(pic)--ZX(pic),m--Y(pic),
+ m.x,M.x,pos,pic.scale.x);
return og;
};
};
@@ -74,8 +80,10 @@ grid3routine XZgrid=XZgrid();
grid3routine ZXgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--Z(pic),X(pic)--ZX(pic),pic.userMin--Y(pic),
- pic.userMin.z,pic.userMax.z,pos,pic.scale.z);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--Z(pic),X(pic)--ZX(pic),m--Y(pic),
+ m.z,M.z,pos,pic.scale.z);
return og;
};
};
@@ -84,8 +92,10 @@ grid3routine ZXgrid=ZXgrid();
grid3routine YZgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--Y(pic),Z(pic)--YZ(pic),pic.userMin--X(pic),
- pic.userMin.y,pic.userMax.y,pos,pic.scale.y);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--Y(pic),Z(pic)--YZ(pic),m--X(pic),
+ m.y,M.y,pos,pic.scale.y);
return og;
};
};
@@ -94,8 +104,10 @@ grid3routine YZgrid=YZgrid();
grid3routine ZYgrid(position pos=Relative(0)) {
return new grid3(picture pic) {
grid3 og;
- og.create(pic,pic.userMin--Z(pic),Y(pic)--YZ(pic),pic.userMin--X(pic),
- pic.userMin.z,pic.userMax.z,pos,pic.scale.z);
+ triple m=pic.userMin();
+ triple M=pic.userMax();
+ og.create(pic,m--Z(pic),Y(pic)--YZ(pic),m--X(pic),
+ m.z,M.z,pos,pic.scale.z);
return og;
};
};
diff --git a/Build/source/utils/asymptote/base/math.asy b/Build/source/utils/asymptote/base/math.asy
index 0dfddff7f2f..77c0664895f 100644
--- a/Build/source/utils/asymptote/base/math.asy
+++ b/Build/source/utils/asymptote/base/math.asy
@@ -113,6 +113,30 @@ real[] partialsum(real[] a, real[] dx)
return b;
}
+// Given an integer array a, return its partial sums.
+int[] partialsum(int[] a)
+{
+ int[] b=new int[a.length];
+ int sum=0;
+ for(int i=0; i < a.length; ++i) {
+ sum += a[i];
+ b[i]=sum;
+ }
+ return b;
+}
+
+// Given an integer array a, return its partial dx-weighted sums.
+int[] partialsum(int[] a, int[] dx)
+{
+ int[] b=new int[a.length];
+ int sum=0;
+ for(int i=0; i < a.length; ++i) {
+ sum += a[i]*dx[i];
+ b[i]=sum;
+ }
+ return b;
+}
+
// If strict=false, return whether i > j implies a[i] >= a[j]
// If strict=true, return whether i > j implies a[i] > a[j]
bool increasing(real[] a, bool strict=false)
@@ -232,11 +256,12 @@ bool rectangular(triple[][] m)
// size of picture pic.
void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen)
{
- pic.add(new void (frame f, transform t, transform, pair m, pair M) {
+ pic.add(new void (frame f, transform t, transform T, pair m, pair M) {
// Reduce the bounds by the size of the pen.
m -= min(p); M -= max(p);
// Calculate the points and direction vector in the transformed space.
+ t=t*T;
pair z=t*P;
pair v=t*Q-z;
diff --git a/Build/source/utils/asymptote/base/palette.asy b/Build/source/utils/asymptote/base/palette.asy
index 41a40a04a85..88f8ae2c42f 100644
--- a/Build/source/utils/asymptote/base/palette.asy
+++ b/Build/source/utils/asymptote/base/palette.asy
@@ -138,6 +138,18 @@ void image(picture pic=currentpicture, pen[][] data, pair initial, pair final,
pic.addBox(initial,final);
}
+void image(picture pic=currentpicture, pen f(int, int), int width, int height,
+ pair initial, pair final, bool antialias=false)
+{
+ initial=Scale(pic,initial);
+ final=Scale(pic,final);
+
+ pic.add(new void(frame F, transform t) {
+ _image(F,f,width,height,initial,final,t,antialias=antialias);
+ },true);
+ pic.addBox(initial,final);
+}
+
bounds image(picture pic=currentpicture, pair[] z, real[] f,
range range=Full, pen[] palette)
{
diff --git a/Build/source/utils/asymptote/base/plain_arrows.asy b/Build/source/utils/asymptote/base/plain_arrows.asy
index 490f76f777c..59b65aa4126 100644
--- a/Build/source/utils/asymptote/base/plain_arrows.asy
+++ b/Build/source/utils/asymptote/base/plain_arrows.asy
@@ -469,30 +469,87 @@ void draw(frame f, path g, pen p=currentpen, arrowbar arrow)
add(f,pic.fit());
}
-void draw(picture pic=currentpicture, Label L="", path g, align align=NoAlign,
- pen p=currentpen, arrowbar arrow=None, arrowbar bar=None,
- margin margin=NoMargin, Label legend="", marker marker=nomarker)
-{
- Label L=L.copy();
- L.align(align);
- if(marker != nomarker && !marker.above) marker.mark(pic,g);
- bool drawpath=arrow(pic,g,p,margin);
- if(bar(pic,g,p,margin) && drawpath) _draw(pic,g,p,margin);
- if(L.s != "") {
- L.p(p);
- L.out(pic,g);
+void draw(picture pic=currentpicture, Label L=null, path g,
+ align align=NoAlign, pen p=currentpen, arrowbar arrow=None,
+ arrowbar bar=None, margin margin=NoMargin, Label legend=null,
+ marker marker=nomarker)
+{
+ // These if statements are ordered in such a way that the most common case
+ // (with just a path and a pen) executes the least bytecode.
+ if (marker == nomarker)
+ {
+ if (arrow == None && bar == None)
+ {
+ if (margin == NoMargin && size(nib(p)) == 0)
+ {
+ pic.addExactAbove(
+ new void(frame f, transform t, transform T, pair, pair) {
+ _draw(f,t*T*g,p);
+ });
+ pic.addPath(g,p);
+
+ // Jumping over else clauses takes time, so test if we can return
+ // here.
+ if (L == null && legend == null)
+ return;
+ }
+ else // With margin or polygonal pen.
+ {
+ _draw(pic, g, p, margin);
+ }
+ }
+ else /* arrow or bar */
+ {
+ // Note we are using & instead of && as both arrow and bar need to be
+ // called.
+ if (arrow(pic, g, p, margin) & bar(pic, g, p, margin))
+ _draw(pic, g, p, margin);
+ }
+
+ if(L != null && L.s != "") {
+ L=L.copy();
+ L.align(align);
+ L.p(p);
+ L.out(pic,g);
+ }
+
+ if(legend != null && legend.s != "") {
+ legend.p(p);
+ pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
+ }
}
- if(legend.s != "") {
- legend.p(p);
- pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
+ else /* marker != nomarker */
+ {
+ if(marker != nomarker && !marker.above) marker.mark(pic,g);
+
+ // Note we are using & instead of && as both arrow and bar need to be
+ // called.
+ if ((arrow == None || arrow(pic, g, p, margin)) &
+ (bar == None || bar(pic, g, p, margin)))
+ {
+ _draw(pic, g, p, margin);
+ }
+
+ if(L != null && L.s != "") {
+ L=L.copy();
+ L.align(align);
+ L.p(p);
+ L.out(pic,g);
+ }
+
+ if(legend != null && legend.s != "") {
+ legend.p(p);
+ pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
+ }
+
+ if(marker != nomarker && marker.above) marker.mark(pic,g);
}
- if(marker != nomarker && marker.above) marker.mark(pic,g);
}
// Draw a fixed-size line about the user-coordinate 'origin'.
-void draw(pair origin, picture pic=currentpicture, Label L="", path g,
+void draw(pair origin, picture pic=currentpicture, Label L=null, path g,
align align=NoAlign, pen p=currentpen, arrowbar arrow=None,
- arrowbar bar=None, margin margin=NoMargin, Label legend="",
+ arrowbar bar=None, margin margin=NoMargin, Label legend=null,
marker marker=nomarker)
{
picture opic;
@@ -501,21 +558,22 @@ void draw(pair origin, picture pic=currentpicture, Label L="", path g,
}
void draw(picture pic=currentpicture, explicit path[] g, pen p=currentpen,
- Label legend="", marker marker=nomarker)
+ Label legend=null, marker marker=nomarker)
{
+ // This could be optimized to size and draw the entire array as a batch.
for(int i=0; i < g.length-1; ++i)
draw(pic,g[i],p,marker);
if(g.length > 0) draw(pic,g[g.length-1],p,legend,marker);
}
void draw(picture pic=currentpicture, guide[] g, pen p=currentpen,
- Label legend="", marker marker=nomarker)
+ Label legend=null, marker marker=nomarker)
{
draw(pic,(path[]) g,p,legend,marker);
}
void draw(pair origin, picture pic=currentpicture, explicit path[] g,
- pen p=currentpen, Label legend="", marker marker=nomarker)
+ pen p=currentpen, Label legend=null, marker marker=nomarker)
{
picture opic;
draw(opic,g,p,legend,marker);
@@ -523,21 +581,23 @@ void draw(pair origin, picture pic=currentpicture, explicit path[] g,
}
void draw(pair origin, picture pic=currentpicture, guide[] g, pen p=currentpen,
- Label legend="", marker marker=nomarker)
+ Label legend=null, marker marker=nomarker)
{
draw(origin,pic,(path[]) g,p,legend,marker);
}
// Align an arrow pointing to b from the direction dir. The arrow is
// 'length' PostScript units long.
-void arrow(picture pic=currentpicture, Label L="", pair b, pair dir,
+void arrow(picture pic=currentpicture, Label L=null, pair b, pair dir,
real length=arrowlength, align align=NoAlign,
pen p=currentpen, arrowbar arrow=Arrow, margin margin=EndMargin)
{
- Label L=L.copy();
- if(L.defaultposition) L.position(0);
- L.align(L.align,dir);
- L.p(p);
+ if(L != null && L.s != "") {
+ L=L.copy();
+ if(L.defaultposition) L.position(0);
+ L.align(L.align,dir);
+ L.p(p);
+ }
marginT margin=margin(b--b,p); // Extract margin.begin and margin.end
pair a=(margin.begin+length+margin.end)*unit(dir);
draw(b,pic,L,a--(0,0),align,p,arrow,margin);
@@ -562,6 +622,7 @@ frame[] fit2(picture[] pictures, picture all)
}
// Fit an array of pictures simultaneously using the size of the first picture.
+// TODO: Remove unused arguments.
frame[] fit(string prefix="", picture[] pictures, string format="",
bool view=true, string options="", string script="",
projection P=currentprojection)
diff --git a/Build/source/utils/asymptote/base/plain_bounds.asy b/Build/source/utils/asymptote/base/plain_bounds.asy
new file mode 100644
index 00000000000..71c304da02f
--- /dev/null
+++ b/Build/source/utils/asymptote/base/plain_bounds.asy
@@ -0,0 +1,783 @@
+include plain_scaling;
+
+// After an transformation, produce new coordinate bounds. For paths that
+// have been added, this is only an approximation since it takes the bounds of
+// their transformed bounding box.
+private void addTransformedCoords(coords2 dest, transform t,
+ coords2 point, coords2 min, coords2 max)
+{
+ dest.push(t, point, point);
+
+ // Add in all 4 corner coords, to properly size rectangular pictures.
+ dest.push(t,min,min);
+ dest.push(t,min,max);
+ dest.push(t,max,min);
+ dest.push(t,max,max);
+}
+
+// Adds another sizing restriction to the coordinates, but only if it is
+// maximal, that is, if under some scaling, this coordinate could be the
+// largest.
+private void addIfMaximal(coord[] coords, real user, real truesize) {
+ // TODO: Test promoting coordinates for efficiency.
+
+ for (coord c : coords)
+ if (user <= c.user && truesize <= c.truesize)
+ // Not maximal.
+ return;
+
+ // The coordinate is not dominated by any existing extreme, so it is
+ // maximal and will be added, but first remove any coords it now dominates.
+ int i = 0;
+ while (i < coords.length) {
+ coord c = coords[i];
+ if (c.user <= user && c.truesize <= truesize)
+ coords.delete(i);
+ else
+ ++i;
+ }
+
+ // Add the coordinate to the extremes.
+ coords.push(coord.build(user, truesize));
+}
+
+private void addIfMaximal(coord[] dest, coord[] src)
+{
+ // This may be inefficient, as it rebuilds the coord struct when adding it.
+ for (coord c : src)
+ addIfMaximal(dest, c.user, c.truesize);
+}
+
+// Same as addIfMaximal, but testing for minimal coords.
+private void addIfMinimal(coord[] coords, real user, real truesize) {
+ for (coord c : coords)
+ if (user >= c.user && truesize >= c.truesize)
+ return;
+
+ int i = 0;
+ while (i < coords.length) {
+ coord c = coords[i];
+ if (c.user >= user && c.truesize >= truesize)
+ coords.delete(i);
+ else
+ ++i;
+ }
+
+ coords.push(coord.build(user, truesize));
+}
+
+private void addIfMinimal(coord[] dest, coord[] src)
+{
+ for (coord c : src)
+ addIfMinimal(dest, c.user, c.truesize);
+}
+
+// This stores a list of sizing bounds for picture data. If the object is
+// frozen, then it cannot be modified further, and therefore can be safely
+// passed by reference and stored in the sizing data for multiple pictures.
+private struct freezableBounds {
+ restricted bool frozen = false;
+ void freeze() {
+ frozen = true;
+ }
+
+ // Optional links to further (frozen) sizing data.
+ private freezableBounds[] links;
+
+ // Links to (frozen) sizing data that is transformed when added here.
+ private static struct transformedBounds {
+ transform t;
+ freezableBounds link;
+ };
+ private transformedBounds[] tlinks;
+
+ // The sizing data. It cannot be modified once this object is frozen.
+ private coords2 point, min, max;
+
+ // A bound represented by a path. Using the path instead of the bounding
+ // box means it will be accurate after a transformation by coordinates.
+ private path[] pathBounds;
+
+ // A bound represented by a path and a pen.
+ // As often many paths use the same pen, we store an array of paths.
+ private static struct pathpen {
+ path[] g; pen p;
+
+ void operator init(path g, pen p) {
+ this.g.push(g);
+ this.p = p;
+ }
+ }
+ private static pathpen operator *(transform t, pathpen pp) {
+ // Should the pen be transformed?
+ pathpen newpp;
+ for (path g : pp.g)
+ newpp.g.push(t*g);
+ newpp.p = pp.p;
+ return newpp;
+ }
+
+ // WARNING: Due to crazy optimizations, if this array is changed between an
+ // empty and non-empty state, the assignment of a method to
+ // addPath(path,pen) must also change.
+ private pathpen[] pathpenBounds;
+
+ // Once frozen, the sizing is immutable, and therefore we can compute and
+ // store the extremal coordinates.
+ public static struct extremes {
+ coord[] left, bottom, right, top;
+
+ void operator init(coord[] left, coord[] bottom,
+ coord[] right, coord[] top) {
+ this.left = left;
+ this.bottom = bottom;
+ this.right = right;
+ this.top = top;
+ }
+
+ }
+ private static void addMaxToExtremes(extremes e, pair user, pair truesize) {
+ addIfMaximal(e.right, user.x, truesize.x);
+ addIfMaximal(e.top, user.y, truesize.y);
+ }
+ private static void addMinToExtremes(extremes e, pair user, pair truesize) {
+ addIfMinimal(e.left, user.x, truesize.x);
+ addIfMinimal(e.bottom, user.y, truesize.y);
+ }
+ private static void addMaxToExtremes(extremes e, coords2 coords) {
+ addIfMaximal(e.right, coords.x);
+ addIfMaximal(e.top, coords.y);
+ }
+ private static void addMinToExtremes(extremes e, coords2 coords) {
+ addIfMinimal(e.left, coords.x);
+ addIfMinimal(e.bottom, coords.y);
+ }
+
+ private extremes cachedExtremes = null;
+
+ // Once frozen, getMutable returns a new object based on this one, which can
+ // be modified.
+ freezableBounds getMutable() {
+ assert(frozen);
+ var f = new freezableBounds;
+ f.links.push(this);
+ return f;
+ }
+
+ freezableBounds transformed(transform t) {
+ // Freeze these bounds, as we are storing a reference to them.
+ freeze();
+
+ var tlink = new transformedBounds;
+ tlink.t = t;
+ tlink.link = this;
+
+ var b = new freezableBounds;
+ b.tlinks.push(tlink);
+
+ return b;
+ }
+
+ void append(freezableBounds b) {
+ // Check that we can modify the object.
+ assert(!frozen);
+
+ //TODO: If b is "small", ie. a single tlink or cliplink, just copy the
+ //link.
+
+ // As we only reference b, we must freeze it to ensure it does not change.
+ b.freeze();
+ links.push(b);
+ }
+
+ void addPoint(pair user, pair truesize) {
+ assert(!frozen);
+ point.push(user, truesize);
+ }
+
+ void addBox(pair userMin, pair userMax, pair trueMin, pair trueMax) {
+ assert(!frozen);
+ this.min.push(userMin, trueMin);
+ this.max.push(userMax, trueMax);
+ }
+
+ void addPath(path g) {
+ // This, and other asserts have been removed to speed things up slightly.
+ //assert(!frozen);
+ this.pathBounds.push(g);
+ }
+
+ void addPath(path[] g) {
+ //assert(!frozen);
+ this.pathBounds.append(g);
+ }
+
+ // To squeeze out a bit more performance, this method is either assigned
+ // addPathToNonEmptyArray or addPathToEmptyArray depending on the state of
+ // the pathpenBounds array.
+ void addPath(path g, pen p);
+
+ private void addPathToNonEmptyArray(path g, pen p) {
+ //assert(!frozen);
+ //assert(!pathpenBounds.empty());
+ var pp = pathpenBounds[0];
+
+ // Test if the pens are equal or have the same bounds.
+ if (pp.p == p || (min(pp.p) == min(p) && max(pp.p) == max(p))) {
+ // If this path has the same pen as the last one, just add it to the
+ // array corresponding to that pen.
+ pp.g.push(g);
+ }
+ else {
+ // A different pen. Start a new bound and put it on the front. Put
+ // the old bound at the end of the array.
+ pathpenBounds[0] = pathpen(g,p);
+ pathpenBounds.push(pp);
+ }
+ }
+ void addPathToEmptyArray(path g, pen p) {
+ //assert(!frozen);
+ //assert(pathpenBounds.empty());
+
+ pathpenBounds.push(pathpen(g,p));
+ addPath = addPathToNonEmptyArray;
+ }
+
+ // Initial setting for addPath.
+ addPath = addPathToEmptyArray;
+
+ // Transform the sizing info by t then add the result to the coords
+ // structure.
+ private void accumulateCoords(transform t, coords2 coords) {
+ for (var link : links)
+ link.accumulateCoords(t, coords);
+
+ for (var tlink : tlinks)
+ tlink.link.accumulateCoords(t*tlink.t, coords);
+
+ addTransformedCoords(coords, t, this.point, this.min, this.max);
+
+ for (var g : pathBounds) {
+ g = t*g;
+ coords.push(min(g), (0,0));
+ coords.push(max(g), (0,0));
+ }
+
+ for (var pp: pathpenBounds) {
+ pair pm = min(pp.p), pM = max(pp.p);
+ for (var g : pp.g) {
+ g = t*g;
+ coords.push(min(g), pm);
+ coords.push(max(g), pM);
+ }
+ }
+ }
+
+ // Add all of the sizing info to the given coords structure.
+ private void accumulateCoords(coords2 coords) {
+ for (var link : links)
+ link.accumulateCoords(coords);
+
+ for (var tlink : tlinks)
+ tlink.link.accumulateCoords(tlink.t, coords);
+
+ coords.append(this.point);
+ coords.append(this.min);
+ coords.append(this.max);
+
+ for (var g : pathBounds) {
+ coords.push(min(g), (0,0));
+ coords.push(max(g), (0,0));
+ }
+
+ for (var pp: pathpenBounds) {
+ pair pm = min(pp.p), pM = max(pp.p);
+ for (var g : pp.g) {
+ coords.push(min(g), pm);
+ coords.push(max(g), pM);
+ }
+ }
+ }
+
+ // Returns all of the coords that this sizing data represents.
+ private coords2 allCoords() {
+ coords2 coords;
+ accumulateCoords(coords);
+ return coords;
+ }
+
+ private void addLocalsToExtremes(transform t, extremes e) {
+ coords2 coords;
+ addTransformedCoords(coords, t, this.point, this.min, this.max);
+ addMinToExtremes(e, coords);
+ addMaxToExtremes(e, coords);
+
+ if (pathBounds.length > 0) {
+ addMinToExtremes(e, minAfterTransform(t, pathBounds), (0,0));
+ addMaxToExtremes(e, maxAfterTransform(t, pathBounds), (0,0));
+ }
+
+ for (var pp : pathpenBounds) {
+ if (pp.g.length > 0) {
+ addMinToExtremes(e, minAfterTransform(t, pp.g), min(pp.p));
+ addMaxToExtremes(e, maxAfterTransform(t, pp.g), max(pp.p));
+ }
+ }
+ }
+
+ private void addToExtremes(transform t, extremes e) {
+ for (var link : links)
+ link.addToExtremes(t, e);
+
+ for (var tlink : tlinks)
+ tlink.link.addToExtremes(t*tlink.t, e);
+
+ addLocalsToExtremes(t, e);
+ }
+
+ private void addLocalsToExtremes(extremes e) {
+ addMinToExtremes(e, point);
+ addMaxToExtremes(e, point);
+ addMinToExtremes(e, min);
+ addMaxToExtremes(e, max);
+
+ if (pathBounds.length > 0) {
+ addMinToExtremes(e, min(pathBounds), (0,0));
+ addMaxToExtremes(e, max(pathBounds), (0,0));
+ }
+
+ for (var pp : pathpenBounds) {
+ if (pp.g.length > 0) {
+ addMinToExtremes(e, min(pp.g), min(pp.p));
+ addMaxToExtremes(e, max(pp.g), max(pp.p));
+ }
+ }
+ }
+
+ private void addToExtremes(extremes e) {
+ for (var link : links)
+ link.addToExtremes(e);
+
+ for (var tlink : tlinks)
+ tlink.link.addToExtremes(tlink.t, e);
+
+ addLocalsToExtremes(e);
+ }
+
+ private static void write(extremes e) {
+ static void write(coord[] coords) {
+ for (coord c : coords)
+ write(" " + (string)c.user + " u + " + (string)c.truesize);
+ }
+ write("left:");
+ write(e.left);
+ write("bottom:");
+ write(e.bottom);
+ write("right:");
+ write(e.right);
+ write("top:");
+ write(e.top);
+ }
+
+ // Returns the extremal coordinates of the sizing data.
+ public extremes extremes() {
+ if (cachedExtremes == null) {
+ freeze();
+
+ extremes e;
+ addToExtremes(e);
+ cachedExtremes = e;
+ }
+
+ return cachedExtremes;
+ }
+
+ // Helper functions for computing the usersize bounds. usermin and usermax
+ // would be easily computable from extremes, except that the picture
+ // interface actually allows calls that manually change the usermin and
+ // usermax values. Therefore, we have to compute these values separately.
+ private static struct bounds {
+ bool areSet=false;
+ pair min;
+ pair max;
+ }
+ private static struct boundsAccumulator {
+ pair[] mins;
+ pair[] maxs;
+
+ void push(pair m, pair M) {
+ mins.push(m);
+ maxs.push(M);
+ }
+
+ void push(bounds b) {
+ if (b.areSet)
+ push(b.min, b.max);
+ }
+
+ void push(transform t, bounds b) {
+ if (b.areSet) {
+ pair[] box = { t*(b.min.x,b.max.y), t*b.max,
+ t*b.min.x, t*(b.min.x,b.max.y) };
+ for (var z : box)
+ push(z,z);
+ }
+ }
+
+ void pushUserCoords(coords2 min, coords2 max) {
+ int n = min.x.length;
+ assert(min.y.length == n);
+ assert(max.x.length == n);
+ assert(max.y.length == n);
+
+ for (int i = 0; i < n; ++i)
+ push((min.x[i].user, min.y[i].user),
+ (max.x[i].user, max.y[i].user));
+ }
+
+ bounds collapse() {
+ bounds b;
+ if (mins.length > 0) {
+ b.areSet = true;
+ b.min = minbound(mins);
+ b.max = maxbound(maxs);
+ }
+ else {
+ b.areSet = false;
+ }
+ return b;
+ }
+ }
+
+ // The user bounds already calculated for this data.
+ private bounds storedUserBounds = null;
+
+ private void accumulateUserBounds(boundsAccumulator acc)
+ {
+ if (storedUserBounds != null) {
+ assert(frozen);
+ acc.push(storedUserBounds);
+ } else {
+ acc.pushUserCoords(point, point);
+ acc.pushUserCoords(min, max);
+ if (pathBounds.length > 0)
+ acc.push(min(pathBounds), max(pathBounds));
+ for (var pp : pathpenBounds)
+ acc.push(min(pp.g), max(pp.g));
+ for (var link : links)
+ link.accumulateUserBounds(acc);
+
+ // Transforms are handled as they were in the old system.
+ for (var tlink : tlinks) {
+ boundsAccumulator tacc;
+ tlink.link.accumulateUserBounds(tacc);
+ acc.push(tlink.t, tacc.collapse());
+ }
+ }
+ }
+
+ private void computeUserBounds() {
+ freeze();
+ boundsAccumulator acc;
+ accumulateUserBounds(acc);
+ storedUserBounds = acc.collapse();
+ }
+
+ private bounds userBounds() {
+ if (storedUserBounds == null)
+ computeUserBounds();
+
+ assert(storedUserBounds != null);
+ return storedUserBounds;
+ }
+
+ // userMin/userMax returns the minimal/maximal userspace coordinate of the
+ // sizing data. As coordinates for objects such as labels can have
+ // significant truesize dimensions, this userMin/userMax values may not
+ // correspond closely to the end of the screen, and are of limited use.
+ // userSetx and userSety determine if there is sizing data in order to even
+ // have userMin/userMax defined.
+ public bool userBoundsAreSet() {
+ return userBounds().areSet;
+ }
+
+ public pair userMin() {
+ return userBounds().min;
+ }
+ public pair userMax() {
+ return userBounds().max;
+ }
+
+ // To override the true userMin and userMax bounds, first compute the
+ // userBounds as they should be at this point, then change the values.
+ public void alterUserBound(string which, real val) {
+ // We are changing the bounds data, so it cannot be frozen yet. After the
+ // user bounds are set, however, the sizing data cannot change, so it will
+ // be frozen.
+ assert(!frozen);
+ computeUserBounds();
+ assert(frozen);
+
+ var b = storedUserBounds;
+ if (which == "minx")
+ b.min = (val, b.min.y);
+ else if (which == "miny")
+ b.min = (b.min.x, val);
+ else if (which == "maxx")
+ b.max = (val, b.max.y);
+ else {
+ assert(which == "maxy");
+ b.max = (b.max.x, val);
+ }
+ }
+
+ // A temporary measure. Stuffs all of the data from the links and paths
+ // into the coords.
+ private void flatten() {
+ assert(!frozen);
+
+ // First, compute the user bounds, taking into account any manual
+ // alterations.
+ computeUserBounds();
+
+ // Calculate all coordinates.
+ coords2 coords = allCoords();
+
+ // Erase all the old data.
+ point.erase();
+ min.erase();
+ max.erase();
+ pathBounds.delete();
+ pathpenBounds.delete();
+ addPath = addPathToEmptyArray;
+ links.delete();
+ tlinks.delete();
+
+ // Put all of the coordinates into point.
+ point = coords;
+ }
+
+ void xclip(real Min, real Max) {
+ assert(!frozen);
+ flatten();
+ point.xclip(Min,Max);
+ min.xclip(Min,Max);
+ max.xclip(Min,Max);
+
+ // Cap the userBounds.
+ bounds b = storedUserBounds;
+ b.min = (max(Min, b.min.x), b.min.y);
+ b.max = (min(Max, b.max.x), b.max.y);
+ }
+
+ void yclip(real Min, real Max) {
+ assert(!frozen);
+ flatten();
+ point.yclip(Min,Max);
+ min.yclip(Min,Max);
+ max.yclip(Min,Max);
+
+ // Cap the userBounds.
+ bounds b = storedUserBounds;
+ b.min = (b.min.x, max(Min, b.min.y));
+ b.max = (b.max.x, min(Max, b.max.y));
+ }
+
+ // Calculate the min for the final frame, given the coordinate transform.
+ pair min(transform t) {
+ extremes e = extremes();
+ if (e.left.length == 0)
+ return 0;
+
+ pair a=t*(1,1)-t*(0,0), b=t*(0,0);
+ scaling xs=scaling.build(a.x,b.x);
+ scaling ys=scaling.build(a.y,b.y);
+
+ return (min(infinity, xs, e.left), min(infinity, ys, e.bottom));
+ }
+
+ // Calculate the max for the final frame, given the coordinate transform.
+ pair max(transform t) {
+ extremes e = extremes();
+ if (e.right.length == 0)
+ return 0;
+
+ pair a=t*(1,1)-t*(0,0), b=t*(0,0);
+ scaling xs=scaling.build(a.x,b.x);
+ scaling ys=scaling.build(a.y,b.y);
+
+ return (max(-infinity, xs, e.right), max(-infinity, ys, e.top));
+ }
+
+ // Returns the transform for turning user-space pairs into true-space pairs.
+ transform scaling(real xsize, real ysize,
+ real xunitsize, real yunitsize,
+ bool keepAspect, bool warn) {
+ if(xsize == 0 && xunitsize == 0 && ysize == 0 && yunitsize == 0)
+ return identity();
+
+ // Get the extremal coordinates.
+ extremes e = extremes();
+
+ real sx;
+ if(xunitsize == 0) {
+ if(xsize != 0) sx=calculateScaling("x",e.left,e.right,xsize,warn);
+ } else sx=xunitsize;
+
+ /* Possible alternative code :
+ real sx = xunitsize != 0 ? xunitsize :
+ xsize != 0 ? calculateScaling("x", Coords.x, xsize, warn) :
+ 0; */
+
+ real sy;
+ if(yunitsize == 0) {
+ if(ysize != 0) sy=calculateScaling("y",e.bottom,e.top,ysize,warn);
+ } else sy=yunitsize;
+
+ if(sx == 0) {
+ sx=sy;
+ if(sx == 0)
+ return identity();
+ } else if(sy == 0) sy=sx;
+
+
+ if(keepAspect && (xunitsize == 0 || yunitsize == 0))
+ return scale(min(sx,sy));
+ else
+ return scale(sx,sy);
+ }
+}
+
+struct bounds {
+ private var base = new freezableBounds;
+
+ // We should probably put this back into picture.
+ bool exact = true;
+
+ // Called just before modifying the sizing data. It ensures base is
+ // non-frozen.
+ // Note that this is manually inlined for speed reasons in a couple often
+ // called methods below.
+ private void makeMutable() {
+ if (base.frozen)
+ base = base.getMutable();
+ //assert(!base.frozen); // Disabled for speed reasons.
+ }
+
+ void erase() {
+ // Just discard the old bounds.
+ base = new freezableBounds;
+
+ // We don't reset the 'exact' field, for backward compatibility.
+ }
+
+ bounds copy() {
+ // Freeze the underlying bounds and make a shallow copy.
+ base.freeze();
+
+ var b = new bounds;
+ b.base = this.base;
+ b.exact = this.exact;
+ return b;
+ }
+
+ bounds transformed(transform t) {
+ var b = new bounds;
+ b.base = base.transformed(t);
+ b.exact = this.exact;
+ return b;
+ }
+
+ void append(bounds b) {
+ makeMutable();
+ base.append(b.base);
+ }
+
+ void append(transform t, bounds b) {
+ // makeMutable will be called by append.
+ if (t == identity())
+ append(b);
+ else
+ append(b.transformed(t));
+ }
+
+ void addPoint(pair user, pair truesize) {
+ makeMutable();
+ base.addPoint(user, truesize);
+ }
+
+ void addBox(pair userMin, pair userMax, pair trueMin, pair trueMax) {
+ makeMutable();
+ base.addBox(userMin, userMax, trueMin, trueMax);
+ }
+
+ void addPath(path g) {
+ //makeMutable(); // Manually inlined here for speed reasons.
+ if (base.frozen)
+ base = base.getMutable();
+ base.addPath(g);
+ }
+
+ void addPath(path[] g) {
+ //makeMutable(); // Manually inlined here for speed reasons.
+ if (base.frozen)
+ base = base.getMutable();
+ base.addPath(g);
+ }
+
+ void addPath(path g, pen p) {
+ //makeMutable(); // Manually inlined here for speed reasons.
+ if (base.frozen)
+ base = base.getMutable();
+ base.addPath(g, p);
+ }
+
+ public bool userBoundsAreSet() {
+ return base.userBoundsAreSet();
+ }
+ public pair userMin() {
+ return base.userMin();
+ }
+ public pair userMax() {
+ return base.userMax();
+ }
+ public void alterUserBound(string which, real val) {
+ makeMutable();
+ base.alterUserBound(which, val);
+ }
+
+ void xclip(real Min, real Max) {
+ makeMutable();
+ base.xclip(Min,Max);
+ }
+
+ void yclip(real Min, real Max) {
+ makeMutable();
+ base.yclip(Min,Max);
+ }
+
+ void clip(pair Min, pair Max) {
+ // TODO: If the user bounds have been manually altered, they may be
+ // incorrect after the clip.
+ xclip(Min.x,Max.x);
+ yclip(Min.y,Max.y);
+ }
+
+ pair min(transform t) {
+ return base.min(t);
+ }
+
+ pair max(transform t) {
+ return base.max(t);
+ }
+
+ transform scaling(real xsize, real ysize,
+ real xunitsize, real yunitsize,
+ bool keepAspect, bool warn) {
+ return base.scaling(xsize, ysize, xunitsize, yunitsize, keepAspect, warn);
+ }
+}
+
+bounds operator *(transform t, bounds b) {
+ return b.transformed(t);
+}
diff --git a/Build/source/utils/asymptote/base/plain_constants.asy b/Build/source/utils/asymptote/base/plain_constants.asy
index d1d11b1b1c5..d41cfb770b8 100644
--- a/Build/source/utils/asymptote/base/plain_constants.asy
+++ b/Build/source/utils/asymptote/base/plain_constants.asy
@@ -63,6 +63,8 @@ restricted file stdout=output("");
void none(file file) {}
void endl(file file) {write(file,'\n',flush);}
void newl(file file) {write(file,'\n');}
+void DOSendl(file file) {write(file,'\r\n',flush);}
+void DOSnewl(file file) {write(file,'\r\n');}
void tab(file file) {write(file,'\t');}
void comma(file file) {write(file,',');}
typedef void suffix(file);
diff --git a/Build/source/utils/asymptote/base/plain_pens.asy b/Build/source/utils/asymptote/base/plain_pens.asy
index 5b0bdbd5879..fcf9d31e638 100644
--- a/Build/source/utils/asymptote/base/plain_pens.asy
+++ b/Build/source/utils/asymptote/base/plain_pens.asy
@@ -17,8 +17,8 @@ void defaultpen(real w) {defaultpen(linewidth(w));}
pen operator +(pen p, real w) {return p+linewidth(w);}
pen operator +(real w, pen p) {return linewidth(w)+p;}
-pen Dotted=dotted+1.0;
-pen Dotted(pen p=currentpen) {return dotted+2*linewidth(p);}
+pen Dotted(pen p=currentpen) {return linetype(new real[] {0,3})+2*linewidth(p);}
+pen Dotted=Dotted();
restricted pen squarecap=linecap(0);
restricted pen roundcap=linecap(1);
@@ -129,7 +129,7 @@ pen palegrey=palegray;
pen lightgrey=lightgray;
pen mediumgrey=mediumgray;
pen grey=gray;
-pen heavygrey=gray;
+pen heavygrey=heavygray;
pen deepgrey=deepgray;
pen darkgrey=darkgray;
diff --git a/Build/source/utils/asymptote/base/plain_picture.asy b/Build/source/utils/asymptote/base/plain_picture.asy
index 6764d885380..5b06b7f737c 100644
--- a/Build/source/utils/asymptote/base/plain_picture.asy
+++ b/Build/source/utils/asymptote/base/plain_picture.asy
@@ -1,114 +1,15 @@
-real camerafactor=2; // Factor used for camera adjustment.
+// Pre picture <<<1
+import plain_scaling;
+import plain_bounds;
+
+include plain_prethree;
+
+// This variable is required by asymptote.sty.
pair viewportsize=0; // Horizontal and vertical viewport limits.
restricted bool Aspect=true;
restricted bool IgnoreAspect=false;
-typedef real[][] transform3;
-restricted transform3 identity4=identity(4);
-
-// A uniform 3D scaling.
-transform3 scale3(real s)
-{
- transform3 t=identity(4);
- t[0][0]=t[1][1]=t[2][2]=s;
- return t;
-}
-
-// Simultaneous 3D scalings in the x, y, and z directions.
-transform3 scale(real x, real y, real z)
-{
- transform3 t=identity(4);
- t[0][0]=x;
- t[1][1]=y;
- t[2][2]=z;
- return t;
-}
-
-transform3 shiftless(transform3 t)
-{
- transform3 T=copy(t);
- T[0][3]=T[1][3]=T[2][3]=0;
- return T;
-}
-
-// A coordinate in "flex space." A linear combination of user and true-size
-// coordinates.
-struct coord {
- real user,truesize;
-
- // Build a coord.
- static coord build(real user, real truesize) {
- coord c=new coord;
- c.user=user;
- c.truesize=truesize;
- return c;
- }
-
- // Deep copy of coordinate. Users may add coords to the picture, but then
- // modify the struct. To prevent this from yielding unexpected results, deep
- // copying is used.
- coord copy() {
- return build(user, truesize);
- }
-
- void clip(real min, real max) {
- user=min(max(user,min),max);
- truesize=0;
- }
-}
-
-struct coords2 {
- coord[] x,y;
- void erase() {
- x.delete();
- y.delete();
- }
- // Only a shallow copy of the individual elements of x and y
- // is needed since, once entered, they are never modified.
- coords2 copy() {
- coords2 c=new coords2;
- c.x=copy(x);
- c.y=copy(y);
- return c;
- }
- void append(coords2 c) {
- x.append(c.x);
- y.append(c.y);
- }
- void push(pair user, pair truesize) {
- x.push(coord.build(user.x,truesize.x));
- y.push(coord.build(user.y,truesize.y));
- }
- void push(coord cx, coord cy) {
- x.push(cx);
- y.push(cy);
- }
- void push(transform t, coords2 c1, coords2 c2) {
- for(int i=0; i < c1.x.length; ++i) {
- coord cx=c1.x[i], cy=c2.y[i];
- pair tinf=shiftless(t)*(0,0);
- pair z=t*(cx.user,cy.user);
- pair w=(cx.truesize,cy.truesize);
- w=length(w)*unit(shiftless(t)*w);
- coord Cx,Cy;
- Cx.user=z.x;
- Cy.user=z.y;
- Cx.truesize=w.x;
- Cy.truesize=w.y;
- push(Cx,Cy);
- }
- }
- void xclip(real min, real max) {
- for(int i=0; i < x.length; ++i)
- x[i].clip(min,max);
- }
- void yclip(real min, real max) {
- for(int i=0; i < y.length; ++i)
- y[i].clip(min,max);
- }
-}
-
struct coords3 {
coord[] x,y,z;
void erase() {
@@ -159,89 +60,7 @@ struct coords3 {
}
}
-bool operator <= (coord a, coord b)
-{
- return a.user <= b.user && a.truesize <= b.truesize;
-}
-
-bool operator >= (coord a, coord b)
-{
- return a.user >= b.user && a.truesize >= b.truesize;
-}
-
-// Find the maximal elements of the input array, using the partial ordering
-// given.
-coord[] maxcoords(coord[] in, bool operator <= (coord,coord))
-{
- // As operator <= is defined in the parameter list, it has a special
- // meaning in the body of the function.
-
- coord best;
- coord[] c;
-
- int n=in.length;
-
- if(n == 0)
- return c;
-
- int first=0;
- // Add the first coord without checking restrictions (as there are none).
- best=in[first];
- c.push(best);
-
- static int NONE=-1;
-
- int dominator(coord x)
- {
- // This assumes it has already been checked against the best.
- for(int i=1; i < c.length; ++i)
- if(x <= c[i])
- return i;
- return NONE;
- }
-
- void promote(int i)
- {
- // Swap with the top
- coord x=c[i];
- c[i]=best;
- best=c[0]=x;
- }
-
- void addmaximal(coord x)
- {
- coord[] newc;
-
- // Check if it beats any others.
- for(int i=0; i < c.length; ++i) {
- coord y=c[i];
- if(!(y <= x))
- newc.push(y);
- }
- newc.push(x);
- c=newc;
- best=c[0];
- }
-
- void add(coord x)
- {
- if(x <= best)
- return;
- else {
- int i=dominator(x);
- if(i == NONE)
- addmaximal(x);
- else
- promote(i);
- }
- }
-
- for(int i=1; i < n; ++i)
- add(in[i]);
-
- return c;
-}
-
+// scaleT and Legend <<<
typedef real scalefcn(real x);
struct scaleT {
@@ -328,233 +147,9 @@ struct Legend {
}
}
-pair rectify(pair dir)
-{
- real scale=max(abs(dir.x),abs(dir.y));
- if(scale != 0) dir *= 0.5/scale;
- dir += (0.5,0.5);
- return dir;
-}
-
-pair point(frame f, pair dir)
-{
- pair m=min(f);
- pair M=max(f);
- return m+realmult(rectify(dir),M-m);
-}
-
-path[] align(path[] g, transform t=identity(), pair position,
- pair align, pen p=currentpen)
-{
- if(g.length == 0) return g;
- pair m=min(g);
- pair M=max(g);
- pair dir=rectify(inverse(t)*-align);
- if(basealign(p) == 1)
- dir -= (0,m.y/(M.y-m.y));
- pair a=m+realmult(dir,M-m);
- return shift(position+align*labelmargin(p))*t*shift(-a)*g;
-}
-
-// Returns a transform for aligning frame f in the direction align
-transform shift(frame f, pair align)
-{
- return shift(align-point(f,-align));
-}
-
-// Returns a copy of frame f aligned in the direction align
-frame align(frame f, pair align)
-{
- return shift(f,align)*f;
-}
-
-struct transformation {
- transform3 modelview; // For orientation and positioning
- transform3 projection; // For 3D to 2D projection
- bool infinity;
- void operator init(transform3 modelview) {
- this.modelview=modelview;
- this.projection=identity4;
- infinity=true;
- }
- void operator init(transform3 modelview, transform3 projection) {
- this.modelview=modelview;
- this.projection=projection;
- infinity=false;
- }
- transform3 compute() {
- return infinity ? modelview : projection*modelview;
- }
- transformation copy() {
- transformation T=new transformation;
- T.modelview=copy(modelview);
- T.projection=copy(projection);
- T.infinity=infinity;
- return T;
- }
-}
-
-struct projection {
- transform3 t; // projection*modelview (cached)
- bool infinity;
- bool absolute=false;
- triple camera; // Position of camera.
- triple up; // A vector that should be projected to direction (0,1).
- triple target; // Point where camera is looking at.
- triple normal; // Normal vector from target to projection plane.
- pair viewportshift; // Fractional viewport shift.
- real zoom=1; // Zoom factor.
- real angle; // Lens angle (for perspective projection).
- bool showtarget=true; // Expand bounding volume to include target?
- typedef transformation projector(triple camera, triple up, triple target);
- projector projector;
- bool autoadjust=true; // Adjust camera to lie outside bounding volume?
- bool center=false; // Center target within bounding volume?
- int ninterpolate; // Used for projecting nurbs to 2D Bezier curves.
- bool bboxonly=true; // Typeset label bounding box only.
-
- transformation T;
-
- void calculate() {
- T=projector(camera,up,target);
- t=T.compute();
- infinity=T.infinity;
- ninterpolate=infinity ? 1 : 16;
- }
-
- triple vector() {
- return camera-target;
- }
-
- void operator init(triple camera, triple up=(0,0,1), triple target=(0,0,0),
- triple normal=camera-target,
- real zoom=1, real angle=0, pair viewportshift=0,
- bool showtarget=true, bool autoadjust=true,
- bool center=false, projector projector) {
- this.camera=camera;
- this.up=up;
- this.target=target;
- this.normal=normal;
- this.zoom=zoom;
- this.angle=angle;
- this.viewportshift=viewportshift;
- this.showtarget=showtarget;
- this.autoadjust=autoadjust;
- this.center=center;
- this.projector=projector;
- calculate();
- }
-
- projection copy() {
- projection P=new projection;
- P.t=t;
- P.infinity=infinity;
- P.absolute=absolute;
- P.camera=camera;
- P.up=up;
- P.target=target;
- P.normal=normal;
- P.zoom=zoom;
- P.angle=angle;
- P.viewportshift=viewportshift;
- P.showtarget=showtarget;
- P.autoadjust=autoadjust;
- P.center=center;
- P.projector=projector;
- P.ninterpolate=ninterpolate;
- P.bboxonly=bboxonly;
- P.T=T.copy();
- return P;
- }
-
- // Return the maximum distance of box(m,M) from target.
- real distance(triple m, triple M) {
- triple[] c={m,(m.x,m.y,M.z),(m.x,M.y,m.z),(m.x,M.y,M.z),
- (M.x,m.y,m.z),(M.x,m.y,M.z),(M.x,M.y,m.z),M};
- return max(abs(c-target));
- }
-
- // Move the camera so that the box(m,M) rotated about target will always
- // lie in front of the clipping plane.
- bool adjust(triple m, triple M) {
- triple v=camera-target;
- real d=distance(m,M);
- static real lambda=camerafactor*(1-sqrtEpsilon);
- if(lambda*d >= abs(v)) {
- camera=target+camerafactor*d*unit(v);
- calculate();
- return true;
- }
- return false;
- }
-}
-
-projection currentprojection;
-
-struct light {
- real[][] diffuse;
- real[][] ambient;
- real[][] specular;
- pen background=nullpen; // Background color of the 3D canvas.
- real specularfactor;
- bool viewport; // Are the lights specified (and fixed) in the viewport frame?
- triple[] position; // Only directional lights are currently implemented.
-
- transform3 T=identity(4); // Transform to apply to normal vectors.
+// >>>
- bool on() {return position.length > 0;}
-
- void operator init(pen[] diffuse,
- pen[] ambient=array(diffuse.length,black),
- pen[] specular=diffuse, pen background=nullpen,
- real specularfactor=1,
- bool viewport=false, triple[] position) {
- int n=diffuse.length;
- assert(ambient.length == n && specular.length == n && position.length == n);
-
- this.diffuse=new real[n][];
- this.ambient=new real[n][];
- this.specular=new real[n][];
- this.background=background;
- this.position=new triple[n];
- for(int i=0; i < position.length; ++i) {
- this.diffuse[i]=rgba(diffuse[i]);
- this.ambient[i]=rgba(ambient[i]);
- this.specular[i]=rgba(specular[i]);
- this.position[i]=unit(position[i]);
- }
- this.specularfactor=specularfactor;
- this.viewport=viewport;
- }
-
- void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
- pen background=nullpen, real specularfactor=1,
- bool viewport=false...triple[] position) {
- int n=position.length;
- operator init(array(n,diffuse),array(n,ambient),array(n,specular),
- background,specularfactor,viewport,position);
- }
-
- void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
- pen background=nullpen, bool viewport=false,
- real x, real y, real z) {
- operator init(diffuse,ambient,specular,background,viewport,(x,y,z));
- }
-
- void operator init(explicit light light) {
- diffuse=copy(light.diffuse);
- ambient=copy(light.ambient);
- specular=copy(light.specular);
- background=light.background;
- specularfactor=light.specularfactor;
- viewport=light.viewport;
- position=copy(light.position);
- }
-
- real[] background() {return rgba(background == nullpen ? white : background);}
-}
-
-light currentlight;
+// Frame Alignment was here
triple min3(pen p)
{
@@ -571,9 +166,34 @@ triple max3(pen p)
typedef void drawer(frame f, transform t);
// A generalization of drawer that includes the final frame's bounds.
+// TODO: Add documentation as to what T is.
typedef void drawerBound(frame f, transform t, transform T, pair lb, pair rt);
-struct picture {
+// PairOrTriple <<<1
+// This struct is used to represent a userMin/userMax which serves as both a
+// pair and a triple depending on the context.
+struct pairOrTriple {
+ real x,y,z;
+ void init() { x = y = z = 0; }
+};
+void copyPairOrTriple(pairOrTriple dest, pairOrTriple src)
+{
+ dest.x = src.x;
+ dest.y = src.y;
+ dest.z = src.z;
+}
+pair operator cast (pairOrTriple a) {
+ return (a.x, a.y);
+};
+triple operator cast (pairOrTriple a) {
+ return (a.x, a.y, a.z);
+}
+void write(pairOrTriple a) {
+ write((triple) a);
+}
+
+struct picture { // <<<1
+ // Nodes <<<2
// Three-dimensional version of drawer and drawerBound:
typedef void drawer3(frame f, transform3 t, picture pic, projection P);
typedef void drawerBound3(frame f, transform3 t, transform3 T,
@@ -585,39 +205,6 @@ struct picture {
bool uptodate=true;
- // The coordinates in flex space to be used in sizing the picture.
- struct bounds {
- coords2 point,min,max;
- bool exact=true; // An accurate picture bounds is provided by the user.
- void erase() {
- point.erase();
- min.erase();
- max.erase();
- }
- bounds copy() {
- bounds b=new bounds;
- b.point=point.copy();
- b.min=min.copy();
- b.max=max.copy();
- b.exact=exact;
- return b;
- }
- void xclip(real Min, real Max) {
- point.xclip(Min,Max);
- min.xclip(Min,Max);
- max.xclip(Min,Max);
- }
- void yclip(real Min, real Max) {
- point.yclip(Min,Max);
- min.yclip(Min,Max);
- max.yclip(Min,Max);
- }
- void clip(triple Min, triple Max) {
- xclip(Min.x,Max.x);
- yclip(Min.y,Max.y);
- }
- }
-
struct bounds3 {
coords3 point,min,max;
bool exact=true; // An accurate picture bounds is provided by the user.
@@ -639,14 +226,15 @@ struct picture {
bounds bounds;
bounds3 bounds3;
+ // Other Fields <<<2
// Transform to be applied to this picture.
transform T;
transform3 T3;
- // Cached user-space bounding box
- triple userMin,userMax;
- bool userSetx,userSety,userSetz;
-
+ // The internal representation of the 3D user bounds.
+ private pairOrTriple umin, umax;
+ private bool usetx, usety, usetz;
+
ScaleT scale; // Needed by graph
Legend[] legend;
@@ -669,9 +257,11 @@ struct picture {
bool fixed;
transform fixedscaling;
+ // Init and erase <<<2
void init() {
- userMin=userMax=(0,0,0);
- userSetx=userSety=userSetz=false;
+ umin.init();
+ umax.init();
+ usetx=usety=usetz=false;
T3=identity(4);
}
init();
@@ -688,6 +278,7 @@ struct picture {
init();
}
+ // Empty <<<2
bool empty2() {
return nodes.length == 0;
}
@@ -700,133 +291,175 @@ struct picture {
return empty2() && empty3();
}
- pair userMin() {return (userMin.x,userMin.y);}
- pair userMax() {return (userMax.x,userMax.y);}
+ // User min/max <<<2
+ pair userMin2() {return bounds.userMin(); }
+ pair userMax2() {return bounds.userMax(); }
- void userMinx(real x) {
- userMin=(x,userMin.y,userMin.z);
- userSetx=true;
+ bool userSetx2() { return bounds.userBoundsAreSet(); }
+ bool userSety2() { return bounds.userBoundsAreSet(); }
+
+ triple userMin3() { return umin; }
+ triple userMax3() { return umax; }
+
+ bool userSetx3() { return usetx; }
+ bool userSety3() { return usety; }
+ bool userSetz3() { return usetz; }
+
+ private typedef real binop(real, real);
+
+ // Helper functions for finding the minimum/maximum of two data, one of
+ // which may not be defined.
+ private static real merge(real x1, bool set1, real x2, bool set2, binop m)
+ {
+ return set1 ? (set2 ? m(x1,x2) : x1) : x2;
}
-
- void userMiny(real y) {
- userMin=(userMin.x,y,userMin.z);
- userSety=true;
+ private pairOrTriple userExtreme(pair u2(), triple u3(), binop m)
+ {
+ bool setx2 = userSetx2();
+ bool sety2 = userSety2();
+ bool setx3 = userSetx3();
+ bool sety3 = userSety3();
+
+ pair p;
+ if (setx2 || sety2)
+ p = u2();
+ triple t = u3();
+
+ pairOrTriple r;
+ r.x = merge(p.x, setx2, t.x, setx3, m);
+ r.y = merge(p.y, sety2, t.y, sety3, m);
+ r.z = t.z;
+
+ return r;
}
-
- void userMinz(real z) {
- userMin=(userMin.x,userMin.y,z);
- userSetz=true;
+
+ // The combination of 2D and 3D data.
+ pairOrTriple userMin() {
+ return userExtreme(userMin2, userMin3, min);
}
-
- void userMaxx(real x) {
- userMax=(x,userMax.y,userMax.z);
- userSetx=true;
+ pairOrTriple userMax() {
+ return userExtreme(userMax2, userMax3, max);
+ }
+
+ bool userSetx() { return userSetx2() || userSetx3(); }
+ bool userSety() { return userSety2() || userSety3(); }
+ bool userSetz() = userSetz3;
+
+ // Functions for setting the user bounds.
+ void userMinx3(real x) {
+ umin.x=x;
+ usetx=true;
}
- void userMaxy(real y) {
- userMax=(userMax.x,y,userMax.z);
- userSety=true;
+ void userMiny3(real y) {
+ umin.y=y;
+ usety=true;
}
- void userMaxz(real z) {
- userMax=(userMax.x,userMax.y,z);
- userSetz=true;
+ void userMinz3(real z) {
+ umin.z=z;
+ usetz=true;
}
- void userCorners(pair c00, pair c01, pair c10, pair c11) {
- userMin=(min(c00.x,c01.x,c10.x,c11.x),min(c00.y,c01.y,c10.y,c11.y),
- userMin.z);
- userMax=(max(c00.x,c01.x,c10.x,c11.x),max(c00.y,c01.y,c10.y,c11.y),
- userMax.z);
+ void userMaxx3(real x) {
+ umax.x=x;
+ usetx=true;
}
- void userCorners(triple c000, triple c001, triple c010, triple c011,
- triple c100, triple c101, triple c110, triple c111) {
- userMin=(min(c000.x,c001.x,c010.x,c011.x,c100.x,c101.x,c110.x,c111.x),
- min(c000.y,c001.y,c010.y,c011.y,c100.y,c101.y,c110.y,c111.y),
- min(c000.z,c001.z,c010.z,c011.z,c100.z,c101.z,c110.z,c111.z));
- userMax=(max(c000.x,c001.x,c010.x,c011.x,c100.x,c101.x,c110.x,c111.x),
- max(c000.y,c001.y,c010.y,c011.y,c100.y,c101.y,c110.y,c111.y),
- max(c000.z,c001.z,c010.z,c011.z,c100.z,c101.z,c110.z,c111.z));
+ void userMaxy3(real y) {
+ umax.y=y;
+ usety=true;
}
- void userCopy(picture pic) {
- userMin=(triple) pic.userMin;
- userMax=(triple) pic.userMax;
- userSetx=pic.userSetx;
- userSety=pic.userSety;
- userSetz=pic.userSetz;
+ void userMaxz3(real z) {
+ umax.z=z;
+ usetz=true;
+ }
+
+ void userMinx2(real x) { bounds.alterUserBound("minx", x); }
+ void userMinx(real x) { userMinx2(x); userMinx3(x); }
+ void userMiny2(real y) { bounds.alterUserBound("miny", y); }
+ void userMiny(real y) { userMiny2(y); userMiny3(y); }
+ void userMaxx2(real x) { bounds.alterUserBound("maxx", x); }
+ void userMaxx(real x) { userMaxx2(x); userMaxx3(x); }
+ void userMaxy2(real y) { bounds.alterUserBound("maxy", y); }
+ void userMaxy(real y) { userMaxy2(y); userMaxy3(y); }
+ void userMinz(real z) = userMinz3;
+ void userMaxz(real z) = userMaxz3;
+
+ void userCorners3(triple c000, triple c001, triple c010, triple c011,
+ triple c100, triple c101, triple c110, triple c111) {
+ umin.x = min(c000.x,c001.x,c010.x,c011.x,c100.x,c101.x,c110.x,c111.x);
+ umin.y = min(c000.y,c001.y,c010.y,c011.y,c100.y,c101.y,c110.y,c111.y);
+ umin.z = min(c000.z,c001.z,c010.z,c011.z,c100.z,c101.z,c110.z,c111.z);
+ umax.x = max(c000.x,c001.x,c010.x,c011.x,c100.x,c101.x,c110.x,c111.x);
+ umax.y = max(c000.y,c001.y,c010.y,c011.y,c100.y,c101.y,c110.y,c111.y);
+ umax.z = max(c000.z,c001.z,c010.z,c011.z,c100.z,c101.z,c110.z,c111.z);
}
- typedef real binop(real, real);
-
// Cache the current user-space bounding box x coodinates
- void userBoxX(real min, real max, binop m=min, binop M=max) {
- if(userSetx) {
- userMin=(m(userMin.x,min),userMin.y,userMin.z);
- userMax=(M(userMax.x,max),userMax.y,userMax.z);
+ void userBoxX3(real min, real max, binop m=min, binop M=max) {
+ if (usetx) {
+ umin.x=m(umin.x,min);
+ umax.x=M(umax.x,max);
} else {
- userMin=(min,userMin.y,userMin.z);
- userMax=(max,userMax.y,userMax.z);
- userSetx=true;
+ umin.x=min;
+ umax.x=max;
+ usetx=true;
}
}
-
+
// Cache the current user-space bounding box y coodinates
- void userBoxY(real min, real max, binop m=min, binop M=max) {
- if(userSety) {
- userMin=(userMin.x,m(userMin.y,min),userMin.z);
- userMax=(userMax.x,M(userMax.y,max),userMax.z);
+ void userBoxY3(real min, real max, binop m=min, binop M=max) {
+ if (usety) {
+ umin.y=m(umin.y,min);
+ umax.y=M(umax.y,max);
} else {
- userMin=(userMin.x,min,userMin.z);
- userMax=(userMax.x,max,userMax.z);
- userSety=true;
+ umin.y=min;
+ umax.y=max;
+ usety=true;
}
}
-
+
// Cache the current user-space bounding box z coodinates
- void userBoxZ(real min, real max, binop m=min, binop M=max) {
- if(userSetz) {
- userMin=(userMin.x,userMin.y,m(userMin.z,min));
- userMax=(userMax.x,userMax.y,M(userMax.z,max));
+ void userBoxZ3(real min, real max, binop m=min, binop M=max) {
+ if (usetz) {
+ umin.z=m(umin.z,min);
+ umax.z=M(umax.z,max);
} else {
- userMin=(userMin.x,userMin.y,min);
- userMax=(userMax.x,userMax.y,max);
- userSetz=true;
+ umin.z=min;
+ umax.z=max;
+ usetz=true;
}
}
-
- // Cache the current user-space bounding box
- void userBox(pair min, pair max) {
- userBoxX(min.x,max.x);
- userBoxY(min.y,max.y);
- }
-
+
// Cache the current user-space bounding box
- void userBox(triple min, triple max) {
- userBoxX(min.x,max.x);
- userBoxY(min.y,max.y);
- userBoxZ(min.z,max.z);
+ void userBox3(triple min, triple max) {
+ userBoxX3(min.x,max.x);
+ userBoxY3(min.y,max.y);
+ userBoxZ3(min.z,max.z);
}
- // Clip the current user-space bounding box
- void userClip(pair min, pair max) {
- userBoxX(min.x,max.x,max,min);
- userBoxY(min.y,max.y,max,min);
+ // Add drawer <<<2
+ void add(drawerBound d, bool exact=false, bool above=true) {
+ uptodate=false;
+ if(!exact) bounds.exact=false;
+ if(above)
+ nodes.push(d);
+ else
+ nodes.insert(0,d);
}
- void add(drawerBound d, bool exact=false) {
+ // Faster implementation of most common case.
+ void addExactAbove(drawerBound d) {
uptodate=false;
- if(!exact) bounds.exact=false;
nodes.push(d);
}
void add(drawer d, bool exact=false, bool above=true) {
- uptodate=false;
- if(!exact) bounds.exact=false;
- nodes.push(new void(frame f, transform t, transform T, pair, pair) {
+ add(new void(frame f, transform t, transform T, pair, pair) {
d(f,t*T);
- });
+ },exact,above);
}
void add(drawerBound3 d, bool exact=false, bool above=true) {
@@ -845,20 +478,22 @@ struct picture {
},exact,above);
}
- void clip(drawer d, bool exact=false) {
- bounds.clip(userMin,userMax);
+ // Clip <<<2
+ void clip(pair min, pair max, drawer d, bool exact=false) {
+ bounds.clip(min, max);
this.add(d,exact);
}
- void clip(drawerBound d, bool exact=false) {
- bounds.clip(userMin,userMax);
+ void clip(pair min, pair max, drawerBound d, bool exact=false) {
+ bounds.clip(min, max);
this.add(d,exact);
}
+ // Add sizing <<<2
// Add a point to the sizing.
void addPoint(pair user, pair truesize=0) {
- bounds.point.push(user,truesize);
- userBox(user,user);
+ bounds.addPoint(user,truesize);
+ //userBox(user,user);
}
// Add a point to the sizing, accounting also for the size of the pen.
@@ -869,7 +504,7 @@ struct picture {
void addPoint(triple user, triple truesize=(0,0,0)) {
bounds3.point.push(user,truesize);
- userBox(user,user);
+ userBox3(user,user);
}
void addPoint(triple user, triple truesize=(0,0,0), pen p) {
@@ -879,34 +514,21 @@ struct picture {
// Add a box to the sizing.
void addBox(pair userMin, pair userMax, pair trueMin=0, pair trueMax=0) {
- bounds.min.push(userMin,trueMin);
- bounds.max.push(userMax,trueMax);
- userBox(userMin,userMax);
+ bounds.addBox(userMin, userMax, trueMin, trueMax);
}
void addBox(triple userMin, triple userMax, triple trueMin=(0,0,0),
triple trueMax=(0,0,0)) {
bounds3.min.push(userMin,trueMin);
bounds3.max.push(userMax,trueMax);
- userBox(userMin,userMax);
- }
-
- // Add a (user space) path to the sizing.
- void addPath(path g) {
- if(size(g) > 0)
- addBox(min(g),max(g));
- }
- void addPath(path[] g) {
- for(int i=0; i < g.length; ++i)
- addPath(g[i]);
+ userBox3(userMin,userMax);
}
- // Add a path to the sizing with the additional padding of a pen.
- void addPath(path g, pen p) {
- if(size(g) > 0)
- addBox(min(g),max(g),min(p),max(p));
- }
+ // For speed reason, we unravel the addPath routines from bounds. This
+ // avoids an extra function call.
+ from bounds unravel addPath;
+ // Size commands <<<2
void size(real x, real y=x, bool keepAspect=this.keepAspect) {
if(!empty()) uptodate=false;
xsize=x;
@@ -929,62 +551,15 @@ struct picture {
zunitsize=z;
}
- // The scaling in one dimension: x --> a*x + b
- struct scaling {
- real a,b;
- static scaling build(real a, real b) {
- scaling s=new scaling;
- s.a=a; s.b=b;
- return s;
- }
- real scale(real x) {
- return a*x+b;
- }
- real scale(coord c) {
- return scale(c.user) + c.truesize;
- }
- }
-
- // Calculate the minimum point in scaling the coords.
- real min(real m, scaling s, coord[] c) {
- for(int i=0; i < c.length; ++i)
- if(s.scale(c[i]) < m)
- m=s.scale(c[i]);
- return m;
- }
-
- // Calculate the maximum point in scaling the coords.
- real max(real M, scaling s, coord[] c) {
- for(int i=0; i < c.length; ++i)
- if(s.scale(c[i]) > M)
- M=s.scale(c[i]);
- return M;
- }
-
+ // min/max of picture <<<2
// Calculate the min for the final frame, given the coordinate transform.
pair min(transform t) {
- if(bounds.min.x.length == 0 && bounds.point.x.length == 0 &&
- bounds.max.x.length == 0) return 0;
- pair a=t*(1,1)-t*(0,0), b=t*(0,0);
- scaling xs=scaling.build(a.x,b.x);
- scaling ys=scaling.build(a.y,b.y);
- return (min(min(min(infinity,xs,bounds.point.x),xs,bounds.min.x),
- xs,bounds.max.x),
- min(min(min(infinity,ys,bounds.point.y),ys,bounds.min.y),
- ys,bounds.max.y));
+ return bounds.min(t);
}
// Calculate the max for the final frame, given the coordinate transform.
pair max(transform t) {
- if(bounds.min.x.length == 0 && bounds.point.x.length == 0 &&
- bounds.max.x.length == 0) return 0;
- pair a=t*(1,1)-t*(0,0), b=t*(0,0);
- scaling xs=scaling.build(a.x,b.x);
- scaling ys=scaling.build(a.y,b.y);
- return (max(max(max(-infinity,xs,bounds.point.x),xs,bounds.min.x),
- xs,bounds.max.x),
- max(max(max(-infinity,ys,bounds.point.y),ys,bounds.min.y),
- ys,bounds.max.y));
+ return bounds.max(t);
}
// Calculate the min for the final frame, given the coordinate transform.
@@ -1019,66 +594,6 @@ struct picture {
zs,bounds3.max.z));
}
- // Calculate the sizing constants for the given array and maximum size.
- real calculateScaling(string dir, coord[] coords, real size,
- bool warn=true) {
- access simplex;
- simplex.problem p=new simplex.problem;
-
- void addMinCoord(coord c) {
- // (a*user + b) + truesize >= 0:
- p.addRestriction(c.user,1,c.truesize);
- }
- void addMaxCoord(coord c) {
- // (a*user + b) + truesize <= size:
- p.addRestriction(-c.user,-1,size-c.truesize);
- }
-
- coord[] m=maxcoords(coords,operator >=);
- coord[] M=maxcoords(coords,operator <=);
-
- for(int i=0; i < m.length; ++i)
- addMinCoord(m[i]);
- for(int i=0; i < M.length; ++i)
- addMaxCoord(M[i]);
-
- int status=p.optimize();
- if(status == simplex.problem.OPTIMAL) {
- return scaling.build(p.a(),p.b()).a;
- } else if(status == simplex.problem.UNBOUNDED) {
- if(warn) warning("unbounded",dir+" scaling in picture unbounded");
- return 0;
- } else {
- if(!warn) return 1;
- bool userzero=true;
- for(int i=0; i < coords.length; ++i) {
- if(coords[i].user != 0) userzero=false;
- }
- if(userzero) return 1;
- warning("cannotfit","cannot fit picture to "+dir+"size "+(string) size
- +"...enlarging...");
- return calculateScaling(dir,coords,sqrt(2)*size,warn);
- }
- }
-
- void append(coords2 point, coords2 min, coords2 max, transform t,
- bounds bounds)
- {
- // Add the coord info to this picture.
- if(t == identity()) {
- point.append(bounds.point);
- min.append(bounds.min);
- max.append(bounds.max);
- } else {
- point.push(t,bounds.point,bounds.point);
- // Add in all 4 corner points, to properly size rectangular pictures.
- point.push(t,bounds.min,bounds.min);
- point.push(t,bounds.min,bounds.max);
- point.push(t,bounds.max,bounds.min);
- point.push(t,bounds.max,bounds.max);
- }
- }
-
void append(coords3 point, coords3 min, coords3 max, transform3 t,
bounds3 bounds)
{
@@ -1101,37 +616,13 @@ struct picture {
}
}
+ // Scaling and Fit <<<2
// Returns the transform for turning user-space pairs into true-space pairs.
transform scaling(real xsize, real ysize, bool keepAspect=true,
bool warn=true) {
- if(xsize == 0 && xunitsize == 0 && ysize == 0 && yunitsize == 0)
- return identity();
-
- coords2 Coords;
-
- append(Coords,Coords,Coords,T,bounds);
-
- real sx;
- if(xunitsize == 0) {
- if(xsize != 0) sx=calculateScaling("x",Coords.x,xsize,warn);
- } else sx=xunitsize;
-
- real sy;
- if(yunitsize == 0) {
- if(ysize != 0) sy=calculateScaling("y",Coords.y,ysize,warn);
- } else sy=yunitsize;
-
- if(sx == 0) {
- sx=sy;
- if(sx == 0)
- return identity();
- } else if(sy == 0) sy=sx;
+ bounds b = (T == identity()) ? this.bounds : T * this.bounds;
-
- if(keepAspect && (xunitsize == 0 || yunitsize == 0))
- return scale(min(sx,sy));
- else
- return scale(sx,sy);
+ return b.scaling(xsize, ysize, xunitsize, yunitsize, keepAspect, warn);
}
transform scaling(bool warn=true) {
@@ -1184,7 +675,8 @@ struct picture {
frame fit(transform t, transform T0=T, pair m, pair M) {
frame f;
- for(int i=0; i < nodes.length; ++i)
+ int n = nodes.length;
+ for(int i=0; i < n; ++i)
nodes[i](f,t,T0,m,M);
return f;
}
@@ -1207,6 +699,7 @@ struct picture {
return fit3(t,pic,P,min(t),max(t));
}
+ // Add drawer wrappers <<<2
void add(void d(picture, transform), bool exact=false) {
add(new void(frame f, transform t) {
picture opic=new picture;
@@ -1233,6 +726,7 @@ struct picture {
},exact,above);
}
+ // More scaling <<<2
frame scaled() {
frame f=fit(fixedscaling);
pair d=size(f);
@@ -1289,6 +783,7 @@ struct picture {
} else return scale(xgrow,ygrow,zgrow);
}
+ // calculateTransform with scaling <<<2
// Return the transform that would be used to fit the picture to a frame
transform calculateTransform(real xsize, real ysize, bool keepAspect=true,
bool warn=true) {
@@ -1309,6 +804,8 @@ struct picture {
return scale3(fit3(t,null,P),keepAspect)*t;
}
+ // min/max with xsize and ysize <<<2
+ // NOTE: These are probably very slow as implemented.
pair min(real xsize=this.xsize, real ysize=this.ysize,
bool keepAspect=this.keepAspect, bool warn=true) {
return min(calculateTransform(xsize,ysize,keepAspect,warn));
@@ -1331,11 +828,14 @@ struct picture {
return max(calculateTransform3(xsize,ysize,zsize,keepAspect,warn,P));
}
+ // More Fitting <<<2
// Returns the 2D picture fit to the requested size.
frame fit2(real xsize=this.xsize, real ysize=this.ysize,
bool keepAspect=this.keepAspect) {
if(fixed) return scaled();
- if(empty2()) return newframe;
+ if(empty2())
+ return newframe;
+
transform t=scaling(xsize,ysize,keepAspect);
frame f=fit(t);
transform s=scale(f,xsize,ysize,keepAspect);
@@ -1378,15 +878,42 @@ struct picture {
return s*f;
}
+ // Copying <<<2
+
+ // Copies enough information to yield the same userMin/userMax.
+ void userCopy2(picture pic) {
+ userMinx2(pic.userMin2().x);
+ userMiny2(pic.userMin2().y);
+ userMaxx2(pic.userMax2().x);
+ userMaxy2(pic.userMax2().y);
+ }
+
+ void userCopy3(picture pic) {
+ copyPairOrTriple(umin, pic.umin);
+ copyPairOrTriple(umax, pic.umax);
+ usetx=pic.usetx;
+ usety=pic.usety;
+ usetz=pic.usetz;
+ }
+
+ void userCopy(picture pic) {
+ userCopy2(pic);
+ userCopy3(pic);
+ }
+
// Copies the drawing information, but not the sizing information into a new
// picture. Fitting this picture will not scale as the original picture would.
picture drawcopy() {
picture dest=new picture;
- dest.nodes=copy(nodes);
+ dest.nodes = copy(nodes);
dest.nodes3=copy(nodes3);
dest.T=T;
dest.T3=T3;
- dest.userCopy(this);
+
+ // TODO: User bounds are sizing info, which probably shouldn't be part of
+ // a draw copy. Should we move this down to copy()?
+ dest.userCopy3(this);
+
dest.scale=scale.copy();
dest.legend=copy(legend);
@@ -1412,6 +939,37 @@ struct picture {
return dest;
}
+ // Helper function for defining transformed pictures. Do not call it
+ // directly.
+ picture transformed(transform t) {
+ picture dest=drawcopy();
+
+ // Replace nodes with a single drawer that realizes the transform.
+ drawerBound[] oldnodes = dest.nodes;
+ void drawAll(frame f, transform tt, transform T, pair lb, pair rt) {
+ transform Tt = T*t;
+ for (var node : oldnodes)
+ node(f, tt, Tt, lb, rt);
+ }
+ dest.nodes = new drawerBound[] { drawAll };
+
+ dest.uptodate=uptodate;
+ dest.bounds=bounds.transformed(t);
+ dest.bounds3=bounds3.copy();
+
+ dest.bounds.exact=false;
+
+ dest.xsize=xsize; dest.ysize=ysize;
+ dest.xsize3=xsize; dest.ysize3=ysize3; dest.zsize3=zsize3;
+ dest.keepAspect=keepAspect;
+ dest.xunitsize=xunitsize; dest.yunitsize=yunitsize;
+ dest.zunitsize=zunitsize;
+ dest.fixed=fixed; dest.fixedscaling=fixedscaling;
+
+ return dest;
+ }
+
+ // Add Picture <<<2
// Add a picture to this picture, such that the user coordinates will be
// scaled identically when fitted
void add(picture src, bool group=true, filltype filltype=NoFill,
@@ -1440,42 +998,38 @@ struct picture {
legend.append(src.legend);
- if(src.userSetx) userBoxX(src.userMin.x,src.userMax.x);
- if(src.userSety) userBoxY(src.userMin.y,src.userMax.y);
- if(src.userSetz) userBoxZ(src.userMin.z,src.userMax.z);
+ if(src.usetx) userBoxX3(src.umin.x,src.umax.x);
+ if(src.usety) userBoxY3(src.umin.y,src.umax.y);
+ if(src.usetz) userBoxZ3(src.umin.z,src.umax.z);
- append(bounds.point,bounds.min,bounds.max,srcCopy.T,src.bounds);
+ bounds.append(srcCopy.T, src.bounds);
+ //append(bounds.point,bounds.min,bounds.max,srcCopy.T,src.bounds);
append(bounds3.point,bounds3.min,bounds3.max,srcCopy.T3,src.bounds3);
- if(!src.bounds.exact) bounds.exact=false;
+ //if(!src.bounds.exact) bounds.exact=false;
if(!src.bounds3.exact) bounds3.exact=false;
}
}
+// Post Struct <<<1
picture operator * (transform t, picture orig)
{
- picture pic=orig.copy();
- pic.T=t*pic.T;
- pic.userCorners(t*(pic.userMin.x,pic.userMin.y),
- t*(pic.userMin.x,pic.userMax.y),
- t*(pic.userMax.x,pic.userMin.y),
- t*(pic.userMax.x,pic.userMax.y));
- pic.bounds.exact=false;
- return pic;
+ return orig.transformed(t);
}
picture operator * (transform3 t, picture orig)
{
picture pic=orig.copy();
pic.T3=t*pic.T3;
- pic.userCorners(t*pic.userMin,
- t*(pic.userMin.x,pic.userMin.y,pic.userMax.z),
- t*(pic.userMin.x,pic.userMax.y,pic.userMin.z),
- t*(pic.userMin.x,pic.userMax.y,pic.userMax.z),
- t*(pic.userMax.x,pic.userMin.y,pic.userMin.z),
- t*(pic.userMax.x,pic.userMin.y,pic.userMax.z),
- t*(pic.userMax.x,pic.userMax.y,pic.userMin.z),
- t*pic.userMax);
+ triple umin=pic.userMin3(), umax=pic.userMax3();
+ pic.userCorners3(t*umin,
+ t*(umin.x,umin.y,umax.z),
+ t*(umin.x,umax.y,umin.z),
+ t*(umin.x,umax.y,umax.z),
+ t*(umax.x,umin.y,umin.z),
+ t*(umax.x,umin.y,umax.z),
+ t*(umax.x,umax.y,umin.z),
+ t*umax);
pic.bounds3.exact=false;
return pic;
}
@@ -1538,9 +1092,54 @@ pair size(picture pic, bool user=false)
return t*M-t*m;
}
+// Frame Alignment <<<
+pair rectify(pair dir)
+{
+ real scale=max(abs(dir.x),abs(dir.y));
+ if(scale != 0) dir *= 0.5/scale;
+ dir += (0.5,0.5);
+ return dir;
+}
+
+pair point(frame f, pair dir)
+{
+ pair m=min(f);
+ pair M=max(f);
+ return m+realmult(rectify(dir),M-m);
+}
+
+path[] align(path[] g, transform t=identity(), pair position,
+ pair align, pen p=currentpen)
+{
+ if(g.length == 0) return g;
+ pair m=min(g);
+ pair M=max(g);
+ pair dir=rectify(inverse(t)*-align);
+ if(basealign(p) == 1)
+ dir -= (0,m.y/(M.y-m.y));
+ pair a=m+realmult(dir,M-m);
+ return shift(position+align*labelmargin(p))*t*shift(-a)*g;
+}
+
+// Returns a transform for aligning frame f in the direction align
+transform shift(frame f, pair align)
+{
+ return shift(align-point(f,-align));
+}
+
+// Returns a copy of frame f aligned in the direction align
+frame align(frame f, pair align)
+{
+ return shift(f,align)*f;
+}
+// >>>
+
pair point(picture pic=currentpicture, pair dir, bool user=true)
{
- pair z=pic.userMin()+realmult(rectify(dir),pic.userMax()-pic.userMin());
+ pair umin = pic.userMin2();
+ pair umax = pic.userMax2();
+
+ pair z=umin+realmult(rectify(dir),umax-umin);
return user ? z : pic.calculateTransform()*z;
}
@@ -1556,7 +1155,7 @@ pair truepoint(picture pic=currentpicture, pair dir, bool user=true)
// Transform coordinate in [0,1]x[0,1] to current user coordinates.
pair relative(picture pic=currentpicture, pair z)
{
- return pic.userMin()+realmult(z,pic.userMax()-pic.userMin());
+ return pic.userMin2()+realmult(z,pic.userMax2()-pic.userMin2());
}
void add(picture pic=currentpicture, drawer d, bool exact=false)
@@ -1604,17 +1203,25 @@ void Draw(picture pic=currentpicture, path g, pen p=currentpen)
pic.addPath(g,p);
}
-void _draw(picture pic=currentpicture, path g, pen p=currentpen,
- margin margin=NoMargin)
+// Default arguments have been removed to increase speed.
+void _draw(picture pic, path g, pen p, margin margin)
{
- pic.add(new void(frame f, transform t) {
- draw(f,margin(t*g,p).g,p);
- },true);
+ if (size(nib(p)) == 0 && margin==NoMargin) {
+ // Inline the drawerBound wrapper for speed.
+ pic.addExactAbove(new void(frame f, transform t, transform T, pair, pair) {
+ _draw(f,t*T*g,p);
+ });
+ } else {
+ pic.add(new void(frame f, transform t) {
+ draw(f,margin(t*g,p).g,p);
+ },true);
+ }
pic.addPath(g,p);
}
void Draw(picture pic=currentpicture, explicit path[] g, pen p=currentpen)
{
+ // Could optimize this by adding one drawer.
for(int i=0; i < g.length; ++i) Draw(pic,g[i],p);
}
@@ -1791,10 +1398,12 @@ void clip(picture pic=currentpicture, path[] g, bool stroke=false,
{
if(copy)
g=copy(g);
- pic.userClip(min(g),max(g));
- pic.clip(new void(frame f, transform t) {
- clip(f,t*g,stroke,fillrule,false);
- },true);
+ //pic.userClip(min(g),max(g));
+ pic.clip(min(g), max(g),
+ new void(frame f, transform t) {
+ clip(f,t*g,stroke,fillrule,false);
+ },
+ true);
}
void beginclip(picture pic=currentpicture, path[] g, bool stroke=false,
@@ -1813,11 +1422,26 @@ void beginclip(picture pic=currentpicture, path[] g, bool stroke=false,
void endclip(picture pic=currentpicture)
{
- if(pic.clipmin.length > 0 && pic.clipmax.length > 0)
- pic.userClip(pic.clipmin.pop(),pic.clipmax.pop());
- pic.clip(new void(frame f, transform) {
- endclip(f);
- },true);
+ pair min,max;
+ if (pic.clipmin.length > 0 && pic.clipmax.length > 0)
+ {
+ min = pic.clipmin.pop();
+ max = pic.clipmax.pop();
+ }
+ else
+ {
+ // We should probably abort here, since the PostScript output will be
+ // garbage.
+ warning("endclip", "endclip without beginclip");
+ min = pic.userMin2();
+ max = pic.userMax2();
+ }
+
+ pic.clip(min, max,
+ new void(frame f, transform) {
+ endclip(f);
+ },
+ true);
}
void unfill(picture pic=currentpicture, path[] g, bool copy=true)
diff --git a/Build/source/utils/asymptote/base/plain_prethree.asy b/Build/source/utils/asymptote/base/plain_prethree.asy
new file mode 100644
index 00000000000..595bac2fad4
--- /dev/null
+++ b/Build/source/utils/asymptote/base/plain_prethree.asy
@@ -0,0 +1,224 @@
+// Critical definitions for transform3 needed by projection and picture.
+
+typedef real[][] transform3;
+restricted transform3 identity4=identity(4);
+
+// A uniform 3D scaling.
+transform3 scale3(real s)
+{
+ transform3 t=identity(4);
+ t[0][0]=t[1][1]=t[2][2]=s;
+ return t;
+}
+
+// Simultaneous 3D scalings in the x, y, and z directions.
+transform3 scale(real x, real y, real z)
+{
+ transform3 t=identity(4);
+ t[0][0]=x;
+ t[1][1]=y;
+ t[2][2]=z;
+ return t;
+}
+
+transform3 shiftless(transform3 t)
+{
+ transform3 T=copy(t);
+ T[0][3]=T[1][3]=T[2][3]=0;
+ return T;
+}
+
+real camerafactor=2; // Factor used for camera adjustment.
+
+struct transformation {
+ transform3 modelview; // For orientation and positioning
+ transform3 projection; // For 3D to 2D projection
+ bool infinity;
+ void operator init(transform3 modelview) {
+ this.modelview=modelview;
+ this.projection=identity4;
+ infinity=true;
+ }
+ void operator init(transform3 modelview, transform3 projection) {
+ this.modelview=modelview;
+ this.projection=projection;
+ infinity=false;
+ }
+ transform3 compute() {
+ return infinity ? modelview : projection*modelview;
+ }
+ transformation copy() {
+ transformation T=new transformation;
+ T.modelview=copy(modelview);
+ T.projection=copy(projection);
+ T.infinity=infinity;
+ return T;
+ }
+}
+
+struct projection {
+ transform3 t; // projection*modelview (cached)
+ bool infinity;
+ bool absolute=false;
+ triple camera; // Position of camera.
+ triple up; // A vector that should be projected to direction (0,1).
+ triple target; // Point where camera is looking at.
+ triple normal; // Normal vector from target to projection plane.
+ pair viewportshift; // Fractional viewport shift.
+ real zoom=1; // Zoom factor.
+ real angle; // Lens angle (for perspective projection).
+ bool showtarget=true; // Expand bounding volume to include target?
+ typedef transformation projector(triple camera, triple up, triple target);
+ projector projector;
+ bool autoadjust=true; // Adjust camera to lie outside bounding volume?
+ bool center=false; // Center target within bounding volume?
+ int ninterpolate; // Used for projecting nurbs to 2D Bezier curves.
+ bool bboxonly=true; // Typeset label bounding box only.
+
+ transformation T;
+
+ void calculate() {
+ T=projector(camera,up,target);
+ t=T.compute();
+ infinity=T.infinity;
+ ninterpolate=infinity ? 1 : 16;
+ }
+
+ triple vector() {
+ return camera-target;
+ }
+
+ void operator init(triple camera, triple up=(0,0,1), triple target=(0,0,0),
+ triple normal=camera-target,
+ real zoom=1, real angle=0, pair viewportshift=0,
+ bool showtarget=true, bool autoadjust=true,
+ bool center=false, projector projector) {
+ this.camera=camera;
+ this.up=up;
+ this.target=target;
+ this.normal=normal;
+ this.zoom=zoom;
+ this.angle=angle;
+ this.viewportshift=viewportshift;
+ this.showtarget=showtarget;
+ this.autoadjust=autoadjust;
+ this.center=center;
+ this.projector=projector;
+ calculate();
+ }
+
+ projection copy() {
+ projection P=new projection;
+ P.t=t;
+ P.infinity=infinity;
+ P.absolute=absolute;
+ P.camera=camera;
+ P.up=up;
+ P.target=target;
+ P.normal=normal;
+ P.zoom=zoom;
+ P.angle=angle;
+ P.viewportshift=viewportshift;
+ P.showtarget=showtarget;
+ P.autoadjust=autoadjust;
+ P.center=center;
+ P.projector=projector;
+ P.ninterpolate=ninterpolate;
+ P.bboxonly=bboxonly;
+ P.T=T.copy();
+ return P;
+ }
+
+ // Return the maximum distance of box(m,M) from target.
+ real distance(triple m, triple M) {
+ triple[] c={m,(m.x,m.y,M.z),(m.x,M.y,m.z),(m.x,M.y,M.z),
+ (M.x,m.y,m.z),(M.x,m.y,M.z),(M.x,M.y,m.z),M};
+ return max(abs(c-target));
+ }
+
+
+ // This is redefined here to make projection as self-contained as possible.
+ static private real sqrtEpsilon = sqrt(realEpsilon);
+
+ // Move the camera so that the box(m,M) rotated about target will always
+ // lie in front of the clipping plane.
+ bool adjust(triple m, triple M) {
+ triple v=camera-target;
+ real d=distance(m,M);
+ static real lambda=camerafactor*(1-sqrtEpsilon);
+ if(lambda*d >= abs(v)) {
+ camera=target+camerafactor*d*unit(v);
+ calculate();
+ return true;
+ }
+ return false;
+ }
+}
+
+projection currentprojection;
+
+struct light {
+ real[][] diffuse;
+ real[][] ambient;
+ real[][] specular;
+ pen background=nullpen; // Background color of the 3D canvas.
+ real specularfactor;
+ bool viewport; // Are the lights specified (and fixed) in the viewport frame?
+ triple[] position; // Only directional lights are currently implemented.
+
+ transform3 T=identity(4); // Transform to apply to normal vectors.
+
+ bool on() {return position.length > 0;}
+
+ void operator init(pen[] diffuse,
+ pen[] ambient=array(diffuse.length,black),
+ pen[] specular=diffuse, pen background=nullpen,
+ real specularfactor=1,
+ bool viewport=false, triple[] position) {
+ int n=diffuse.length;
+ assert(ambient.length == n && specular.length == n && position.length == n);
+
+ this.diffuse=new real[n][];
+ this.ambient=new real[n][];
+ this.specular=new real[n][];
+ this.background=background;
+ this.position=new triple[n];
+ for(int i=0; i < position.length; ++i) {
+ this.diffuse[i]=rgba(diffuse[i]);
+ this.ambient[i]=rgba(ambient[i]);
+ this.specular[i]=rgba(specular[i]);
+ this.position[i]=unit(position[i]);
+ }
+ this.specularfactor=specularfactor;
+ this.viewport=viewport;
+ }
+
+ void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
+ pen background=nullpen, real specularfactor=1,
+ bool viewport=false...triple[] position) {
+ int n=position.length;
+ operator init(array(n,diffuse),array(n,ambient),array(n,specular),
+ background,specularfactor,viewport,position);
+ }
+
+ void operator init(pen diffuse=white, pen ambient=black, pen specular=diffuse,
+ pen background=nullpen, bool viewport=false,
+ real x, real y, real z) {
+ operator init(diffuse,ambient,specular,background,viewport,(x,y,z));
+ }
+
+ void operator init(explicit light light) {
+ diffuse=copy(light.diffuse);
+ ambient=copy(light.ambient);
+ specular=copy(light.specular);
+ background=light.background;
+ specularfactor=light.specularfactor;
+ viewport=light.viewport;
+ position=copy(light.position);
+ }
+
+ real[] background() {return rgba(background == nullpen ? white : background);}
+}
+
+light currentlight;
+
diff --git a/Build/source/utils/asymptote/base/plain_scaling.asy b/Build/source/utils/asymptote/base/plain_scaling.asy
new file mode 100644
index 00000000000..fd2dbae07c0
--- /dev/null
+++ b/Build/source/utils/asymptote/base/plain_scaling.asy
@@ -0,0 +1,246 @@
+real expansionfactor=sqrt(2);
+
+// A coordinate in "flex space." A linear combination of user and true-size
+// coordinates.
+struct coord {
+ real user,truesize;
+
+ // Build a coord.
+ static coord build(real user, real truesize) {
+ coord c=new coord;
+ c.user=user;
+ c.truesize=truesize;
+ return c;
+ }
+
+ // Deep copy of coordinate. Users may add coords to the picture, but then
+ // modify the struct. To prevent this from yielding unexpected results, deep
+ // copying is used.
+ coord copy() {
+ return build(user, truesize);
+ }
+
+ void clip(real min, real max) {
+ user=min(max(user,min),max);
+ truesize=0;
+ }
+}
+
+bool operator <= (coord a, coord b)
+{
+ return a.user <= b.user && a.truesize <= b.truesize;
+}
+
+bool operator >= (coord a, coord b)
+{
+ return a.user >= b.user && a.truesize >= b.truesize;
+}
+
+// Find the maximal elements of the input array, using the partial ordering
+// given.
+coord[] maxcoords(coord[] in, bool operator <= (coord,coord))
+{
+ // As operator <= is defined in the parameter list, it has a special
+ // meaning in the body of the function.
+
+ coord best;
+ coord[] c;
+
+ int n=in.length;
+
+ if(n == 0)
+ return c;
+
+ int first=0;
+ // Add the first coord without checking restrictions (as there are none).
+ best=in[first];
+ c.push(best);
+
+ static int NONE=-1;
+
+ int dominator(coord x)
+ {
+ // This assumes it has already been checked against the best.
+ for(int i=1; i < c.length; ++i)
+ if(x <= c[i])
+ return i;
+ return NONE;
+ }
+
+ void promote(int i)
+ {
+ // Swap with the top
+ coord x=c[i];
+ c[i]=best;
+ best=c[0]=x;
+ }
+
+ void addmaximal(coord x)
+ {
+ coord[] newc;
+
+ // Check if it beats any others.
+ for(int i=0; i < c.length; ++i) {
+ coord y=c[i];
+ if(!(y <= x))
+ newc.push(y);
+ }
+ newc.push(x);
+ c=newc;
+ best=c[0];
+ }
+
+ void add(coord x)
+ {
+ if(x <= best)
+ return;
+ else {
+ int i=dominator(x);
+ if(i == NONE)
+ addmaximal(x);
+ else
+ promote(i);
+ }
+ }
+
+ for(int i=1; i < n; ++i)
+ add(in[i]);
+
+ return c;
+}
+
+struct coords2 {
+ coord[] x,y;
+ void erase() {
+ x.delete();
+ y.delete();
+ }
+ // Only a shallow copy of the individual elements of x and y
+ // is needed since, once entered, they are never modified.
+ coords2 copy() {
+ coords2 c=new coords2;
+ c.x=copy(x);
+ c.y=copy(y);
+ return c;
+ }
+ void append(coords2 c) {
+ x.append(c.x);
+ y.append(c.y);
+ }
+ void push(pair user, pair truesize) {
+ x.push(coord.build(user.x,truesize.x));
+ y.push(coord.build(user.y,truesize.y));
+ }
+ void push(coord cx, coord cy) {
+ x.push(cx);
+ y.push(cy);
+ }
+ void push(transform t, coords2 c1, coords2 c2) {
+ for(int i=0; i < c1.x.length; ++i) {
+ coord cx=c1.x[i], cy=c2.y[i];
+ pair tinf=shiftless(t)*(0,0);
+ pair z=t*(cx.user,cy.user);
+ pair w=(cx.truesize,cy.truesize);
+ w=length(w)*unit(shiftless(t)*w);
+ coord Cx,Cy;
+ Cx.user=z.x;
+ Cy.user=z.y;
+ Cx.truesize=w.x;
+ Cy.truesize=w.y;
+ push(Cx,Cy);
+ }
+ }
+ void xclip(real min, real max) {
+ for(int i=0; i < x.length; ++i)
+ x[i].clip(min,max);
+ }
+ void yclip(real min, real max) {
+ for(int i=0; i < y.length; ++i)
+ y[i].clip(min,max);
+ }
+}
+
+// The scaling in one dimension: x --> a*x + b
+struct scaling {
+ real a,b;
+ static scaling build(real a, real b) {
+ scaling s=new scaling;
+ s.a=a; s.b=b;
+ return s;
+ }
+ real scale(real x) {
+ return a*x+b;
+ }
+ real scale(coord c) {
+ return scale(c.user) + c.truesize;
+ }
+}
+
+// Calculate the minimum point in scaling the coords.
+real min(real m, scaling s, coord[] c) {
+ for(int i=0; i < c.length; ++i)
+ if(s.scale(c[i]) < m)
+ m=s.scale(c[i]);
+ return m;
+}
+
+// Calculate the maximum point in scaling the coords.
+real max(real M, scaling s, coord[] c) {
+ for(int i=0; i < c.length; ++i)
+ if(s.scale(c[i]) > M)
+ M=s.scale(c[i]);
+ return M;
+}
+
+// Calculate the sizing constants for the given array and maximum size.
+real calculateScaling(string dir, coord[] m, coord[] M, real size,
+ bool warn=true) {
+ access simplex;
+ simplex.problem p=new simplex.problem;
+
+ void addMinCoord(coord c) {
+ // (a*user + b) + truesize >= 0:
+ p.addRestriction(c.user,1,c.truesize);
+ }
+ void addMaxCoord(coord c) {
+ // (a*user + b) + truesize <= size:
+ p.addRestriction(-c.user,-1,size-c.truesize);
+ }
+
+ for (int i=0; i < m.length; ++i)
+ addMinCoord(m[i]);
+ for (int i=0; i < M.length; ++i)
+ addMaxCoord(M[i]);
+
+ int status=p.optimize();
+ if(status == simplex.problem.OPTIMAL) {
+ // TODO: Could just be return a;
+ return scaling.build(p.a(),p.b()).a;
+ } else if(status == simplex.problem.UNBOUNDED) {
+ if(warn) warning("unbounded",dir+" scaling in picture unbounded");
+ return 0;
+ } else {
+ if(!warn) return 1;
+
+ bool userzero(coord[] coords) {
+ for(var coord : coords)
+ if(coord.user != 0) return false;
+ return true;
+ }
+
+ if((userzero(m) && userzero(M)) || size >= infinity) return 1;
+
+ warning("cannotfit","cannot fit picture to "+dir+"size "+(string) size
+ +"...enlarging...");
+
+ return calculateScaling(dir,m,M,expansionfactor*size,warn);
+ }
+}
+
+real calculateScaling(string dir, coord[] coords, real size, bool warn=true)
+{
+ coord[] m=maxcoords(coords,operator >=);
+ coord[] M=maxcoords(coords,operator <=);
+
+ return calculateScaling(dir, m, M, size, warn);
+}
diff --git a/Build/source/utils/asymptote/base/plain_shipout.asy b/Build/source/utils/asymptote/base/plain_shipout.asy
index e96a3a8acb1..ccf94e6c9fd 100644
--- a/Build/source/utils/asymptote/base/plain_shipout.asy
+++ b/Build/source/utils/asymptote/base/plain_shipout.asy
@@ -1,6 +1,8 @@
// Default file prefix used for inline LaTeX mode
string defaultfilename;
+string[] file3;
+
string outprefix(string prefix=defaultfilename) {
return stripextension(prefix != "" ? prefix : outname());
}
@@ -77,7 +79,8 @@ void shipout(string prefix=defaultfilename, frame f,
int limit=2000;
if(abs(m.x) > limit || abs(m.y) > limit) f=shift(-m)*f;
- shipout(prefix,f,currentpatterns,format,wait,view,xformStack.pop0);
+ shipout(prefix,f,currentpatterns,format,wait,view,
+ xformStack.empty() ? null : xformStack.pop0);
shipped=true;
}
@@ -91,8 +94,17 @@ void shipout(string prefix=defaultfilename, picture pic=currentpicture,
bool inlinetex=settings.inlinetex;
bool prc=prc(format);
bool empty3=pic.empty3();
- if(prc && !empty3)
+ if(prc && !empty3) {
+ if(settings.render == 0) {
+ string image=outprefix(prefix)+"+"+(string) file3.length;
+ if(settings.inlineimage) image += "_0";
+ settings.inlinetex=false;
+ settings.prc=false;
+ shipout(image,pic,orientation,nativeformat(),view=false,light,P);
+ settings.prc=true;
+ }
settings.inlinetex=settings.inlineimage;
+ }
frame f=pic.fit(prefix,format,view=view,options,script,light,P);
if(!pic.empty2() || settings.render == 0 || prc || empty3)
shipout(prefix,orientation(f),format,wait,view);
diff --git a/Build/source/utils/asymptote/base/plain_strings.asy b/Build/source/utils/asymptote/base/plain_strings.asy
index 138ab05ca05..98f72f460aa 100644
--- a/Build/source/utils/asymptote/base/plain_strings.asy
+++ b/Build/source/utils/asymptote/base/plain_strings.asy
@@ -155,16 +155,24 @@ private void notimplemented(string text)
abort(text+" is not implemented for the '"+settings.tex+"' TeX engine");
}
+string jobname(string name)
+{
+ int pos=rfind(name,"-");
+ return pos >= 0 ? "\ASYprefix\jobname"+substr(name,pos) : name;
+}
+
string graphic(string name, string options="")
{
if(latex()) {
if(options != "") options="["+options+"]";
- if(find(name," ") < 0)
- return "\includegraphics"+options+"{"+name+"}";
- else {
- return "\includegraphics"+options+
- (pdf() ? "{\""+stripextension(name)+"\".pdf}" : "{\""+name+"\"}");
- }
+ bool pdf=pdf();
+ string includegraphics="\includegraphics"+options;
+ if(settings.inlinetex)
+ return includegraphics+"{"+jobname(name)+"}";
+ else
+ return includegraphics+
+ (find(name," ") < 0 ? "{"+name+"}" :
+ (pdf ? "{\""+stripextension(name)+"\".pdf}" : "{\""+name+"\"}"));
}
if(settings.tex != "context")
notimplemented("graphic");
diff --git a/Build/source/utils/asymptote/base/plain_xasy.asy b/Build/source/utils/asymptote/base/plain_xasy.asy
index 162cbfb35ad..efc739d8385 100644
--- a/Build/source/utils/asymptote/base/plain_xasy.asy
+++ b/Build/source/utils/asymptote/base/plain_xasy.asy
@@ -113,11 +113,15 @@ struct framedTransformStack {
toPush[tList[a].index]=transact(tList[a]);
for(int a=0; a < toPush.length; ++a)
if(!toPush.initialized(a))
- toPush[a]=transact();
+ toPush[a]=transact();
report("Added");
report(toPush.length);
stack.append(toPush);
}
+
+ bool empty() {
+ return stack.length == 0;
+ }
}
framedTransformStack xformStack;
diff --git a/Build/source/utils/asymptote/base/simplex.asy b/Build/source/utils/asymptote/base/simplex.asy
index bd9f69c9324..43920109ff4 100644
--- a/Build/source/utils/asymptote/base/simplex.asy
+++ b/Build/source/utils/asymptote/base/simplex.asy
@@ -184,8 +184,10 @@ struct problem {
// Checks that constants are valid.
bool validConstants() {
for (int i = 0; i < rows.length; ++i)
- if (rows[i].c < 0)
- return false;
+ // Do not test the row for b, as it does not have a non-negativity
+ // condition.
+ if (i != VAR_B && rows[i].c < 0)
+ return false;
return true;
}
diff --git a/Build/source/utils/asymptote/base/slide.asy b/Build/source/utils/asymptote/base/slide.asy
index 092c3429145..0a3e0f65fab 100644
--- a/Build/source/utils/asymptote/base/slide.asy
+++ b/Build/source/utils/asymptote/base/slide.asy
@@ -401,27 +401,27 @@ void figure(string[] s, string options="", real margin=0,
S[i]=graphic(s[i],options);
}
- display(S,margin,captions,caption,align,itempen,figuremattpen, final);
+ display(S,margin,captions,caption,align,itempen,figuremattpen,final);
}
void figure(string s, string options="", string caption="", pair align=S,
pen p=itempen, pen figuremattpen=figuremattpen, bool final=true)
{
- figure(new string[] {s},options,caption,align,p,figuremattpen, final);
+ figure(new string[] {s},options,caption,align,p,figuremattpen,final);
}
void multifigure(string[] slist, string options="", string caption="",
- pair align=S, pen p=itempen, pen figuremattpen=figuremattpen)
+ pair align=S, pen p=itempen, pen figuremattpen=figuremattpen,
+ bool step=itemstep)
{
- if (stepping) {
- int lastnode = currentpicture.nodes.length-1;
+ if(step) {
+ int lastnode=currentpicture.nodes.length-1;
for (int i=0; i<slist.length-1; ++i) {
- figure(slist[i], options, caption, align, p, figuremattpen, final=false);
+ figure(slist[i],options,caption,align,p,figuremattpen,final=false);
erasestep(lastnode);
}
}
- figure(slist[slist.length-1], options, caption, align, p, figuremattpen,
- final=true);
+ figure(slist[slist.length-1],options,caption,align,p,figuremattpen,final=true);
if(!firststep) step();
firststep=false;
@@ -429,12 +429,13 @@ void multifigure(string[] slist, string options="", string caption="",
void indexedfigure(string prefix, int first, int last,
string options="", string caption="",
- pair align=S, pen p=itempen, pen figuremattpen=figuremattpen)
+ pair align=S, pen p=itempen, pen figuremattpen=figuremattpen,
+ bool step=itemstep)
{
string[] s;
for(int i=first; i <= last; ++i)
s.push(prefix+string(i));
- multifigure(s, options, caption, align, p, figuremattpen);
+ multifigure(s,options,caption,align,p,figuremattpen,step=step);
}
string[] codefile;
diff --git a/Build/source/utils/asymptote/base/solids.asy b/Build/source/utils/asymptote/base/solids.asy
index c9be44552c9..239bce4b9a0 100644
--- a/Build/source/utils/asymptote/base/solids.asy
+++ b/Build/source/utils/asymptote/base/solids.asy
@@ -1,4 +1,3 @@
-import three;
import graph3;
pen defaultbackpen=linetype(new real[] {4,4},4,scale=false);
diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy
index 4221646f632..033461263eb 100644
--- a/Build/source/utils/asymptote/base/three.asy
+++ b/Build/source/utils/asymptote/base/three.asy
@@ -28,9 +28,11 @@ struct render
bool closed; // use one-sided rendering?
bool tessellate; // use tessellated mesh to store straight patches?
- bool3 merge; // merge nodes before rendering, for lower quality
- // but faster PRC rendering?
- // (default=merge only transparent patches)
+
+ bool3 merge; // merge nodes before rendering, for faster but
+ // lower quality PRC rendering (the value default means
+ // merge opaque patches only).
+
int sphere; // PRC sphere type (PRCsphere or NURBSsphere).
// General parameters:
@@ -2408,7 +2410,8 @@ triple point(frame f, triple dir)
triple point(picture pic=currentpicture, triple dir, bool user=true,
projection P=currentprojection)
{
- triple v=pic.userMin+realmult(rectify(dir),pic.userMax-pic.userMin);
+ triple min = pic.userMin(), max = pic.userMax();
+ triple v=min+realmult(rectify(dir),max-min);
return user ? v : pic.calculateTransform3(P)*v;
}
@@ -2509,8 +2512,6 @@ private string format(triple v, string sep=" ")
return string(v.x)+sep+string(v.y)+sep+string(v.z);
}
-private string[] file3;
-
private string projection(bool infinity, real viewplanesize)
{
return "activeCamera=scene.cameras.getByIndex(0);
@@ -2696,9 +2697,8 @@ string embed3D(string label="", string text=label, string prefix,
writeJavaScript(name,lightscript+projection(P.infinity,viewplanesize)+
billboard(index,center),script);
- prefix += ".prc";
if(!settings.inlinetex)
- file3.push(prefix);
+ file3.push(prefix+".prc");
triple target=P.target;
if(P.viewportshift != 0) {
@@ -2730,9 +2730,11 @@ string embed3D(string label="", string text=label, string prefix,
",3Droo="+Format(abs(v))+
",3Dbg="+Format(light.background());
if(options != "") options3 += ","+options;
- if(name != "") options3 += ",3Djscript="+stripdirectory(name);
+ if(settings.inlinetex)
+ prefix=jobname(prefix);
+ options3 += ",3Djscript="+prefix+".js";
- return Embed(stripdirectory(prefix),options3,width,height);
+ return Embed(prefix+".prc",options3,width,height);
}
struct scene
@@ -2983,7 +2985,7 @@ object embed(string label="", string text=label, string prefix=defaultfilename,
}
string image;
- if(preview && settings.embed) {
+ if((preview || (prc && settings.render == 0)) && settings.embed) {
image=prefix;
if(settings.inlinetex) image += "_0";
image += "."+nativeformat();
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index 8e48b0606a3..88e42cf6640 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/three_surface.asy
@@ -1435,7 +1435,8 @@ void label(frame f, Label L, triple position, align align=NoAlign,
bool lighton=light.on();
for(patch S : surface(L,position,bbox=P.bboxonly).s) {
draw3D(f,S,position,L.p,light,interaction);
- if(render.labelfill && !lighton) // Fill subdivision cracks
+ // Fill subdivision cracks
+ if(render.labelfill && opacity(L.p) == 1 && !lighton)
_draw(f,S.external(),position,L.p,interaction.type);
}
} else {
@@ -1485,7 +1486,8 @@ void label(picture pic=currentpicture, Label L, triple position,
if(is3D()) {
for(patch S : surface(L,v,bbox=P.bboxonly).s) {
draw3D(f,S,v,L.p,light,interaction);
- if(render.labelfill && !lighton) // Fill subdivision cracks
+ // Fill subdivision cracks
+ if(render.labelfill && opacity(L.p) == 1 && !lighton)
_draw(f,S.external(),v,L.p,interaction.type);
}
}
@@ -1819,6 +1821,26 @@ void dot(picture pic=currentpicture, Label L, triple v, align align=NoAlign,
label(pic,L,v,render);
}
+void pixel(picture pic=currentpicture, triple v, pen p=currentpen,
+ real width=1)
+{
+ real h=0.5*width;
+ pic.add(new void(frame f, transform3 t, picture pic, projection P) {
+ triple V=t*v;
+ if(is3D())
+ drawpixel(f,V,p,width);
+ if(pic != null) {
+ triple R=h*unit(cross(unit(P.vector()),P.up));
+ pair z=project(V,P.t);
+ real h=0.5*abs(project(V+R,P.t)-project(V-R,P.t));
+ pair r=h*(1,1)/mm;
+ fill(pic,box(z-r,z+r),p,false);
+ }
+ },true);
+ triple R=h*(1,1,1);
+ pic.addBox(v,v,-R,R);
+}
+
pair minbound(triple[] A, projection P)
{
pair b=project(A[0],P);
diff --git a/Build/source/utils/asymptote/base/trembling.asy b/Build/source/utils/asymptote/base/trembling.asy
index 61e78a4fca3..6f6f5973332 100644
--- a/Build/source/utils/asymptote/base/trembling.asy
+++ b/Build/source/utils/asymptote/base/trembling.asy
@@ -1,246 +1,209 @@
-// Copyright (c) 2008, Philippe Ivaldi.
-// http://www.piprime.fr/
+// Copyright(c) 2008, Philippe Ivaldi.
+// Simplified by John Bowman 02Feb2011
+// http: //www.piprime.fr/
// trembling.asy: handwriting package for the software Asymptote.
-// This program is free software ; you can redistribute it and/or modify
+// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation ; either version 3 of the License, or
-// (at your option) any later version.
+// the Free Software Foundation; either version 3 of the License, or
+//(at your option) any later version.
// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public License
-// along with this program ; if not, write to the Free Software
+// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-// COMMENTARY:
+// COMMENTARY:
-// THANKS:
+// THANKS:
-// BUGS:
+// BUGS:
// magnetic points are experimental...
-// CODE:
+// CODE:
-import geometry;
-import stats;
-
-/*<asyxml><variable type="pair[]" signature="magneticPoints"><code></asyxml>*/
-pair[] magneticPoints;
-/*<asyxml></code><documentation>Array of magnetic points.
- When a point is magnetized, a trembled path will pass though P if the original path passes through P.
- When trembling is enabled with the routine 'startTrembling' all the drawn points is added to this array.
- For convenience, one can magnetize an arbitrary number of points with the routine 'magnetize'.<look href="#magnetize(...point[])"><look href="#startTrembling(real,real,real,real,bool">
- </documentation></variable></asyxml>*/
real magneticRadius=1; // unit is bp in postscript coordinates.
real trembleFuzz(){return min(1e-3,magneticRadius/10);}
-// real trembleFuzz(){return min(1e-1,1);}
-pair[] single(pair[] P)
+/* <asyxml> <variable type="real" signature="trembleAngle"> <code> </asyxml> */
+real trembleAngle=4, trembleFrequency=0.5, trembleRandom=2;
+/* <asyxml> </code> <documentation> Variables used by the routine 'tremble'.
+ </documentation> </variable> </asyxml> */
+
+struct tremble
{
- pair[] op;
- bool allow;
- for (int i=0; i < P.length-1; ++i) {
- allow=true;
- for (int j=i+1; j < P.length; ++j) {
- if(abs(P[i]-P[j]) < magneticRadius) {
- allow=false;
- break;
+ static real test=5;
+
+ real angle,frequency,random,fuzz;
+
+ pair[] single(pair[] P)
+ {
+ pair[] op;
+ bool allow;
+ for(int i=0; i < P.length-1; ++i) {
+ allow=true;
+ for(int j=i+1; j < P.length; ++j) {
+ if(abs(P[i]-P[j]) < magneticRadius) {
+ allow=false;
+ break;
+ }
}
+ if(allow) op.push(P[i]);
}
- if(allow) op.push(P[i]);
+ if(P.length > 0) op.push(P[P.length-1]);
+ return op;
}
- if(P.length > 0) op.push(P[P.length-1]);
- return op;
-}
-/*<asyxml><function type="pair" signature="attract(pair,path,real)"><code></asyxml>*/
-real atime(pair m, path g, real fuzz=trembleFuzz())
-{/*<asyxml></code><documentation>Return the time of the nearest point of 'm' which is on the path g.
- 'fuzz' is the argument 'fuzz' of 'intersect'.</documentation></function></asyxml>*/
- if(length(g) == 0) return 0.0;
- real[] t=intersect(m,g,fuzz);
- if(t.length > 0) return t[1];
- real ot;
- static real eps=sqrt(realEpsilon);
- real abmax=abs(max(g)-m), abmin=abs(min(g)-m);
- real initr=abs(m-midpoint(g));
- real maxR=2*max(abmax,abmin), step=eps, r=initr;
- real shx=1e-4;
- transform T=shift(m);
- path ig;
- // do {
- // do {// Find a radius for intersection
- // r += step;
- // ig=T*scale(r)*unitcircle;
- // if(ig == g) {
- // T *= shift(shx,0);
- // ig=T*scale(r)*unitcircle;
- // }
- // t=intersect(ig,g);
- // } while(t.length <= 0 && r <= maxR && inside(g,ig) != 1);//
- // if(t.length <= 0) { // degenerated case
- // r=initr;
- // T *= shift(shx,0);
- // warning("atime","atime needs numerical adjustment.",position=true);
- // }
- // } while(t.length <= 0);
- if(t.length > 0) ot=t[1];
- real rm=0, rM=r;
- while(rM-rm > eps) {
- r=(rm+rM)/2;
- t=intersect(T*scale(r)*unitcircle,g,fuzz);
- if(t.length <= 0) {
- rm=r;
- } else {
- rM=r;
- ot=t[1];
+ /* <asyxml> <function type="pair" signature="attract(pair,path,real)"> <code>
+ </asyxml> */
+ real atime(pair m, path g, real fuzz=trembleFuzz())
+ {/* <asyxml> </code> <documentation> Return the time of the point on path g
+ nearest to 'm'.
+ 'fuzz' is the argument 'fuzz' of 'intersect'. </documentation> </function>
+ </asyxml> */
+ if(length(g) == 0) return 0.0;
+ real[] t=intersect(m,g,fuzz);
+ if(t.length > 0) return t[1];
+ real ot;
+ static real eps=sqrt(realEpsilon);
+ real abmax=abs(max(g)-m), abmin=abs(min(g)-m);
+ real initr=abs(m-midpoint(g));
+ real maxR=2*max(abmax,abmin), step=eps, r=initr;
+ real shx=1e-4;
+ transform T=shift(m);
+ path ig;
+ if(t.length > 0) ot=t[1];
+ real rm=0, rM=r;
+ while(rM-rm > eps) {
+ r=(rm+rM)/2;
+ t=intersect(T*scale(r)*unitcircle,g,fuzz);
+ if(t.length <= 0) {
+ rm=r;
+ } else {
+ rM=r;
+ ot=t[1];
+ }
}
+ return ot;
}
- return ot;
-}
-
-/*<asyxml><function type="void" signature="magnetize(...pair[])"><code></asyxml>*/
-void magnetize(...pair[] P)
-{/*<asyxml></code><documentation>Magnetize the points P.
- When a point is magnetized, a trembled path will pass though P if the original path passes through P.</documentation></function></asyxml>*/
- if(magneticRadius <= 0) return;
- currentpicture.uptodate=false;
- currentpicture.nodes.insert(0,
- new void(frame f, transform t, transform T, pair lb, pair rt)
- {
- for (pair PT:P) {
- magneticPoints.push(t*PT);
- }
- });
-}
-/*<asyxml><function type="void" signature="magnetize(...triangle[])"><code></asyxml>*/
-void magnetize(...triangle[] t)
-{/*<asyxml></code><documentation>Magnetize the vertices of the triangles t.<look href="#magnetize(...pair[])"/></documentation></function></asyxml>*/
- for(int i=0; i < t.length; ++i)
- magnetize(...new point[] {t[i].A, t[i].B, t[i].C});
-}
-
-void trueMagnetize(pair p)
-{
- if(magneticRadius <= 0) return;
- magneticPoints.push(p);
-}
-
-/*<asyxml><function type="path" signature="addnode(path,real)"><code></asyxml>*/
-path addnode(path g, real t)
-{/*<asyxml></code><documentation>Add a node to 'g' at point(g,t).</documentation></function></asyxml>*/
- real l=length(g);
- real rt=t%1;
- if (l==0 || (t > l && !cyclic(g)) || rt == 0) return g;
- if(cyclic(g)) t=t%l;
- int t0=floor(t);
- int t1=t0+1;
- pair z0=point(g,t0), z1=point(g,t1),
- c0=postcontrol(g,t0), c1=precontrol(g,t1),
- m0=(1-rt)*z0+rt*c0, m1=(1-rt)*c0+rt*c1,
- m2=(1-rt)*c1+rt*z1, m3=(1-rt)*m0+rt*m1,
- m4=(1-rt)*m1+rt*m2;
- guide og=subpath(g,0,t0);
- og=og..controls m0 and m3..point(g,t);
- if(cyclic(g))
- if(t1 < l) {
- og=og..controls m4 and m2..subpath(g,t1,l)&cycle;
- } else og=og..controls m4 and m2..cycle;
- else og=og..controls m4 and m2..subpath(g,t1,l);
- return og;
-}
-
-path addnodes(path g, real fuzz=trembleFuzz() ...pair[] P)
-{
- pair[] P=single(P);
- if(length(g) == 0 || P.length == 0 || magneticRadius <= 0) return g;
- path og=g;
- for(pair tp:P) {
- real t=atime(tp,og,fuzz);
- real d=abs(tp-point(og,t));
- if(d < magneticRadius) og=addnode(og,t);
+ /* <asyxml> <function type="path" signature="addnode(path,real)"> <code>
+ </asyxml> */
+ path addnode(path g, real t)
+ {/* <asyxml> </code> <documentation> Add a node to 'g' at point(g,t).
+ </documentation> </function> </asyxml> */
+ real l=length(g);
+ real rt=t % 1;
+ if(l == 0 || (t > l && !cyclic(g)) || rt == 0) return g;
+ if(cyclic(g)) t=t % l;
+ int t0=floor(t);
+ int t1=t0+1;
+ pair z0=point(g,t0), z1=point(g,t1),
+ c0=postcontrol(g,t0), c1=precontrol(g,t1),
+ m0=(1-rt)*z0+rt*c0, m1=(1-rt)*c0+rt*c1,
+ m2=(1-rt)*c1+rt*z1, m3=(1-rt)*m0+rt*m1,
+ m4=(1-rt)*m1+rt*m2;
+ guide og=subpath(g,0,t0)..controls m0 and m3..point(g,t);
+ if(cyclic(g)) {
+ if(t1 < l)
+ og=og..controls m4 and m2..subpath(g,t1,l)&cycle;
+ else og=og..controls m4 and m2..cycle;
+ } else og=og..controls m4 and m2..subpath(g,t1,l);
+ return og;
}
- return og;
-}
-/*<asyxml><function type="path" signature="addnodes(path,int)"><code></asyxml>*/
-path addnodes(path g, int n)
-{/*<asyxml></code><documentation>Add 'n' nodes between each node of 'g'.</documentation></function></asyxml>*/
- real l=length(g);
- if(n == 0 || l == 0) return g;
- path og=g;
- int np=0;
- for (int i=0; i < l; ++i) {
- real step=1/(n+1);
- for (int j=0; j < n; ++j) {
- og=addnode(og,i*(n+1)+j+step);
- step=1/(n-j);
+ path addnodes(path g, real fuzz=trembleFuzz()...pair[] P)
+ {
+ pair[] P=single(P);
+ if(length(g) == 0 || P.length == 0 || magneticRadius <= 0) return g;
+ path og=g;
+ for(pair tp: P) {
+ real t=atime(tp,og,fuzz);
+ real d=abs(tp-point(og,t));
+ if(d < magneticRadius) og=addnode(og,t);
}
+ return og;
}
- return og;
-}
-
-
-/*<asyxml><variable type="real" signature="trembleAngle"><code></asyxml>*/
-real trembleAngle=4, trembleFrequency=0.5, trembleRandom=2;/*<asyxml></code><documentation>Variables used by the routine 'tremble'.</documentation></variable></asyxml>*/
-
-/*<asyxml><function type="path" signature="tremble(path,real,real,real,real)"><code></asyxml>*/
-path tremble(path g,
- real angle=trembleAngle,
- real frequency=trembleFrequency,
- real random=trembleRandom,
- real fuzz=trembleFuzz())
-{/*<asyxml></code><documentation>Return g as it was handwriting.
- The postcontrols and precontrols of the nodes of g will be rotated
- by an angle proportional to 'angle' (in degrees).
- If frequency < 1, floor(1/frequency) nodes will be added to g to increase the
- control points.
- If frequency >= 1, one point for floor(frequency) will be used to deform the path.
- 'random' controls the randomized coefficient which will be multiplied 'angle'.
- random is 0 means don't use randomized coefficient;
- More 'random' is hight more the coefficient is hight and the trembling seems randomized.</documentation></function></asyxml>*/
- if(length(g) == 0) return g;
- path tg=g;
- frequency=abs(frequency);
- int f=abs(floor(1/frequency)-1);
- tg=addnodes(tg,f);
- int frequency=floor(frequency);
- int tf=(frequency == 0) ? 1 : frequency;
- int l=length(tg);
- guide og=point(tg,0);
- random=abs(random);
- int rsgn(real x){
- int d2=floor(100*x)-10*floor(10*x);
- if(d2 == 0) return 1;
- return 2%d2 == 0 ? 1 : -1;
- }
- real randf()
- {
- real or;
- if(random != 0)
- if(1%tf != 0) or=0; else {
- real ur=unitrand();
- or=rsgn(ur)*angle*(1+ur^(1/random));
+ /* <asyxml> <function type="path" signature="addnodes(path,int)"> <code>
+ </asyxml> */
+ path addnodes(path g, int n)
+ {/* <asyxml> </code> <documentation> Add 'n' nodes between each node of 'g'.
+ </documentation> </function> </asyxml> */
+ real l=length(g);
+ if(n == 0 || l == 0) return g;
+ path og=g;
+ int np=0;
+ for(int i=0; i < l; ++i) {
+ real step=1/(n+1);
+ for(int j=0; j < n; ++j) {
+ og=addnode(og,i*(n+1)+j+step);
+ step=1/(n-j);
}
- else or=rsgn(unitrand())*1.5*angle;
- return or;
+ }
+ return og;
}
- real first=randf(), a=first;
- real gle;
- for(int i=1; i <= l; ++i)
+ /* <asyxml> <function type="path"
+ signature="tremble(path,real,real,real,real,pair[] )"> <code> </asyxml> */
+ void operator init(real angle=trembleAngle, real frequency=trembleFrequency,
+ real random=trembleRandom, real fuzz=trembleFuzz()) {
+ this.angle=angle;
+ this.frequency=frequency;
+ this.random=random;
+ this.fuzz=fuzz;
+ }
+
+ path deform(path g...pair[] magneticPoints) {
+ /* <asyxml> </code> <documentation> Return g as it was handwriting.
+ The postcontrols and precontrols of the nodes of g will be rotated
+ by an angle proportional to 'angle'(in degrees).
+ If frequency < 1, floor(1/frequency) nodes will be added to g to
+ increase the control points.
+ If frequency>= 1, one point for floor(frequency) will be used to deform
+ the path.
+ 'random' controls the randomized coefficient which will be multiplied
+ by 'angle'.
+ random is 0 means don't use randomized coefficient;
+ The higher 'random' is, the more the trembling is randomized.
+ </documentation> </function> </asyxml> */
+ if(length(g) == 0) return g;
+ g=addnodes(g,fuzz*abs(max(g)-min(g))...magneticPoints);
+ path tg=g;
+ frequency=abs(frequency);
+ int f=abs(floor(1/frequency)-1);
+ tg=addnodes(tg,f);
+ int frequency=floor(frequency);
+ int tf=(frequency == 0) ? 1 : frequency;
+ int l=length(tg);
+ guide og=point(tg,0);
+ random=abs(random);
+ int rsgn(real x){
+ int d2=floor(100*x)-10*floor(10*x);
+ if(d2 == 0) return 1;
+ return 2 % d2 == 0 ? 1 : -1;
+ }
+ real randf()
{
+ real or;
+ if(random != 0) {
+ if(1 % tf != 0) or=0;
+ else {
+ real ur=unitrand();
+ or=rsgn(ur)*angle*(1+ur^(1/random));
+ }
+ } else or=rsgn(unitrand())*1.5*angle;
+ return or;
+ }
+
+ real first=randf();
+ for(int i=1; i <= l; ++i) {
pair P=point(tg,i);
- // gle=(i == l && (cyclic(tg))) ? first : a;
- // pair post=rotate(gle,point(tg,i-1))*postcontrol(tg,i-1);
- // pair pre=rotate(gle,P)*precontrol(tg,i);
- a=randf();
+ real a=randf();
pair post=rotate(a,point(tg,i-1))*postcontrol(tg,i-1);
pair pre=rotate((a+randf())/2,P)*precontrol(tg,i);
if(i == l && (cyclic(tg)))
@@ -248,121 +211,6 @@ path tremble(path g,
else
og=og..controls post and pre..P;
}
- return og;
-}
-
-typedef path pathModifier(path);
-pathModifier NoModifier=new path(path g){return g;};
-pathModifier tremble(real angle=trembleAngle,
- real frequency=trembleFrequency,
- real random=trembleRandom,
- real fuzz=trembleFuzz())
-{
- return new path(path g){return tremble(g,angle,frequency,random,fuzz);};
-}
-
-void orig_draw(frame f, path g, pen p=currentpen)=draw;
-void tremble_draw(frame f, path g, pen p=currentpen){}
-
-void tremble_marknodes(picture pic=currentpicture, frame f, path g) {}
-void tremble_markuniform(bool centered=false, int n, bool rotated=false) {}
-
-int tremble_circlenodesnumber(real r){return 5;}
-int orig_circlenodesnumber(real r)=circlenodesnumber;
-
-int tremble_circlenodesnumber1(real r, real angle1, real angle2){return 4;}
-int orig_circlenodesnumber1(real r, real angle1, real angle2)=circlenodesnumber;
-
-int tremble_ellipsenodesnumber(real a, real b){return 50;}
-int orig_ellipsenodesnumber(real a, real b)=ellipsenodesnumber;
-
-int tremble_ellipsenodesnumber1(real a, real b, real angle1, real angle2, bool dir){return 20;}
-int orig_ellipsenodesnumber1(real a, real b, real angle1, real angle2, bool dir)=ellipsenodesnumber;
-
-int tremble_parabolanodesnumber(parabola p, real angle1, real angle2){return 20;}
-int orig_parabolanodesnumber(parabola p, real angle1, real angle2)=parabolanodesnumber;
-
-int tremble_hyperbolanodesnumber(hyperbola h, real angle1, real angle2){return 20;}
-int orig_hyperbolanodesnumber(hyperbola h, real angle1, real angle2)=hyperbolanodesnumber;
-
-restricted bool tremblingMode=false;
-/*<asyxml><function type="void" signature="startTrembling(real,real,real,real,bool"><code></asyxml>*/
-void startTrembling(real angle=trembleAngle,
- real frequency=trembleFrequency,
- real random=trembleRandom,
- real fuzz=trembleFuzz(),
- bool magnetizePoints=true)
-{/*<asyxml></code><documentation>Calling this routine all drawn paths will be trembled with the givens parameters.<look href="#tremble(path,real,real,real,real)"/>
- If 'magnetizePoints' is true, most dotted points are automatically magnetized.<look href="magnetize(...pair[])"/></documentation></function></asyxml>*/
- if(!tremblingMode) {
- tremblingMode=true;
- tremble_draw=new void(frame f, path g, pen p=currentpen)
- {
- if(length(g) == 0 && magnetizePoints) {
- trueMagnetize(point(g,0));
- }
- g=addnodes(g,fuzz*abs(max(g)-min(g)) ...magneticPoints);
- orig_draw(f,tremble(g,angle,frequency,random,fuzz),p);
- };
-
- plain.draw=tremble_draw;
-
- if(magnetizePoints) {
- marknodes=new void(picture pic=currentpicture, frame f, path g)
- {
- for(int i=0; i <= length(g); ++i) {
- add(pic,f,point(g,i));
- magnetize(point(g,i));
- }
- };
- dot=dot();
-
- markuniform=new markroutine(bool centered=false, int n, bool rotated=false)
- {
- return new void(picture pic=currentpicture, frame f, path g) {
- if(n <= 0) return;
- void add(real x) {
- real t=reltime(g,x);
- add(pic,rotated ? rotate(degrees(dir(g,t)))*f : f,point(g,t));
- magnetize(point(g,t));
- }
- if(centered) {
- real width=1/n;
- for(int i=0; i < n; ++i) add((i+0.5)*width);
- } else {
- if(n == 1) add(0.5);
- else {
- real width=1/(n-1);
- for(int i=0; i < n; ++i)
- add(i*width);
- }
- }
- };
- };
- }
-
- circlenodesnumber=tremble_circlenodesnumber;
- circlenodesnumber=tremble_circlenodesnumber1;
-
- ellipsenodesnumber=tremble_ellipsenodesnumber;
- ellipsenodesnumber=tremble_ellipsenodesnumber1;
-
- parabolanodesnumber=tremble_parabolanodesnumber;
- hyperbolanodesnumber=tremble_hyperbolanodesnumber;
+ return og;
}
}
-
-// void stopTrembling()
-// {
-// if(tremblingMode) {
-// tremblingMode=false;
-// plain.draw=orig_draw;
-// // draw=orig_draw1;
-// circlenodesnumber=orig_circlenodesnumber;
-// circlenodesnumber=orig_circlenodesnumber1;
-// ellipsenodesnumber=orig_ellipsenodesnumber;
-// ellipsenodesnumber=orig_ellipsenodesnumber1;
-// parabolanodesnumber=orig_parabolanodesnumber;
-// hyperbolanodesnumber=orig_hyperbolanodesnumber;
-// }
-// }
diff --git a/Build/source/utils/asymptote/builtin.cc b/Build/source/utils/asymptote/builtin.cc
index 4a8ed9c2216..b5066061384 100644
--- a/Build/source/utils/asymptote/builtin.cc
+++ b/Build/source/utils/asymptote/builtin.cc
@@ -42,6 +42,11 @@
#include "builtin.symbols.h"
#endif
+namespace vm {
+ // Defined in stack.cc
+ extern vm::frame *make_dummyframe(string name);
+}
+
using namespace types;
using namespace camp;
using namespace vm;
@@ -90,7 +95,7 @@ void base_tenv(tenv &te)
const formal noformal(0);
-void addFunc(venv &ve, access *a, ty *result, symbol id,
+function *functionFromFormals(ty *result,
formal f1=noformal, formal f2=noformal, formal f3=noformal,
formal f4=noformal, formal f5=noformal, formal f6=noformal,
formal f7=noformal, formal f8=noformal, formal f9=noformal,
@@ -119,6 +124,20 @@ void addFunc(venv &ve, access *a, ty *result, symbol id,
if (fH.t) fun->add(fH);
if (fI.t) fun->add(fI);
+ return fun;
+}
+
+void addFunc(venv &ve, access *a, ty *result, symbol id,
+ formal f1=noformal, formal f2=noformal, formal f3=noformal,
+ formal f4=noformal, formal f5=noformal, formal f6=noformal,
+ formal f7=noformal, formal f8=noformal, formal f9=noformal,
+ formal fA=noformal, formal fB=noformal, formal fC=noformal,
+ formal fD=noformal, formal fE=noformal, formal fF=noformal,
+ formal fG=noformal, formal fH=noformal, formal fI=noformal)
+{
+ function *fun = functionFromFormals(result,f1,f2,f3,f4,f5,f6,f7,f8,f9,
+ fA,fB,fC,fD,fE,fF,fG,fH,fI);
+
// NOTE: If the function is a field, we should encode the defining record in
// the entry
varEntry *ent = new varEntry(fun, a, 0, position());
@@ -132,7 +151,25 @@ void addFunc(venv &ve, bltin f, ty *result, symbol name,
formal f7, formal f8, formal f9, formal fA, formal fB, formal fC,
formal fD, formal fE, formal fF, formal fG, formal fH, formal fI)
{
- REGISTER_BLTIN(f, name);
+#ifdef DEBUG_BLTIN
+ // If the function is an operator, print out the whole signature with the
+ // types, as operators are heavily overloaded. min and max are also heavily
+ // overloaded, so we check for them too. Many builtin functions have so
+ // many arguments that it is noise to print out their full signatures.
+ string s = name;
+ if (s.find("operator ", 0) == 0 || s == "min" || s == "max")
+ {
+ function *fun = functionFromFormals(result,f1,f2,f3,f4,f5,f6,f7,f8,f9,
+ fA,fB,fC,fD,fE,fF,fG,fH,fI);
+ ostringstream out;
+ fun->printVar(out, name);
+ REGISTER_BLTIN(f, out.str());
+ }
+ else {
+ REGISTER_BLTIN(f, name);
+ }
+#endif
+
access *a = new bltinAccess(f);
addFunc(ve,a,result,name,f1,f2,f3,f4,f5,f6,f7,f8,f9,
fA,fB,fC,fD,fE,fF,fG,fH,fI);
@@ -544,13 +581,11 @@ void addArrayOps(venv &ve, types::array *t)
{
ty *ct = t->celltype;
-#ifdef TEST_ADDED_OPS
// Check for the alias function to see if these operation have already been
// added, if they have, don't add them again.
static types::function aliasType(primBoolean(), primVoid(), primVoid());
aliasType.sig.formals[0].t = t;
aliasType.sig.formals[1].t = t;
-#endif
if (ve.lookByType(SYM(alias), &aliasType))
return;
@@ -559,17 +594,16 @@ void addArrayOps(venv &ve, types::array *t)
primBoolean(), SYM(alias), formal(t, SYM(a)), formal(t, SYM(b)));
size_t depth=(size_t) t->depth();
- typedef void (*stackFcn)(stack *Stack);
- static stackFcn routine[]={run::copyArray0,run::copyArray1,run::copyArray2};
-
- size_t ndepth=sizeof(routine)/sizeof(stackFcn);
-
- if(depth <= ndepth) {
- addFunc(ve, routine[depth-1],
- t, SYM(array), formal(primInt(), SYM(n)),
- formal(ct, SYM(value)),
- formal(primInt(), SYM(depth), true));
- }
+
+ // Define an array constructor. This needs to know the depth of the array,
+ // which may not be known at runtime. Therefore, the depth, which is known
+ // here at compile-time, is pushed on the stack beforehand by use of a
+ // thunk.
+ callable *copyFunc = new thunk(new vm::bfunc(run::copyArray),(Int) depth-1);
+ addFunc(ve, new callableAccess(copyFunc),
+ t, SYM(array), formal(primInt(), SYM(n)),
+ formal(ct, SYM(value)),
+ formal(primInt(), SYM(depth), true));
switch (depth) {
case 1:
@@ -614,14 +648,7 @@ void addRecordOps(venv &ve, record *r)
void addFunctionOps(venv &ve, function *f)
{
-#ifdef NO_FUNC_OPS
// No function ops.
-#else
- addFunc(ve, run::boolFuncEq, primBoolean(), SYM_EQ, formal(f, SYM(a)),
- formal(f, SYM(b)));
- addFunc(ve, run::boolFuncNeq, primBoolean(), SYM_NEQ, formal(f, SYM(a)),
- formal(f, SYM(b)));
-#endif
}
@@ -702,11 +729,7 @@ void addOperators(venv &ve)
dummyRecord *createDummyRecord(venv &ve, symbol name)
{
dummyRecord *r=new dummyRecord(name);
-#ifdef DEBUG_FRAME
- vm::frame *f = new vm::frame("dummy record " + string(name), 0);
-#else
- vm::frame *f = new vm::frame(0);
-#endif
+ vm::frame *f = make_dummyframe(name);
addConstant(ve, f, r, name);
addRecordOps(ve, r);
return r;
@@ -728,9 +751,41 @@ void openFunc(stack *Stack)
}
#endif
+// A function accessible in asy code print the bytecode of a function.
+void printBytecode(stack *Stack)
+{
+ // As arbitrary addresses can be sent to printBytecode, it should not be run
+ // in safe mode.
+ if (settings::safe) {
+ cerr << "use -nosafe flag to enable printBytecode" << endl;
+ return;
+ }
+
+ vm::array *a=vm::pop<vm::array *>(Stack);
+ size_t numArgs=checkArray(a);
+ if (numArgs != 1)
+ cerr << "printBytecode takes one argument" << endl;
+
+ // TODO: Add a reliable test for the object being a func.
+ callable *c = a->read<callable *>(0);
+ if (func *f = dynamic_cast<func *>(c))
+ print(cout, f->body->code);
+ else
+ cout << "callable is not a standard function";
+}
+
+
+
+
// NOTE: We should move all of these into a "builtin" module.
void base_venv(venv &ve)
{
+ // Register the name of arrayDeleteHelper for debugging in "asy -s" mode.
+ // This is done automatically for other function, but because
+ // arrayDeleteHelper is not defined in the usual way, it must be done
+ // explicitly, and here is as good a place as any.
+ REGISTER_BLTIN(arrayDeleteHelper, "arrayDeleteHelper");
+
addInitializers(ve);
addCasts(ve);
addOperators(ve);
@@ -807,6 +862,8 @@ void base_venv(venv &ve)
addOpenFunc(ve, openFunc, primInt(), SYM(openFunc));
#endif
+ addOpenFunc(ve, printBytecode, primVoid(), SYM(printBytecode));
+
gen_runtime_venv(ve);
gen_runbacktrace_venv(ve);
gen_runpicture_venv(ve);
diff --git a/Build/source/utils/asymptote/builtin.h b/Build/source/utils/asymptote/builtin.h
index 09a88133783..f29a97ccd40 100644
--- a/Build/source/utils/asymptote/builtin.h
+++ b/Build/source/utils/asymptote/builtin.h
@@ -52,7 +52,7 @@ extern double infinity;
void single(vm::stack *Stack);
void arrayDeleteHelper(vm::stack *Stack);
-// Used by coder to optimize conditional jumps.
+// Used by to optimize conditional jumps.
extern const vm::bltin intLess;
extern const vm::bltin intGreater;
}
diff --git a/Build/source/utils/asymptote/camp.l b/Build/source/utils/asymptote/camp.l
index cb4d31bdc95..5eb8d706808 100644
--- a/Build/source/utils/asymptote/camp.l
+++ b/Build/source/utils/asymptote/camp.l
@@ -27,7 +27,8 @@ using mem::string;
#include "opsymbols.h"
-#define YY_NO_UNPUT
+static void yyunput(int, char *);
+void (*unused)(int,char *) = yyunput;
fileinfo* fi;
Int tokPos;
diff --git a/Build/source/utils/asymptote/camp.tab.cc b/Build/source/utils/asymptote/camp.tab.cc
index 239d5eb4555..b274b4fc881 100644
--- a/Build/source/utils/asymptote/camp.tab.cc
+++ b/Build/source/utils/asymptote/camp.tab.cc
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -108,6 +107,19 @@ void yyerror(const char *s)
}
}
+// Check if the symbol given is "keyword". Returns true in this case and
+// returns false and reports an error otherwise.
+bool checkKeyword(position pos, symbol sym)
+{
+ if (sym != symbol::trans("keyword")) {
+ em.error(pos);
+ em << "expected 'keyword' here";
+
+ return false;
+ }
+ return true;
+}
+
namespace absyntax { file *root; }
using namespace absyntax;
@@ -116,7 +128,7 @@ using mem::string;
/* Line 189 of yacc.c */
-#line 120 "camp.tab.c"
+#line 132 "camp.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -209,7 +221,7 @@ typedef union YYSTYPE
{
/* Line 214 of yacc.c */
-#line 47 "camp.y"
+#line 60 "camp.y"
position pos;
bool boo;
@@ -259,7 +271,7 @@ typedef union YYSTYPE
/* Line 214 of yacc.c */
-#line 263 "camp.tab.c"
+#line 275 "camp.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -271,7 +283,7 @@ typedef union YYSTYPE
/* Line 264 of yacc.c */
-#line 275 "camp.tab.c"
+#line 287 "camp.tab.c"
#ifdef short
# undef short
@@ -321,7 +333,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -486,16 +498,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 2174
+#define YYLAST 2151
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 76
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 51
+#define YYNNTS 49
/* YYNRULES -- Number of rules. */
#define YYNRULES 199
/* YYNRULES -- Number of states. */
-#define YYNSTATES 379
+#define YYNSTATES 381
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -553,19 +565,19 @@ static const yytype_uint16 yyprhs[] =
119, 122, 125, 127, 130, 132, 135, 139, 143, 148,
150, 154, 156, 160, 162, 165, 169, 174, 176, 178,
182, 185, 190, 194, 200, 202, 204, 207, 209, 213,
- 215, 219, 222, 224, 228, 230, 231, 234, 238, 244,
- 250, 257, 261, 264, 266, 269, 272, 276, 280, 285,
- 290, 295, 300, 304, 309, 313, 318, 322, 326, 328,
- 330, 334, 336, 340, 343, 345, 349, 351, 353, 355,
- 357, 360, 365, 371, 374, 377, 380, 384, 388, 392,
- 396, 400, 404, 408, 412, 416, 420, 424, 428, 432,
- 436, 440, 444, 448, 452, 456, 459, 463, 468, 472,
- 477, 483, 490, 497, 505, 511, 515, 521, 529, 543,
- 547, 550, 553, 556, 559, 563, 568, 570, 572, 575,
- 578, 582, 587, 591, 597, 605, 607, 611, 615, 617,
- 619, 622, 627, 631, 637, 640, 645, 647, 649, 652,
- 658, 666, 672, 680, 690, 699, 702, 705, 708, 712,
- 714, 716, 717, 719, 721, 722, 724, 725, 727, 729
+ 215, 218, 222, 226, 228, 229, 232, 236, 242, 247,
+ 254, 260, 267, 271, 274, 276, 279, 282, 286, 290,
+ 295, 300, 305, 310, 314, 319, 323, 328, 332, 336,
+ 338, 340, 344, 346, 349, 353, 357, 359, 361, 363,
+ 365, 368, 373, 379, 382, 385, 388, 392, 396, 400,
+ 404, 408, 412, 416, 420, 424, 428, 432, 436, 440,
+ 444, 448, 452, 456, 460, 464, 467, 471, 476, 480,
+ 485, 491, 498, 505, 513, 519, 523, 529, 537, 551,
+ 555, 558, 561, 564, 567, 571, 576, 578, 580, 583,
+ 586, 590, 595, 599, 605, 613, 615, 619, 623, 625,
+ 627, 630, 635, 639, 645, 648, 653, 655, 657, 660,
+ 666, 674, 680, 688, 698, 707, 710, 713, 716, 720,
+ 722, 724, 725, 727, 729, 730, 732, 733, 735, 737
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -573,9 +585,9 @@ static const yytype_int8 yyrhs[] =
{
77, 0, -1, 78, -1, -1, 78, 81, -1, -1,
79, 81, -1, 3, -1, 80, 44, 3, -1, 29,
- -1, 83, -1, 120, -1, 82, 83, -1, 82, 120,
+ -1, 83, -1, 118, -1, 82, 83, -1, 82, 118,
-1, 73, -1, 72, -1, 82, 73, -1, 82, 72,
- -1, 89, -1, 107, -1, 108, -1, 50, 88, 48,
+ -1, 89, -1, 106, -1, 107, -1, 50, 88, 48,
-1, 54, 80, 51, 85, 48, -1, 54, 80, 51,
27, 48, -1, 51, 80, 48, -1, 54, 86, 50,
85, 48, -1, 54, 86, 50, 27, 48, -1, 52,
@@ -585,91 +597,92 @@ static const yytype_int8 yyrhs[] =
3, 3, -1, 87, -1, 88, 45, 87, -1, 90,
48, -1, 91, 95, -1, 92, -1, 80, 93, -1,
80, -1, 46, 47, -1, 93, 46, 47, -1, 46,
- 114, 47, -1, 94, 46, 114, 47, -1, 96, -1,
+ 112, 47, -1, 94, 46, 112, 47, -1, 96, -1,
95, 45, 96, -1, 97, -1, 97, 34, 98, -1,
3, -1, 3, 93, -1, 3, 42, 43, -1, 3,
- 42, 103, 43, -1, 114, -1, 100, -1, 40, 79,
+ 42, 103, 43, -1, 112, -1, 100, -1, 40, 79,
41, -1, 40, 41, -1, 40, 49, 98, 41, -1,
40, 101, 41, -1, 40, 101, 49, 98, 41, -1,
45, -1, 102, -1, 102, 45, -1, 98, -1, 102,
- 45, 98, -1, 104, -1, 104, 49, 106, -1, 49,
- 106, -1, 106, -1, 104, 45, 106, -1, 68, -1,
- -1, 105, 91, -1, 105, 91, 97, -1, 105, 91,
- 97, 34, 98, -1, 91, 3, 42, 43, 122, -1,
- 91, 3, 42, 103, 43, 122, -1, 56, 3, 99,
- -1, 57, 89, -1, 36, -1, 114, 36, -1, 36,
- 114, -1, 114, 36, 114, -1, 110, 44, 3, -1,
- 80, 46, 114, 47, -1, 110, 46, 114, 47, -1,
- 80, 46, 109, 47, -1, 110, 46, 109, 47, -1,
- 80, 42, 43, -1, 80, 42, 112, 43, -1, 110,
- 42, 43, -1, 110, 42, 112, 43, -1, 42, 114,
- 43, -1, 42, 80, 43, -1, 67, -1, 114, -1,
- 3, 34, 114, -1, 113, -1, 113, 49, 111, -1,
- 49, 111, -1, 111, -1, 113, 45, 111, -1, 80,
- -1, 110, -1, 70, -1, 71, -1, 70, 114, -1,
- 42, 80, 43, 114, -1, 42, 80, 93, 43, 114,
- -1, 25, 114, -1, 26, 114, -1, 31, 114, -1,
- 114, 25, 114, -1, 114, 26, 114, -1, 114, 27,
- 114, -1, 114, 28, 114, -1, 114, 29, 114, -1,
- 114, 30, 114, -1, 114, 20, 114, -1, 114, 21,
- 114, -1, 114, 22, 114, -1, 114, 23, 114, -1,
- 114, 18, 114, -1, 114, 19, 114, -1, 114, 15,
- 114, -1, 114, 14, 114, -1, 114, 24, 114, -1,
- 114, 17, 114, -1, 114, 16, 114, -1, 114, 32,
- 114, -1, 114, 8, 114, -1, 58, 92, -1, 58,
- 92, 94, -1, 58, 92, 94, 93, -1, 58, 92,
- 93, -1, 58, 92, 93, 100, -1, 58, 92, 42,
- 43, 122, -1, 58, 92, 93, 42, 43, 122, -1,
- 58, 92, 42, 103, 43, 122, -1, 58, 92, 93,
- 42, 103, 43, 122, -1, 114, 35, 114, 36, 114,
- -1, 114, 34, 114, -1, 42, 114, 45, 114, 43,
- -1, 42, 114, 45, 114, 45, 114, 43, -1, 42,
- 114, 45, 114, 45, 114, 45, 114, 45, 114, 45,
- 114, 43, -1, 114, 115, 114, -1, 114, 116, -1,
- 8, 114, -1, 7, 114, -1, 114, 8, -1, 114,
- 4, 114, -1, 55, 40, 78, 41, -1, 7, -1,
- 117, -1, 116, 117, -1, 117, 116, -1, 116, 117,
- 116, -1, 40, 13, 114, 41, -1, 40, 114, 41,
- -1, 40, 114, 45, 114, 41, -1, 40, 114, 45,
- 114, 45, 114, 41, -1, 5, -1, 5, 118, 5,
- -1, 5, 119, 5, -1, 6, -1, 9, -1, 11,
- 114, -1, 11, 114, 39, 114, -1, 11, 12, 114,
- -1, 11, 12, 114, 39, 114, -1, 10, 114, -1,
- 10, 114, 39, 114, -1, 48, -1, 122, -1, 121,
- 48, -1, 59, 42, 114, 43, 120, -1, 59, 42,
- 114, 43, 120, 60, 120, -1, 61, 42, 114, 43,
- 120, -1, 62, 120, 61, 42, 114, 43, 48, -1,
- 63, 42, 123, 48, 124, 48, 125, 43, 120, -1,
- 63, 42, 91, 3, 36, 114, 43, 120, -1, 64,
- 48, -1, 65, 48, -1, 66, 48, -1, 66, 114,
- 48, -1, 114, -1, 99, -1, -1, 126, -1, 90,
- -1, -1, 114, -1, -1, 126, -1, 121, -1, 126,
- 45, 121, -1
+ 45, 98, -1, 105, -1, 49, 105, -1, 103, 45,
+ 105, -1, 103, 49, 105, -1, 68, -1, -1, 104,
+ 91, -1, 104, 91, 97, -1, 104, 91, 97, 34,
+ 98, -1, 104, 91, 3, 97, -1, 104, 91, 3,
+ 97, 34, 98, -1, 91, 3, 42, 43, 120, -1,
+ 91, 3, 42, 103, 43, 120, -1, 56, 3, 99,
+ -1, 57, 89, -1, 36, -1, 112, 36, -1, 36,
+ 112, -1, 112, 36, 112, -1, 109, 44, 3, -1,
+ 80, 46, 112, 47, -1, 109, 46, 112, 47, -1,
+ 80, 46, 108, 47, -1, 109, 46, 108, 47, -1,
+ 80, 42, 43, -1, 80, 42, 111, 43, -1, 109,
+ 42, 43, -1, 109, 42, 111, 43, -1, 42, 112,
+ 43, -1, 42, 80, 43, -1, 67, -1, 112, -1,
+ 3, 34, 112, -1, 110, -1, 49, 110, -1, 111,
+ 45, 110, -1, 111, 49, 110, -1, 80, -1, 109,
+ -1, 70, -1, 71, -1, 70, 112, -1, 42, 80,
+ 43, 112, -1, 42, 80, 93, 43, 112, -1, 25,
+ 112, -1, 26, 112, -1, 31, 112, -1, 112, 25,
+ 112, -1, 112, 26, 112, -1, 112, 27, 112, -1,
+ 112, 28, 112, -1, 112, 29, 112, -1, 112, 30,
+ 112, -1, 112, 20, 112, -1, 112, 21, 112, -1,
+ 112, 22, 112, -1, 112, 23, 112, -1, 112, 18,
+ 112, -1, 112, 19, 112, -1, 112, 15, 112, -1,
+ 112, 14, 112, -1, 112, 24, 112, -1, 112, 17,
+ 112, -1, 112, 16, 112, -1, 112, 32, 112, -1,
+ 112, 8, 112, -1, 58, 92, -1, 58, 92, 94,
+ -1, 58, 92, 94, 93, -1, 58, 92, 93, -1,
+ 58, 92, 93, 100, -1, 58, 92, 42, 43, 120,
+ -1, 58, 92, 93, 42, 43, 120, -1, 58, 92,
+ 42, 103, 43, 120, -1, 58, 92, 93, 42, 103,
+ 43, 120, -1, 112, 35, 112, 36, 112, -1, 112,
+ 34, 112, -1, 42, 112, 45, 112, 43, -1, 42,
+ 112, 45, 112, 45, 112, 43, -1, 42, 112, 45,
+ 112, 45, 112, 45, 112, 45, 112, 45, 112, 43,
+ -1, 112, 113, 112, -1, 112, 114, -1, 8, 112,
+ -1, 7, 112, -1, 112, 8, -1, 112, 4, 112,
+ -1, 55, 40, 78, 41, -1, 7, -1, 115, -1,
+ 114, 115, -1, 115, 114, -1, 114, 115, 114, -1,
+ 40, 13, 112, 41, -1, 40, 112, 41, -1, 40,
+ 112, 45, 112, 41, -1, 40, 112, 45, 112, 45,
+ 112, 41, -1, 5, -1, 5, 116, 5, -1, 5,
+ 117, 5, -1, 6, -1, 9, -1, 11, 112, -1,
+ 11, 112, 39, 112, -1, 11, 12, 112, -1, 11,
+ 12, 112, 39, 112, -1, 10, 112, -1, 10, 112,
+ 39, 112, -1, 48, -1, 120, -1, 119, 48, -1,
+ 59, 42, 112, 43, 118, -1, 59, 42, 112, 43,
+ 118, 60, 118, -1, 61, 42, 112, 43, 118, -1,
+ 62, 118, 61, 42, 112, 43, 48, -1, 63, 42,
+ 121, 48, 122, 48, 123, 43, 118, -1, 63, 42,
+ 91, 3, 36, 112, 43, 118, -1, 64, 48, -1,
+ 65, 48, -1, 66, 48, -1, 66, 112, 48, -1,
+ 112, -1, 99, -1, -1, 124, -1, 90, -1, -1,
+ 112, -1, -1, 124, -1, 119, -1, 124, 45, 119,
+ -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 179, 179, 183, 184, 189, 190, 195, 196, 197,
- 202, 203, 204, 206, 211, 212, 213, 215, 220, 221,
- 222, 223, 225, 227, 229, 230, 232, 234, 236, 237,
- 242, 244, 248, 249, 254, 255, 260, 262, 266, 267,
- 272, 276, 280, 281, 285, 289, 290, 294, 295, 300,
- 301, 306, 307, 312, 313, 314, 316, 321, 322, 326,
- 331, 332, 334, 336, 341, 342, 343, 347, 349, 354,
- 355, 357, 361, 362, 367, 368, 372, 374, 376, 381,
- 383, 388, 389, 393, 394, 395, 396, 400, 401, 403,
- 404, 406, 407, 410, 414, 415, 417, 419, 421, 425,
- 426, 430, 431, 433, 437, 438, 444, 445, 446, 447,
- 449, 450, 452, 454, 456, 458, 459, 460, 461, 462,
- 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
- 473, 474, 475, 476, 477, 478, 480, 482, 484, 486,
- 488, 490, 495, 497, 502, 504, 506, 508, 510, 512,
- 514, 520, 522, 525, 527, 528, 535, 536, 538, 541,
- 544, 550, 551, 552, 555, 561, 562, 564, 566, 567,
- 571, 573, 576, 579, 585, 586, 591, 592, 593, 594,
- 596, 598, 600, 602, 604, 606, 607, 608, 609, 613,
- 617, 621, 622, 623, 627, 628, 632, 633, 637, 638
+ 0, 192, 192, 196, 197, 202, 203, 208, 209, 210,
+ 215, 216, 217, 219, 224, 225, 226, 228, 233, 234,
+ 235, 236, 238, 240, 242, 243, 245, 247, 249, 250,
+ 255, 257, 261, 262, 267, 268, 273, 275, 279, 280,
+ 285, 289, 293, 294, 298, 302, 303, 307, 308, 313,
+ 314, 319, 320, 325, 326, 327, 329, 334, 335, 339,
+ 344, 345, 347, 349, 354, 355, 356, 360, 362, 367,
+ 368, 369, 371, 376, 377, 381, 383, 385, 388, 391,
+ 397, 399, 404, 405, 409, 410, 411, 412, 416, 417,
+ 419, 420, 422, 423, 426, 430, 431, 433, 435, 437,
+ 441, 442, 446, 447, 449, 451, 456, 457, 458, 459,
+ 461, 462, 464, 466, 468, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 492, 494, 496, 498,
+ 500, 502, 507, 509, 514, 516, 518, 520, 522, 524,
+ 526, 532, 534, 537, 539, 540, 547, 548, 550, 553,
+ 556, 562, 563, 564, 567, 573, 574, 576, 578, 579,
+ 583, 585, 588, 591, 597, 598, 603, 604, 605, 606,
+ 608, 610, 612, 614, 616, 618, 619, 620, 621, 625,
+ 629, 633, 634, 635, 639, 640, 644, 645, 649, 650
};
#endif
@@ -692,11 +705,10 @@ static const char *const yytname[] =
"idpair", "idpairlist", "strid", "stridpair", "stridpairlist", "vardec",
"barevardec", "type", "celltype", "dims", "dimexps", "decidlist",
"decid", "decidstart", "varinit", "block", "arrayinit", "basearrayinit",
- "varinits", "formals", "baseformals", "explicitornot", "formal",
- "fundec", "typedec", "slice", "value", "argument", "arglist",
- "basearglist", "exp", "join", "dir", "basicjoin", "tension", "controls",
- "stm", "stmexp", "blockstm", "forinit", "fortest", "forupdate",
- "stmexplist", 0
+ "varinits", "formals", "explicitornot", "formal", "fundec", "typedec",
+ "slice", "value", "argument", "arglist", "exp", "join", "dir",
+ "basicjoin", "tension", "controls", "stm", "stmexp", "blockstm",
+ "forinit", "fortest", "forupdate", "stmexplist", 0
};
#endif
@@ -726,19 +738,19 @@ static const yytype_uint8 yyr1[] =
89, 90, 91, 91, 92, 93, 93, 94, 94, 95,
95, 96, 96, 97, 97, 97, 97, 98, 98, 99,
100, 100, 100, 100, 101, 101, 101, 102, 102, 103,
- 103, 103, 104, 104, 105, 105, 106, 106, 106, 107,
- 107, 108, 108, 109, 109, 109, 109, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 111,
- 111, 112, 112, 112, 113, 113, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 115, 115, 115, 115,
- 115, 116, 116, 116, 116, 117, 117, 117, 117, 117,
- 118, 118, 118, 118, 119, 119, 120, 120, 120, 120,
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 121,
- 122, 123, 123, 123, 124, 124, 125, 125, 126, 126
+ 103, 103, 103, 104, 104, 105, 105, 105, 105, 105,
+ 106, 106, 107, 107, 108, 108, 108, 108, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 110, 110, 111, 111, 111, 111, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 113, 113, 113, 113,
+ 113, 114, 114, 114, 114, 115, 115, 115, 115, 115,
+ 116, 116, 116, 116, 117, 117, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 119,
+ 120, 121, 121, 121, 122, 122, 123, 123, 124, 124
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -751,10 +763,10 @@ static const yytype_uint8 yyr2[] =
2, 2, 1, 2, 1, 2, 3, 3, 4, 1,
3, 1, 3, 1, 2, 3, 4, 1, 1, 3,
2, 4, 3, 5, 1, 1, 2, 1, 3, 1,
- 3, 2, 1, 3, 1, 0, 2, 3, 5, 5,
- 6, 3, 2, 1, 2, 2, 3, 3, 4, 4,
- 4, 4, 3, 4, 3, 4, 3, 3, 1, 1,
- 3, 1, 3, 2, 1, 3, 1, 1, 1, 1,
+ 2, 3, 3, 1, 0, 2, 3, 5, 4, 6,
+ 5, 6, 3, 2, 1, 2, 2, 3, 3, 4,
+ 4, 4, 4, 3, 4, 3, 4, 3, 3, 1,
+ 1, 3, 1, 2, 3, 3, 1, 1, 1, 1,
2, 4, 5, 2, 2, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 2, 3, 4, 3, 4,
@@ -774,108 +786,108 @@ static const yytype_uint8 yydefact[] =
3, 0, 2, 1, 7, 0, 0, 0, 0, 9,
0, 5, 0, 176, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 98, 108, 109, 15, 14, 106, 4, 0, 10, 18,
+ 99, 108, 109, 15, 14, 106, 4, 0, 10, 18,
0, 0, 42, 190, 19, 20, 107, 189, 11, 0,
177, 106, 152, 151, 113, 114, 115, 0, 106, 0,
36, 35, 0, 38, 0, 0, 0, 0, 0, 7,
- 0, 0, 3, 0, 44, 82, 0, 44, 135, 0,
+ 0, 0, 3, 0, 44, 83, 0, 44, 135, 0,
0, 0, 191, 185, 186, 187, 0, 110, 0, 0,
0, 43, 17, 16, 12, 13, 40, 53, 41, 49,
51, 0, 0, 0, 0, 165, 168, 156, 153, 169,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 150, 157, 178, 0, 59, 6, 97, 0,
- 96, 0, 0, 0, 21, 24, 27, 28, 29, 0,
- 0, 0, 81, 0, 53, 75, 0, 138, 136, 0,
- 0, 0, 193, 0, 198, 0, 192, 188, 7, 92,
- 0, 104, 0, 101, 99, 8, 83, 45, 0, 0,
- 0, 75, 54, 0, 0, 94, 0, 87, 0, 0,
- 154, 0, 0, 0, 0, 134, 129, 128, 132, 131,
- 126, 127, 122, 123, 124, 125, 130, 116, 117, 118,
- 119, 120, 121, 133, 145, 0, 0, 0, 149, 158,
- 159, 111, 0, 0, 37, 39, 30, 0, 32, 0,
- 0, 0, 155, 75, 0, 75, 74, 0, 69, 0,
- 72, 0, 0, 75, 139, 0, 137, 0, 0, 0,
- 53, 194, 0, 0, 103, 93, 0, 0, 85, 90,
- 84, 88, 46, 55, 0, 50, 52, 58, 57, 95,
- 91, 89, 174, 0, 170, 166, 167, 0, 0, 162,
- 0, 160, 112, 146, 0, 0, 23, 0, 22, 26,
- 25, 55, 0, 140, 71, 0, 75, 75, 76, 47,
- 60, 64, 0, 67, 0, 65, 0, 0, 0, 179,
- 181, 0, 0, 195, 0, 199, 100, 105, 102, 86,
- 79, 56, 0, 172, 0, 144, 161, 0, 0, 31,
- 33, 56, 142, 73, 70, 77, 0, 62, 0, 66,
- 141, 0, 48, 0, 0, 0, 196, 80, 175, 0,
- 171, 163, 0, 147, 0, 0, 61, 0, 68, 143,
- 180, 182, 0, 0, 197, 173, 0, 0, 78, 63,
- 184, 0, 164, 0, 183, 0, 0, 0, 148
+ 0, 0, 150, 157, 178, 0, 59, 6, 98, 0,
+ 97, 0, 0, 0, 21, 24, 27, 28, 29, 0,
+ 0, 0, 82, 0, 53, 74, 0, 138, 136, 0,
+ 0, 0, 193, 0, 198, 0, 192, 188, 7, 93,
+ 0, 102, 0, 100, 8, 84, 45, 0, 0, 0,
+ 74, 54, 0, 0, 95, 0, 88, 0, 0, 154,
+ 0, 0, 0, 0, 134, 129, 128, 132, 131, 126,
+ 127, 122, 123, 124, 125, 130, 116, 117, 118, 119,
+ 120, 121, 133, 145, 0, 0, 0, 149, 158, 159,
+ 111, 0, 0, 37, 39, 30, 0, 32, 0, 0,
+ 0, 155, 74, 0, 74, 73, 0, 0, 69, 0,
+ 0, 74, 139, 0, 137, 0, 0, 0, 53, 194,
+ 0, 0, 103, 94, 0, 0, 86, 91, 85, 89,
+ 46, 55, 0, 50, 52, 58, 57, 96, 92, 90,
+ 174, 0, 170, 166, 167, 0, 0, 162, 0, 160,
+ 112, 146, 0, 0, 23, 0, 22, 26, 25, 55,
+ 0, 140, 70, 0, 74, 74, 75, 47, 60, 64,
+ 0, 67, 0, 65, 0, 0, 0, 179, 181, 0,
+ 0, 195, 0, 199, 101, 104, 105, 87, 80, 56,
+ 0, 172, 0, 144, 161, 0, 0, 31, 33, 56,
+ 142, 71, 72, 53, 76, 0, 62, 0, 66, 141,
+ 0, 48, 0, 0, 0, 196, 81, 175, 0, 171,
+ 163, 0, 147, 0, 78, 0, 61, 0, 68, 143,
+ 180, 182, 0, 0, 197, 173, 0, 0, 0, 77,
+ 63, 184, 0, 164, 0, 79, 183, 0, 0, 0,
+ 148
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 57, 51, 36, 37, 38, 228, 229,
- 62, 63, 64, 39, 40, 41, 42, 182, 158, 98,
- 99, 100, 266, 43, 267, 304, 305, 237, 238, 239,
- 240, 44, 45, 178, 46, 171, 172, 173, 47, 131,
- 132, 133, 193, 194, 48, 49, 50, 165, 314, 363,
- 166
+ -1, 1, 2, 57, 51, 36, 37, 38, 227, 228,
+ 62, 63, 64, 39, 40, 41, 42, 181, 158, 98,
+ 99, 100, 264, 43, 265, 302, 303, 236, 237, 238,
+ 44, 45, 177, 46, 171, 172, 47, 131, 132, 133,
+ 192, 193, 48, 49, 50, 165, 312, 363, 166
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -208
+#define YYPACT_NINF -261
static const yytype_int16 yypact[] =
{
- -208, 23, 474, -208, -208, 913, 913, 913, 913, -208,
- 913, -208, 913, -208, 17, 12, 17, 18, 16, -27,
- 69, 12, 12, 42, 44, 616, 62, 79, 80, 733,
- -208, 6, -208, -208, -208, 36, -208, 545, -208, -208,
- 90, 146, -208, -208, -208, -208, 100, 1804, -208, 109,
- -208, 132, 128, 128, 128, 128, -208, 332, 110, 1197,
- 164, -208, 166, -208, 102, 115, 134, 145, 155, 133,
- 0, 154, -208, 169, -6, -208, 205, 175, 118, 913,
- 913, 160, 913, -208, -208, -208, 1012, 128, 235, 221,
- 659, 179, -208, -208, -208, -208, -208, 124, 181, -208,
- 193, 690, 227, 743, 913, 83, -208, -208, 6, -208,
- 913, 913, 913, 913, 913, 913, 913, 913, 913, 913,
- 913, 913, 913, 913, 913, 913, 913, 913, 913, 913,
- 786, 913, -208, 191, -208, 743, -208, -208, 6, 149,
- -208, 913, 230, 17, -208, -208, -208, -208, -208, 39,
- 43, 403, -208, 187, 135, -16, 817, 99, 195, 1491,
- 1531, 197, -208, 242, -208, 199, 208, -208, 216, -208,
- 944, -208, 211, 139, 1804, -208, 913, -208, 209, 1049,
- 210, -13, 179, 205, 860, -208, 215, -208, 212, 1086,
- 1804, 913, 870, 257, 258, 172, 2022, 2050, 2078, 2106,
- 2134, 2134, 483, 483, 483, 483, 552, 30, 30, 128,
- 128, 128, 128, 412, 1804, 1767, 913, 1239, 172, 191,
- -208, -208, 913, 1281, -208, -208, 262, 219, -208, 168,
- 222, 170, -208, 13, 169, 201, -208, 228, 140, 12,
- -208, 1123, 165, 94, -208, 817, 179, 616, 616, 913,
- 7, 913, 913, 913, -208, -208, 944, 944, 1804, -208,
- 913, -208, -208, 169, 233, -208, -208, -208, 1804, -208,
- -208, -208, 1839, 913, 1876, -208, -208, 913, 1691, -208,
- 913, -208, -208, -208, 913, 270, -208, 277, -208, -208,
- -208, -208, 238, -208, -208, 169, 201, 201, 205, -208,
- -208, -208, 860, -208, 22, 237, 169, 240, 1160, 225,
- -208, 1571, 913, 1804, 239, -208, 1804, -208, -208, 1804,
- -208, 169, 913, 1913, 913, 1986, -208, 1323, 1365, -208,
- -208, -208, -208, -208, -208, 252, 247, -208, 860, 860,
- -208, 169, -208, 616, 241, 1611, 913, -208, 1950, 913,
- 1950, -208, 913, -208, 913, 860, -208, 250, -208, -208,
- -208, -208, 616, 249, 208, 1950, 1729, 1407, -208, -208,
- -208, 616, -208, 913, -208, 1449, 913, 1651, -208
+ -261, 13, 488, -261, -261, 927, 927, 927, 927, -261,
+ 927, -261, 927, -261, 15, 20, 15, 16, 11, 23,
+ 49, 20, 20, 14, 37, 630, 53, 54, 83, 747,
+ -261, 101, -261, -261, -261, 18, -261, 559, -261, -261,
+ 89, 98, -261, -261, -261, -261, 217, 1818, -261, 93,
+ -261, 264, 127, 127, 127, 127, -261, 346, 239, 1211,
+ 161, -261, 172, -261, 94, -2, 135, 136, 156, 177,
+ 40, 179, -261, 191, -3, -261, 203, 204, 108, 927,
+ 927, 190, 927, -261, -261, -261, 1026, 127, 673, 259,
+ 229, 221, -261, -261, -261, -261, -261, 222, 227, -261,
+ 245, 704, 283, 757, 927, 78, -261, -261, 101, -261,
+ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927,
+ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927,
+ 800, 927, -261, 253, -261, 757, -261, -261, 101, 22,
+ -261, 927, 294, 15, -261, -261, -261, -261, -261, 26,
+ 32, 417, -261, 254, 246, -10, 831, 106, 256, 1505,
+ 1545, 261, -261, 306, -261, 270, 277, -261, 289, -261,
+ 958, -261, 104, 1818, -261, 927, -261, 278, 1063, 279,
+ 8, 221, 203, 874, -261, 117, -261, 280, 1100, 1818,
+ 927, 884, 319, 323, 193, 1999, 2027, 2055, 2083, 2111,
+ 2111, 497, 497, 497, 497, 330, 284, 284, 127, 127,
+ 127, 127, 426, 1818, 1781, 927, 1253, 193, 253, -261,
+ -261, 927, 1295, -261, -261, 326, 282, -261, 169, 286,
+ 195, -261, 12, 191, 263, -261, 124, 20, -261, 1137,
+ 249, 95, -261, 831, 221, 630, 630, 927, 2, 927,
+ 927, 927, -261, -261, 958, 958, 1818, -261, 927, -261,
+ -261, 191, 166, -261, -261, -261, 1818, -261, -261, -261,
+ 173, 927, 1853, -261, -261, 927, 1705, -261, 927, -261,
+ -261, -261, 927, 337, -261, 339, -261, -261, -261, -261,
+ 185, -261, -261, 191, 263, 263, 341, -261, -261, -261,
+ 874, -261, -4, 300, 191, 196, 1174, 287, -261, 1585,
+ 927, 1818, 304, -261, 1818, -261, -261, 1818, -261, 191,
+ 927, 1890, 927, 1963, -261, 1337, 1379, -261, -261, -261,
+ -261, -261, -261, 24, 327, 321, -261, 874, 874, -261,
+ 191, -261, 630, 316, 1625, 927, -261, 1927, 927, 1927,
+ -261, 927, -261, 927, 331, 874, -261, 325, -261, -261,
+ -261, -261, 630, 324, 277, 1927, 1743, 1421, 874, -261,
+ -261, -261, 630, -261, 927, -261, -261, 1463, 927, 1665,
+ -261
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -208, -208, 223, -208, 10, 243, -208, 259, 11, 144,
- 281, -8, -208, 280, 226, -17, 282, -24, -208, -208,
- 120, 14, -207, 236, 153, -208, -208, -164, -208, -208,
- -206, -208, -208, 213, -208, -156, 214, -208, -5, -208,
- -117, 182, -208, -208, -19, -72, -166, -208, -208, -208,
- -35
+ -261, -261, 296, -261, 10, 317, -261, 342, 91, 228,
+ 362, -8, -261, 360, 301, -11, 363, -24, -261, -261,
+ 200, -260, -210, 311, 232, -261, -261, -160, -261, -217,
+ -261, -261, 288, -261, -161, 291, -5, -261, -118, 258,
+ -261, -261, -21, -76, -164, -261, -261, -261, 48
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -885,358 +897,349 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -45
static const yytype_int16 yytable[] =
{
- 52, 53, 54, 55, 76, 56, 81, 59, 66, 4,
- 164, 91, 35, 72, 254, 4, 220, 264, 95, 69,
- 60, 67, 58, 3, 86, 65, 87, 234, 70, 294,
- 263, 74, 77, 235, 139, 303, 235, 10, 89, -44,
- 153, 9, 226, 312, 89, 9, 226, 35, 12, 233,
- 91, 149, 236, 153, 157, 236, 291, 123, 124, 125,
- 126, 19, 235, 337, 22, 163, 227, 35, 293, 292,
- 230, 338, 73, 30, 159, 160, 31, 32, 88, 307,
- 89, 236, 90, 174, 79, 179, 80, 61, 61, 68,
- 333, 334, 35, 191, 192, 336, 174, 320, 189, 190,
- 317, 318, 281, 195, 82, 196, 197, 198, 199, 200,
- 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 217, 218, 83, 84, 332,
- 179, 357, 358, 221, 246, 225, 223, 306, 96, 242,
- 340, 243, 101, 235, 102, 180, 103, 143, 368, 97,
- 144, 241, 88, 138, 89, 347, 90, 134, 126, 89,
- 155, 35, 236, 145, 156, 174, 181, -34, 4, 142,
- 153, 258, 5, 6, 88, 359, 89, 233, 135, 268,
- 315, 153, 146, -34, 256, 296, 272, 274, 257, 297,
- 7, 8, 222, 147, 9, 180, 10, 121, 122, 123,
- 124, 125, 126, 148, 150, 242, 300, 12, 154, 11,
- 301, 278, 130, 287, 302, 287, 288, 282, 290, 89,
- 19, 161, 298, 22, 175, 180, 183, 184, 309, 310,
- 187, 130, 30, 224, 177, 31, 32, 268, 168, 249,
- 308, 245, 5, 6, 311, 250, 313, 251, 316, 74,
- 253, 174, 174, 252, 255, 319, 259, 262, 269, 270,
- 7, 8, 275, 276, 9, 285, 10, 286, 323, 236,
- 289, 295, 325, 329, 164, 327, 321, 12, 169, 328,
- 226, 331, 339, 341, 170, 343, 355, 346, 356, 361,
- 19, 369, 371, 22, 231, 151, 94, 268, 330, 71,
- 137, 75, 30, 265, 78, 31, 32, 345, 162, 152,
- 244, 364, 335, 0, 219, 186, 188, 348, 0, 350,
- 0, 0, 0, 0, 360, 0, 0, 0, 0, 0,
- 0, 0, 0, 268, 268, 4, 0, 0, 0, 5,
- 6, 0, 0, 370, 365, 0, 0, 366, 0, 367,
- 268, 0, 374, 0, 0, 0, 0, 7, 8, 0,
- 0, 9, 0, 10, 0, 0, 0, 0, 375, 0,
- 0, 377, 11, 136, 12, 0, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 0, 24, 25, 26, 27, 28, 29, 30,
- 0, 0, 31, 32, 33, 34, 4, 0, 0, 0,
- 5, 6, 0, 0, 0, 0, 0, 105, 106, 107,
- 108, 109, 0, 0, 0, 0, 0, 0, 7, 8,
- 0, 0, 9, 0, 10, 0, 120, 121, 122, 123,
- 124, 125, 126, 11, 232, 12, 0, 0, 0, 0,
- 0, 13, 130, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 0, 24, 25, 26, 27, 28, 29,
- 30, 0, 0, 31, 32, 33, 34, 4, 0, 0,
- 0, 5, 6, 0, 0, 0, 0, 0, 105, 106,
- 107, 108, 109, 0, 0, 0, 0, 0, 0, 7,
- 8, 0, 0, 9, 0, 10, 0, 120, 121, 122,
- 123, 124, 125, 126, 11, 127, 12, 0, 0, 0,
- 0, 0, 13, 130, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 0, 24, 25, 26, 27, 28,
- 29, 30, 0, 0, 31, 32, 33, 34, 4, 0,
- 0, 0, 5, 6, 0, 0, 0, 105, 106, 107,
- 108, 109, 0, 0, 0, 0, 0, 0, 0, 0,
- 7, 8, 0, 0, 9, 0, 10, 121, 122, 123,
- 124, 125, 126, 0, 0, 11, 0, 12, 0, 0,
- 0, 0, 130, 13, 0, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 0, 24, 25, 26, 27,
- 28, 29, 30, 0, 0, 31, 32, 92, 93, 4,
- 0, 0, 0, 5, 6, 0, 0, 0, 0, 0,
+ 52, 53, 54, 55, 81, 56, 164, 59, 66, 252,
+ 76, 91, 35, 3, 69, 219, 95, 292, 60, 67,
+ 262, -44, 58, 4, 86, 65, 87, 154, 70, 225,
+ 301, 74, 77, 233, 139, 225, 334, 336, 310, 234,
+ 9, 89, 89, 153, 232, 337, 145, 35, 153, 9,
+ 91, 261, 73, 226, 157, 289, 79, 234, 235, 229,
+ 88, 234, 89, 72, 90, 221, 232, 35, 179, 291,
+ 153, 163, 290, 354, 159, 160, 235, 331, 332, 80,
+ 235, 305, 61, 173, 89, 178, 61, 68, 190, 191,
+ 335, 149, 35, 315, 316, 82, 173, 318, 188, 189,
+ 279, 97, 83, 194, 4, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 216, 217, 357, 358, 330,
+ 178, 84, 10, 220, 244, 224, 222, 96, 304, 143,
+ 339, 134, 144, 12, 234, 369, 240, 253, 241, 254,
+ 155, 239, 179, 255, 156, 346, 19, 126, 375, 22,
+ 267, 35, 254, 235, -34, 173, 255, 293, 30, 294,
+ 256, 31, 32, 295, 313, 142, 359, 104, 266, 106,
+ 107, 108, 109, 146, 147, 270, 272, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 148, 127, 154, 128, 129, 319,
+ 276, 294, 320, 130, 285, 295, 280, 286, 121, 122,
+ 123, 124, 125, 126, 307, 308, 296, -34, 329, 150,
+ 294, 11, 4, 130, 295, 266, 5, 6, 306, 340,
+ 285, 294, 309, 288, 311, 295, 314, 74, 89, 173,
+ 173, 161, 4, 317, 7, 8, 5, 6, 9, 101,
+ 10, 102, 174, 103, 180, 175, 321, 179, 153, 164,
+ 323, 12, 182, 325, 7, 8, 176, 326, 9, 183,
+ 10, 88, 138, 89, 19, 90, 186, 22, 232, 240,
+ 298, 12, 153, 130, 299, 266, 30, 223, 300, 31,
+ 32, 176, 243, 247, 19, 344, 88, 22, 89, 248,
+ 135, 123, 124, 125, 126, 347, 30, 349, 249, 31,
+ 32, 360, 250, 251, 273, 257, 260, 268, 274, 283,
+ 284, 235, 266, 266, 287, 105, 106, 107, 108, 109,
+ 327, 371, 225, 365, 333, 338, 366, 342, 367, 4,
+ 266, 376, 345, 5, 6, 121, 122, 123, 124, 125,
+ 126, 355, 356, 266, 361, 368, 370, 372, 151, 377,
+ 130, 7, 8, 379, 137, 9, 328, 10, 230, 94,
+ 71, 75, 263, 162, 152, 78, 11, 136, 12, 242,
+ 218, 187, 185, 364, 13, 0, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 0, 24, 25, 26,
+ 27, 28, 29, 30, 0, 0, 31, 32, 33, 34,
+ 4, 0, 0, 0, 5, 6, 0, 0, 0, 0,
+ 0, 105, 106, 107, 108, 109, 0, 0, 0, 0,
+ 0, 0, 7, 8, 0, 0, 9, 0, 10, 0,
+ 120, 121, 122, 123, 124, 125, 126, 11, 231, 12,
+ 0, 0, 0, 0, 0, 13, 130, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 24, 25,
+ 26, 27, 28, 29, 30, 0, 0, 31, 32, 33,
+ 34, 4, 0, 0, 0, 5, 6, 0, 0, 0,
+ 0, 0, 105, 106, 107, 108, 109, 0, 0, 0,
+ 0, 0, 0, 7, 8, 0, 0, 9, 0, 10,
+ 0, 120, 121, 122, 123, 124, 125, 126, 11, 127,
+ 12, 0, 0, 0, 0, 0, 13, 130, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 0, 24,
+ 25, 26, 27, 28, 29, 30, 0, 0, 31, 32,
+ 33, 34, 4, 0, 0, 0, 5, 6, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 7, 8, 0, 0, 9, 0, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 11, 0, 12, 0,
- 0, 0, 4, 0, 13, 0, 5, 6, 0, 0,
- 0, 19, 0, 0, 22, 23, 0, 24, 25, 26,
- 27, 28, 29, 30, 7, 8, 31, 32, 9, 0,
- 10, 0, 0, 168, 0, 176, 0, 5, 6, 0,
- 0, 12, 0, 0, 0, 0, 177, 0, 0, 0,
- 0, 0, 0, 0, 19, 7, 8, 22, 0, 9,
- 0, 10, 0, 0, 0, 0, 30, 0, 0, 31,
- 32, 0, 12, 185, 0, 0, 4, 0, 0, 170,
- 5, 6, 0, 0, 0, 19, 4, 0, 22, 0,
- 5, 6, 0, 0, 0, 0, 0, 30, 7, 8,
- 31, 32, 9, 0, 10, 0, 0, 0, 7, 8,
- 0, 0, 9, 0, 10, 12, 0, 0, 0, 176,
- 0, 85, 0, 0, 0, 12, 0, 0, 19, 4,
- 0, 22, 0, 5, 6, 0, 0, 0, 19, 216,
- 30, 22, 0, 31, 32, 0, 0, 0, 0, 0,
- 30, 7, 8, 31, 32, 9, 0, 10, 0, 0,
- 4, 0, 0, 0, 5, 6, 0, 0, 12, 0,
+ 0, 0, 0, 0, 7, 8, 0, 0, 9, 0,
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 11,
+ 0, 12, 0, 0, 0, 0, 0, 13, 0, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 24, 25, 26, 27, 28, 29, 30, 0, 0, 31,
+ 32, 92, 93, 4, 0, 0, 0, 5, 6, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 19, 7, 8, 22, 0, 9, 0, 10, 0,
- 0, 0, 0, 30, 0, 0, 31, 32, 0, 12,
- 0, 0, 0, 4, 177, 0, 0, 5, 6, 0,
- 0, 0, 19, 4, 0, 22, 0, 5, 6, 0,
- 0, 0, 273, 0, 30, 7, 8, 31, 32, 9,
- 0, 10, 0, 0, 0, 7, 8, 0, 0, 9,
- 242, 10, 12, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 12, 0, 0, 19, 4, 0, 22, 0,
- 5, 6, 0, 0, 0, 19, 0, 30, 22, 0,
- 31, 32, 0, 0, 0, 0, 0, 30, 7, 8,
+ 0, 0, 0, 0, 0, 7, 8, 0, 0, 9,
+ 0, 10, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11, 0, 12, 0, 0, 0, 168, 0, 13, 0,
+ 5, 6, 0, 0, 0, 19, 0, 0, 22, 23,
+ 0, 24, 25, 26, 27, 28, 29, 30, 7, 8,
31, 32, 9, 0, 10, 0, 0, 168, 0, 0,
- 0, 5, 6, 0, 0, 12, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 19, 7,
+ 0, 5, 6, 0, 0, 12, 169, 0, 0, 0,
+ 0, 0, 170, 0, 0, 0, 0, 0, 19, 7,
8, 22, 0, 9, 0, 10, 0, 0, 0, 0,
- 30, 0, 0, 31, 32, 0, 12, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
- 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
- 0, 30, 0, 0, 31, 32, 104, 105, 106, 107,
- 108, 109, 0, 0, 0, 0, 110, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126, 0, 127, 0, 128, 129, 0, 0,
- 0, 0, 130, 104, 105, 106, 107, 108, 109, 0,
- 167, 0, 0, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 0, 127, 0, 128, 129, 260, 0, 0, 0, 130,
- 104, 105, 106, 107, 108, 109, 261, 0, 0, 0,
+ 30, 0, 0, 31, 32, 0, 12, 184, 0, 0,
+ 4, 0, 0, 170, 5, 6, 0, 0, 0, 19,
+ 4, 0, 22, 0, 5, 6, 0, 0, 0, 0,
+ 0, 30, 7, 8, 31, 32, 9, 0, 10, 0,
+ 0, 0, 7, 8, 0, 0, 9, 0, 10, 12,
+ 0, 0, 0, 175, 0, 85, 0, 0, 0, 12,
+ 0, 0, 19, 4, 0, 22, 0, 5, 6, 0,
+ 0, 0, 19, 215, 30, 22, 0, 31, 32, 0,
+ 0, 0, 0, 0, 30, 7, 8, 31, 32, 9,
+ 0, 10, 0, 0, 4, 0, 0, 0, 5, 6,
+ 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 7, 8, 22, 0,
+ 9, 0, 10, 0, 0, 0, 0, 30, 0, 0,
+ 31, 32, 0, 12, 0, 0, 0, 4, 176, 0,
+ 0, 5, 6, 0, 0, 0, 19, 4, 0, 22,
+ 0, 5, 6, 0, 0, 0, 271, 0, 30, 7,
+ 8, 31, 32, 9, 0, 10, 0, 0, 0, 7,
+ 8, 0, 0, 9, 240, 10, 12, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 12, 0, 0, 19,
+ 4, 0, 22, 0, 5, 6, 0, 0, 0, 19,
+ 0, 30, 22, 0, 31, 32, 0, 0, 0, 0,
+ 0, 30, 7, 8, 31, 32, 9, 0, 10, 0,
+ 0, 168, 0, 0, 0, 5, 6, 0, 0, 12,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 19, 7, 8, 22, 0, 9, 0, 10,
+ 0, 0, 0, 0, 30, 0, 0, 31, 32, 0,
+ 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 30, 0, 0, 31, 32,
+ 104, 105, 106, 107, 108, 109, 0, 0, 0, 0,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
120, 121, 122, 123, 124, 125, 126, 0, 127, 0,
- 128, 129, 260, 0, 0, 0, 130, 104, 105, 106,
- 107, 108, 109, 271, 0, 0, 0, 110, 111, 112,
+ 128, 129, 0, 0, 0, 0, 130, 104, 105, 106,
+ 107, 108, 109, 0, 167, 0, 0, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
- 123, 124, 125, 126, 0, 127, 0, 128, 129, 0,
+ 123, 124, 125, 126, 0, 127, 0, 128, 129, 258,
0, 0, 0, 130, 104, 105, 106, 107, 108, 109,
- 299, 0, 0, 0, 110, 111, 112, 113, 114, 115,
+ 259, 0, 0, 0, 110, 111, 112, 113, 114, 115,
116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
- 126, 0, 127, 0, 128, 129, 0, 0, 0, 0,
- 130, 104, 105, 106, 107, 108, 109, 342, 0, 0,
+ 126, 0, 127, 0, 128, 129, 258, 0, 0, 0,
+ 130, 104, 105, 106, 107, 108, 109, 269, 0, 0,
0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123, 124, 125, 126, 0, 127,
- 0, 128, 129, 0, 0, 0, 0, 130, 0, 0,
- 140, 0, 141, 104, 105, 106, 107, 108, 109, 0,
- 0, 0, 0, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 0, 127, 0, 128, 129, 0, 0, 0, 0, 130,
- 279, 0, 0, 0, 280, 104, 105, 106, 107, 108,
- 109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
+ 0, 128, 129, 0, 0, 0, 0, 130, 104, 105,
+ 106, 107, 108, 109, 297, 0, 0, 0, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 0, 127, 0, 128, 129,
+ 0, 0, 0, 0, 130, 104, 105, 106, 107, 108,
+ 109, 341, 0, 0, 0, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 283, 0, 284, 104, 105, 106,
+ 0, 130, 0, 0, 140, 0, 141, 104, 105, 106,
107, 108, 109, 0, 0, 0, 0, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
123, 124, 125, 126, 0, 127, 0, 128, 129, 0,
- 0, 0, 0, 130, 351, 0, 0, 0, 352, 104,
+ 0, 0, 0, 130, 277, 0, 0, 0, 278, 104,
105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
- 129, 0, 0, 0, 0, 130, 0, 0, 353, 0,
- 354, 104, 105, 106, 107, 108, 109, 0, 0, 0,
+ 129, 0, 0, 0, 0, 130, 0, 0, 281, 0,
+ 282, 104, 105, 106, 107, 108, 109, 0, 0, 0,
0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123, 124, 125, 126, 0, 127,
- 0, 128, 129, 0, 0, 0, 0, 130, 0, 0,
- 0, 0, 373, 104, 105, 106, 107, 108, 109, 0,
+ 0, 128, 129, 0, 0, 0, 0, 130, 350, 0,
+ 0, 0, 351, 104, 105, 106, 107, 108, 109, 0,
0, 0, 0, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
0, 127, 0, 128, 129, 0, 0, 0, 0, 130,
- 0, 0, 0, 0, 376, 104, 105, 106, 107, 108,
- 109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 247, 104, 105, 106, 107, 108,
+ 0, 0, 352, 0, 353, 104, 105, 106, 107, 108,
109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 248, 104, 105, 106, 107, 108,
- 109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 344, 104, 105, 106, 107, 108,
- 109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 362, 104, 105, 106, 107, 108,
- 109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 0, 0, 378, 104, 105, 106, 107, 108,
+ 0, 130, 0, 0, 0, 0, 374, 104, 105, 106,
+ 107, 108, 109, 0, 0, 0, 0, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 0, 127, 0, 128, 129, 0,
+ 0, 0, 0, 130, 0, 0, 0, 0, 378, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 0, 0, 245, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 0, 0, 246, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 0, 0, 343, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 0, 0, 362, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 0, 0, 380, 104,
+ 105, 106, 107, 108, 109, 0, 0, 0, 0, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 0, 128,
+ 129, 0, 0, 0, 0, 130, 324, 104, 105, 106,
+ 107, 108, 109, 0, 0, 0, 0, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 0, 127, 0, 128, 129, 0,
+ 0, 0, 0, 130, 373, 104, 105, 106, 107, 108,
109, 0, 0, 0, 0, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 0, 127, 0, 128, 129, 0, 0, 0,
- 0, 130, 326, 104, 105, 106, 107, 108, 109, 0,
- 0, 0, 0, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 0, 127, 0, 128, 129, 0, 0, 0, 0, 130,
- 372, 104, 105, 106, 107, 108, 109, 0, 0, 0,
- 0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 0, 127,
- 0, 128, 129, 277, 0, 0, 0, 130, 104, 105,
- 106, 107, 108, 109, 0, 0, 0, 0, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 0, 127, 0, 128, 129,
- 0, 0, 0, 104, 130, 106, 107, 108, 109, 0,
- 0, 0, 0, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 0, 127, 0, 128, 129, 0, 0, 0, 322, 130,
- 104, 0, 106, 107, 108, 109, 0, 0, 0, 0,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 0, 127, 0,
- 128, 129, 0, 0, 0, 324, 130, 104, 0, 106,
+ 125, 126, 0, 127, 0, 128, 129, 275, 0, 0,
+ 0, 130, 104, 105, 106, 107, 108, 109, 0, 0,
+ 0, 0, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 0,
+ 127, 0, 128, 129, 0, 0, 0, 104, 130, 106,
107, 108, 109, 0, 0, 0, 0, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
123, 124, 125, 126, 0, 127, 0, 128, 129, 0,
- 0, 0, 349, 130, 104, 0, 106, 107, 108, 109,
+ 0, 0, 322, 130, 104, 0, 106, 107, 108, 109,
0, 0, 0, 0, 110, 111, 112, 113, 114, 115,
116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
- 126, 0, 127, 0, 128, 129, 0, 0, 0, 0,
- 130, 105, 106, 107, 108, 109, 0, 0, 0, 0,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 0, 127, 0,
- 0, 129, 0, 0, 0, 0, 130, 105, 106, 107,
- 108, 109, 0, 0, 0, 0, 0, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126, 0, 127, 105, 106, 107, 108, 109,
- 0, 0, 130, 0, 0, 0, 112, 113, 114, 115,
- 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
- 126, 0, 127, 105, 106, 107, 108, 109, 0, 0,
- 130, 0, 0, 0, 0, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, 122, 123, 124, 125, 126, 0,
- 127, 105, 106, 107, 108, 109, 0, 0, 130, 0,
- 0, 0, 0, 0, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 0, 127, 105,
- 106, 107, 108, 109, 0, 0, 130, 0, 0, 0,
- 0, 0, 0, 0, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 0, 127, 0, 0, 0,
- 0, 0, 0, 0, 130
+ 126, 0, 127, 0, 128, 129, 0, 0, 0, 348,
+ 130, 104, 0, 106, 107, 108, 109, 0, 0, 0,
+ 0, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 0, 127,
+ 0, 128, 129, 0, 0, 0, 0, 130, 105, 106,
+ 107, 108, 109, 0, 0, 0, 0, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 0, 127, 0, 0, 129, 0,
+ 0, 0, 0, 130, 105, 106, 107, 108, 109, 0,
+ 0, 0, 0, 0, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 0, 127, 105, 106, 107, 108, 109, 0, 0, 130,
+ 0, 0, 0, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 0, 127,
+ 105, 106, 107, 108, 109, 0, 0, 130, 0, 0,
+ 0, 0, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 0, 127, 105, 106,
+ 107, 108, 109, 0, 0, 130, 0, 0, 0, 0,
+ 0, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 0, 127, 105, 106, 107, 108,
+ 109, 0, 0, 130, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 0, 127, 0, 0, 0, 0, 0, 0,
+ 0, 130
};
static const yytype_int16 yycheck[] =
{
- 5, 6, 7, 8, 21, 10, 25, 12, 16, 3,
- 82, 35, 2, 40, 170, 3, 133, 181, 37, 3,
- 3, 3, 12, 0, 29, 15, 31, 43, 18, 235,
- 43, 21, 22, 49, 58, 242, 49, 31, 44, 3,
- 46, 29, 3, 36, 44, 29, 3, 37, 42, 42,
- 74, 51, 68, 46, 78, 68, 43, 27, 28, 29,
- 30, 55, 49, 41, 58, 82, 27, 57, 234, 233,
- 27, 49, 3, 67, 79, 80, 70, 71, 42, 243,
- 44, 68, 46, 88, 42, 90, 42, 71, 71, 71,
- 296, 297, 82, 10, 11, 302, 101, 263, 103, 104,
- 256, 257, 219, 108, 42, 110, 111, 112, 113, 114,
+ 5, 6, 7, 8, 25, 10, 82, 12, 16, 170,
+ 21, 35, 2, 0, 3, 133, 37, 234, 3, 3,
+ 180, 3, 12, 3, 29, 15, 31, 3, 18, 3,
+ 240, 21, 22, 43, 58, 3, 296, 41, 36, 49,
+ 29, 44, 44, 46, 42, 49, 48, 37, 46, 29,
+ 74, 43, 3, 27, 78, 43, 42, 49, 68, 27,
+ 42, 49, 44, 40, 46, 43, 42, 57, 46, 233,
+ 46, 82, 232, 333, 79, 80, 68, 294, 295, 42,
+ 68, 241, 71, 88, 44, 90, 71, 71, 10, 11,
+ 300, 51, 82, 254, 255, 42, 101, 261, 103, 104,
+ 218, 3, 48, 108, 3, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 127, 128, 129, 130, 131, 48, 48, 295,
- 135, 338, 339, 138, 158, 143, 141, 43, 48, 40,
- 306, 42, 42, 49, 44, 46, 46, 45, 355, 3,
- 48, 156, 42, 43, 44, 321, 46, 48, 30, 44,
- 42, 151, 68, 48, 46, 170, 42, 3, 3, 3,
- 46, 176, 7, 8, 42, 341, 44, 42, 46, 184,
- 252, 46, 48, 50, 45, 45, 191, 192, 49, 49,
- 25, 26, 43, 48, 29, 46, 31, 25, 26, 27,
- 28, 29, 30, 48, 50, 40, 41, 42, 3, 40,
- 45, 216, 40, 45, 49, 45, 48, 222, 48, 44,
- 55, 61, 239, 58, 3, 46, 45, 34, 247, 248,
- 3, 40, 67, 3, 47, 70, 71, 242, 3, 42,
- 245, 46, 7, 8, 249, 3, 251, 48, 253, 239,
- 34, 256, 257, 45, 43, 260, 47, 47, 43, 47,
- 25, 26, 5, 5, 29, 3, 31, 48, 273, 68,
- 48, 43, 277, 3, 346, 280, 43, 42, 43, 284,
- 3, 43, 45, 43, 49, 60, 34, 48, 41, 48,
- 55, 41, 43, 58, 150, 72, 37, 302, 287, 18,
- 57, 21, 67, 183, 22, 70, 71, 312, 82, 73,
- 157, 346, 298, -1, 132, 101, 103, 322, -1, 324,
- -1, -1, -1, -1, 343, -1, -1, -1, -1, -1,
- -1, -1, -1, 338, 339, 3, -1, -1, -1, 7,
- 8, -1, -1, 362, 349, -1, -1, 352, -1, 354,
- 355, -1, 371, -1, -1, -1, -1, 25, 26, -1,
- -1, 29, -1, 31, -1, -1, -1, -1, 373, -1,
- -1, 376, 40, 41, 42, -1, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
- -1, -1, 70, 71, 72, 73, 3, -1, -1, -1,
- 7, 8, -1, -1, -1, -1, -1, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1, 25, 26,
- -1, -1, 29, -1, 31, -1, 24, 25, 26, 27,
- 28, 29, 30, 40, 41, 42, -1, -1, -1, -1,
- -1, 48, 40, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
- 67, -1, -1, 70, 71, 72, 73, 3, -1, -1,
- -1, 7, 8, -1, -1, -1, -1, -1, 5, 6,
- 7, 8, 9, -1, -1, -1, -1, -1, -1, 25,
- 26, -1, -1, 29, -1, 31, -1, 24, 25, 26,
- 27, 28, 29, 30, 40, 32, 42, -1, -1, -1,
- -1, -1, 48, 40, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
- 66, 67, -1, -1, 70, 71, 72, 73, 3, -1,
- -1, -1, 7, 8, -1, -1, -1, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1, -1, -1,
- 25, 26, -1, -1, 29, -1, 31, 25, 26, 27,
- 28, 29, 30, -1, -1, 40, -1, 42, -1, -1,
- -1, -1, 40, 48, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, -1, 61, 62, 63, 64,
- 65, 66, 67, -1, -1, 70, 71, 72, 73, 3,
- -1, -1, -1, 7, 8, -1, -1, -1, -1, -1,
+ 125, 126, 127, 128, 129, 130, 131, 337, 338, 293,
+ 135, 48, 31, 138, 158, 143, 141, 48, 43, 45,
+ 304, 48, 48, 42, 49, 355, 40, 43, 42, 45,
+ 42, 156, 46, 49, 46, 319, 55, 30, 368, 58,
+ 43, 151, 45, 68, 3, 170, 49, 43, 67, 45,
+ 175, 70, 71, 49, 250, 3, 340, 4, 183, 6,
+ 7, 8, 9, 48, 48, 190, 191, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 48, 32, 3, 34, 35, 43,
+ 215, 45, 39, 40, 45, 49, 221, 48, 25, 26,
+ 27, 28, 29, 30, 245, 246, 237, 50, 43, 50,
+ 45, 40, 3, 40, 49, 240, 7, 8, 243, 43,
+ 45, 45, 247, 48, 249, 49, 251, 237, 44, 254,
+ 255, 61, 3, 258, 25, 26, 7, 8, 29, 42,
+ 31, 44, 3, 46, 42, 36, 271, 46, 46, 345,
+ 275, 42, 45, 278, 25, 26, 47, 282, 29, 34,
+ 31, 42, 43, 44, 55, 46, 3, 58, 42, 40,
+ 41, 42, 46, 40, 45, 300, 67, 3, 49, 70,
+ 71, 47, 46, 42, 55, 310, 42, 58, 44, 3,
+ 46, 27, 28, 29, 30, 320, 67, 322, 48, 70,
+ 71, 342, 45, 34, 5, 47, 47, 47, 5, 3,
+ 48, 68, 337, 338, 48, 5, 6, 7, 8, 9,
+ 3, 362, 3, 348, 3, 45, 351, 60, 353, 3,
+ 355, 372, 48, 7, 8, 25, 26, 27, 28, 29,
+ 30, 34, 41, 368, 48, 34, 41, 43, 72, 374,
+ 40, 25, 26, 378, 57, 29, 285, 31, 150, 37,
+ 18, 21, 182, 82, 73, 22, 40, 41, 42, 157,
+ 132, 103, 101, 345, 48, -1, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
+ 64, 65, 66, 67, -1, -1, 70, 71, 72, 73,
+ 3, -1, -1, -1, 7, 8, -1, -1, -1, -1,
+ -1, 5, 6, 7, 8, 9, -1, -1, -1, -1,
+ -1, -1, 25, 26, -1, -1, 29, -1, 31, -1,
+ 24, 25, 26, 27, 28, 29, 30, 40, 41, 42,
+ -1, -1, -1, -1, -1, 48, 40, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, -1, 61, 62,
+ 63, 64, 65, 66, 67, -1, -1, 70, 71, 72,
+ 73, 3, -1, -1, -1, 7, 8, -1, -1, -1,
+ -1, -1, 5, 6, 7, 8, 9, -1, -1, -1,
+ -1, -1, -1, 25, 26, -1, -1, 29, -1, 31,
+ -1, 24, 25, 26, 27, 28, 29, 30, 40, 32,
+ 42, -1, -1, -1, -1, -1, 48, 40, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
+ 62, 63, 64, 65, 66, 67, -1, -1, 70, 71,
+ 72, 73, 3, -1, -1, -1, 7, 8, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, 26, -1, -1, 29, -1, 31, -1, -1,
- -1, -1, -1, -1, -1, -1, 40, -1, 42, -1,
- -1, -1, 3, -1, 48, -1, 7, 8, -1, -1,
- -1, 55, -1, -1, 58, 59, -1, 61, 62, 63,
- 64, 65, 66, 67, 25, 26, 70, 71, 29, -1,
- 31, -1, -1, 3, -1, 36, -1, 7, 8, -1,
- -1, 42, -1, -1, -1, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, 55, 25, 26, 58, -1, 29,
- -1, 31, -1, -1, -1, -1, 67, -1, -1, 70,
- 71, -1, 42, 43, -1, -1, 3, -1, -1, 49,
- 7, 8, -1, -1, -1, 55, 3, -1, 58, -1,
- 7, 8, -1, -1, -1, -1, -1, 67, 25, 26,
- 70, 71, 29, -1, 31, -1, -1, -1, 25, 26,
- -1, -1, 29, -1, 31, 42, -1, -1, -1, 36,
- -1, 48, -1, -1, -1, 42, -1, -1, 55, 3,
- -1, 58, -1, 7, 8, -1, -1, -1, 55, 13,
- 67, 58, -1, 70, 71, -1, -1, -1, -1, -1,
- 67, 25, 26, 70, 71, 29, -1, 31, -1, -1,
- 3, -1, -1, -1, 7, 8, -1, -1, 42, -1,
+ -1, -1, -1, -1, 25, 26, -1, -1, 29, -1,
+ 31, -1, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, 42, -1, -1, -1, -1, -1, 48, -1, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, -1,
+ 61, 62, 63, 64, 65, 66, 67, -1, -1, 70,
+ 71, 72, 73, 3, -1, -1, -1, 7, 8, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 55, 25, 26, 58, -1, 29, -1, 31, -1,
- -1, -1, -1, 67, -1, -1, 70, 71, -1, 42,
- -1, -1, -1, 3, 47, -1, -1, 7, 8, -1,
- -1, -1, 55, 3, -1, 58, -1, 7, 8, -1,
- -1, -1, 12, -1, 67, 25, 26, 70, 71, 29,
- -1, 31, -1, -1, -1, 25, 26, -1, -1, 29,
- 40, 31, 42, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, -1, -1, 55, 3, -1, 58, -1,
- 7, 8, -1, -1, -1, 55, -1, 67, 58, -1,
- 70, 71, -1, -1, -1, -1, -1, 67, 25, 26,
+ -1, -1, -1, -1, -1, 25, 26, -1, -1, 29,
+ -1, 31, -1, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, 42, -1, -1, -1, 3, -1, 48, -1,
+ 7, 8, -1, -1, -1, 55, -1, -1, 58, 59,
+ -1, 61, 62, 63, 64, 65, 66, 67, 25, 26,
70, 71, 29, -1, 31, -1, -1, 3, -1, -1,
- -1, 7, 8, -1, -1, 42, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 55, 25,
+ -1, 7, 8, -1, -1, 42, 43, -1, -1, -1,
+ -1, -1, 49, -1, -1, -1, -1, -1, 55, 25,
26, 58, -1, 29, -1, 31, -1, -1, -1, -1,
- 67, -1, -1, 70, 71, -1, 42, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 55,
- -1, -1, 58, -1, -1, -1, -1, -1, -1, -1,
- -1, 67, -1, -1, 70, 71, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, -1, 32, -1, 34, 35, -1, -1,
- -1, -1, 40, 4, 5, 6, 7, 8, 9, -1,
- 48, -1, -1, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- -1, 32, -1, 34, 35, 36, -1, -1, -1, 40,
- 4, 5, 6, 7, 8, 9, 47, -1, -1, -1,
+ 67, -1, -1, 70, 71, -1, 42, 43, -1, -1,
+ 3, -1, -1, 49, 7, 8, -1, -1, -1, 55,
+ 3, -1, 58, -1, 7, 8, -1, -1, -1, -1,
+ -1, 67, 25, 26, 70, 71, 29, -1, 31, -1,
+ -1, -1, 25, 26, -1, -1, 29, -1, 31, 42,
+ -1, -1, -1, 36, -1, 48, -1, -1, -1, 42,
+ -1, -1, 55, 3, -1, 58, -1, 7, 8, -1,
+ -1, -1, 55, 13, 67, 58, -1, 70, 71, -1,
+ -1, -1, -1, -1, 67, 25, 26, 70, 71, 29,
+ -1, 31, -1, -1, 3, -1, -1, -1, 7, 8,
+ -1, -1, 42, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 55, 25, 26, 58, -1,
+ 29, -1, 31, -1, -1, -1, -1, 67, -1, -1,
+ 70, 71, -1, 42, -1, -1, -1, 3, 47, -1,
+ -1, 7, 8, -1, -1, -1, 55, 3, -1, 58,
+ -1, 7, 8, -1, -1, -1, 12, -1, 67, 25,
+ 26, 70, 71, 29, -1, 31, -1, -1, -1, 25,
+ 26, -1, -1, 29, 40, 31, 42, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 42, -1, -1, 55,
+ 3, -1, 58, -1, 7, 8, -1, -1, -1, 55,
+ -1, 67, 58, -1, 70, 71, -1, -1, -1, -1,
+ -1, 67, 25, 26, 70, 71, 29, -1, 31, -1,
+ -1, 3, -1, -1, -1, 7, 8, -1, -1, 42,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 55, 25, 26, 58, -1, 29, -1, 31,
+ -1, -1, -1, -1, 67, -1, -1, 70, 71, -1,
+ 42, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 55, -1, -1, 58, -1, -1, -1,
+ -1, -1, -1, -1, -1, 67, -1, -1, 70, 71,
+ 4, 5, 6, 7, 8, 9, -1, -1, -1, -1,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, -1, 32, -1,
- 34, 35, 36, -1, -1, -1, 40, 4, 5, 6,
- 7, 8, 9, 47, -1, -1, -1, 14, 15, 16,
+ 34, 35, -1, -1, -1, -1, 40, 4, 5, 6,
+ 7, 8, 9, -1, 48, -1, -1, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, -1, 32, -1, 34, 35, -1,
+ 27, 28, 29, 30, -1, 32, -1, 34, 35, 36,
-1, -1, -1, 40, 4, 5, 6, 7, 8, 9,
47, -1, -1, -1, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, -1, 32, -1, 34, 35, -1, -1, -1, -1,
+ 30, -1, 32, -1, 34, 35, 36, -1, -1, -1,
40, 4, 5, 6, 7, 8, 9, 47, -1, -1,
-1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, -1, 32,
- -1, 34, 35, -1, -1, -1, -1, 40, -1, -1,
- 43, -1, 45, 4, 5, 6, 7, 8, 9, -1,
- -1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- -1, 32, -1, 34, 35, -1, -1, -1, -1, 40,
- 41, -1, -1, -1, 45, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
+ -1, 34, 35, -1, -1, -1, -1, 40, 4, 5,
+ 6, 7, 8, 9, 47, -1, -1, -1, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, -1, 32, -1, 34, 35,
+ -1, -1, -1, -1, 40, 4, 5, 6, 7, 8,
+ 9, 47, -1, -1, -1, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
-1, 40, -1, -1, 43, -1, 45, 4, 5, 6,
@@ -1251,80 +1254,85 @@ static const yytype_int16 yycheck[] =
45, 4, 5, 6, 7, 8, 9, -1, -1, -1,
-1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, -1, 32,
- -1, 34, 35, -1, -1, -1, -1, 40, -1, -1,
+ -1, 34, 35, -1, -1, -1, -1, 40, 41, -1,
-1, -1, 45, 4, 5, 6, 7, 8, 9, -1,
-1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
-1, 32, -1, 34, 35, -1, -1, -1, -1, 40,
- -1, -1, -1, -1, 45, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, -1, -1, 43, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, -1, -1, 43, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, -1, -1, 43, 4, 5, 6, 7, 8,
+ -1, -1, 43, -1, 45, 4, 5, 6, 7, 8,
9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, -1, -1, 43, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, -1, -1, 43, 4, 5, 6, 7, 8,
+ -1, 40, -1, -1, -1, -1, 45, 4, 5, 6,
+ 7, 8, 9, -1, -1, -1, -1, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, -1, 32, -1, 34, 35, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, 45, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, -1, -1, 43, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, -1, -1, 43, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, -1, -1, 43, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, -1, -1, 43, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, -1, -1, 43, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, -1, 34,
+ 35, -1, -1, -1, -1, 40, 41, 4, 5, 6,
+ 7, 8, 9, -1, -1, -1, -1, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, -1, 32, -1, 34, 35, -1,
+ -1, -1, -1, 40, 41, 4, 5, 6, 7, 8,
9, -1, -1, -1, -1, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, -1, 32, -1, 34, 35, -1, -1, -1,
- -1, 40, 41, 4, 5, 6, 7, 8, 9, -1,
- -1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- -1, 32, -1, 34, 35, -1, -1, -1, -1, 40,
- 41, 4, 5, 6, 7, 8, 9, -1, -1, -1,
- -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, -1, 32,
- -1, 34, 35, 36, -1, -1, -1, 40, 4, 5,
- 6, 7, 8, 9, -1, -1, -1, -1, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, -1, 32, -1, 34, 35,
- -1, -1, -1, 4, 40, 6, 7, 8, 9, -1,
- -1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- -1, 32, -1, 34, 35, -1, -1, -1, 39, 40,
- 4, -1, 6, 7, 8, 9, -1, -1, -1, -1,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, -1, 32, -1,
- 34, 35, -1, -1, -1, 39, 40, 4, -1, 6,
+ 29, 30, -1, 32, -1, 34, 35, 36, -1, -1,
+ -1, 40, 4, 5, 6, 7, 8, 9, -1, -1,
+ -1, -1, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, -1,
+ 32, -1, 34, 35, -1, -1, -1, 4, 40, 6,
7, 8, 9, -1, -1, -1, -1, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, -1, 32, -1, 34, 35, -1,
-1, -1, 39, 40, 4, -1, 6, 7, 8, 9,
-1, -1, -1, -1, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, -1, 32, -1, 34, 35, -1, -1, -1, -1,
- 40, 5, 6, 7, 8, 9, -1, -1, -1, -1,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, -1, 32, -1,
- -1, 35, -1, -1, -1, -1, 40, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, -1, 32, 5, 6, 7, 8, 9,
- -1, -1, 40, -1, -1, -1, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, -1, 32, 5, 6, 7, 8, 9, -1, -1,
- 40, -1, -1, -1, -1, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, -1,
- 32, 5, 6, 7, 8, 9, -1, -1, 40, -1,
- -1, -1, -1, -1, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, -1, 32, 5,
- 6, 7, 8, 9, -1, -1, 40, -1, -1, -1,
- -1, -1, -1, -1, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, -1, 32, -1, -1, -1,
- -1, -1, -1, -1, 40
+ 30, -1, 32, -1, 34, 35, -1, -1, -1, 39,
+ 40, 4, -1, 6, 7, 8, 9, -1, -1, -1,
+ -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, -1, 32,
+ -1, 34, 35, -1, -1, -1, -1, 40, 5, 6,
+ 7, 8, 9, -1, -1, -1, -1, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, -1, 32, -1, -1, 35, -1,
+ -1, -1, -1, 40, 5, 6, 7, 8, 9, -1,
+ -1, -1, -1, -1, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ -1, 32, 5, 6, 7, 8, 9, -1, -1, 40,
+ -1, -1, -1, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, -1, 32,
+ 5, 6, 7, 8, 9, -1, -1, 40, -1, -1,
+ -1, -1, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, -1, 32, 5, 6,
+ 7, 8, 9, -1, -1, 40, -1, -1, -1, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, -1, 32, 5, 6, 7, 8,
+ 9, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ -1, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, -1, 32, -1, -1, -1, -1, -1, -1,
+ -1, 40
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1335,40 +1343,41 @@ static const yytype_uint8 yystos[] =
31, 40, 42, 48, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 61, 62, 63, 64, 65, 66,
67, 70, 71, 72, 73, 80, 81, 82, 83, 89,
- 90, 91, 92, 99, 107, 108, 110, 114, 120, 121,
- 122, 80, 114, 114, 114, 114, 114, 79, 80, 114,
+ 90, 91, 92, 99, 106, 107, 109, 112, 118, 119,
+ 120, 80, 112, 112, 112, 112, 112, 79, 80, 112,
3, 71, 86, 87, 88, 80, 87, 3, 71, 3,
80, 86, 40, 3, 80, 89, 91, 80, 92, 42,
- 42, 120, 42, 48, 48, 48, 114, 114, 42, 44,
- 46, 93, 72, 73, 83, 120, 48, 3, 95, 96,
+ 42, 118, 42, 48, 48, 48, 112, 112, 42, 44,
+ 46, 93, 72, 73, 83, 118, 48, 3, 95, 96,
97, 42, 44, 46, 4, 5, 6, 7, 8, 9,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 32, 34, 35,
- 40, 115, 116, 117, 48, 46, 41, 81, 43, 93,
+ 40, 113, 114, 115, 48, 46, 41, 81, 43, 93,
43, 45, 3, 45, 48, 48, 48, 48, 48, 51,
- 50, 78, 99, 46, 3, 42, 46, 93, 94, 114,
- 114, 61, 90, 91, 121, 123, 126, 48, 3, 43,
- 49, 111, 112, 113, 114, 3, 36, 47, 109, 114,
- 46, 42, 93, 45, 34, 43, 112, 3, 109, 114,
- 114, 10, 11, 118, 119, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 13, 114, 114, 117,
- 116, 114, 43, 114, 3, 87, 3, 27, 84, 85,
- 27, 85, 41, 42, 43, 49, 68, 103, 104, 105,
- 106, 114, 40, 42, 100, 46, 93, 43, 43, 42,
- 3, 48, 45, 34, 111, 43, 45, 49, 114, 47,
- 36, 47, 47, 43, 103, 96, 98, 100, 114, 43,
- 47, 47, 114, 12, 114, 5, 5, 36, 114, 41,
- 45, 116, 114, 43, 45, 3, 48, 45, 48, 48,
- 48, 43, 103, 122, 106, 43, 45, 49, 91, 47,
- 41, 45, 49, 98, 101, 102, 43, 103, 114, 120,
- 120, 114, 36, 114, 124, 121, 114, 111, 111, 114,
- 122, 43, 39, 114, 39, 114, 41, 114, 114, 3,
- 84, 43, 122, 106, 106, 97, 98, 41, 49, 45,
- 122, 43, 47, 60, 43, 114, 48, 122, 114, 39,
- 114, 41, 45, 43, 45, 34, 41, 98, 98, 122,
- 120, 48, 43, 125, 126, 114, 114, 114, 98, 41,
- 120, 43, 41, 45, 120, 114, 45, 114, 43
+ 50, 78, 99, 46, 3, 42, 46, 93, 94, 112,
+ 112, 61, 90, 91, 119, 121, 124, 48, 3, 43,
+ 49, 110, 111, 112, 3, 36, 47, 108, 112, 46,
+ 42, 93, 45, 34, 43, 111, 3, 108, 112, 112,
+ 10, 11, 116, 117, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 13, 112, 112, 115, 114,
+ 112, 43, 112, 3, 87, 3, 27, 84, 85, 27,
+ 85, 41, 42, 43, 49, 68, 103, 104, 105, 112,
+ 40, 42, 100, 46, 93, 43, 43, 42, 3, 48,
+ 45, 34, 110, 43, 45, 49, 112, 47, 36, 47,
+ 47, 43, 103, 96, 98, 100, 112, 43, 47, 47,
+ 112, 12, 112, 5, 5, 36, 112, 41, 45, 114,
+ 112, 43, 45, 3, 48, 45, 48, 48, 48, 43,
+ 103, 120, 105, 43, 45, 49, 91, 47, 41, 45,
+ 49, 98, 101, 102, 43, 103, 112, 118, 118, 112,
+ 36, 112, 122, 119, 112, 110, 110, 112, 120, 43,
+ 39, 112, 39, 112, 41, 112, 112, 3, 84, 43,
+ 120, 105, 105, 3, 97, 98, 41, 49, 45, 120,
+ 43, 47, 60, 43, 112, 48, 120, 112, 39, 112,
+ 41, 45, 43, 45, 97, 34, 41, 98, 98, 120,
+ 118, 48, 43, 123, 124, 112, 112, 112, 34, 98,
+ 41, 118, 43, 41, 45, 98, 118, 112, 45, 112,
+ 43
};
#define yyerrok (yyerrstatus = 0)
@@ -1383,9 +1392,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -1442,7 +1460,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -2181,991 +2199,993 @@ yyreduce:
{
case 2:
-/* Line 1455 of yacc.c */
-#line 179 "camp.y"
+/* Line 1464 of yacc.c */
+#line 192 "camp.y"
{ absyntax::root = (yyvsp[(1) - (1)].b); ;}
break;
case 3:
-/* Line 1455 of yacc.c */
-#line 183 "camp.y"
+/* Line 1464 of yacc.c */
+#line 196 "camp.y"
{ (yyval.b) = new file(lexerPos(), false); ;}
break;
case 4:
-/* Line 1455 of yacc.c */
-#line 185 "camp.y"
+/* Line 1464 of yacc.c */
+#line 198 "camp.y"
{ (yyval.b) = (yyvsp[(1) - (2)].b); (yyval.b)->add((yyvsp[(2) - (2)].run)); ;}
break;
case 5:
-/* Line 1455 of yacc.c */
-#line 189 "camp.y"
+/* Line 1464 of yacc.c */
+#line 202 "camp.y"
{ (yyval.b) = new block(lexerPos(), true); ;}
break;
case 6:
-/* Line 1455 of yacc.c */
-#line 191 "camp.y"
+/* Line 1464 of yacc.c */
+#line 204 "camp.y"
{ (yyval.b) = (yyvsp[(1) - (2)].b); (yyval.b)->add((yyvsp[(2) - (2)].run)); ;}
break;
case 7:
-/* Line 1455 of yacc.c */
-#line 195 "camp.y"
+/* Line 1464 of yacc.c */
+#line 208 "camp.y"
{ (yyval.n) = new simpleName((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 8:
-/* Line 1455 of yacc.c */
-#line 196 "camp.y"
+/* Line 1464 of yacc.c */
+#line 209 "camp.y"
{ (yyval.n) = new qualifiedName((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].n), (yyvsp[(3) - (3)].ps).sym); ;}
break;
case 9:
-/* Line 1455 of yacc.c */
-#line 197 "camp.y"
+/* Line 1464 of yacc.c */
+#line 210 "camp.y"
{ (yyval.n) = new simpleName((yyvsp[(1) - (1)].ps).pos,
symbol::trans("operator answer")); ;}
break;
case 10:
-/* Line 1455 of yacc.c */
-#line 202 "camp.y"
+/* Line 1464 of yacc.c */
+#line 215 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].d); ;}
break;
case 11:
-/* Line 1455 of yacc.c */
-#line 203 "camp.y"
+/* Line 1464 of yacc.c */
+#line 216 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].s); ;}
break;
case 12:
-/* Line 1455 of yacc.c */
-#line 205 "camp.y"
+/* Line 1464 of yacc.c */
+#line 218 "camp.y"
{ (yyval.run) = new modifiedRunnable((yyvsp[(1) - (2)].ml)->getPos(), (yyvsp[(1) - (2)].ml), (yyvsp[(2) - (2)].d)); ;}
break;
case 13:
-/* Line 1455 of yacc.c */
-#line 207 "camp.y"
+/* Line 1464 of yacc.c */
+#line 220 "camp.y"
{ (yyval.run) = new modifiedRunnable((yyvsp[(1) - (2)].ml)->getPos(), (yyvsp[(1) - (2)].ml), (yyvsp[(2) - (2)].s)); ;}
break;
case 14:
-/* Line 1455 of yacc.c */
-#line 211 "camp.y"
+/* Line 1464 of yacc.c */
+#line 224 "camp.y"
{ (yyval.ml) = new modifierList((yyvsp[(1) - (1)].mod).pos); (yyval.ml)->add((yyvsp[(1) - (1)].mod).val); ;}
break;
case 15:
-/* Line 1455 of yacc.c */
-#line 212 "camp.y"
+/* Line 1464 of yacc.c */
+#line 225 "camp.y"
{ (yyval.ml) = new modifierList((yyvsp[(1) - (1)].perm).pos); (yyval.ml)->add((yyvsp[(1) - (1)].perm).val); ;}
break;
case 16:
-/* Line 1455 of yacc.c */
-#line 214 "camp.y"
+/* Line 1464 of yacc.c */
+#line 227 "camp.y"
{ (yyval.ml) = (yyvsp[(1) - (2)].ml); (yyval.ml)->add((yyvsp[(2) - (2)].mod).val); ;}
break;
case 17:
-/* Line 1455 of yacc.c */
-#line 216 "camp.y"
+/* Line 1464 of yacc.c */
+#line 229 "camp.y"
{ (yyval.ml) = (yyvsp[(1) - (2)].ml); (yyval.ml)->add((yyvsp[(2) - (2)].perm).val); ;}
break;
case 18:
-/* Line 1455 of yacc.c */
-#line 220 "camp.y"
+/* Line 1464 of yacc.c */
+#line 233 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].vd); ;}
break;
case 19:
-/* Line 1455 of yacc.c */
-#line 221 "camp.y"
+/* Line 1464 of yacc.c */
+#line 234 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].d); ;}
break;
case 20:
-/* Line 1455 of yacc.c */
-#line 222 "camp.y"
+/* Line 1464 of yacc.c */
+#line 235 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].d); ;}
break;
case 21:
-/* Line 1455 of yacc.c */
-#line 224 "camp.y"
+/* Line 1464 of yacc.c */
+#line 237 "camp.y"
{ (yyval.d) = new accessdec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ipl)); ;}
break;
case 22:
-/* Line 1455 of yacc.c */
-#line 226 "camp.y"
+/* Line 1464 of yacc.c */
+#line 239 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].n), (yyvsp[(4) - (5)].ipl)); ;}
break;
case 23:
-/* Line 1455 of yacc.c */
-#line 228 "camp.y"
+/* Line 1464 of yacc.c */
+#line 241 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].n), WILDCARD); ;}
break;
case 24:
-/* Line 1455 of yacc.c */
-#line 229 "camp.y"
+/* Line 1464 of yacc.c */
+#line 242 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].n), WILDCARD); ;}
break;
case 25:
-/* Line 1455 of yacc.c */
-#line 231 "camp.y"
+/* Line 1464 of yacc.c */
+#line 244 "camp.y"
{ (yyval.d) = new fromaccessdec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].ps).sym, (yyvsp[(4) - (5)].ipl)); ;}
break;
case 26:
-/* Line 1455 of yacc.c */
-#line 233 "camp.y"
+/* Line 1464 of yacc.c */
+#line 246 "camp.y"
{ (yyval.d) = new fromaccessdec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].ps).sym, WILDCARD); ;}
break;
case 27:
-/* Line 1455 of yacc.c */
-#line 235 "camp.y"
+/* Line 1464 of yacc.c */
+#line 248 "camp.y"
{ (yyval.d) = new importdec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ip)); ;}
break;
case 28:
-/* Line 1455 of yacc.c */
-#line 236 "camp.y"
+/* Line 1464 of yacc.c */
+#line 249 "camp.y"
{ (yyval.d) = new includedec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ps).sym); ;}
break;
case 29:
-/* Line 1455 of yacc.c */
-#line 238 "camp.y"
+/* Line 1464 of yacc.c */
+#line 251 "camp.y"
{ (yyval.d) = new includedec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].stre)->getString()); ;}
break;
case 30:
-/* Line 1455 of yacc.c */
-#line 242 "camp.y"
+/* Line 1464 of yacc.c */
+#line 255 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 31:
-/* Line 1455 of yacc.c */
-#line 244 "camp.y"
+/* Line 1464 of yacc.c */
+#line 257 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, (yyvsp[(2) - (3)].ps).sym , (yyvsp[(3) - (3)].ps).sym); ;}
break;
case 32:
-/* Line 1455 of yacc.c */
-#line 248 "camp.y"
+/* Line 1464 of yacc.c */
+#line 261 "camp.y"
{ (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[(1) - (1)].ip)); ;}
break;
case 33:
-/* Line 1455 of yacc.c */
-#line 250 "camp.y"
+/* Line 1464 of yacc.c */
+#line 263 "camp.y"
{ (yyval.ipl) = (yyvsp[(1) - (3)].ipl); (yyval.ipl)->add((yyvsp[(3) - (3)].ip)); ;}
break;
case 34:
-/* Line 1455 of yacc.c */
-#line 254 "camp.y"
+/* Line 1464 of yacc.c */
+#line 267 "camp.y"
{ (yyval.ps) = (yyvsp[(1) - (1)].ps); ;}
break;
case 35:
-/* Line 1455 of yacc.c */
-#line 255 "camp.y"
+/* Line 1464 of yacc.c */
+#line 268 "camp.y"
{ (yyval.ps).pos = (yyvsp[(1) - (1)].stre)->getPos();
- (yyval.ps).sym = symbol::trans((yyvsp[(1) - (1)].stre)->getString()); ;}
+ (yyval.ps).sym = symbol::literalTrans((yyvsp[(1) - (1)].stre)->getString()); ;}
break;
case 36:
-/* Line 1455 of yacc.c */
-#line 260 "camp.y"
+/* Line 1464 of yacc.c */
+#line 273 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 37:
-/* Line 1455 of yacc.c */
-#line 262 "camp.y"
+/* Line 1464 of yacc.c */
+#line 275 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, (yyvsp[(2) - (3)].ps).sym , (yyvsp[(3) - (3)].ps).sym); ;}
break;
case 38:
-/* Line 1455 of yacc.c */
-#line 266 "camp.y"
+/* Line 1464 of yacc.c */
+#line 279 "camp.y"
{ (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[(1) - (1)].ip)); ;}
break;
case 39:
-/* Line 1455 of yacc.c */
-#line 268 "camp.y"
+/* Line 1464 of yacc.c */
+#line 281 "camp.y"
{ (yyval.ipl) = (yyvsp[(1) - (3)].ipl); (yyval.ipl)->add((yyvsp[(3) - (3)].ip)); ;}
break;
case 40:
-/* Line 1455 of yacc.c */
-#line 272 "camp.y"
+/* Line 1464 of yacc.c */
+#line 285 "camp.y"
{ (yyval.vd) = (yyvsp[(1) - (2)].vd); ;}
break;
case 41:
-/* Line 1455 of yacc.c */
-#line 276 "camp.y"
+/* Line 1464 of yacc.c */
+#line 289 "camp.y"
{ (yyval.vd) = new vardec((yyvsp[(1) - (2)].t)->getPos(), (yyvsp[(1) - (2)].t), (yyvsp[(2) - (2)].dil)); ;}
break;
case 42:
-/* Line 1455 of yacc.c */
-#line 280 "camp.y"
+/* Line 1464 of yacc.c */
+#line 293 "camp.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); ;}
break;
case 43:
-/* Line 1455 of yacc.c */
-#line 281 "camp.y"
+/* Line 1464 of yacc.c */
+#line 294 "camp.y"
{ (yyval.t) = new arrayTy((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].dim)); ;}
break;
case 44:
-/* Line 1455 of yacc.c */
-#line 285 "camp.y"
+/* Line 1464 of yacc.c */
+#line 298 "camp.y"
{ (yyval.t) = new nameTy((yyvsp[(1) - (1)].n)); ;}
break;
case 45:
-/* Line 1455 of yacc.c */
-#line 289 "camp.y"
+/* Line 1464 of yacc.c */
+#line 302 "camp.y"
{ (yyval.dim) = new dimensions((yyvsp[(1) - (2)].pos)); ;}
break;
case 46:
-/* Line 1455 of yacc.c */
-#line 290 "camp.y"
+/* Line 1464 of yacc.c */
+#line 303 "camp.y"
{ (yyval.dim) = (yyvsp[(1) - (3)].dim); (yyval.dim)->increase(); ;}
break;
case 47:
-/* Line 1455 of yacc.c */
-#line 294 "camp.y"
+/* Line 1464 of yacc.c */
+#line 307 "camp.y"
{ (yyval.elist) = new explist((yyvsp[(1) - (3)].pos)); (yyval.elist)->add((yyvsp[(2) - (3)].e)); ;}
break;
case 48:
-/* Line 1455 of yacc.c */
-#line 296 "camp.y"
+/* Line 1464 of yacc.c */
+#line 309 "camp.y"
{ (yyval.elist) = (yyvsp[(1) - (4)].elist); (yyval.elist)->add((yyvsp[(3) - (4)].e)); ;}
break;
case 49:
-/* Line 1455 of yacc.c */
-#line 300 "camp.y"
+/* Line 1464 of yacc.c */
+#line 313 "camp.y"
{ (yyval.dil) = new decidlist((yyvsp[(1) - (1)].di)->getPos()); (yyval.dil)->add((yyvsp[(1) - (1)].di)); ;}
break;
case 50:
-/* Line 1455 of yacc.c */
-#line 302 "camp.y"
+/* Line 1464 of yacc.c */
+#line 315 "camp.y"
{ (yyval.dil) = (yyvsp[(1) - (3)].dil); (yyval.dil)->add((yyvsp[(3) - (3)].di)); ;}
break;
case 51:
-/* Line 1455 of yacc.c */
-#line 306 "camp.y"
+/* Line 1464 of yacc.c */
+#line 319 "camp.y"
{ (yyval.di) = new decid((yyvsp[(1) - (1)].dis)->getPos(), (yyvsp[(1) - (1)].dis)); ;}
break;
case 52:
-/* Line 1455 of yacc.c */
-#line 308 "camp.y"
+/* Line 1464 of yacc.c */
+#line 321 "camp.y"
{ (yyval.di) = new decid((yyvsp[(1) - (3)].dis)->getPos(), (yyvsp[(1) - (3)].dis), (yyvsp[(3) - (3)].vi)); ;}
break;
case 53:
-/* Line 1455 of yacc.c */
-#line 312 "camp.y"
+/* Line 1464 of yacc.c */
+#line 325 "camp.y"
{ (yyval.dis) = new decidstart((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 54:
-/* Line 1455 of yacc.c */
-#line 313 "camp.y"
+/* Line 1464 of yacc.c */
+#line 326 "camp.y"
{ (yyval.dis) = new decidstart((yyvsp[(1) - (2)].ps).pos, (yyvsp[(1) - (2)].ps).sym, (yyvsp[(2) - (2)].dim)); ;}
break;
case 55:
-/* Line 1455 of yacc.c */
-#line 314 "camp.y"
+/* Line 1464 of yacc.c */
+#line 327 "camp.y"
{ (yyval.dis) = new fundecidstart((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, 0,
new formals((yyvsp[(2) - (3)].pos))); ;}
break;
case 56:
-/* Line 1455 of yacc.c */
-#line 317 "camp.y"
+/* Line 1464 of yacc.c */
+#line 330 "camp.y"
{ (yyval.dis) = new fundecidstart((yyvsp[(1) - (4)].ps).pos, (yyvsp[(1) - (4)].ps).sym, 0, (yyvsp[(3) - (4)].fls)); ;}
break;
case 57:
-/* Line 1455 of yacc.c */
-#line 321 "camp.y"
+/* Line 1464 of yacc.c */
+#line 334 "camp.y"
{ (yyval.vi) = (yyvsp[(1) - (1)].e); ;}
break;
case 58:
-/* Line 1455 of yacc.c */
-#line 322 "camp.y"
+/* Line 1464 of yacc.c */
+#line 335 "camp.y"
{ (yyval.vi) = (yyvsp[(1) - (1)].ai); ;}
break;
case 59:
-/* Line 1455 of yacc.c */
-#line 327 "camp.y"
+/* Line 1464 of yacc.c */
+#line 340 "camp.y"
{ (yyval.b) = (yyvsp[(2) - (3)].b); ;}
break;
case 60:
-/* Line 1455 of yacc.c */
-#line 331 "camp.y"
+/* Line 1464 of yacc.c */
+#line 344 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (2)].pos)); ;}
break;
case 61:
-/* Line 1455 of yacc.c */
-#line 333 "camp.y"
+/* Line 1464 of yacc.c */
+#line 346 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (4)].pos)); (yyval.ai)->addRest((yyvsp[(3) - (4)].vi)); ;}
break;
case 62:
-/* Line 1455 of yacc.c */
-#line 335 "camp.y"
+/* Line 1464 of yacc.c */
+#line 348 "camp.y"
{ (yyval.ai) = (yyvsp[(2) - (3)].ai); ;}
break;
case 63:
-/* Line 1455 of yacc.c */
-#line 337 "camp.y"
+/* Line 1464 of yacc.c */
+#line 350 "camp.y"
{ (yyval.ai) = (yyvsp[(2) - (5)].ai); (yyval.ai)->addRest((yyvsp[(4) - (5)].vi)); ;}
break;
case 64:
-/* Line 1455 of yacc.c */
-#line 341 "camp.y"
+/* Line 1464 of yacc.c */
+#line 354 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (1)].pos)); ;}
break;
case 65:
-/* Line 1455 of yacc.c */
-#line 342 "camp.y"
+/* Line 1464 of yacc.c */
+#line 355 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (1)].ai); ;}
break;
case 66:
-/* Line 1455 of yacc.c */
-#line 343 "camp.y"
+/* Line 1464 of yacc.c */
+#line 356 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (2)].ai); ;}
break;
case 67:
-/* Line 1455 of yacc.c */
-#line 347 "camp.y"
+/* Line 1464 of yacc.c */
+#line 360 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (1)].vi)->getPos());
(yyval.ai)->add((yyvsp[(1) - (1)].vi));;}
break;
case 68:
-/* Line 1455 of yacc.c */
-#line 350 "camp.y"
+/* Line 1464 of yacc.c */
+#line 363 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (3)].ai); (yyval.ai)->add((yyvsp[(3) - (3)].vi)); ;}
break;
case 69:
-/* Line 1455 of yacc.c */
-#line 354 "camp.y"
- { (yyval.fls) = (yyvsp[(1) - (1)].fls); ;}
+/* Line 1464 of yacc.c */
+#line 367 "camp.y"
+ { (yyval.fls) = new formals((yyvsp[(1) - (1)].fl)->getPos()); (yyval.fls)->add((yyvsp[(1) - (1)].fl)); ;}
break;
case 70:
-/* Line 1455 of yacc.c */
-#line 356 "camp.y"
- { (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->addRest((yyvsp[(3) - (3)].fl)); ;}
+/* Line 1464 of yacc.c */
+#line 368 "camp.y"
+ { (yyval.fls) = new formals((yyvsp[(1) - (2)].pos)); (yyval.fls)->addRest((yyvsp[(2) - (2)].fl)); ;}
break;
case 71:
-/* Line 1455 of yacc.c */
-#line 357 "camp.y"
- { (yyval.fls) = new formals((yyvsp[(1) - (2)].pos)); (yyval.fls)->addRest((yyvsp[(2) - (2)].fl)); ;}
+/* Line 1464 of yacc.c */
+#line 370 "camp.y"
+ { (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->add((yyvsp[(3) - (3)].fl)); ;}
break;
case 72:
-/* Line 1455 of yacc.c */
-#line 361 "camp.y"
- { (yyval.fls) = new formals((yyvsp[(1) - (1)].fl)->getPos()); (yyval.fls)->add((yyvsp[(1) - (1)].fl)); ;}
+/* Line 1464 of yacc.c */
+#line 372 "camp.y"
+ { (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->addRest((yyvsp[(3) - (3)].fl)); ;}
break;
case 73:
-/* Line 1455 of yacc.c */
-#line 363 "camp.y"
- { (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->add((yyvsp[(3) - (3)].fl)); ;}
+/* Line 1464 of yacc.c */
+#line 376 "camp.y"
+ { (yyval.boo) = true; ;}
break;
case 74:
-/* Line 1455 of yacc.c */
-#line 367 "camp.y"
- { (yyval.boo) = true; ;}
+/* Line 1464 of yacc.c */
+#line 377 "camp.y"
+ { (yyval.boo) = false; ;}
break;
case 75:
-/* Line 1455 of yacc.c */
-#line 368 "camp.y"
- { (yyval.boo) = false; ;}
+/* Line 1464 of yacc.c */
+#line 382 "camp.y"
+ { (yyval.fl) = new formal((yyvsp[(2) - (2)].t)->getPos(), (yyvsp[(2) - (2)].t), 0, 0, (yyvsp[(1) - (2)].boo), 0); ;}
break;
case 76:
-/* Line 1455 of yacc.c */
-#line 373 "camp.y"
- { (yyval.fl) = new formal((yyvsp[(2) - (2)].t)->getPos(), (yyvsp[(2) - (2)].t), 0, 0, (yyvsp[(1) - (2)].boo)); ;}
+/* Line 1464 of yacc.c */
+#line 384 "camp.y"
+ { (yyval.fl) = new formal((yyvsp[(2) - (3)].t)->getPos(), (yyvsp[(2) - (3)].t), (yyvsp[(3) - (3)].dis), 0, (yyvsp[(1) - (3)].boo), 0); ;}
break;
case 77:
-/* Line 1455 of yacc.c */
-#line 375 "camp.y"
- { (yyval.fl) = new formal((yyvsp[(2) - (3)].t)->getPos(), (yyvsp[(2) - (3)].t), (yyvsp[(3) - (3)].dis), 0, (yyvsp[(1) - (3)].boo)); ;}
+/* Line 1464 of yacc.c */
+#line 386 "camp.y"
+ { (yyval.fl) = new formal((yyvsp[(2) - (5)].t)->getPos(), (yyvsp[(2) - (5)].t), (yyvsp[(3) - (5)].dis), (yyvsp[(5) - (5)].vi), (yyvsp[(1) - (5)].boo), 0); ;}
break;
case 78:
-/* Line 1455 of yacc.c */
-#line 377 "camp.y"
- { (yyval.fl) = new formal((yyvsp[(2) - (5)].t)->getPos(), (yyvsp[(2) - (5)].t), (yyvsp[(3) - (5)].dis), (yyvsp[(5) - (5)].vi), (yyvsp[(1) - (5)].boo)); ;}
+/* Line 1464 of yacc.c */
+#line 389 "camp.y"
+ { bool k = checkKeyword((yyvsp[(3) - (4)].ps).pos, (yyvsp[(3) - (4)].ps).sym);
+ (yyval.fl) = new formal((yyvsp[(2) - (4)].t)->getPos(), (yyvsp[(2) - (4)].t), (yyvsp[(4) - (4)].dis), 0, (yyvsp[(1) - (4)].boo), k); ;}
break;
case 79:
-/* Line 1455 of yacc.c */
-#line 382 "camp.y"
- { (yyval.d) = new fundec((yyvsp[(3) - (5)].pos), (yyvsp[(1) - (5)].t), (yyvsp[(2) - (5)].ps).sym, new formals((yyvsp[(3) - (5)].pos)), (yyvsp[(5) - (5)].s)); ;}
+/* Line 1464 of yacc.c */
+#line 392 "camp.y"
+ { bool k = checkKeyword((yyvsp[(3) - (6)].ps).pos, (yyvsp[(3) - (6)].ps).sym);
+ (yyval.fl) = new formal((yyvsp[(2) - (6)].t)->getPos(), (yyvsp[(2) - (6)].t), (yyvsp[(4) - (6)].dis), (yyvsp[(6) - (6)].vi), (yyvsp[(1) - (6)].boo), k); ;}
break;
case 80:
-/* Line 1455 of yacc.c */
-#line 384 "camp.y"
- { (yyval.d) = new fundec((yyvsp[(3) - (6)].pos), (yyvsp[(1) - (6)].t), (yyvsp[(2) - (6)].ps).sym, (yyvsp[(4) - (6)].fls), (yyvsp[(6) - (6)].s)); ;}
+/* Line 1464 of yacc.c */
+#line 398 "camp.y"
+ { (yyval.d) = new fundec((yyvsp[(3) - (5)].pos), (yyvsp[(1) - (5)].t), (yyvsp[(2) - (5)].ps).sym, new formals((yyvsp[(3) - (5)].pos)), (yyvsp[(5) - (5)].s)); ;}
break;
case 81:
-/* Line 1455 of yacc.c */
-#line 388 "camp.y"
- { (yyval.d) = new recorddec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].b)); ;}
+/* Line 1464 of yacc.c */
+#line 400 "camp.y"
+ { (yyval.d) = new fundec((yyvsp[(3) - (6)].pos), (yyvsp[(1) - (6)].t), (yyvsp[(2) - (6)].ps).sym, (yyvsp[(4) - (6)].fls), (yyvsp[(6) - (6)].s)); ;}
break;
case 82:
-/* Line 1455 of yacc.c */
-#line 389 "camp.y"
- { (yyval.d) = new typedec((yyvsp[(1) - (2)].pos), (yyvsp[(2) - (2)].vd)); ;}
+/* Line 1464 of yacc.c */
+#line 404 "camp.y"
+ { (yyval.d) = new recorddec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].b)); ;}
break;
case 83:
-/* Line 1455 of yacc.c */
-#line 393 "camp.y"
- { (yyval.slice) = new slice((yyvsp[(1) - (1)].pos), 0, 0); ;}
+/* Line 1464 of yacc.c */
+#line 405 "camp.y"
+ { (yyval.d) = new typedec((yyvsp[(1) - (2)].pos), (yyvsp[(2) - (2)].vd)); ;}
break;
case 84:
-/* Line 1455 of yacc.c */
-#line 394 "camp.y"
- { (yyval.slice) = new slice((yyvsp[(2) - (2)].pos), (yyvsp[(1) - (2)].e), 0); ;}
+/* Line 1464 of yacc.c */
+#line 409 "camp.y"
+ { (yyval.slice) = new slice((yyvsp[(1) - (1)].pos), 0, 0); ;}
break;
case 85:
-/* Line 1455 of yacc.c */
-#line 395 "camp.y"
- { (yyval.slice) = new slice((yyvsp[(1) - (2)].pos), 0, (yyvsp[(2) - (2)].e)); ;}
+/* Line 1464 of yacc.c */
+#line 410 "camp.y"
+ { (yyval.slice) = new slice((yyvsp[(2) - (2)].pos), (yyvsp[(1) - (2)].e), 0); ;}
break;
case 86:
-/* Line 1455 of yacc.c */
-#line 396 "camp.y"
- { (yyval.slice) = new slice((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].e)); ;}
+/* Line 1464 of yacc.c */
+#line 411 "camp.y"
+ { (yyval.slice) = new slice((yyvsp[(1) - (2)].pos), 0, (yyvsp[(2) - (2)].e)); ;}
break;
case 87:
-/* Line 1455 of yacc.c */
-#line 400 "camp.y"
- { (yyval.e) = new fieldExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].ps).sym); ;}
+/* Line 1464 of yacc.c */
+#line 412 "camp.y"
+ { (yyval.slice) = new slice((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].e)); ;}
break;
case 88:
-/* Line 1455 of yacc.c */
-#line 401 "camp.y"
+/* Line 1464 of yacc.c */
+#line 416 "camp.y"
+ { (yyval.e) = new fieldExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].ps).sym); ;}
+ break;
+
+ case 89:
+
+/* Line 1464 of yacc.c */
+#line 417 "camp.y"
{ (yyval.e) = new subscriptExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)), (yyvsp[(3) - (4)].e)); ;}
break;
- case 89:
+ case 90:
-/* Line 1455 of yacc.c */
-#line 403 "camp.y"
+/* Line 1464 of yacc.c */
+#line 419 "camp.y"
{ (yyval.e) = new subscriptExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].e)); ;}
break;
- case 90:
+ case 91:
-/* Line 1455 of yacc.c */
-#line 404 "camp.y"
+/* Line 1464 of yacc.c */
+#line 420 "camp.y"
{ (yyval.e) = new sliceExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)), (yyvsp[(3) - (4)].slice)); ;}
break;
- case 91:
+ case 92:
-/* Line 1455 of yacc.c */
-#line 406 "camp.y"
+/* Line 1464 of yacc.c */
+#line 422 "camp.y"
{ (yyval.e) = new sliceExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].slice)); ;}
break;
- case 92:
+ case 93:
-/* Line 1455 of yacc.c */
-#line 407 "camp.y"
+/* Line 1464 of yacc.c */
+#line 423 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (3)].pos),
new nameExp((yyvsp[(1) - (3)].n)->getPos(), (yyvsp[(1) - (3)].n)),
new arglist()); ;}
break;
- case 93:
+ case 94:
-/* Line 1455 of yacc.c */
-#line 411 "camp.y"
+/* Line 1464 of yacc.c */
+#line 427 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)),
(yyvsp[(3) - (4)].alist)); ;}
break;
- case 94:
-
-/* Line 1455 of yacc.c */
-#line 414 "camp.y"
- { (yyval.e) = new callExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), new arglist()); ;}
- break;
-
case 95:
-/* Line 1455 of yacc.c */
-#line 416 "camp.y"
- { (yyval.e) = new callExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].alist)); ;}
+/* Line 1464 of yacc.c */
+#line 430 "camp.y"
+ { (yyval.e) = new callExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), new arglist()); ;}
break;
case 96:
-/* Line 1455 of yacc.c */
-#line 418 "camp.y"
- { (yyval.e) = (yyvsp[(2) - (3)].e); ;}
+/* Line 1464 of yacc.c */
+#line 432 "camp.y"
+ { (yyval.e) = new callExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].alist)); ;}
break;
case 97:
-/* Line 1455 of yacc.c */
-#line 420 "camp.y"
- { (yyval.e) = new nameExp((yyvsp[(2) - (3)].n)->getPos(), (yyvsp[(2) - (3)].n)); ;}
+/* Line 1464 of yacc.c */
+#line 434 "camp.y"
+ { (yyval.e) = (yyvsp[(2) - (3)].e); ;}
break;
case 98:
-/* Line 1455 of yacc.c */
-#line 421 "camp.y"
- { (yyval.e) = new thisExp((yyvsp[(1) - (1)].pos)); ;}
+/* Line 1464 of yacc.c */
+#line 436 "camp.y"
+ { (yyval.e) = new nameExp((yyvsp[(2) - (3)].n)->getPos(), (yyvsp[(2) - (3)].n)); ;}
break;
case 99:
-/* Line 1455 of yacc.c */
-#line 425 "camp.y"
- { (yyval.arg).name = symbol::nullsym; (yyval.arg).val=(yyvsp[(1) - (1)].e); ;}
+/* Line 1464 of yacc.c */
+#line 437 "camp.y"
+ { (yyval.e) = new thisExp((yyvsp[(1) - (1)].pos)); ;}
break;
case 100:
-/* Line 1455 of yacc.c */
-#line 426 "camp.y"
- { (yyval.arg).name = (yyvsp[(1) - (3)].ps).sym; (yyval.arg).val=(yyvsp[(3) - (3)].e); ;}
+/* Line 1464 of yacc.c */
+#line 441 "camp.y"
+ { (yyval.arg).name = symbol::nullsym; (yyval.arg).val=(yyvsp[(1) - (1)].e); ;}
break;
case 101:
-/* Line 1455 of yacc.c */
-#line 430 "camp.y"
- { (yyval.alist) = (yyvsp[(1) - (1)].alist); ;}
+/* Line 1464 of yacc.c */
+#line 442 "camp.y"
+ { (yyval.arg).name = (yyvsp[(1) - (3)].ps).sym; (yyval.arg).val=(yyvsp[(3) - (3)].e); ;}
break;
case 102:
-/* Line 1455 of yacc.c */
-#line 432 "camp.y"
- { (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->rest = (yyvsp[(3) - (3)].arg); ;}
+/* Line 1464 of yacc.c */
+#line 446 "camp.y"
+ { (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[(1) - (1)].arg)); ;}
break;
case 103:
-/* Line 1455 of yacc.c */
-#line 433 "camp.y"
- { (yyval.alist) = new arglist(); (yyval.alist)->rest = (yyvsp[(2) - (2)].arg); ;}
+/* Line 1464 of yacc.c */
+#line 448 "camp.y"
+ { (yyval.alist) = new arglist(); (yyval.alist)->addRest((yyvsp[(2) - (2)].arg)); ;}
break;
case 104:
-/* Line 1455 of yacc.c */
-#line 437 "camp.y"
- { (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[(1) - (1)].arg)); ;}
+/* Line 1464 of yacc.c */
+#line 450 "camp.y"
+ { (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->add((yyvsp[(3) - (3)].arg)); ;}
break;
case 105:
-/* Line 1455 of yacc.c */
-#line 439 "camp.y"
- { (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->add((yyvsp[(3) - (3)].arg)); ;}
+/* Line 1464 of yacc.c */
+#line 452 "camp.y"
+ { (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->addRest((yyvsp[(3) - (3)].arg)); ;}
break;
case 106:
-/* Line 1455 of yacc.c */
-#line 444 "camp.y"
+/* Line 1464 of yacc.c */
+#line 456 "camp.y"
{ (yyval.e) = new nameExp((yyvsp[(1) - (1)].n)->getPos(), (yyvsp[(1) - (1)].n)); ;}
break;
case 107:
-/* Line 1455 of yacc.c */
-#line 445 "camp.y"
+/* Line 1464 of yacc.c */
+#line 457 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); ;}
break;
case 108:
-/* Line 1455 of yacc.c */
-#line 446 "camp.y"
+/* Line 1464 of yacc.c */
+#line 458 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); ;}
break;
case 109:
-/* Line 1455 of yacc.c */
-#line 447 "camp.y"
+/* Line 1464 of yacc.c */
+#line 459 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].stre); ;}
break;
case 110:
-/* Line 1455 of yacc.c */
-#line 449 "camp.y"
+/* Line 1464 of yacc.c */
+#line 461 "camp.y"
{ (yyval.e) = new scaleExp((yyvsp[(1) - (2)].e)->getPos(), (yyvsp[(1) - (2)].e), (yyvsp[(2) - (2)].e)); ;}
break;
case 111:
-/* Line 1455 of yacc.c */
-#line 451 "camp.y"
+/* Line 1464 of yacc.c */
+#line 463 "camp.y"
{ (yyval.e) = new castExp((yyvsp[(2) - (4)].n)->getPos(), new nameTy((yyvsp[(2) - (4)].n)), (yyvsp[(4) - (4)].e)); ;}
break;
case 112:
-/* Line 1455 of yacc.c */
-#line 453 "camp.y"
+/* Line 1464 of yacc.c */
+#line 465 "camp.y"
{ (yyval.e) = new castExp((yyvsp[(2) - (5)].n)->getPos(), new arrayTy((yyvsp[(2) - (5)].n), (yyvsp[(3) - (5)].dim)), (yyvsp[(5) - (5)].e)); ;}
break;
case 113:
-/* Line 1455 of yacc.c */
-#line 455 "camp.y"
+/* Line 1464 of yacc.c */
+#line 467 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); ;}
break;
case 114:
-/* Line 1455 of yacc.c */
-#line 457 "camp.y"
+/* Line 1464 of yacc.c */
+#line 469 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); ;}
break;
case 115:
-/* Line 1455 of yacc.c */
-#line 458 "camp.y"
+/* Line 1464 of yacc.c */
+#line 470 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); ;}
break;
case 116:
-/* Line 1455 of yacc.c */
-#line 459 "camp.y"
+/* Line 1464 of yacc.c */
+#line 471 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 117:
-/* Line 1455 of yacc.c */
-#line 460 "camp.y"
+/* Line 1464 of yacc.c */
+#line 472 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 118:
-/* Line 1455 of yacc.c */
-#line 461 "camp.y"
+/* Line 1464 of yacc.c */
+#line 473 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 119:
-/* Line 1455 of yacc.c */
-#line 462 "camp.y"
+/* Line 1464 of yacc.c */
+#line 474 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 120:
-/* Line 1455 of yacc.c */
-#line 463 "camp.y"
+/* Line 1464 of yacc.c */
+#line 475 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 121:
-/* Line 1455 of yacc.c */
-#line 464 "camp.y"
+/* Line 1464 of yacc.c */
+#line 476 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 122:
-/* Line 1455 of yacc.c */
-#line 465 "camp.y"
+/* Line 1464 of yacc.c */
+#line 477 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 123:
-/* Line 1455 of yacc.c */
-#line 466 "camp.y"
+/* Line 1464 of yacc.c */
+#line 478 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 124:
-/* Line 1455 of yacc.c */
-#line 467 "camp.y"
+/* Line 1464 of yacc.c */
+#line 479 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 125:
-/* Line 1455 of yacc.c */
-#line 468 "camp.y"
+/* Line 1464 of yacc.c */
+#line 480 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 126:
-/* Line 1455 of yacc.c */
-#line 469 "camp.y"
+/* Line 1464 of yacc.c */
+#line 481 "camp.y"
{ (yyval.e) = new equalityExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 127:
-/* Line 1455 of yacc.c */
-#line 470 "camp.y"
+/* Line 1464 of yacc.c */
+#line 482 "camp.y"
{ (yyval.e) = new equalityExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 128:
-/* Line 1455 of yacc.c */
-#line 471 "camp.y"
+/* Line 1464 of yacc.c */
+#line 483 "camp.y"
{ (yyval.e) = new andExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 129:
-/* Line 1455 of yacc.c */
-#line 472 "camp.y"
+/* Line 1464 of yacc.c */
+#line 484 "camp.y"
{ (yyval.e) = new orExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 130:
-/* Line 1455 of yacc.c */
-#line 473 "camp.y"
+/* Line 1464 of yacc.c */
+#line 485 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 131:
-/* Line 1455 of yacc.c */
-#line 474 "camp.y"
+/* Line 1464 of yacc.c */
+#line 486 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 132:
-/* Line 1455 of yacc.c */
-#line 475 "camp.y"
+/* Line 1464 of yacc.c */
+#line 487 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 133:
-/* Line 1455 of yacc.c */
-#line 476 "camp.y"
+/* Line 1464 of yacc.c */
+#line 488 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 134:
-/* Line 1455 of yacc.c */
-#line 477 "camp.y"
+/* Line 1464 of yacc.c */
+#line 489 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 135:
-/* Line 1455 of yacc.c */
-#line 479 "camp.y"
+/* Line 1464 of yacc.c */
+#line 491 "camp.y"
{ (yyval.e) = new newRecordExp((yyvsp[(1) - (2)].pos), (yyvsp[(2) - (2)].t)); ;}
break;
case 136:
-/* Line 1455 of yacc.c */
-#line 481 "camp.y"
+/* Line 1464 of yacc.c */
+#line 493 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].t), (yyvsp[(3) - (3)].elist), 0, 0); ;}
break;
case 137:
-/* Line 1455 of yacc.c */
-#line 483 "camp.y"
+/* Line 1464 of yacc.c */
+#line 495 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (4)].pos), (yyvsp[(2) - (4)].t), (yyvsp[(3) - (4)].elist), (yyvsp[(4) - (4)].dim), 0); ;}
break;
case 138:
-/* Line 1455 of yacc.c */
-#line 485 "camp.y"
+/* Line 1464 of yacc.c */
+#line 497 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].t), 0, (yyvsp[(3) - (3)].dim), 0); ;}
break;
case 139:
-/* Line 1455 of yacc.c */
-#line 487 "camp.y"
+/* Line 1464 of yacc.c */
+#line 499 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (4)].pos), (yyvsp[(2) - (4)].t), 0, (yyvsp[(3) - (4)].dim), (yyvsp[(4) - (4)].ai)); ;}
break;
case 140:
-/* Line 1455 of yacc.c */
-#line 489 "camp.y"
+/* Line 1464 of yacc.c */
+#line 501 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].t), new formals((yyvsp[(3) - (5)].pos)), (yyvsp[(5) - (5)].s)); ;}
break;
case 141:
-/* Line 1455 of yacc.c */
-#line 491 "camp.y"
+/* Line 1464 of yacc.c */
+#line 503 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (6)].pos),
new arrayTy((yyvsp[(2) - (6)].t)->getPos(), (yyvsp[(2) - (6)].t), (yyvsp[(3) - (6)].dim)),
new formals((yyvsp[(4) - (6)].pos)),
@@ -3174,15 +3194,15 @@ yyreduce:
case 142:
-/* Line 1455 of yacc.c */
-#line 496 "camp.y"
+/* Line 1464 of yacc.c */
+#line 508 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (6)].pos), (yyvsp[(2) - (6)].t), (yyvsp[(4) - (6)].fls), (yyvsp[(6) - (6)].s)); ;}
break;
case 143:
-/* Line 1455 of yacc.c */
-#line 498 "camp.y"
+/* Line 1464 of yacc.c */
+#line 510 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (7)].pos),
new arrayTy((yyvsp[(2) - (7)].t)->getPos(), (yyvsp[(2) - (7)].t), (yyvsp[(3) - (7)].dim)),
(yyvsp[(5) - (7)].fls),
@@ -3191,50 +3211,50 @@ yyreduce:
case 144:
-/* Line 1455 of yacc.c */
-#line 503 "camp.y"
+/* Line 1464 of yacc.c */
+#line 515 "camp.y"
{ (yyval.e) = new conditionalExp((yyvsp[(2) - (5)].pos), (yyvsp[(1) - (5)].e), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].e)); ;}
break;
case 145:
-/* Line 1455 of yacc.c */
-#line 504 "camp.y"
+/* Line 1464 of yacc.c */
+#line 516 "camp.y"
{ (yyval.e) = new assignExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].e)); ;}
break;
case 146:
-/* Line 1455 of yacc.c */
-#line 507 "camp.y"
+/* Line 1464 of yacc.c */
+#line 519 "camp.y"
{ (yyval.e) = new pairExp((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].e), (yyvsp[(4) - (5)].e)); ;}
break;
case 147:
-/* Line 1455 of yacc.c */
-#line 509 "camp.y"
+/* Line 1464 of yacc.c */
+#line 521 "camp.y"
{ (yyval.e) = new tripleExp((yyvsp[(1) - (7)].pos), (yyvsp[(2) - (7)].e), (yyvsp[(4) - (7)].e), (yyvsp[(6) - (7)].e)); ;}
break;
case 148:
-/* Line 1455 of yacc.c */
-#line 511 "camp.y"
+/* Line 1464 of yacc.c */
+#line 523 "camp.y"
{ (yyval.e) = new transformExp((yyvsp[(1) - (13)].pos), (yyvsp[(2) - (13)].e), (yyvsp[(4) - (13)].e), (yyvsp[(6) - (13)].e), (yyvsp[(8) - (13)].e), (yyvsp[(10) - (13)].e), (yyvsp[(12) - (13)].e)); ;}
break;
case 149:
-/* Line 1455 of yacc.c */
-#line 513 "camp.y"
+/* Line 1464 of yacc.c */
+#line 525 "camp.y"
{ (yyvsp[(2) - (3)].j)->pushFront((yyvsp[(1) - (3)].e)); (yyvsp[(2) - (3)].j)->pushBack((yyvsp[(3) - (3)].e)); (yyval.e) = (yyvsp[(2) - (3)].j); ;}
break;
case 150:
-/* Line 1455 of yacc.c */
-#line 515 "camp.y"
+/* Line 1464 of yacc.c */
+#line 527 "camp.y"
{ (yyvsp[(2) - (2)].se)->setSide(camp::OUT);
joinExp *jexp =
new joinExp((yyvsp[(2) - (2)].se)->getPos(), SYM_DOTS);
@@ -3244,360 +3264,360 @@ yyreduce:
case 151:
-/* Line 1455 of yacc.c */
-#line 521 "camp.y"
+/* Line 1464 of yacc.c */
+#line 533 "camp.y"
{ (yyval.e) = new prefixExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), SYM_PLUS); ;}
break;
case 152:
-/* Line 1455 of yacc.c */
-#line 523 "camp.y"
+/* Line 1464 of yacc.c */
+#line 535 "camp.y"
{ (yyval.e) = new prefixExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), SYM_MINUS); ;}
break;
case 153:
-/* Line 1455 of yacc.c */
-#line 526 "camp.y"
+/* Line 1464 of yacc.c */
+#line 538 "camp.y"
{ (yyval.e) = new postfixExp((yyvsp[(2) - (2)].ps).pos, (yyvsp[(1) - (2)].e), SYM_PLUS); ;}
break;
case 154:
-/* Line 1455 of yacc.c */
-#line 527 "camp.y"
+/* Line 1464 of yacc.c */
+#line 539 "camp.y"
{ (yyval.e) = new selfExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); ;}
break;
case 155:
-/* Line 1455 of yacc.c */
-#line 529 "camp.y"
+/* Line 1464 of yacc.c */
+#line 541 "camp.y"
{ (yyval.e) = new quoteExp((yyvsp[(1) - (4)].pos), (yyvsp[(3) - (4)].b)); ;}
break;
case 156:
-/* Line 1455 of yacc.c */
-#line 535 "camp.y"
+/* Line 1464 of yacc.c */
+#line 547 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos,(yyvsp[(1) - (1)].ps).sym); ;}
break;
case 157:
-/* Line 1455 of yacc.c */
-#line 537 "camp.y"
+/* Line 1464 of yacc.c */
+#line 549 "camp.y"
{ (yyval.j) = (yyvsp[(1) - (1)].j); ;}
break;
case 158:
-/* Line 1455 of yacc.c */
-#line 539 "camp.y"
+/* Line 1464 of yacc.c */
+#line 551 "camp.y"
{ (yyvsp[(1) - (2)].se)->setSide(camp::OUT);
(yyval.j) = (yyvsp[(2) - (2)].j); (yyval.j)->pushFront((yyvsp[(1) - (2)].se)); ;}
break;
case 159:
-/* Line 1455 of yacc.c */
-#line 542 "camp.y"
+/* Line 1464 of yacc.c */
+#line 554 "camp.y"
{ (yyvsp[(2) - (2)].se)->setSide(camp::IN);
(yyval.j) = (yyvsp[(1) - (2)].j); (yyval.j)->pushBack((yyvsp[(2) - (2)].se)); ;}
break;
case 160:
-/* Line 1455 of yacc.c */
-#line 545 "camp.y"
+/* Line 1464 of yacc.c */
+#line 557 "camp.y"
{ (yyvsp[(1) - (3)].se)->setSide(camp::OUT); (yyvsp[(3) - (3)].se)->setSide(camp::IN);
(yyval.j) = (yyvsp[(2) - (3)].j); (yyval.j)->pushFront((yyvsp[(1) - (3)].se)); (yyval.j)->pushBack((yyvsp[(3) - (3)].se)); ;}
break;
case 161:
-/* Line 1455 of yacc.c */
-#line 550 "camp.y"
+/* Line 1464 of yacc.c */
+#line 562 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(2) - (4)].ps).pos, (yyvsp[(2) - (4)].ps).sym, (yyvsp[(3) - (4)].e)); ;}
break;
case 162:
-/* Line 1455 of yacc.c */
-#line 551 "camp.y"
+/* Line 1464 of yacc.c */
+#line 563 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (3)].pos), symbol::opTrans("spec"), (yyvsp[(2) - (3)].e)); ;}
break;
case 163:
-/* Line 1455 of yacc.c */
-#line 553 "camp.y"
+/* Line 1464 of yacc.c */
+#line 565 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (5)].pos), symbol::opTrans("spec"),
new pairExp((yyvsp[(3) - (5)].pos), (yyvsp[(2) - (5)].e), (yyvsp[(4) - (5)].e))); ;}
break;
case 164:
-/* Line 1455 of yacc.c */
-#line 556 "camp.y"
+/* Line 1464 of yacc.c */
+#line 568 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (7)].pos), symbol::opTrans("spec"),
new tripleExp((yyvsp[(3) - (7)].pos), (yyvsp[(2) - (7)].e), (yyvsp[(4) - (7)].e), (yyvsp[(6) - (7)].e))); ;}
break;
case 165:
-/* Line 1455 of yacc.c */
-#line 561 "camp.y"
+/* Line 1464 of yacc.c */
+#line 573 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 166:
-/* Line 1455 of yacc.c */
-#line 563 "camp.y"
+/* Line 1464 of yacc.c */
+#line 575 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym); (yyval.j)->pushBack((yyvsp[(2) - (3)].e)); ;}
break;
case 167:
-/* Line 1455 of yacc.c */
-#line 565 "camp.y"
+/* Line 1464 of yacc.c */
+#line 577 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym); (yyval.j)->pushBack((yyvsp[(2) - (3)].e)); ;}
break;
case 168:
-/* Line 1455 of yacc.c */
-#line 566 "camp.y"
+/* Line 1464 of yacc.c */
+#line 578 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 169:
-/* Line 1455 of yacc.c */
-#line 567 "camp.y"
+/* Line 1464 of yacc.c */
+#line 579 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); ;}
break;
case 170:
-/* Line 1455 of yacc.c */
-#line 571 "camp.y"
+/* Line 1464 of yacc.c */
+#line 583 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym,
new booleanExp((yyvsp[(1) - (2)].ps).pos, false)); ;}
break;
case 171:
-/* Line 1455 of yacc.c */
-#line 574 "camp.y"
+/* Line 1464 of yacc.c */
+#line 586 "camp.y"
{ (yyval.e) = new ternaryExp((yyvsp[(1) - (4)].ps).pos, (yyvsp[(2) - (4)].e), (yyvsp[(1) - (4)].ps).sym, (yyvsp[(4) - (4)].e),
new booleanExp((yyvsp[(1) - (4)].ps).pos, false)); ;}
break;
case 172:
-/* Line 1455 of yacc.c */
-#line 577 "camp.y"
+/* Line 1464 of yacc.c */
+#line 589 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(3) - (3)].e), (yyvsp[(1) - (3)].ps).sym,
new booleanExp((yyvsp[(2) - (3)].ps).pos, true)); ;}
break;
case 173:
-/* Line 1455 of yacc.c */
-#line 580 "camp.y"
+/* Line 1464 of yacc.c */
+#line 592 "camp.y"
{ (yyval.e) = new ternaryExp((yyvsp[(1) - (5)].ps).pos, (yyvsp[(3) - (5)].e), (yyvsp[(1) - (5)].ps).sym, (yyvsp[(5) - (5)].e),
new booleanExp((yyvsp[(2) - (5)].ps).pos, true)); ;}
break;
case 174:
-/* Line 1455 of yacc.c */
-#line 585 "camp.y"
+/* Line 1464 of yacc.c */
+#line 597 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); ;}
break;
case 175:
-/* Line 1455 of yacc.c */
-#line 587 "camp.y"
+/* Line 1464 of yacc.c */
+#line 599 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (4)].ps).pos, (yyvsp[(2) - (4)].e), (yyvsp[(1) - (4)].ps).sym, (yyvsp[(4) - (4)].e)); ;}
break;
case 176:
-/* Line 1455 of yacc.c */
-#line 591 "camp.y"
+/* Line 1464 of yacc.c */
+#line 603 "camp.y"
{ (yyval.s) = new emptyStm((yyvsp[(1) - (1)].pos)); ;}
break;
case 177:
-/* Line 1455 of yacc.c */
-#line 592 "camp.y"
+/* Line 1464 of yacc.c */
+#line 604 "camp.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); ;}
break;
case 178:
-/* Line 1455 of yacc.c */
-#line 593 "camp.y"
+/* Line 1464 of yacc.c */
+#line 605 "camp.y"
{ (yyval.s) = (yyvsp[(1) - (2)].s); ;}
break;
case 179:
-/* Line 1455 of yacc.c */
-#line 595 "camp.y"
+/* Line 1464 of yacc.c */
+#line 607 "camp.y"
{ (yyval.s) = new ifStm((yyvsp[(1) - (5)].pos), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].s)); ;}
break;
case 180:
-/* Line 1455 of yacc.c */
-#line 597 "camp.y"
+/* Line 1464 of yacc.c */
+#line 609 "camp.y"
{ (yyval.s) = new ifStm((yyvsp[(1) - (7)].pos), (yyvsp[(3) - (7)].e), (yyvsp[(5) - (7)].s), (yyvsp[(7) - (7)].s)); ;}
break;
case 181:
-/* Line 1455 of yacc.c */
-#line 599 "camp.y"
+/* Line 1464 of yacc.c */
+#line 611 "camp.y"
{ (yyval.s) = new whileStm((yyvsp[(1) - (5)].pos), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].s)); ;}
break;
case 182:
-/* Line 1455 of yacc.c */
-#line 601 "camp.y"
+/* Line 1464 of yacc.c */
+#line 613 "camp.y"
{ (yyval.s) = new doStm((yyvsp[(1) - (7)].pos), (yyvsp[(2) - (7)].s), (yyvsp[(5) - (7)].e)); ;}
break;
case 183:
-/* Line 1455 of yacc.c */
-#line 603 "camp.y"
+/* Line 1464 of yacc.c */
+#line 615 "camp.y"
{ (yyval.s) = new forStm((yyvsp[(1) - (9)].pos), (yyvsp[(3) - (9)].run), (yyvsp[(5) - (9)].e), (yyvsp[(7) - (9)].sel), (yyvsp[(9) - (9)].s)); ;}
break;
case 184:
-/* Line 1455 of yacc.c */
-#line 605 "camp.y"
+/* Line 1464 of yacc.c */
+#line 617 "camp.y"
{ (yyval.s) = new extendedForStm((yyvsp[(1) - (8)].pos), (yyvsp[(3) - (8)].t), (yyvsp[(4) - (8)].ps).sym, (yyvsp[(6) - (8)].e), (yyvsp[(8) - (8)].s)); ;}
break;
case 185:
-/* Line 1455 of yacc.c */
-#line 606 "camp.y"
+/* Line 1464 of yacc.c */
+#line 618 "camp.y"
{ (yyval.s) = new breakStm((yyvsp[(1) - (2)].pos)); ;}
break;
case 186:
-/* Line 1455 of yacc.c */
-#line 607 "camp.y"
+/* Line 1464 of yacc.c */
+#line 619 "camp.y"
{ (yyval.s) = new continueStm((yyvsp[(1) - (2)].pos)); ;}
break;
case 187:
-/* Line 1455 of yacc.c */
-#line 608 "camp.y"
+/* Line 1464 of yacc.c */
+#line 620 "camp.y"
{ (yyval.s) = new returnStm((yyvsp[(1) - (2)].pos)); ;}
break;
case 188:
-/* Line 1455 of yacc.c */
-#line 609 "camp.y"
+/* Line 1464 of yacc.c */
+#line 621 "camp.y"
{ (yyval.s) = new returnStm((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].e)); ;}
break;
case 189:
-/* Line 1455 of yacc.c */
-#line 613 "camp.y"
+/* Line 1464 of yacc.c */
+#line 625 "camp.y"
{ (yyval.s) = new expStm((yyvsp[(1) - (1)].e)->getPos(), (yyvsp[(1) - (1)].e)); ;}
break;
case 190:
-/* Line 1455 of yacc.c */
-#line 617 "camp.y"
+/* Line 1464 of yacc.c */
+#line 629 "camp.y"
{ (yyval.s) = new blockStm((yyvsp[(1) - (1)].b)->getPos(), (yyvsp[(1) - (1)].b)); ;}
break;
case 191:
-/* Line 1455 of yacc.c */
-#line 621 "camp.y"
+/* Line 1464 of yacc.c */
+#line 633 "camp.y"
{ (yyval.run) = 0; ;}
break;
case 192:
-/* Line 1455 of yacc.c */
-#line 622 "camp.y"
+/* Line 1464 of yacc.c */
+#line 634 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].sel); ;}
break;
case 193:
-/* Line 1455 of yacc.c */
-#line 623 "camp.y"
+/* Line 1464 of yacc.c */
+#line 635 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].vd); ;}
break;
case 194:
-/* Line 1455 of yacc.c */
-#line 627 "camp.y"
+/* Line 1464 of yacc.c */
+#line 639 "camp.y"
{ (yyval.e) = 0; ;}
break;
case 195:
-/* Line 1455 of yacc.c */
-#line 628 "camp.y"
+/* Line 1464 of yacc.c */
+#line 640 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); ;}
break;
case 196:
-/* Line 1455 of yacc.c */
-#line 632 "camp.y"
+/* Line 1464 of yacc.c */
+#line 644 "camp.y"
{ (yyval.sel) = 0; ;}
break;
case 197:
-/* Line 1455 of yacc.c */
-#line 633 "camp.y"
+/* Line 1464 of yacc.c */
+#line 645 "camp.y"
{ (yyval.sel) = (yyvsp[(1) - (1)].sel); ;}
break;
case 198:
-/* Line 1455 of yacc.c */
-#line 637 "camp.y"
+/* Line 1464 of yacc.c */
+#line 649 "camp.y"
{ (yyval.sel) = new stmExpList((yyvsp[(1) - (1)].s)->getPos()); (yyval.sel)->add((yyvsp[(1) - (1)].s)); ;}
break;
case 199:
-/* Line 1455 of yacc.c */
-#line 639 "camp.y"
+/* Line 1464 of yacc.c */
+#line 651 "camp.y"
{ (yyval.sel) = (yyvsp[(1) - (3)].sel); (yyval.sel)->add((yyvsp[(3) - (3)].s)); ;}
break;
-/* Line 1455 of yacc.c */
-#line 3601 "camp.tab.c"
+/* Line 1464 of yacc.c */
+#line 3621 "camp.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/Build/source/utils/asymptote/camp.tab.h b/Build/source/utils/asymptote/camp.tab.h
index cd6c58db7cc..50a6b1966f5 100644
--- a/Build/source/utils/asymptote/camp.tab.h
+++ b/Build/source/utils/asymptote/camp.tab.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -104,8 +103,8 @@
typedef union YYSTYPE
{
-/* Line 1676 of yacc.c */
-#line 47 "camp.y"
+/* Line 1685 of yacc.c */
+#line 60 "camp.y"
position pos;
bool boo;
@@ -154,8 +153,8 @@ typedef union YYSTYPE
-/* Line 1676 of yacc.c */
-#line 159 "camp.tab.h"
+/* Line 1685 of yacc.c */
+#line 158 "camp.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/Build/source/utils/asymptote/camp.y b/Build/source/utils/asymptote/camp.y
index 94feb807c32..26d5a834e2a 100644
--- a/Build/source/utils/asymptote/camp.y
+++ b/Build/source/utils/asymptote/camp.y
@@ -37,6 +37,19 @@ void yyerror(const char *s)
}
}
+// Check if the symbol given is "keyword". Returns true in this case and
+// returns false and reports an error otherwise.
+bool checkKeyword(position pos, symbol sym)
+{
+ if (sym != symbol::trans("keyword")) {
+ em.error(pos);
+ em << "expected 'keyword' here";
+
+ return false;
+ }
+ return true;
+}
+
namespace absyntax { file *root; }
using namespace absyntax;
@@ -148,7 +161,7 @@ using mem::string;
%type <vi> varinit
%type <ai> arrayinit basearrayinit varinits
%type <fl> formal
-%type <fls> formals baseformals
+%type <fls> formals
%type <e> value exp fortest
%type <arg> argument
%type <slice> slice
@@ -156,7 +169,7 @@ using mem::string;
%type <e> tension controls
%type <se> dir
%type <elist> dimexps
-%type <alist> arglist basearglist
+%type <alist> arglist
%type <s> stm stmexp blockstm
%type <run> forinit
%type <sel> forupdate stmexplist
@@ -253,7 +266,7 @@ idpairlist:
strid:
ID { $$ = $1; }
| STRING { $$.pos = $1->getPos();
- $$.sym = symbol::trans($1->getString()); }
+ $$.sym = symbol::literalTrans($1->getString()); }
;
stridpair:
@@ -351,16 +364,12 @@ varinits:
;
formals:
- baseformals { $$ = $1; }
-| baseformals ELLIPSIS formal
- { $$ = $1; $$->addRest($3); }
-| ELLIPSIS formal { $$ = new formals($1); $$->addRest($2); }
-;
-
-baseformals:
formal { $$ = new formals($1->getPos()); $$->add($1); }
-| baseformals ',' formal
+| ELLIPSIS formal { $$ = new formals($1); $$->addRest($2); }
+| formals ',' formal
{ $$ = $1; $$->add($3); }
+| formals ELLIPSIS formal
+ { $$ = $1; $$->addRest($3); }
;
explicitornot:
@@ -370,11 +379,18 @@ explicitornot:
formal:
explicitornot type
- { $$ = new formal($2->getPos(), $2, 0, 0, $1); }
+ { $$ = new formal($2->getPos(), $2, 0, 0, $1, 0); }
| explicitornot type decidstart
- { $$ = new formal($2->getPos(), $2, $3, 0, $1); }
+ { $$ = new formal($2->getPos(), $2, $3, 0, $1, 0); }
| explicitornot type decidstart ASSIGN varinit
- { $$ = new formal($2->getPos(), $2, $3, $5, $1); }
+ { $$ = new formal($2->getPos(), $2, $3, $5, $1, 0); }
+/* The uses of ID below are 'keyword' qualifiers before the parameter name. */
+| explicitornot type ID decidstart
+ { bool k = checkKeyword($3.pos, $3.sym);
+ $$ = new formal($2->getPos(), $2, $4, 0, $1, k); }
+| explicitornot type ID decidstart ASSIGN varinit
+ { bool k = checkKeyword($3.pos, $3.sym);
+ $$ = new formal($2->getPos(), $2, $4, $6, $1, k); }
;
fundec:
@@ -427,19 +443,15 @@ argument:
;
arglist:
- basearglist { $$ = $1; }
-| basearglist ELLIPSIS argument
- { $$ = $1; $$->rest = $3; }
-| ELLIPSIS argument { $$ = new arglist(); $$->rest = $2; }
-;
-
-basearglist:
argument { $$ = new arglist(); $$->add($1); }
-| basearglist ',' argument
+| ELLIPSIS argument
+ { $$ = new arglist(); $$->addRest($2); }
+| arglist ',' argument
{ $$ = $1; $$->add($3); }
+| arglist ELLIPSIS argument
+ { $$ = $1; $$->addRest($3); }
;
-
exp:
name { $$ = new nameExp($1->getPos(), $1); }
| value { $$ = $1; }
diff --git a/Build/source/utils/asymptote/coder.cc b/Build/source/utils/asymptote/coder.cc
index f2d3b4d6833..02bb27599ff 100644
--- a/Build/source/utils/asymptote/coder.cc
+++ b/Build/source/utils/asymptote/coder.cc
@@ -35,11 +35,14 @@ vm::lambda *newLambda(string name) {
}
-// The dummy environment of the global environment.
// Used purely for global variables and static code blocks of file
// level modules.
coder::coder(position pos, string name, modifier sord)
+#if SIMPLE_FRAME
+ : level(frame::indirect_frame(name)),
+#else
: level(new frame(name, 0, 0)),
+#endif
recordLevel(0),
recordType(0),
isCodelet(false),
@@ -49,11 +52,9 @@ coder::coder(position pos, string name, modifier sord)
sord(sord),
perm(DEFAULT_PERM),
program(new vm::program),
- numLabels(0),
curPos(pos)
{
sord_stack.push(sord);
- encodeAllocInstruction();
}
// Defines a new function environment.
@@ -72,11 +73,9 @@ coder::coder(position pos, string name, function *t, coder *parent,
sord(sord),
perm(DEFAULT_PERM),
program(new vm::program),
- numLabels(0),
curPos(pos)
{
sord_stack.push(sord);
- encodeAllocInstruction();
}
// Start encoding the body of the record. The function being encoded
@@ -92,11 +91,9 @@ coder::coder(position pos, record *t, coder *parent, modifier sord)
sord(sord),
perm(DEFAULT_PERM),
program(new vm::program),
- numLabels(0),
curPos(pos)
{
sord_stack.push(sord);
- encodeAllocInstruction();
}
coder coder::newFunction(position pos, string name, function *t, modifier sord)
@@ -171,33 +168,22 @@ bool coder::encode(frame *f)
if (f == 0) {
encode(inst::constpush,(item)0);
+ return true;
}
else if (f == toplevel) {
encode(inst::pushclosure);
+ return true;
}
else {
- encode(inst::varpush,0);
-
- frame *level = toplevel->getParent();
- while (level != f) {
- if (level == 0)
- // Frame request was in an improper scope.
- return false;
-
- encode(inst::fieldpush,0);
-
- level = level->getParent();
- }
+ encode(inst::varpush,toplevel->parentIndex());
+ return encode(f, toplevel->getParent());
}
-
- return true;
}
bool coder::encode(frame *dest, frame *top)
{
- //cerr << "coder::encode()\n";
-
if (dest == 0) {
+ // Change to encodePop?
encode(inst::pop);
encode(inst::constpush,(item)0);
}
@@ -206,12 +192,10 @@ bool coder::encode(frame *dest, frame *top)
while (level != dest) {
if (level == 0) {
// Frame request was in an improper scope.
- //cerr << "failed\n";
-
return false;
}
- encode(inst::fieldpush,0);
+ encode(inst::fieldpush, level->parentIndex());
level = level->getParent();
}
@@ -221,67 +205,117 @@ bool coder::encode(frame *dest, frame *top)
return true;
}
-Int coder::defLabel()
+vm::program::label coder::encodeEmptyJump(inst::opcode op)
+{
+ // Get the end position before encoding the label. Once encoded, this will
+ // point to the instruction.
+ vm::program::label pos = program->end();
+
+ encode(op);
+
+ return pos;
+}
+
+void replaceEmptyJump(vm::program::label from, vm::program::label to)
+{
+ from->ref = to;
+}
+
+label coder::defNewLabel()
{
if (isStatic())
- return parent->defLabel();
+ return parent->defNewLabel();
- return defLabel(numLabels++);
+ label l = new label_t();
+ assert(!l->location.defined());
+ assert(!l->firstUse.defined());
+ return defLabel(l);
}
-Int coder::defLabel(Int label)
+label coder::defLabel(label label)
{
if (isStatic())
return parent->defLabel(label);
-
- assert(label >= 0 && label < numLabels);
- defs.insert(std::make_pair(label,program->end()));
+ //cout << "defining label " << label << endl;
+
+ assert(!label->location.defined());
+ //vm::program::label here = program->end();
+ label->location = program->end();
+ assert(label->location.defined());
- std::multimap<Int,vm::program::label>::iterator p = uses.lower_bound(label);
- while (p != uses.upper_bound(label)) {
- p->second->ref = program->end();
- ++p;
+ if (label->firstUse.defined()) {
+ replaceEmptyJump(label->firstUse, program->end());
+ //vm::printInst(cout, label->firstUse, program->begin());
+ //cout << endl;
+
+ if (label->moreUses) {
+ typedef label_t::useVector useVector;
+ useVector& v = *label->moreUses;
+ for (useVector::iterator p = v.begin(); p != v.end(); ++p) {
+ replaceEmptyJump(*p, program->end());
+ }
+ }
}
return label;
}
-void coder::useLabel(inst::opcode op, Int label)
+
+void coder::useLabel(inst::opcode op, label label)
{
if (isStatic())
return parent->useLabel(op,label);
-#ifdef COMBO
- if (op == inst::cjmp || op == inst::njmp) {
- inst& last = program->back();
- if (last.op == inst::builtin) {
- bltin f = vm::get<bltin>(last);
- if (f == run::intLess && op == inst::njmp) {
- program->pop_back();
- op = inst::gejmp;
- }
- }
- }
-#endif
-
- std::map<Int,vm::program::label>::iterator p = defs.find(label);
- if (p != defs.end()) {
- encode(op,p->second);
+ if (label->location.defined()) {
+ encode(op, label->location);
} else {
- // Not yet defined
- uses.insert(std::make_pair(label,program->end()));
- encode(op);
+ if (label->firstUse.defined()) {
+ // Store additional uses in the moreUses array.
+ if (!label->moreUses)
+ label->moreUses = new label_t::useVector;
+ label->moreUses->push_back(encodeEmptyJump(op));
+ }
+ else {
+ label->firstUse = encodeEmptyJump(op);
+ assert(label->firstUse.defined());
+ assert(!label->location.defined());
+ }
}
}
-
-Int coder::fwdLabel()
+label coder::fwdLabel()
{
if (isStatic())
return parent->fwdLabel();
// Create a new label without specifying its position.
- return numLabels++;
+ label l = new label_t();
+ assert(!l->location.defined());
+ assert(!l->firstUse.defined());
+
+ //cout << "forward label " << l << endl;
+
+ return l;
+}
+
+bool coder::usesClosureSinceLabel(label l)
+{
+ assert(l->location.defined());
+ for (vm::program::label i = l->location; i != program->end(); ++i)
+ if (i->op == inst::pushclosure)
+ return true;
+ return false;
+}
+
+void coder::encodePatch(label from, label to)
+{
+ assert(from->location.defined());
+ assert(to->location.defined());
+
+ assert(from->location->op == inst::nop);
+
+ from->location->op = inst::jmp;
+ from->location->ref = to->location;
}
void coder::markPos(position pos)
@@ -302,11 +336,9 @@ vm::lambda *coder::close() {
l->code = program;
- l->params = level->getNumFormals();
+ l->parentIndex = level->parentIndex();
- // Now that we know how many variables the function has, allocate space for
- // all of them at the start of the function.
- finishAlloc();
+ l->framesize = level->size();
sord_stack.pop();
sord = sord_stack.top();
diff --git a/Build/source/utils/asymptote/coder.h b/Build/source/utils/asymptote/coder.h
index 0405e6d18d7..df44b0310ea 100644
--- a/Build/source/utils/asymptote/coder.h
+++ b/Build/source/utils/asymptote/coder.h
@@ -35,6 +35,27 @@ using vm::item;
void assertBltinLookup(inst::opcode op, item it);
#endif
+// Labels used by the coder class to denote where in the code a jump
+// instruction should go to. Label can be used before their exact location is
+// known.
+// Declared outside of the coder class, so that it can be declared in exp.h.
+struct label_t : public gc {
+ vm::program::label location;
+ vm::program::label firstUse;
+
+ // Most labels are used only once, and so we optimize for that case. We do,
+ // however, have to handle labels which are used multiple times (such as
+ // break locations in a loop), and so a useVector is allocated to store
+ // these if necessary.
+ typedef mem::vector<vm::program::label> useVector;
+ useVector *moreUses;
+
+ // Only the constructor is defined. Everything else is handles by methods
+ // of the coder class.
+ label_t() : location(), firstUse(), moreUses(0) {}
+};
+typedef label_t *label;
+
class coder {
// The frame of the function we are currently encoding. This keeps
// track of local variables, and parameters with respect to the stack.
@@ -78,24 +99,25 @@ class coder {
// array to write.
vm::program *program;
- // Keeps track of labels and writes in memory addresses as they're defined.
- // This way a label can be used before its address is known.
- std::map<Int,vm::program::label> defs;
- std::multimap<Int,vm::program::label> uses;
- Int numLabels;
-
- // The loop constructs allocate nested frames, in case variables in an
+ // Some loops allocate nested frames, in case variables in an
// iteration escape in a closure. This stack keeps track of where the
- // variables are allocated, so the size of the frame can be encoded. At the
- // start, it just holds the label of the first instruction of the lambda, as
- // this is where space for the variables of the function is allocated.
- std::stack<vm::program::label> allocs;
+ // pushframe instructions are, so the size of the frame can be encoded.
+ std::stack<vm::program::label> pushframeLabels;
// Loops need to store labels to where break and continue statements
- // should pass control to. Since loops can be nested, this needs to
- // be stored as a stack.
- std::stack<Int> breakLabels;
- std::stack<Int> continueLabels;
+ // should pass control. Since loops can be nested, this needs to
+ // be stored as a stack. We also store which of the loops are being encoded
+ // with an additional frame for variables. This is needed to know if the
+ // break and continue statements need to pop the frame.
+ struct loopdata_t : gc {
+ label continueLabel;
+ label breakLabel;
+ bool pushedFrame;
+
+ loopdata_t(label c, label b)
+ : continueLabel(c), breakLabel(b), pushedFrame(false) {}
+ };
+ mem::stack<loopdata_t> loopdata;
// Current File Position
position curPos;
@@ -255,6 +277,9 @@ private:
}
}
+ // Encode a jump to a not yet known location.
+ vm::program::label encodeEmptyJump(inst::opcode op);
+
public:
void encode(inst::opcode op)
{
@@ -304,77 +329,81 @@ public:
bool encode(frame *dest, frame *top);
- // Assigns a handle to the current point in the list of stack
+ // Assigns a handle to the current point in the list of bytecode
// instructions and returns that handle.
- Int defLabel();
+ label defNewLabel();
// Sets the handle given by label to the current point in the list of
// instructions.
- Int defLabel(Int label);
+ label defLabel(label label);
// Encodes the address pointed to by the handle label into the
// sequence of instructions. This is useful for a jump instruction to
// jump to where a label was defined.
- void useLabel(inst::opcode op, Int label);
+ void useLabel(inst::opcode op, label label);
// If an address has to be used for a jump instruction before it is
// actually encoded, a handle can be given to it by this function.
// When that handle's label is later defined, the proper address will
// be inserted into the code where the handle was used.
- Int fwdLabel();
+ label fwdLabel();
- void pushBreak(Int label) {
- breakLabels.push(label);
+ void pushLoop(label c, label b) {
+ loopdata.push(loopdata_t(c,b));
}
- void pushContinue(Int label) {
- continueLabels.push(label);
+ void popLoop() {
+ loopdata.pop();
}
- void popBreak() {
- breakLabels.pop();
- }
- void popContinue() {
- continueLabels.pop();
+ void loopPushesFrame()
+ {
+ assert(!loopdata.empty());
+ loopdata_t& d = loopdata.top();
+ d.pushedFrame = true;
}
bool encodeBreak() {
- if (breakLabels.empty())
+ if (loopdata.empty())
return false;
else {
- useLabel(inst::jmp,breakLabels.top());
+ loopdata_t& d = loopdata.top();
+ if (d.pushedFrame)
+ encode(inst::popframe);
+ useLabel(inst::jmp,d.breakLabel);
return true;
}
}
bool encodeContinue() {
- if (continueLabels.empty())
+ if (loopdata.empty())
return false;
else {
- useLabel(inst::jmp,continueLabels.top());
+ loopdata_t& d = loopdata.top();
+ if (d.pushedFrame)
+ encode(inst::popframe);
+ useLabel(inst::jmp,d.continueLabel);
return true;
}
}
-
-private:
- void encodeAllocInstruction() {
- encode(inst::alloc, 0);
- allocs.push(--program->end());
- }
- void finishAlloc() {
- allocs.top()->ref = level->size();
- allocs.pop();
- }
+ // Returns true if a pushclosure has been encoded since the definition of
+ // the label.
+ bool usesClosureSinceLabel(label l);
+
+ // Turn a no-op into a jump to bypass incorrect code.
+ void encodePatch(label from, label to);
public:
void encodePushFrame() {
- encode(inst::pushframe);
- level = new frame("encodePushFrame", level, 0);
+ pushframeLabels.push(program->end());
+ encode(inst::pushframe, (Int)0);
- encodeAllocInstruction();
+ level = new frame("encodePushFrame", level, 0);
}
void encodePopFrame() {
- finishAlloc();
+ pushframeLabels.top()->ref = level->size();
+ pushframeLabels.pop();
encode(inst::popframe);
+
level = level->getParent();
}
diff --git a/Build/source/utils/asymptote/common.h b/Build/source/utils/asymptote/common.h
index 78ab9e5e6a5..b121ba9beca 100644
--- a/Build/source/utils/asymptote/common.h
+++ b/Build/source/utils/asymptote/common.h
@@ -62,10 +62,14 @@ typedef unsigned int unsignedInt;
#if COMPACT
// Reserve highest two values for DefaultValue and Undefined states.
#define Int_MAX (Int_MAX2-2)
+#define int_MAX (LONG_MAX-2)
#else
#define Int_MAX Int_MAX2
+#define int_MAX LONG_MAX
#endif
+#define int_MIN LONG_MIN
+
using std::cout;
using std::cin;
using std::cerr;
diff --git a/Build/source/utils/asymptote/config.h.in b/Build/source/utils/asymptote/config.h.in
index 490f137e7bf..9497dfcb2c4 100644
--- a/Build/source/utils/asymptote/config.h.in
+++ b/Build/source/utils/asymptote/config.h.in
@@ -171,6 +171,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure
index 350b6eac0cf..2ea02aa214b 100755
--- a/Build/source/utils/asymptote/configure
+++ b/Build/source/utils/asymptote/configure
@@ -1,20 +1,24 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for Asymptote 2.02.
+# Generated by GNU Autoconf 2.66 for Asymptote 2.10.
#
# Report bugs to <http://sourceforge.net/projects/asymptote>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## 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
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22,23 +26,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ 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
-
as_nl='
'
export as_nl
@@ -46,7 +42,13 @@ export as_nl
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
@@ -57,7 +59,7 @@ else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
- case $arg in
+ case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
}
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
@@ -96,15 +91,15 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+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
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -116,12 +111,16 @@ if test "x$as_myself" = x; then
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); 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
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
@@ -133,330 +132,300 @@ export LC_ALL
LANGUAGE=C
export LANGUAGE
-# 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 ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
# CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
else
- as_have_required=no
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
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
-}
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
exitcode=0
-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
- :
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
else
- exitcode=1
- echo positional parameters were not saved.
+ as_have_required=no
fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-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
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- case $as_dir in
+ as_found=:
+ case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
done;;
esac
+ as_found=false
done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
IFS=$as_save_IFS
- 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=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_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=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_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
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
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; }
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://sourceforge.net/projects/asymptote about your
+$0: system, including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
fi
-
-
fi
-
fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
-(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
-}
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
-exitcode=0
-if as_func_success; then
- :
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
else
- exitcode=1
- echo as_func_success failed.
-fi
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-if as_func_ret_success; then
- :
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
else
- exitcode=1
- echo as_func_ret_success failed.
+ as_expr=false
fi
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
fi
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
else
- exitcode=1
- echo positional parameters were not saved.
+ as_dirname=false
fi
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
- as_lineno_1=$LINENO
- as_lineno_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. :-)
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
@@ -473,8 +442,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
@@ -484,29 +452,18 @@ test \$exitcode = 0") || {
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
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
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
@@ -536,7 +493,7 @@ 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=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -555,10 +512,10 @@ else
if test -d "$1"; then
test -d "$1/.";
else
- case $1 in
+ case $1 in #(
-*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -572,11 +529,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -591,14 +548,14 @@ cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Asymptote'
PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='2.02'
-PACKAGE_STRING='Asymptote 2.02'
+PACKAGE_VERSION='2.10'
+PACKAGE_STRING='Asymptote 2.10'
PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
+PACKAGE_URL=''
# Factoring default headers for most tests.
ac_includes_default="\
@@ -705,6 +662,7 @@ bindir
program_transform_name
prefix
exec_prefix
+PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
@@ -850,8 +808,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -877,8 +834,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1082,8 +1038,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1099,8 +1054,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1130,17 +1084,17 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1157,15 +1111,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1188,8 +1140,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1203,8 +1154,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1219,11 +1170,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1262,13 +1211,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1294,7 +1241,7 @@ 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 Asymptote 2.02 to adapt to many kinds of systems.
+\`configure' configures Asymptote 2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1308,7 +1255,7 @@ Configuration:
--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
+ -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
@@ -1355,7 +1302,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Asymptote 2.02:";;
+ short | recursive ) echo "Configuration of Asymptote 2.10:";;
esac
cat <<\_ACEOF
@@ -1387,7 +1334,7 @@ Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
@@ -1465,22 +1412,548 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Asymptote configure 2.02
-generated by GNU Autoconf 2.63
+Asymptote configure 2.10
+generated by GNU Autoconf 2.66
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit
fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------------------------------- ##
+## Report this to http://sourceforge.net/projects/asymptote ##
+## -------------------------------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
+
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_cxx_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_func
+
+# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
+# ---------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_cxx_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_type
+
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_run
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 Asymptote $as_me 2.02, which was
-generated by GNU Autoconf 2.63. Invocation command line was
+It was created by Asymptote $as_me 2.10, which was
+generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
@@ -1516,8 +1989,8 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
IFS=$as_save_IFS
} >&5
@@ -1554,9 +2027,9 @@ do
ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1572,13 +2045,13 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
+ as_fn_append 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; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1590,11 +2063,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -1603,13 +2074,13 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -1628,11 +2099,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -1645,11 +2114,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -1663,11 +2130,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -1681,46 +2146,53 @@ _ASBOX
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
+$as_echo "/* confdefs.h */" > confdefs.h
+
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -1731,19 +2203,23 @@ fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
@@ -1751,7 +2227,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1766,11 +2242,11 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
@@ -1780,17 +2256,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
@@ -1802,43 +2278,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1860,9 +2313,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -1873,24 +2326,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -1900,9 +2353,9 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -1913,24 +2366,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -1939,7 +2392,7 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -1953,9 +2406,9 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -1966,24 +2419,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -1993,9 +2446,9 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -2007,18 +2460,18 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
@@ -2037,10 +2490,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -2052,9 +2505,9 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -2065,24 +2518,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -2096,9 +2549,9 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -2109,24 +2562,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -2139,7 +2592,7 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -2150,57 +2603,37 @@ fi
fi
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2216,8 +2649,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -2233,17 +2666,17 @@ do
done
rm -f $ac_rmfiles
-if { (ac_try="$ac_link_default"
+if { { ac_try="$ac_link_default"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -2260,7 +2693,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -2279,84 +2712,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
- $as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_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
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_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
-$as_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
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
rm -f -r a.out a.out.dSYM 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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
+if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2371,32 +2761,83 @@ for ac_file in conftest.exe conftest conftest.*; do
esac
done
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
+if test "${ac_cv_objext+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2408,17 +2849,17 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -2431,31 +2872,23 @@ else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2469,37 +2902,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GCC=yes
@@ -2508,20 +2920,16 @@ else
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+if test "${ac_cv_prog_cc_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2532,35 +2940,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- $as_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
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2571,36 +2955,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
- ac_c_werror_flag=$ac_save_c_werror_flag
+else
+ 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2611,42 +2971,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
-else
- $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
@@ -2663,18 +2998,14 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
$as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -2731,32 +3062,9 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+ if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
-else
- $as_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
@@ -2767,17 +3075,19 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -2791,14 +3101,14 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -2813,11 +3123,7 @@ do
# <limits.h> 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2826,78 +3132,34 @@ cat >>conftest.$ac_ext <<_ACEOF
#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- $as_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
+if $ac_preproc_ok; then :
break
fi
@@ -2909,7 +3171,7 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
@@ -2920,11 +3182,7 @@ do
# <limits.h> 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2933,87 +3191,40 @@ cat >>conftest.$ac_ext <<_ACEOF
#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- $as_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
- :
+if $ac_preproc_ok; then :
+
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -3023,9 +3234,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
+if test "${ac_cv_path_GREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -3036,7 +3247,7 @@ 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_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
@@ -3056,7 +3267,7 @@ case `"$ac_path_GREP" --version 2>&1` in
$as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
@@ -3071,26 +3282,24 @@ esac
$ac_path_GREP_found && break 3
done
done
-done
+ done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+if test "${ac_cv_path_EGREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3104,7 +3313,7 @@ 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_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
@@ -3124,7 +3333,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
$as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3139,12 +3348,10 @@ esac
$ac_path_EGREP_found && break 3
done
done
-done
+ done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -3152,21 +3359,17 @@ fi
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
+if test "${ac_cv_header_stdc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
@@ -3181,48 +3384,23 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_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
ac_cv_header_stdc=no
fi
@@ -3232,18 +3410,14 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_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
ac_cv_header_stdc=no
fi
@@ -3253,14 +3427,10 @@ 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 <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ctype.h>
#include <stdlib.h>
@@ -3287,118 +3457,33 @@ main ()
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+ ac_cv_header_stdc=no
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -3408,19 +3493,14 @@ fi
done
-
- { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then
+if test "${ac_cv_c_bigendian+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_bigendian=unknown
# See if we're dealing with a universal compiler.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __APPLE_CC__
not a universal capable compiler
@@ -3428,46 +3508,34 @@ cat >>conftest.$ac_ext <<_ACEOF
typedef int dummy;
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
# Check for potential -arch flags. It is not universal unless
- # there are some -arch flags. Note that *ppc* also matches
- # ppc64. This check is also rather less than ideal.
- case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
- *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
- esac
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
# See if sys/param.h defines the BYTE_ORDER macro.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
@@ -3485,30 +3553,9 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
# It does; now see whether it defined to BIG_ENDIAN or not.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
@@ -3524,49 +3571,18 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_c_bigendian=no
+ ac_cv_c_bigendian=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
if test $ac_cv_c_bigendian = unknown; then
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
@@ -3581,30 +3597,9 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
# It does; now see whether it defined to _BIG_ENDIAN or not.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
@@ -3619,51 +3614,20 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_c_bigendian=no
+ ac_cv_c_bigendian=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
if test $ac_cv_c_bigendian = unknown; then
# Compile a test program.
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
# Try to guess by grepping values from an object file.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
short int ascii_mm[] =
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
@@ -3689,24 +3653,7 @@ return use_ascii (foo) == use_ebcdic (foo);
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
@@ -3718,20 +3665,10 @@ $as_echo "$ac_try_echo") >&5
ac_cv_c_bigendian=unknown
fi
fi
-else
- $as_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
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
@@ -3751,67 +3688,33 @@ main ()
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
ac_cv_c_bigendian=no
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
+ ac_cv_c_bigendian=yes
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
$as_echo "$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in #(
yes)
- cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
no)
;; #(
universal)
-cat >>confdefs.h <<\_ACEOF
-#define AC_APPLE_UNIVERSAL_BUILD 1
-_ACEOF
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
- { { $as_echo "$as_me:$LINENO: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-$as_echo "$as_me: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
@@ -3823,7 +3726,7 @@ test "$Datadir" = '${prefix}/share' && Datadir=$prefix/share
# Check whether --with-latex was given.
-if test "${with_latex+set}" = set; then
+if test "${with_latex+set}" = set; then :
withval=$with_latex; if test "x$withval" != "x" ; then
latexdir=$withval
fi
@@ -3832,9 +3735,9 @@ else
# Extract the first word of "kpsewhich", so it can be a program name with args.
set dummy kpsewhich; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_kpsewhich+set}" = set; then
+if test "${ac_cv_prog_kpsewhich+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$kpsewhich"; then
@@ -3845,24 +3748,24 @@ 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
+ 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_kpsewhich="true"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
kpsewhich=$ac_cv_prog_kpsewhich
if test -n "$kpsewhich"; then
- { $as_echo "$as_me:$LINENO: result: $kpsewhich" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpsewhich" >&5
$as_echo "$kpsewhich" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -3872,53 +3775,46 @@ if test "x$kpsewhich" = "xtrue"; then
else
latexdir=$prefix/share/texmf/tex/latex
as_ac_File=`$as_echo "ac_cv_file_$latexdir/base/latex.ltx" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $latexdir/base/latex.ltx" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $latexdir/base/latex.ltx" >&5
$as_echo_n "checking for $latexdir/base/latex.ltx... " >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$latexdir/base/latex.ltx"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
-ac_res=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- :
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
+
else
latexdir=/usr/share/texmf/tex/latex
as_ac_File=`$as_echo "ac_cv_file_$latexdir/base/latex.ltx" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $latexdir/base/latex.ltx" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $latexdir/base/latex.ltx" >&5
$as_echo_n "checking for $latexdir/base/latex.ltx... " >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$latexdir/base/latex.ltx"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
-ac_res=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
+
+fi
fi
@@ -3929,7 +3825,7 @@ fi
# Check whether --with-context was given.
-if test "${with_context+set}" = set; then
+if test "${with_context+set}" = set; then :
withval=$with_context; if test "x$withval" != "x" ; then
contextdir=$withval
fi
@@ -3938,9 +3834,9 @@ else
# Extract the first word of "kpsewhich", so it can be a program name with args.
set dummy kpsewhich; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_kpsewhich+set}" = set; then
+if test "${ac_cv_prog_kpsewhich+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$kpsewhich"; then
@@ -3951,24 +3847,24 @@ 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
+ 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_kpsewhich="true"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
kpsewhich=$ac_cv_prog_kpsewhich
if test -n "$kpsewhich"; then
- { $as_echo "$as_me:$LINENO: result: $kpsewhich" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpsewhich" >&5
$as_echo "$kpsewhich" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -3986,9 +3882,9 @@ for ac_prog in texi2dvi texi2dvi4a2ps
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_TEXI2DVI+set}" = set; then
+if test "${ac_cv_prog_TEXI2DVI+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$TEXI2DVI"; then
@@ -3999,24 +3895,24 @@ 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
+ 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_TEXI2DVI="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
TEXI2DVI=$ac_cv_prog_TEXI2DVI
if test -n "$TEXI2DVI"; then
- { $as_echo "$as_me:$LINENO: result: $TEXI2DVI" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2DVI" >&5
$as_echo "$TEXI2DVI" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4031,9 +3927,9 @@ test -n "$TEXI2DVI" || TEXI2DVI="echo texi2dvi is missing! Please put http://asy
latexdir=$latexdir/asymptote
contextdir=$contextdir/asymptote
-{ $as_echo "$as_me:$LINENO: Using $latexdir for LaTeX style file" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Using $latexdir for LaTeX style file" >&5
$as_echo "$as_me: Using $latexdir for LaTeX style file" >&6;}
-{ $as_echo "$as_me:$LINENO: Using $contextdir for ConTeXT style file" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Using $contextdir for ConTeXT style file" >&5
$as_echo "$as_me: Using $contextdir for ConTeXT style file" >&6;}
@@ -4043,7 +3939,7 @@ docdir=$Datadir/doc/asymptote
# Check whether --with-docdir was given.
-if test "${with_docdir+set}" = set; then
+if test "${with_docdir+set}" = set; then :
withval=$with_docdir; if test "x$withval" != "x" ; then
docdir=$withval
fi
@@ -4055,7 +3951,7 @@ fi
sysdir=$Datadir/asymptote
# Check whether --enable-texlive-build was given.
-if test "${enable_texlive_build+set}" = set; then
+if test "${enable_texlive_build+set}" = set; then :
enableval=$enable_texlive_build; if test "x$enableval" = "xyes" ; then
sysdir=""
fi
@@ -4098,9 +3994,9 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
+if test "${ac_cv_prog_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -4111,24 +4007,24 @@ 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
+ 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_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4142,9 +4038,9 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -4155,24 +4051,24 @@ 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
+ 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_CXX="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4185,7 +4081,7 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -4196,53 +4092,36 @@ fi
fi
fi
# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4256,37 +4135,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GXX=yes
@@ -4295,20 +4153,16 @@ else
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4319,35 +4173,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4358,36 +4188,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4398,42 +4204,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
-else
- $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
@@ -4461,9 +4242,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LEX+set}" = set; then
+if test "${ac_cv_prog_LEX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$LEX"; then
@@ -4474,24 +4255,24 @@ 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
+ 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"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
- { $as_echo "$as_me:$LINENO: result: $LEX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
$as_echo "$LEX" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4520,20 +4301,20 @@ main (void)
return ! yylex () + ! yywrap ();
}
_ACEOF
-{ (ac_try="$LEX conftest.l"
+{ { ac_try="$LEX conftest.l"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
(eval "$LEX conftest.l") 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ $as_echo "$as_me:$LINENO: checking lex output file root" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
$as_echo_n "checking lex output file root... " >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then
+if test "${ac_cv_prog_lex_root+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -4542,19 +4323,17 @@ if test -f lex.yy.c; then
elif test -f lexyy.c; then
ac_cv_prog_lex_root=lexyy
else
- { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-$as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
$as_echo "$ac_cv_prog_lex_root" >&6; }
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
if test -z "${LEXLIB+set}"; then
- { $as_echo "$as_me:$LINENO: checking lex library" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
$as_echo_n "checking lex library... " >&6; }
-if test "${ac_cv_lib_lex+set}" = set; then
+if test "${ac_cv_lib_lex+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -4562,55 +4341,29 @@ else
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
`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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_lex=$ac_lib
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
test "$ac_cv_lib_lex" != 'none needed' && break
done
LIBS=$ac_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
$as_echo "$ac_cv_lib_lex" >&6; }
test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
fi
-{ $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
$as_echo_n "checking whether yytext is a pointer... " >&6; }
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# POSIX says lex can declare yytext either as a pointer or an array; the
@@ -4619,52 +4372,24 @@ else
ac_cv_prog_lex_yytext_pointer=no
ac_save_LIBS=$LIBS
LIBS="$LEXLIB $ac_save_LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
#define YYTEXT_POINTER 1
`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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_prog_lex_yytext_pointer=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
if test $ac_cv_prog_lex_yytext_pointer = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define YYTEXT_POINTER 1
-_ACEOF
+$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
@@ -4684,9 +4409,9 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
+if test "${ac_cv_prog_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -4697,24 +4422,24 @@ 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
+ 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_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4728,9 +4453,9 @@ if test -z "$CXX"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -4741,24 +4466,24 @@ 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
+ 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_CXX="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -4771,7 +4496,7 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -4782,53 +4507,36 @@ fi
fi
fi
# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4842,37 +4550,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GXX=yes
@@ -4881,20 +4568,16 @@ else
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4905,35 +4588,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4944,36 +4603,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4984,42 +4619,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_prog_cxx_g=yes
-else
- $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
@@ -5059,9 +4669,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -5087,10 +4695,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
+if test "${ac_cv_path_install+set}" = set; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5098,11 +4706,11 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -5139,7 +4747,7 @@ case $as_dir/ in
;;
esac
-done
+ done
IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
@@ -5155,7 +4763,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -5174,9 +4782,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -5187,24 +4795,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5214,9 +4822,9 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -5227,24 +4835,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5253,7 +4861,7 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -5267,9 +4875,9 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -5280,24 +4888,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5307,9 +4915,9 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -5321,18 +4929,18 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
@@ -5351,10 +4959,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5366,9 +4974,9 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -5379,24 +4987,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5410,9 +5018,9 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -5423,24 +5031,24 @@ 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
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5453,7 +5061,7 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
@@ -5464,62 +5072,42 @@ fi
fi
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5533,37 +5121,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GCC=yes
@@ -5572,20 +5139,16 @@ else
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+if test "${ac_cv_prog_cc_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5596,35 +5159,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- $as_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
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5635,36 +5174,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
- ac_c_werror_flag=$ac_save_c_werror_flag
+else
+ 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5675,42 +5190,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
-else
- $as_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 core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
@@ -5727,18 +5217,14 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
$as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
@@ -5795,32 +5281,9 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_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
+ if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
-else
- $as_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
@@ -5831,17 +5294,19 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -5849,11 +5314,11 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -5861,7 +5326,7 @@ SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -5871,11 +5336,11 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -5884,9 +5349,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then
+if test "${ac_cv_prog_YACC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$YACC"; then
@@ -5897,24 +5362,24 @@ 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
+ 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"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- { $as_echo "$as_me:$LINENO: result: $YACC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
$as_echo "$YACC" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -5938,10 +5403,10 @@ ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -5956,11 +5421,7 @@ do
# <limits.h> 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -5969,78 +5430,34 @@ cat >>conftest.$ac_ext <<_ACEOF
#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+else
# 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
+if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- $as_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
+if $ac_preproc_ok; then :
break
fi
@@ -6052,7 +5469,7 @@ fi
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
-{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
@@ -6063,11 +5480,7 @@ do
# <limits.h> 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -6076,87 +5489,40 @@ cat >>conftest.$ac_ext <<_ACEOF
#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+else
# 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
+if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- $as_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
- :
+if $ac_preproc_ok; then :
+
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
@@ -6166,275 +5532,13 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "${ac_cv_header_tr1_unordered_map+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5
-$as_echo_n "checking for tr1/unordered_map... " >&6; }
-if test "${ac_cv_header_tr1_unordered_map+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5
-$as_echo "$ac_cv_header_tr1_unordered_map" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map usability" >&5
-$as_echo_n "checking tr1/unordered_map usability... " >&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 <tr1/unordered_map>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map presence" >&5
-$as_echo_n "checking tr1/unordered_map presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <tr1/unordered_map>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5
-$as_echo_n "checking for tr1/unordered_map... " >&6; }
-if test "${ac_cv_header_tr1_unordered_map+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_tr1_unordered_map=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5
-$as_echo "$ac_cv_header_tr1_unordered_map" >&6; }
-
-fi
-if test "x$ac_cv_header_tr1_unordered_map" = x""yes; then
- :
-else
- if test "${ac_cv_header_ext_hash_map+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5
-$as_echo_n "checking for ext/hash_map... " >&6; }
-if test "${ac_cv_header_ext_hash_map+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5
-$as_echo "$ac_cv_header_ext_hash_map" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking ext/hash_map usability" >&5
-$as_echo_n "checking ext/hash_map usability... " >&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 <ext/hash_map>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+ac_fn_cxx_check_header_mongrel "$LINENO" "tr1/unordered_map" "ac_cv_header_tr1_unordered_map" "$ac_includes_default"
+if test "x$ac_cv_header_tr1_unordered_map" = x""yes; then :
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking ext/hash_map presence" >&5
-$as_echo_n "checking ext/hash_map presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ext/hash_map>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+ ac_fn_cxx_check_header_mongrel "$LINENO" "ext/hash_map" "ac_cv_header_ext_hash_map" "$ac_includes_default"
+if test "x$ac_cv_header_ext_hash_map" = x""yes; then :
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5
-$as_echo_n "checking for ext/hash_map... " >&6; }
-if test "${ac_cv_header_ext_hash_map+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_ext_hash_map=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5
-$as_echo "$ac_cv_header_ext_hash_map" >&6; }
-
-fi
-if test "x$ac_cv_header_ext_hash_map" = x""yes; then
- :
else
OPTIONS=$OPTIONS"-DNOHASH "
fi
@@ -6447,28 +5551,23 @@ fi
GCVERSION=gc-7.1
as_ac_File=`$as_echo "ac_cv_file_$GCVERSION.tar.gz" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $GCVERSION.tar.gz" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GCVERSION.tar.gz" >&5
$as_echo_n "checking for $GCVERSION.tar.gz... " >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$GCVERSION.tar.gz"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
-ac_res=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
ac_cv_use_gc=$GCVERSION
else
GC_SYSTEM="$GCVERSION.tar.gz not found: using system Boehm garbage collector"
@@ -6476,7 +5575,7 @@ ac_cv_use_gc="system"
fi
# Check whether --enable-gc was given.
-if test "${enable_gc+set}" = set; then
+if test "${enable_gc+set}" = set; then :
enableval=$enable_gc;
if test "x$enableval" != "xyes"; then
ac_cv_use_gc=$enableval
@@ -6504,151 +5603,16 @@ if test "x$ac_cv_use_gc" != "xno" ; then
fi
CPPFLAGS_SAVE=$CPPFLAGS
CPPFLAGS=$CPPFLAGS" $INCL"
- if test "${ac_cv_header_gc_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for gc.h" >&5
-$as_echo_n "checking for gc.h... " >&6; }
-if test "${ac_cv_header_gc_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gc_h" >&5
-$as_echo "$ac_cv_header_gc_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gc.h usability" >&5
-$as_echo_n "checking gc.h usability... " >&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 <gc.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gc.h presence" >&5
-$as_echo_n "checking gc.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <gc.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gc.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gc.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gc.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gc.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gc.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gc.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gc.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gc.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gc.h" >&5
-$as_echo_n "checking for gc.h... " >&6; }
-if test "${ac_cv_header_gc_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_gc_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gc_h" >&5
-$as_echo "$ac_cv_header_gc_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gc_h" = x""yes; then
- { $as_echo "$as_me:$LINENO: checking for GC_malloc in -lgc" >&5
+ ac_fn_cxx_check_header_mongrel "$LINENO" "gc.h" "ac_cv_header_gc_h" "$ac_includes_default"
+if test "x$ac_cv_header_gc_h" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5
$as_echo_n "checking for GC_malloc in -lgc... " >&6; }
-if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then
+if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -6666,53 +5630,28 @@ return GC_malloc ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_gc_GC_malloc=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_gc_GC_malloc=no
+ ac_cv_lib_gc_GC_malloc=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gc_GC_malloc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5
$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; }
-if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then
+if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then :
LIBS=$LIBS"-lgc "
- { $as_echo "$as_me:$LINENO: enabling system $GCNAME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: enabling system $GCNAME" >&5
$as_echo "$as_me: enabling system $GCNAME" >&6;}
else
GCDIR=$GCVERSION
INCL="-I\$(GC)/include"
GCLIB="\$(GC)/.libs/libgc.a"
- { $as_echo "$as_me:$LINENO: $GCNAME library not found" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $GCNAME library not found" >&5
$as_echo "$as_me: $GCNAME library not found" >&6;}
fi
@@ -6720,7 +5659,7 @@ else
GCDIR=$GCVERSION
GCLIB="\$(GC)/.libs/libgc.a"
INCL="-I\$(GC)/include"
- { $as_echo "$as_me:$LINENO: $GCNAME header file not found" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $GCNAME header file not found" >&5
$as_echo "$as_me: $GCNAME header file not found" >&6;}
fi
@@ -6729,25 +5668,25 @@ fi
;;
*)
GCDIR=$ac_cv_use_gc
- { $as_echo "$as_me:$LINENO: enabling local $GCNAME $GCDIR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: enabling local $GCNAME $GCDIR" >&5
$as_echo "$as_me: enabling local $GCNAME $GCDIR" >&6;}
GCLIB="\$(GC)/.libs/libgc.a"
INCL="-I\$(GC)/include"
;;
esac
else
- { $as_echo "$as_me:$LINENO: disabling the $GCNAME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: disabling the $GCNAME" >&5
$as_echo "$as_me: disabling the $GCNAME" >&6;}
fi
# Check whether --enable-gc-debug was given.
-if test "${enable_gc_debug+set}" = set; then
+if test "${enable_gc_debug+set}" = set; then :
enableval=$enable_gc_debug; if test "x$ac_cv_use_gc" != "xno" ; then
if test "x$enableval" = "xyes" ; then
OPTIONS=$OPTIONS"-DGC_DEBUG "
- { $as_echo "$as_me:$LINENO: *** Enabling GC debugging: remember to make clean ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Enabling GC debugging: remember to make clean ***" >&5
$as_echo "$as_me: *** Enabling GC debugging: remember to make clean ***" >&6;}
- { $as_echo "$as_me:$LINENO: *** Set the environment variable GC_FIND_LEAK at runtime ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Set the environment variable GC_FIND_LEAK at runtime ***" >&5
$as_echo "$as_me: *** Set the environment variable GC_FIND_LEAK at runtime ***" >&6;}
fi
fi
@@ -6756,12 +5695,12 @@ fi
# Check whether --enable-gc-full-debug was given.
-if test "${enable_gc_full_debug+set}" = set; then
+if test "${enable_gc_full_debug+set}" = set; then :
enableval=$enable_gc_full_debug; if test "x$ac_cv_use_gc" != "xno" ; then
if test "x$enableval" = "xyes" ; then
OPTIONS=$OPTIONS"-DGC_DEBUG -DGC_BACKTRACE "
GCOPTIONS=$GCOPTIONS"--enable-gc-debug "
- { $as_echo "$as_me:$LINENO: *** Enabling GC backtrace debugging; remember to make gc-clean ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Enabling GC backtrace debugging; remember to make gc-clean ***" >&5
$as_echo "$as_me: *** Enabling GC backtrace debugging; remember to make gc-clean ***" >&6;}
fi
fi
@@ -6769,96 +5708,10 @@ $as_echo "$as_me: *** Enabling GC backtrace debugging; remember to make gc-clean
fi
-{ $as_echo "$as_me:$LINENO: checking for getopt_long_only" >&5
-$as_echo_n "checking for getopt_long_only... " >&6; }
-if test "${ac_cv_func_getopt_long_only+set}" = set; then
- $as_echo_n "(cached) " >&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 getopt_long_only to an innocuous variant, in case <limits.h> declares getopt_long_only.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define getopt_long_only innocuous_getopt_long_only
+ac_fn_cxx_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
+if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getopt_long_only (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getopt_long_only
-
-/* 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 getopt_long_only ();
-/* 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_getopt_long_only || defined __stub___getopt_long_only
-choke me
-#endif
-
-int
-main ()
-{
-return getopt_long_only ();
- ;
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_func_getopt_long_only=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_func_getopt_long_only=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long_only" >&5
-$as_echo "$ac_cv_func_getopt_long_only" >&6; }
-if test "x$ac_cv_func_getopt_long_only" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNU_GETOPT_H 1
-_ACEOF
+$as_echo "#define HAVE_GNU_GETOPT_H 1" >>confdefs.h
else
getopt="getopt getopt1"
@@ -6874,18 +5727,14 @@ fi
# Checks for libraries.
-{ $as_echo "$as_me:$LINENO: checking for setupterm in -lncurses" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm in -lncurses" >&5
$as_echo_n "checking for setupterm in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_setupterm+set}" = set; then
+if test "${ac_cv_lib_ncurses_setupterm+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -6903,62 +5752,30 @@ return setupterm ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_ncurses_setupterm=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_ncurses_setupterm=no
+ ac_cv_lib_ncurses_setupterm=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_setupterm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_setupterm" >&5
$as_echo "$ac_cv_lib_ncurses_setupterm" >&6; }
-if test "x$ac_cv_lib_ncurses_setupterm" = x""yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBCURSES 1
-_ACEOF
+if test "x$ac_cv_lib_ncurses_setupterm" = x""yes; then :
+ $as_echo "#define HAVE_LIBCURSES 1" >>confdefs.h
LIBS=$LIBS"-lncurses "
else
-
-{ $as_echo "$as_me:$LINENO: checking for setupterm in -lcurses" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setupterm in -lcurses" >&5
$as_echo_n "checking for setupterm in -lcurses... " >&6; }
-if test "${ac_cv_lib_curses_setupterm+set}" = set; then
+if test "${ac_cv_lib_curses_setupterm+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -6976,43 +5793,18 @@ return setupterm ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_curses_setupterm=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_curses_setupterm=no
+ ac_cv_lib_curses_setupterm=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curses_setupterm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_setupterm" >&5
$as_echo "$ac_cv_lib_curses_setupterm" >&6; }
-if test "x$ac_cv_lib_curses_setupterm" = x""yes; then
+if test "x$ac_cv_lib_curses_setupterm" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCURSES 1
_ACEOF
@@ -7023,19 +5815,14 @@ fi
fi
-
-{ $as_echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
$as_echo_n "checking for sqrt in -lm... " >&6; }
-if test "${ac_cv_lib_m_sqrt+set}" = set; then
+if test "${ac_cv_lib_m_sqrt+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7053,43 +5840,18 @@ return sqrt ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_m_sqrt=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_m_sqrt=no
+ ac_cv_lib_m_sqrt=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
$as_echo "$ac_cv_lib_m_sqrt" >&6; }
-if test "x$ac_cv_lib_m_sqrt" = x""yes; then
+if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
@@ -7097,24 +5859,17 @@ _ACEOF
LIBS="-lm $LIBS"
else
- { { $as_echo "$as_me:$LINENO: error: *** Please install libm on your system ***" >&5
-$as_echo "$as_me: error: *** Please install libm on your system ***" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "*** Please install libm on your system ***" "$LINENO" 5
fi
-
-{ $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
$as_echo_n "checking for deflate in -lz... " >&6; }
-if test "${ac_cv_lib_z_deflate+set}" = set; then
+if test "${ac_cv_lib_z_deflate+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7132,43 +5887,18 @@ return deflate ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_z_deflate=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_z_deflate=no
+ ac_cv_lib_z_deflate=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
$as_echo "$ac_cv_lib_z_deflate" >&6; }
-if test "x$ac_cv_lib_z_deflate" = x""yes; then
+if test "x$ac_cv_lib_z_deflate" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBZ 1
_ACEOF
@@ -7176,24 +5906,17 @@ _ACEOF
LIBS="-lz $LIBS"
else
- { { $as_echo "$as_me:$LINENO: error: *** Please install libz on your system ***" >&5
-$as_echo "$as_me: error: *** Please install libz on your system ***" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "*** Please install libz on your system ***" "$LINENO" 5
fi
-
-{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7211,43 +5934,18 @@ return pthread_create ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_pthread_pthread_create=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_pthread_pthread_create=no
+ ac_cv_lib_pthread_pthread_create=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
@@ -7256,19 +5954,14 @@ _ACEOF
fi
-
-{ $as_echo "$as_me:$LINENO: checking for stackoverflow_install_handler in -lsigsegv" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stackoverflow_install_handler in -lsigsegv" >&5
$as_echo_n "checking for stackoverflow_install_handler in -lsigsegv... " >&6; }
-if test "${ac_cv_lib_sigsegv_stackoverflow_install_handler+set}" = set; then
+if test "${ac_cv_lib_sigsegv_stackoverflow_install_handler+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsigsegv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7286,43 +5979,18 @@ return stackoverflow_install_handler ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_sigsegv_stackoverflow_install_handler=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_sigsegv_stackoverflow_install_handler=no
+ ac_cv_lib_sigsegv_stackoverflow_install_handler=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sigsegv_stackoverflow_install_handler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sigsegv_stackoverflow_install_handler" >&5
$as_echo "$ac_cv_lib_sigsegv_stackoverflow_install_handler" >&6; }
-if test "x$ac_cv_lib_sigsegv_stackoverflow_install_handler" = x""yes; then
+if test "x$ac_cv_lib_sigsegv_stackoverflow_install_handler" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSIGSEGV 1
_ACEOF
@@ -7331,19 +5999,14 @@ _ACEOF
fi
-
-{ $as_echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
+if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7361,43 +6024,18 @@ return sched_yield ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_rt_sched_yield=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_rt_sched_yield=no
+ ac_cv_lib_rt_sched_yield=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then
+if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBRT 1
_ACEOF
@@ -7408,17 +6046,13 @@ fi
# Check whether --enable-readline was given.
-if test "${enable_readline+set}" = set; then
+if test "${enable_readline+set}" = set; then :
enableval=$enable_readline;
fi
if test "x$enable_readline" != "xno"; then
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -7437,37 +6071,15 @@ abort
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
-{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -7485,43 +6097,18 @@ return rl_completion_matches ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_readline_rl_completion_matches=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_readline_rl_completion_matches=no
+ ac_cv_lib_readline_rl_completion_matches=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
-if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
+if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBREADLINE 1
_ACEOF
@@ -7529,31 +6116,21 @@ _ACEOF
LIBS="-lreadline $LIBS"
else
- { $as_echo "$as_me:$LINENO: *** Could not find GNU readline 4.3 or later: will compile without readline support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find GNU readline 4.3 or later: will compile without readline support ***" >&5
$as_echo "$as_me: *** Could not find GNU readline 4.3 or later: will compile without readline support ***" >&6;}
fi
-else
- $as_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
# Checks for header files.
-{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
+if test "${ac_cv_header_sys_wait_h+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/wait.h>
@@ -7574,189 +6151,26 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_sys_wait_h=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_sys_wait_h=no
+ ac_cv_header_sys_wait_h=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
$as_echo "$ac_cv_header_sys_wait_h" >&6; }
if test $ac_cv_header_sys_wait_h = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_WAIT_H 1
-_ACEOF
+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
-
-
-
for ac_header in fenv.h stddef.h libintl.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -7765,151 +6179,11 @@ fi
done
-
-
-
for ac_header in ncurses/curses.h ncurses.h curses.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -7918,151 +6192,12 @@ fi
done
-
for ac_header in fpu_control.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "fpu_control.h" "ac_cv_header_fpu_control_h" "$ac_includes_default"
+if test "x$ac_cv_header_fpu_control_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_FPU_CONTROL_H 1
_ACEOF
fi
@@ -8070,11 +6205,7 @@ fi
done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "xstream.h"
int
@@ -8085,35 +6216,14 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- { $as_echo "$as_me:$LINENO: checking for library containing xdrstdio_create" >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xdrstdio_create" >&5
$as_echo_n "checking for library containing xdrstdio_create... " >&6; }
-if test "${ac_cv_search_xdrstdio_create+set}" = set; then
+if test "${ac_cv_search_xdrstdio_create+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8138,225 +6248,57 @@ for ac_lib in '' nsl rpc; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_xdrstdio_create=$ac_res
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext
- if test "${ac_cv_search_xdrstdio_create+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_xdrstdio_create+set}" = set; then :
break
fi
done
-if test "${ac_cv_search_xdrstdio_create+set}" = set; then
- :
+if test "${ac_cv_search_xdrstdio_create+set}" = set; then :
+
else
ac_cv_search_xdrstdio_create=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xdrstdio_create" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xdrstdio_create" >&5
$as_echo "$ac_cv_search_xdrstdio_create" >&6; }
ac_res=$ac_cv_search_xdrstdio_create
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RPC_RPC_H 1
-_ACEOF
+$as_echo "#define HAVE_RPC_RPC_H 1" >>confdefs.h
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { $as_echo "$as_me:$LINENO: WARNING: *** Broken rpc headers; XDR support disabled ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Broken rpc headers; XDR support disabled ***" >&5
$as_echo "$as_me: WARNING: *** Broken rpc headers; XDR support disabled ***" >&2;}
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Check whether --enable-gsl was given.
-if test "${enable_gsl+set}" = set; then
+if test "${enable_gsl+set}" = set; then :
enableval=$enable_gsl;
fi
if test "x$enable_gsl" != "xno"; then
- if test "${ac_cv_header_gsl_gsl_sf_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for gsl/gsl_sf.h" >&5
-$as_echo_n "checking for gsl/gsl_sf.h... " >&6; }
-if test "${ac_cv_header_gsl_gsl_sf_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gsl_gsl_sf_h" >&5
-$as_echo "$ac_cv_header_gsl_gsl_sf_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking gsl/gsl_sf.h usability" >&5
-$as_echo_n "checking gsl/gsl_sf.h usability... " >&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 <gsl/gsl_sf.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking gsl/gsl_sf.h presence" >&5
-$as_echo_n "checking gsl/gsl_sf.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <gsl/gsl_sf.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: gsl/gsl_sf.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: gsl/gsl_sf.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for gsl/gsl_sf.h" >&5
-$as_echo_n "checking for gsl/gsl_sf.h... " >&6; }
-if test "${ac_cv_header_gsl_gsl_sf_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_gsl_gsl_sf_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gsl_gsl_sf_h" >&5
-$as_echo "$ac_cv_header_gsl_gsl_sf_h" >&6; }
-
-fi
-if test "x$ac_cv_header_gsl_gsl_sf_h" = x""yes; then
- { $as_echo "$as_me:$LINENO: checking for gsl_sf_debye_6 in -lgsl" >&5
+ ac_fn_cxx_check_header_mongrel "$LINENO" "gsl/gsl_sf.h" "ac_cv_header_gsl_gsl_sf_h" "$ac_includes_default"
+if test "x$ac_cv_header_gsl_gsl_sf_h" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_sf_debye_6 in -lgsl" >&5
$as_echo_n "checking for gsl_sf_debye_6 in -lgsl... " >&6; }
-if test "${ac_cv_lib_gsl_gsl_sf_debye_6+set}" = set; then
+if test "${ac_cv_lib_gsl_gsl_sf_debye_6+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgsl -lgslcblas $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8374,55 +6316,28 @@ return gsl_sf_debye_6 ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_gsl_gsl_sf_debye_6=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_gsl_gsl_sf_debye_6=no
+ ac_cv_lib_gsl_gsl_sf_debye_6=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gsl_gsl_sf_debye_6" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_sf_debye_6" >&5
$as_echo "$ac_cv_lib_gsl_gsl_sf_debye_6" >&6; }
-if test "x$ac_cv_lib_gsl_gsl_sf_debye_6" = x""yes; then
+if test "x$ac_cv_lib_gsl_gsl_sf_debye_6" = x""yes; then :
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGSL 1
-_ACEOF
+$as_echo "#define HAVE_LIBGSL 1" >>confdefs.h
LIBS=$LIBS"-lgsl -lgslcblas "
else
- { $as_echo "$as_me:$LINENO: *** Could not find libgsl: will compile without optional special functions. ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libgsl: will compile without optional special functions. ***" >&5
$as_echo "$as_me: *** Could not find libgsl: will compile without optional special functions. ***" >&6;}
fi
else
- { $as_echo "$as_me:$LINENO: *** Header file gsl_sf.h not found: will compile without optional special functions. ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Header file gsl_sf.h not found: will compile without optional special functions. ***" >&5
$as_echo "$as_me: *** Header file gsl_sf.h not found: will compile without optional special functions. ***" >&6;}
fi
@@ -8430,158 +6345,22 @@ fi
fi
# Check whether --enable-fftw was given.
-if test "${enable_fftw+set}" = set; then
+if test "${enable_fftw+set}" = set; then :
enableval=$enable_fftw;
fi
if test "x$enable_fftw" != "xno"; then
- if test "${ac_cv_header_fftw3_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for fftw3.h" >&5
-$as_echo_n "checking for fftw3.h... " >&6; }
-if test "${ac_cv_header_fftw3_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5
-$as_echo "$ac_cv_header_fftw3_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking fftw3.h usability" >&5
-$as_echo_n "checking fftw3.h usability... " >&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 <fftw3.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking fftw3.h presence" >&5
-$as_echo_n "checking fftw3.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <fftw3.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: fftw3.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: fftw3.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: fftw3.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: fftw3.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: fftw3.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: fftw3.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: fftw3.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for fftw3.h" >&5
-$as_echo_n "checking for fftw3.h... " >&6; }
-if test "${ac_cv_header_fftw3_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_fftw3_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5
-$as_echo "$ac_cv_header_fftw3_h" >&6; }
-
-fi
-if test "x$ac_cv_header_fftw3_h" = x""yes; then
-
-{ $as_echo "$as_me:$LINENO: checking for fftw_execute in -lfftw3" >&5
+ ac_fn_cxx_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
+if test "x$ac_cv_header_fftw3_h" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
-if test "${ac_cv_lib_fftw3_fftw_execute+set}" = set; then
+if test "${ac_cv_lib_fftw3_fftw_execute+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8599,43 +6378,18 @@ return fftw_execute ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_fftw3_fftw_execute=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_fftw3_fftw_execute=no
+ ac_cv_lib_fftw3_fftw_execute=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_execute" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
-if test "x$ac_cv_lib_fftw3_fftw_execute" = x""yes; then
+if test "x$ac_cv_lib_fftw3_fftw_execute" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBFFTW3 1
_ACEOF
@@ -8643,12 +6397,12 @@ _ACEOF
LIBS="-lfftw3 $LIBS"
else
- { $as_echo "$as_me:$LINENO: *** Could not find libfftw3: will compile without optional fast Fourier transforms. ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libfftw3: will compile without optional fast Fourier transforms. ***" >&5
$as_echo "$as_me: *** Could not find libfftw3: will compile without optional fast Fourier transforms. ***" >&6;}
fi
else
- { $as_echo "$as_me:$LINENO: *** Header file fftw3.h not found: will compile without optional fast Fourier transforms. ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Header file fftw3.h not found: will compile without optional fast Fourier transforms. ***" >&5
$as_echo "$as_me: *** Header file fftw3.h not found: will compile without optional fast Fourier transforms. ***" >&6;}
fi
@@ -8656,315 +6410,45 @@ fi
fi
# Check whether --enable-gl was given.
-if test "${enable_gl+set}" = set; then
+if test "${enable_gl+set}" = set; then :
enableval=$enable_gl;
fi
if test "x$enable_gl" != "xno"; then
case "$OSTYPE" in
- cygwin) if test "${ac_cv_header_GL_glut_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for GL/glut.h" >&5
-$as_echo_n "checking for GL/glut.h... " >&6; }
-if test "${ac_cv_header_GL_glut_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glut_h" >&5
-$as_echo "$ac_cv_header_GL_glut_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking GL/glut.h usability" >&5
-$as_echo_n "checking GL/glut.h usability... " >&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 <GL/glut.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking GL/glut.h presence" >&5
-$as_echo_n "checking GL/glut.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <GL/glut.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ cygwin) ac_fn_cxx_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
+if test "x$ac_cv_header_GL_glut_h" = x""yes; then :
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/glut.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: GL/glut.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for GL/glut.h" >&5
-$as_echo_n "checking for GL/glut.h... " >&6; }
-if test "${ac_cv_header_GL_glut_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_GL_glut_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glut_h" >&5
-$as_echo "$ac_cv_header_GL_glut_h" >&6; }
-
-fi
-if test "x$ac_cv_header_GL_glut_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGLUT 1
-_ACEOF
+$as_echo "#define HAVE_LIBGLUT 1" >>confdefs.h
LIBS=$LIBS"-lfreeglut "
else
- { $as_echo "$as_me:$LINENO: *** Could not find libfreeglut: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libfreeglut: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find libfreeglut: will compile without OpenGL support ***" >&6;}
fi
- if test "${ac_cv_header_GL_gl_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
-$as_echo_n "checking for GL/gl.h... " >&6; }
-if test "${ac_cv_header_GL_gl_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
-$as_echo "$ac_cv_header_GL_gl_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
-$as_echo_n "checking GL/gl.h usability... " >&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 <GL/gl.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
-$as_echo_n "checking GL/gl.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <GL/gl.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5
-$as_echo_n "checking for GL/gl.h... " >&6; }
-if test "${ac_cv_header_GL_gl_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_GL_gl_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
-$as_echo "$ac_cv_header_GL_gl_h" >&6; }
-
-fi
-if test "x$ac_cv_header_GL_gl_h" = x""yes; then
+ ac_fn_cxx_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
+if test "x$ac_cv_header_GL_gl_h" = x""yes; then :
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGL 1
-_ACEOF
+$as_echo "#define HAVE_LIBGL 1" >>confdefs.h
LIBS=$LIBS"-lopengl32 "
else
- { $as_echo "$as_me:$LINENO: *** Could not find libopengl32: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libopengl32: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find libopengl32: will compile without OpenGL support ***" >&6;}
fi
- { $as_echo "$as_me:$LINENO: checking for gluNewNurbsRenderer in -lGLU" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluNewNurbsRenderer in -lGLU" >&5
$as_echo_n "checking for gluNewNurbsRenderer in -lGLU... " >&6; }
-if test "${ac_cv_lib_GLU_gluNewNurbsRenderer+set}" = set; then
+if test "${ac_cv_lib_GLU_gluNewNurbsRenderer+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lGLU $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -8982,479 +6466,49 @@ return gluNewNurbsRenderer ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_GLU_gluNewNurbsRenderer=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_GLU_gluNewNurbsRenderer=no
+ ac_cv_lib_GLU_gluNewNurbsRenderer=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluNewNurbsRenderer" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluNewNurbsRenderer" >&5
$as_echo "$ac_cv_lib_GLU_gluNewNurbsRenderer" >&6; }
-if test "x$ac_cv_lib_GLU_gluNewNurbsRenderer" = x""yes; then
+if test "x$ac_cv_lib_GLU_gluNewNurbsRenderer" = x""yes; then :
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGLU 1
-_ACEOF
+$as_echo "#define HAVE_LIBGLU 1" >>confdefs.h
LIBS=$LIBS"-lglu32 "
else
- { $as_echo "$as_me:$LINENO: *** Could not find libglu32: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libglu32: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find libglu32: will compile without OpenGL support ***" >&6;}
fi
;;
- darwin*) if test "${ac_cv_header_OpenGL_gl_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for OpenGL/gl.h" >&5
-$as_echo_n "checking for OpenGL/gl.h... " >&6; }
-if test "${ac_cv_header_OpenGL_gl_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_OpenGL_gl_h" >&5
-$as_echo "$ac_cv_header_OpenGL_gl_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking OpenGL/gl.h usability" >&5
-$as_echo_n "checking OpenGL/gl.h usability... " >&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 <OpenGL/gl.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ darwin*) ac_fn_cxx_check_header_mongrel "$LINENO" "OpenGL/gl.h" "ac_cv_header_OpenGL_gl_h" "$ac_includes_default"
+if test "x$ac_cv_header_OpenGL_gl_h" = x""yes; then :
- ac_header_compiler=no
-fi
+$as_echo "#define HAVE_LIBGL 1" >>confdefs.h
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking OpenGL/gl.h presence" >&5
-$as_echo_n "checking OpenGL/gl.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <OpenGL/gl.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/gl.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: OpenGL/gl.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for OpenGL/gl.h" >&5
-$as_echo_n "checking for OpenGL/gl.h... " >&6; }
-if test "${ac_cv_header_OpenGL_gl_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_OpenGL_gl_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_OpenGL_gl_h" >&5
-$as_echo "$ac_cv_header_OpenGL_gl_h" >&6; }
+ ac_fn_cxx_check_header_mongrel "$LINENO" "OpenGL/glu.h" "ac_cv_header_OpenGL_glu_h" "$ac_includes_default"
+if test "x$ac_cv_header_OpenGL_glu_h" = x""yes; then :
-fi
-if test "x$ac_cv_header_OpenGL_gl_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGL 1
-_ACEOF
+$as_echo "#define HAVE_LIBGLU 1" >>confdefs.h
fi
- if test "${ac_cv_header_OpenGL_glu_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for OpenGL/glu.h" >&5
-$as_echo_n "checking for OpenGL/glu.h... " >&6; }
-if test "${ac_cv_header_OpenGL_glu_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_OpenGL_glu_h" >&5
-$as_echo "$ac_cv_header_OpenGL_glu_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking OpenGL/glu.h usability" >&5
-$as_echo_n "checking OpenGL/glu.h usability... " >&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 <OpenGL/glu.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_fn_cxx_check_header_mongrel "$LINENO" "GLUT/glut.h" "ac_cv_header_GLUT_glut_h" "$ac_includes_default"
+if test "x$ac_cv_header_GLUT_glut_h" = x""yes; then :
- ac_header_compiler=no
-fi
+$as_echo "#define HAVE_LIBGLUT 1" >>confdefs.h
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking OpenGL/glu.h presence" >&5
-$as_echo_n "checking OpenGL/glu.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <OpenGL/glu.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: OpenGL/glu.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: OpenGL/glu.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for OpenGL/glu.h" >&5
-$as_echo_n "checking for OpenGL/glu.h... " >&6; }
-if test "${ac_cv_header_OpenGL_glu_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_OpenGL_glu_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_OpenGL_glu_h" >&5
-$as_echo "$ac_cv_header_OpenGL_glu_h" >&6; }
-
-fi
-if test "x$ac_cv_header_OpenGL_glu_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGLU 1
-_ACEOF
-
-fi
-
-
- if test "${ac_cv_header_GLUT_glut_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for GLUT/glut.h" >&5
-$as_echo_n "checking for GLUT/glut.h... " >&6; }
-if test "${ac_cv_header_GLUT_glut_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GLUT_glut_h" >&5
-$as_echo "$ac_cv_header_GLUT_glut_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking GLUT/glut.h usability" >&5
-$as_echo_n "checking GLUT/glut.h usability... " >&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 <GLUT/glut.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking GLUT/glut.h presence" >&5
-$as_echo_n "checking GLUT/glut.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <GLUT/glut.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: GLUT/glut.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: GLUT/glut.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for GLUT/glut.h" >&5
-$as_echo_n "checking for GLUT/glut.h... " >&6; }
-if test "${ac_cv_header_GLUT_glut_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_GLUT_glut_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GLUT_glut_h" >&5
-$as_echo "$ac_cv_header_GLUT_glut_h" >&6; }
-
-fi
-if test "x$ac_cv_header_GLUT_glut_h" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBGLUT 1
-_ACEOF
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <OpenGL/gl.h>
@@ -9474,58 +6528,28 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GLU_TESS_CALLBACK_TRIPLEDOT 1
-_ACEOF
-
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
+$as_echo "#define GLU_TESS_CALLBACK_TRIPLEDOT 1" >>confdefs.h
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
LIBS=$LIBS"-framework GLUT -framework OpenGL -framework Cocoa"
else
- { $as_echo "$as_me:$LINENO: *** Could not find glut: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find glut: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find glut: will compile without OpenGL support ***" >&6;}
fi
;;
- *)
-{ $as_echo "$as_me:$LINENO: checking for glutMainLoop in -lglut" >&5
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glutMainLoop in -lglut" >&5
$as_echo_n "checking for glutMainLoop in -lglut... " >&6; }
-if test "${ac_cv_lib_glut_glutMainLoop+set}" = set; then
+if test "${ac_cv_lib_glut_glutMainLoop+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lglut $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -9543,43 +6567,18 @@ return glutMainLoop ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_glut_glutMainLoop=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_glut_glutMainLoop=no
+ ac_cv_lib_glut_glutMainLoop=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutMainLoop" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glut_glutMainLoop" >&5
$as_echo "$ac_cv_lib_glut_glutMainLoop" >&6; }
-if test "x$ac_cv_lib_glut_glutMainLoop" = x""yes; then
+if test "x$ac_cv_lib_glut_glutMainLoop" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGLUT 1
_ACEOF
@@ -9587,23 +6586,18 @@ _ACEOF
LIBS="-lglut $LIBS"
else
- { $as_echo "$as_me:$LINENO: *** Could not find libglut: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libglut: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find libglut: will compile without OpenGL support ***" >&6;}
fi
-
-{ $as_echo "$as_me:$LINENO: checking for gluNewNurbsRenderer in -lGLU" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluNewNurbsRenderer in -lGLU" >&5
$as_echo_n "checking for gluNewNurbsRenderer in -lGLU... " >&6; }
-if test "${ac_cv_lib_GLU_gluNewNurbsRenderer+set}" = set; then
+if test "${ac_cv_lib_GLU_gluNewNurbsRenderer+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lGLU $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -9621,43 +6615,18 @@ return gluNewNurbsRenderer ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_GLU_gluNewNurbsRenderer=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_GLU_gluNewNurbsRenderer=no
+ ac_cv_lib_GLU_gluNewNurbsRenderer=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluNewNurbsRenderer" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluNewNurbsRenderer" >&5
$as_echo "$ac_cv_lib_GLU_gluNewNurbsRenderer" >&6; }
-if test "x$ac_cv_lib_GLU_gluNewNurbsRenderer" = x""yes; then
+if test "x$ac_cv_lib_GLU_gluNewNurbsRenderer" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGLU 1
_ACEOF
@@ -9665,23 +6634,18 @@ _ACEOF
LIBS="-lGLU $LIBS"
else
- { $as_echo "$as_me:$LINENO: *** Could not find libGLU: will compile without OpenGL support ***" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libGLU: will compile without OpenGL support ***" >&5
$as_echo "$as_me: *** Could not find libGLU: will compile without OpenGL support ***" >&6;}
fi
-
-{ $as_echo "$as_me:$LINENO: checking for glDepthMask in -lGL" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glDepthMask in -lGL" >&5
$as_echo_n "checking for glDepthMask in -lGL... " >&6; }
-if test "${ac_cv_lib_GL_glDepthMask+set}" = set; then
+if test "${ac_cv_lib_GL_glDepthMask+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lGL $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -9699,43 +6663,18 @@ return glDepthMask ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_GL_glDepthMask=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_GL_glDepthMask=no
+ ac_cv_lib_GL_glDepthMask=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glDepthMask" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glDepthMask" >&5
$as_echo "$ac_cv_lib_GL_glDepthMask" >&6; }
-if test "x$ac_cv_lib_GL_glDepthMask" = x""yes; then
+if test "x$ac_cv_lib_GL_glDepthMask" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGL 1
_ACEOF
@@ -9748,102 +6687,9 @@ esac
fi
# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
-if test "${ac_cv_type_pid_t+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_pid_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (pid_t))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((pid_t)))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
- ac_cv_type_pid_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test "x$ac_cv_type_pid_t" = x""yes; then
- :
else
cat >>confdefs.h <<_ACEOF
@@ -9852,102 +6698,9 @@ _ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
-$as_echo_n "checking for size_t... " >&6; }
-if test "${ac_cv_type_size_t+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_size_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (size_t))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((size_t)))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
- ac_cv_type_size_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-$as_echo "$ac_cv_type_size_t" >&6; }
-if test "x$ac_cv_type_size_t" = x""yes; then
- :
else
cat >>confdefs.h <<_ACEOF
@@ -9956,101 +6709,8 @@ _ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
-$as_echo_n "checking for ptrdiff_t... " >&6; }
-if test "${ac_cv_type_ptrdiff_t+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_ptrdiff_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (ptrdiff_t))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((ptrdiff_t)))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_type_ptrdiff_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
-$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+ac_fn_cxx_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PTRDIFF_T 1
@@ -10059,101 +6719,8 @@ _ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for long long" >&5
-$as_echo_n "checking for long long... " >&6; }
-if test "${ac_cv_type_long_long+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_long_long=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (long long))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((long long)))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_type_long_long=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-$as_echo "$ac_cv_type_long_long" >&6; }
-if test "x$ac_cv_type_long_long" = x""yes; then
+ac_fn_cxx_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LONG_LONG 1
@@ -10162,101 +6729,8 @@ _ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for long" >&5
-$as_echo_n "checking for long... " >&6; }
-if test "${ac_cv_type_long+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_long=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (long))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((long)))
- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_type_long=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-$as_echo "$ac_cv_type_long" >&6; }
-if test "x$ac_cv_type_long" = x""yes; then
+ac_fn_cxx_check_type "$LINENO" "long" "ac_cv_type_long" "$ac_includes_default"
+if test "x$ac_cv_type_long" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LONG 1
@@ -10265,16 +6739,12 @@ _ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
+if test "${ac_cv_c_const+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -10334,56 +6804,29 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_const=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_c_const=no
+ ac_cv_c_const=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
-_ACEOF
+$as_echo "#define const /**/" >>confdefs.h
fi
-{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then
+if test "${ac_cv_c_inline+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
@@ -10392,41 +6835,17 @@ $ac_kw foo_t foo () {return 0; }
#endif
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_inline=$ac_kw
-else
- $as_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
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
$as_echo "$ac_cv_c_inline" >&6; }
-
case $ac_cv_c_inline in
inline | yes) ;;
*)
@@ -10442,16 +6861,12 @@ _ACEOF
;;
esac
-{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then
+if test "${ac_cv_type_signal+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -10464,35 +6879,14 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_type_signal=int
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_type_signal=void
+ ac_cv_type_signal=void
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }
cat >>confdefs.h <<_ACEOF
@@ -10504,252 +6898,23 @@ _ACEOF
# Checks for library functions.
-
for ac_header in vfork.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_VFORK_H 1
_ACEOF
fi
done
-
-
for ac_func in fork vfork
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&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 <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#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
-choke me
-#endif
-
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -10758,19 +6923,15 @@ fi
done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:$LINENO: checking for working fork" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
$as_echo_n "checking for working fork... " >&6; }
-if test "${ac_cv_func_fork_works+set}" = set; then
+if test "${ac_cv_func_fork_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
ac_cv_func_fork_works=cross
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
@@ -10784,44 +6945,17 @@ main ()
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_func_fork_works=yes
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_fork_works=no
+ ac_cv_func_fork_works=no
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
$as_echo "$ac_cv_func_fork_works" >&6; }
else
@@ -10837,24 +6971,20 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:$LINENO: checking for working vfork" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
$as_echo_n "checking for working vfork... " >&6; }
-if test "${ac_cv_func_vfork_works+set}" = set; then
+if test "${ac_cv_func_vfork_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
ac_cv_func_vfork_works=cross
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
@@ -10946,174 +7076,46 @@ main ()
}
}
_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_func_vfork_works=yes
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_vfork_works=no
+ ac_cv_func_vfork_works=no
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
$as_echo "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_VFORK 1
-_ACEOF
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-cat >>confdefs.h <<\_ACEOF
-#define vfork fork
-_ACEOF
+$as_echo "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_FORK 1
-_ACEOF
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
-
-
-
-
-
-
-
for ac_func in dup2 floor memset pow sqrt strchr tgamma
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&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 <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#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
-choke me
-#endif
-
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -11121,118 +7123,24 @@ _ACEOF
fi
done
-
for ac_func in strftime
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&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 <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#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
-choke me
-#endif
-
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+do :
+ ac_fn_cxx_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_STRFTIME 1
_ACEOF
else
# strftime is in -lintl on SCO UNIX.
-{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
$as_echo_n "checking for strftime in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_strftime+set}" = set; then
+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -11250,46 +7158,19 @@ return strftime ();
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_intl_strftime=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_intl_strftime=no
+ ac_cv_lib_intl_strftime=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
$as_echo "$ac_cv_lib_intl_strftime" >&6; }
-if test "x$ac_cv_lib_intl_strftime" = x""yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRFTIME 1
-_ACEOF
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
+ $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
LIBS="-lintl $LIBS"
fi
@@ -11298,118 +7179,24 @@ fi
done
-
-for ac_func in strptime
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&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 <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#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
-choke me
-#endif
-
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
+ for ac_func in strptime
+do :
+ ac_fn_cxx_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
+if test "x$ac_cv_func_strptime" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_STRPTIME 1
_ACEOF
fi
done
-{ $as_echo "$as_me:$LINENO: checking for error_at_line" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
$as_echo_n "checking for error_at_line... " >&6; }
-if test "${ac_cv_lib_error_at_line+set}" = set; then
+if test "${ac_cv_lib_error_at_line+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <error.h>
int
@@ -11420,40 +7207,15 @@ error_at_line (0, 0, "", 0, "an error occurred");
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_error_at_line=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_error_at_line=no
+ ac_cv_lib_error_at_line=no
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
$as_echo "$ac_cv_lib_error_at_line" >&6; }
if test $ac_cv_lib_error_at_line = no; then
case " $LIBOBJS " in
@@ -11464,17 +7226,13 @@ esac
fi
-{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_source+set}" = set; then
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
$as_echo_n "(cached) " >&6
else
while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h> /* for off_t */
#include <stdio.h>
@@ -11487,43 +7245,12 @@ int (*fp) (FILE *, off_t, int) = fseeko;
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_sys_largefile_source=no; break
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
@@ -11537,43 +7264,16 @@ int (*fp) (FILE *, off_t, int) = fseeko;
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_sys_largefile_source=1; break
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
ac_cv_sys_largefile_source=unknown
break
done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
$as_echo "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
no | unknown) ;;
@@ -11590,9 +7290,7 @@ rm -rf conftest*
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSEEKO 1
-_ACEOF
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
fi
@@ -11629,13 +7327,13 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -11643,8 +7341,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
(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 \).
+ # `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"
@@ -11667,11 +7365,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
@@ -11685,14 +7383,15 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -11705,9 +7404,10 @@ LTLIBOBJS=$ac_ltlibobjs
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -11717,17 +7417,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -11735,23 +7436,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ 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
-
as_nl='
'
export as_nl
@@ -11759,7 +7452,13 @@ export as_nl
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
@@ -11770,7 +7469,7 @@ else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
- case $arg in
+ case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -11793,13 +7492,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
}
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
@@ -11809,15 +7501,15 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+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
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -11829,12 +7521,16 @@ if test "x$as_myself" = x; then
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); 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
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
@@ -11846,7 +7542,89 @@ export LC_ALL
LANGUAGE=C
export LANGUAGE
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -11860,8 +7638,12 @@ else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
@@ -11881,76 +7663,25 @@ $as_echo X/"$0" |
}
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" ||
- { $as_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
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
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
@@ -11979,8 +7710,56 @@ fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -11999,10 +7778,10 @@ else
if test -d "$1"; then
test -d "$1/.";
else
- case $1 in
+ case $1 in #(
-*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -12017,13 +7796,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Asymptote $as_me 2.02, which was
-generated by GNU Autoconf 2.63. Invocation command line was
+This file was extended by Asymptote $as_me 2.10, which was
+generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -12054,13 +7839,15 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTION]... [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -12076,16 +7863,17 @@ $config_files
Configuration headers:
$config_headers
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <http://sourceforge.net/projects/asymptote>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Asymptote config.status 2.02
-configured by $0, generated by GNU Autoconf 2.63,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+Asymptote config.status 2.10
+configured by $0, generated by GNU Autoconf 2.66,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -12119,6 +7907,8 @@ do
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -12126,20 +7916,19 @@ do
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
- CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; };;
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -12147,11 +7936,10 @@ Try \`$0 --help' for more information." >&2
ac_cs_silent=: ;;
# This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1"
+ *) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
@@ -12202,9 +7990,7 @@ do
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"doc/png/Makefile") CONFIG_FILES="$CONFIG_FILES doc/png/Makefile" ;;
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -12230,7 +8016,7 @@ $debug ||
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
+ trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
@@ -12241,11 +8027,7 @@ $debug ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -12253,7 +8035,13 @@ $debug ||
if test -n "$CONFIG_FILES"; then
-ac_cr=' '
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\\r'
@@ -12270,24 +8058,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -12309,7 +8091,7 @@ s/'"$ac_delim"'$//
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -12323,7 +8105,7 @@ s/.\{148\}//
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
@@ -12376,22 +8158,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -12419,9 +8207,7 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -12506,9 +8292,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -12521,9 +8305,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
- { (exit 1); exit 1; }; };;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -12551,12 +8333,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
+ as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -12567,7 +8347,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
@@ -12580,9 +8360,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -12610,47 +8388,7 @@ $as_echo X"$ac_file" |
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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
@@ -12702,7 +8440,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-
ac_sed_dataroot='
/datarootdir/ {
p
@@ -12712,12 +8449,11 @@ ac_sed_dataroot='
/@docdir@/p
/@infodir@/p
/@localedir@/p
-/@mandir@/p
-'
+/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -12727,7 +8463,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
s&@infodir@&$infodir&g
s&@localedir@&$localedir&g
s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
+ s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF
@@ -12755,26 +8491,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
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"; } &&
- { $as_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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+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 \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -12785,25 +8517,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
- { (exit 1); exit 1; }; }
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
@@ -12813,15 +8539,12 @@ $as_echo "$as_me: error: could not create -" >&2;}
done # for ac_tag
-{ (exit 0); exit 0; }
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -12842,39 +8565,34 @@ if test "$no_create" != yes; then
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; }
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
if test "x$GCDIR" != "x" ; then
as_ac_File=`$as_echo "ac_cv_file_$GCDIR.tar.gz" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $GCDIR.tar.gz" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GCDIR.tar.gz" >&5
$as_echo_n "checking for $GCDIR.tar.gz... " >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$GCDIR.tar.gz"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
-ac_res=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_File'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- :
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
+
else
echo
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac
index ae65035f24e..77396d7751d 100644
--- a/Build/source/utils/asymptote/configure.ac
+++ b/Build/source/utils/asymptote/configure.ac
@@ -3,7 +3,7 @@
# this file.
AC_PREREQ(2)
-AC_INIT([Asymptote],[2.02],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[2.10],[http://sourceforge.net/projects/asymptote])
VERSION=$PACKAGE_VERSION
AC_SUBST(VERSION)
diff --git a/Build/source/utils/asymptote/dec.cc b/Build/source/utils/asymptote/dec.cc
index 731e4b9db1c..10154609576 100644
--- a/Build/source/utils/asymptote/dec.cc
+++ b/Build/source/utils/asymptote/dec.cc
@@ -83,10 +83,16 @@ void arrayTy::prettyprint(ostream &out, Int indent)
// NOTE: Can this be merged with trans somehow?
void arrayTy::addOps(coenv &e, record *r)
{
- types::array *t=dynamic_cast<types::array *>(trans(e, true));
- e.e.addArrayOps(t);
- if (r)
- r->e.addArrayOps(t);
+ types::ty *t=trans(e, true);
+
+ // Only add ops if it is an array (and not, say, an error)
+ if (t->kind == types::ty_array) {
+ types::array *at=dynamic_cast<types::array *>(t);
+ assert(at);
+ e.e.addArrayOps(at);
+ if (r)
+ r->e.addArrayOps(at);
+ }
}
types::ty *arrayTy::trans(coenv &e, bool tacit)
@@ -94,6 +100,10 @@ types::ty *arrayTy::trans(coenv &e, bool tacit)
types::ty *ct = cell->trans(e, tacit);
assert(ct);
+ // Don't make an array of errors.
+ if (ct->kind == types::ty_error)
+ return ct;
+
types::array *t = dims->truetype(ct);
assert(t);
diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf
index 59b899d3388..afaad32261c 100644
--- a/Build/source/utils/asymptote/doc/CAD.pdf
+++ b/Build/source/utils/asymptote/doc/CAD.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
index ce582954dda..26fcd14b628 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
@@ -13,12 +13,13 @@
\endcopy
\copyto INFO
+INFO-DIR-SECTION Languages
START-INFO-DIR-ENTRY
* asymptote FAQ: (asy-faq). Asymptote Frequently Asked Questions.
END-INFO-DIR-ENTRY

-File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir)
+File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
`date '+%d %h %Y'`
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
index 059fa578d1a..6fc4b7ce85c 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
@@ -1,15 +1,16 @@
Info file: asy-faq.info, -*-Text-*-
produced by bfnnconv.pl from the Bizarre Format With No Name.
+INFO-DIR-SECTION Languages
START-INFO-DIR-ENTRY
* asymptote FAQ: (asy-faq). Asymptote Frequently Asked Questions.
END-INFO-DIR-ENTRY

-File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir)
+File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 11 Jul 2010
+ 26 May 2011
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/Build/source/utils/asymptote/doc/FAQ/install-sh b/Build/source/utils/asymptote/doc/FAQ/install-sh
index a9244eb0786..6781b987bdb 100755
--- a/Build/source/utils/asymptote/doc/FAQ/install-sh
+++ b/Build/source/utils/asymptote/doc/FAQ/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,10 +156,6 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
shift;;
-T) no_target_directory=true;;
@@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -208,11 +200,7 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -240,9 +228,9 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -264,7 +252,12 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@@ -392,7 +385,7 @@ do
case $dstdir in
/*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
+ -*) prefix='./';;
*) prefix='';;
esac
@@ -410,7 +403,7 @@ do
for d
do
- test X"$d" = X && continue
+ test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
diff --git a/Build/source/utils/asymptote/doc/Makefile.in b/Build/source/utils/asymptote/doc/Makefile.in
index 11651df9e43..8cfc0d20ec8 100644
--- a/Build/source/utils/asymptote/doc/Makefile.in
+++ b/Build/source/utils/asymptote/doc/Makefile.in
@@ -1,8 +1,8 @@
MANFILES = asy.1 xasy.1x
-ASYFILES = $(wildcard *.asy) latexusage.asy
+ASYFILES = $(filter-out $(wildcard latexusage-*.asy),$(wildcard *.asy))
SOURCE = asymptote.texi version.texi options
ASY = ../asy -dir ../base -config "" -render=0
-DOCFILES = asymptote.pdf CAD.pdf
+DOCFILES = asymptote.pdf asy-latex.pdf CAD.pdf TeXShopAndAsymptote.pdf
docdir = $(DESTDIR)@docdir@
infodir = $(DESTDIR)@infodir@
@@ -14,6 +14,12 @@ export docdir infodir INSTALL
all: doc
+asy-latex.pdf:
+ pdflatex asy-latex.dtx
+
+asymptote.sty:
+ pdflatex asy-latex.dtx
+
dvi: doc asymptote.dvi
doc: $(DOCFILES) asy.1 faq latexusage.eps
@@ -31,9 +37,9 @@ faq:
%.pdf: %.asy
$(ASY) -f pdf -noprc $<
-latexusage.dvi: latexusage.tex
+latexusage.dvi: latexusage.tex asymptote.sty
rm -f latexusage-*
- rm -f latexusage_.pre
+ rm -f latexusage.pre
rm -f latexusage.aux
latex latexusage
$(ASY) -noprc latexusage-*.asy
@@ -49,14 +55,14 @@ options: ../settings.cc
$(ASY) -h 2>&1 | grep -iv Asymptote > options
asy.1: options asy.1.begin asy.1.end
- cat options | grep \^- | sed -e "s/-\(.*\) \([a-zA-Z].*\)/.TP\n.B -\1\n\2\./" | sed -e "/^.B/ s/-/\\\\-/g" | cat asy.1.begin - asy.1.end > asy.1
+ cat options | grep \^- | sed -e "s/-\(.*\) \([a-zA-Z0-9].*\)/.TP\n.B -\1\n\2\./" | sed -e "/^.B/ s/-/\\\\-/g" | cat asy.1.begin - asy.1.end > asy.1
-asymptote.dvi: $(SOURCE) $(ASYFILES:.asy=.eps)
+asymptote.dvi: $(SOURCE) $(ASYFILES:.asy=.eps) latexusage.pdf
ln -sf asymptote.texi asymptote_.texi
$(TEXI2DVI) asymptote_.texi
mv asymptote_.dvi asymptote.dvi
-asymptote.pdf: $(SOURCE) $(ASYFILES:.asy=.pdf)
+asymptote.pdf: $(SOURCE) $(ASYFILES:.asy=.pdf) latexusage.pdf
$(TEXI2DVI) --pdf asymptote.texi
CAD.pdf: CAD.tex CAD1.eps
@@ -65,12 +71,19 @@ CAD.pdf: CAD.tex CAD1.eps
latex CAD
dvipdf CAD
+TeXShopAndAsymptote.pdf: TeXShopAndAsymptote.tex
+ latex TeXShopAndAsymptote
+ latex TeXShopAndAsymptote
+ dvipdf TeXShopAndAsymptote
+
clean: FORCE
+ -rm -f asy-latex.{aux,idx,ins,log,toc}
-rm -f $(ASYFILES:.asy=.pdf)
- -rm -f *.eps latexusage.{dvi,eps,log,aux,*.eps} latexusage-* latexusage_.pre
+ -rm -f *.eps latexusage.{dvi,eps,pdf,log,aux,*.eps} latexusage-* latexusage.pre
-rm -f {asymptote,asymptote_}.{aux,cp,cps,dvi,fn,info,ky,log,pg,toc,tp,vr}
-rm -f asymptote_.texi
-rm -f CAD.{aux,dvi,log,toc}
+ -rm -f options asy.1
cd png && $(MAKE) clean
install-man:
@@ -102,6 +115,9 @@ uninstall-all:
distclean: FORCE clean
-rm -f version.texi Makefile
-rm -f $(DOCFILES)
- cd png && make distclean
- cd FAQ && make distclean
+ cd png && $(MAKE) distclean
+ cd FAQ && $(MAKE) distclean
FORCE:
+
+Makefile: Makefile.in
+ cd ..; config.status
diff --git a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.tex b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.tex
new file mode 100644
index 00000000000..13cb4f55420
--- /dev/null
+++ b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.tex
@@ -0,0 +1,96 @@
+\documentclass[11pt]{article}
+\usepackage{geometry}
+\geometry{letterpaper}
+
+\usepackage[parfill]{parskip}
+\usepackage{graphicx}
+\usepackage{amssymb}
+\usepackage{epstopdf}
+
+\title{Integrating Asymptote and TeXShop for Mac OS X}
+\author{Vishaal Rajani \& Cole Zmurchok \\ University of Alberta}
+\date{\today}
+
+
+\begin{document}
+\maketitle
+\begin{enumerate}
+\item Download Asymptote and place the \emph{asymptote-x.xx.src.tgz} file
+on the desktop.
+\item Open Terminal and type the following. Note that you will
+have to enter the root password for the final command.
+\begin{verbatim}
+cd Desktop
+gunzip asymptote-x.xx.src.tgz
+tar -xf asymptote-x.xx.src.tar
+cd asymptote-x.xx
+./configure
+make all
+sudo make install
+\end{verbatim}
+If you get an error at the \verb+./configure+ step, stating that you there
+is \verb+no acceptable C+ \verb+compiler found in $PATH+, a solution
+is to download and install Xcode here: \\
+\verb+http://developer.apple.com/TOOLS/Xcode/+.
+
+\item We now create the engine that will typeset Asymptote in TeXShop. The
+easiest way to create this engine, which we will
+call \emph{asyEngine.engine}, is to navigate
+to \verb+~/Library/TeXShop/Engines+ and duplicate one of the
+existing \emph{.engine} files. Open the duplicate file and delete the code
+there. Type the following:
+\newpage
+\begin{verbatim}
+#!/bin/sh
+location=$(dirname "$1")
+basename="${1%.tex}"
+#process
+cd $location
+pdflatex "$1"
+asy "${basename}"-*.asy
+pdflatex "$1"
+\end{verbatim}
+Save this file as \emph{asyEngine.engine}.
+
+\item Now we set our engine to be executable. In the terminal, navigate to
+the Engines directory and type:
+
+\begin{verbatim}
+chmod +x asyEngine.engine
+\end{verbatim}
+
+\item Finally, in the terminal, type:
+
+\begin{verbatim}
+defaults write TeXShop OtherTeXExtensions -array-add "asy"
+\end{verbatim}
+
+This last command allows you choose the \emph{asyEngine} option from the
+drop-down menu when you wish to typeset a document that includes asymptote.
+\end{enumerate}
+
+Now, if you wish to typeset something simple, like the following red line,
+create a new document in TeXShop and type:
+
+\begin{verbatim}
+\documentclass[letterpaper,12pt]{article}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{asymptote}
+
+\begin{document}
+\begin{asy}
+ size(300);
+ draw((0,0)--(1,1),red);
+\end{asy}
+\end{document}
+\end{verbatim}
+
+Choose the \emph{asyEngine} option from the drop-down menu and
+press \emph{Typeset}. Your red line will be created in a PDF Document.
+
+On a final note, it is best to avoid using filenames with spaces in them.
+For example, avoid filenames such as \verb+asy test.tex+ and instead use
+filenames without spaces, such as \verb+asyTest.tex+.
+
+\end{document}
diff --git a/Build/source/utils/asymptote/doc/asy-latex.dtx b/Build/source/utils/asymptote/doc/asy-latex.dtx
new file mode 100644
index 00000000000..3cb386cd6b4
--- /dev/null
+++ b/Build/source/utils/asymptote/doc/asy-latex.dtx
@@ -0,0 +1,710 @@
+% \iffalse
+%
+%<*internal>
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+____________________________
+The ASYMPTOTE package
+
+(C) 2003 Tom Prince
+(C) 2003-2010 John Bowman
+(C) 2010 Will Robertson
+
+Adapted from comment.sty
+
+Licence: GPL2+
+
+\endpreamble
+\nopostamble
+\askforoverwritefalse
+\generate{\file{asymptote.sty}{\from{\jobname.dtx}{pkg}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
+\edef\tmpa{plain}
+\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
+\endgroup
+\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
+\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
+%</internal>
+%
+%<*driver>
+\ProvidesFile{asy-latex.dtx}
+%</driver>
+%<pkg>\ProvidesPackage{asymptote}
+%<*pkg>
+ [2011/05/15 v1.24 Asymptote style file for LaTeX]
+%</pkg>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{asy-latex.dtx}
+% \title{The \textsf{asymptote} package}
+% \author{%
+% John Bowman, Tom Prince, and Will Robertson
+% }
+% \date{\filedate\qquad\fileversion}
+% \maketitle
+% \begin{abstract}
+% This package provides integration of inline and external Asymptote
+% graphics within a \LaTeX\ document.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% This is the documentation for the \LaTeX\ package \texttt{asymptote}
+% which accompanies the Asymptote drawing package. For further details on
+% Asymptote, please see its documentation in \texttt{asymptote.pdf}.
+%
+% \section{User syntax}
+%
+% \subsection{Package loading and options}
+%
+% The package may take two options at load time: \texttt{inline} or
+% \texttt{attach}.
+% These options can also be set at any time with the
+% \cmd\asysetup\marg{options} command, or specified individually in the
+% optional argument to each \texttt{asy} environment or \texttt{asyinclude}
+% command.
+%
+% The \texttt{inline} option uses Asymptote's `inline' mode whereby
+% included graphics have their labels typeset in the environment of the
+% document they are contained within. Otherwise the Asymptote graphics are
+% self-contained and their formatting is independent of the document.
+%
+% The \texttt{attach} option allows generated graphics to be embedded
+% within the PDF using the \texttt{attachfile2} package; please load that
+% package separately if you wish to use it. The \texttt{attach} option
+% takes precedence over the \texttt{inline} option.
+%
+% This package produces quite a number of output files, which by default
+% are created in the same directory as the \LaTeX\ document that is being
+% compiled. To keep things more tidy, you can specify an output directory
+% for these files by defining the \cmd\asydir\ command. For example, if you
+% wish to store the figure files in the subdirectory \texttt{asytmp/}, the
+% you would write \verb|\renewcommand\asydir{asytmp}|.
+%
+% Alternatively (and tentatively), you may write \verb|dir=asytmp| in
+% either the \texttt{asy} environment options or the options to
+% \cmd\asysetup.
+%
+% \subsection{Commands for inserting Asymptote graphics}
+%
+% The main environment defined by the package is the \texttt{asy}
+% environment, in which verbatim Asymptote code is placed that will be
+% compiled for generating a graphic in the document. For example,
+% \begin{verbatim}
+% \begin{figure}
+% \begin{asy}[ <options> ]
+% <ASYMPTOTE CODE>
+% \end{asy}
+% \caption{...}\label{...}
+% \end{verbatim}
+%
+% If you have Asymptote code in a separate file, you can include it with
+% the \cmd\asyinclude\oarg{options}\marg{filename}\ command.
+%
+% For Asymptote code that should be included in \emph{every} graphic,
+% define it using the \texttt{asydef} environment.
+%
+% \subsection{Graphics options}
+%
+% Both the \texttt{asy} environment and the \cmd\asyinclude\ command take
+% optional parameters for controlling aspects of the graphics creation. In
+% addition to locally setting \texttt{inline} and \texttt{attach}, the
+% following options may also be used:
+% \begin{description}
+% \item[height] Height of the figure
+% \item[width] Width of the figure
+% \item[keepAspect] Maintain aspect ratio [default true]
+% \item[viewportheight] Viewport height for 3D figures
+% \item[viewportwidth] Viewport width for 3D figures
+% \end{description}
+% These may also be set globally using the \cmd\asysetup\ command.
+%
+% \section{Processing the document}
+%
+% After running \LaTeX\ on the document, it is necessary to process the
+% Asymptote graphics so they can be included in the next compilation. The
+% simplest procedure is a recipe such as
+% \begin{verbatim}
+% pdflatex mydoc
+% asy mydoc-*.asy
+% pdflatex mydoc
+% \end{verbatim}
+% This technique will recompile each graphic every time, however. To only
+% recompile graphics that have changed, use the \texttt{latexmk}
+% tool. Asymptote is distributed with a \texttt{latexmkrc} configuration
+% file; place this file in a place where \texttt{latexmk} will find it and
+% your document may be compiled, including the \texttt{asy} compilations,
+% with \texttt{latexmk mydoc} or \texttt{latexmk --pdf mydoc}.
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*pkg>
+% \fi
+%
+% \begin{macrocode}
+\def\Asymptote{{\tt Asymptote}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\InputIfFileExists{\jobname.pre}{}{}
+% \end{macrocode}
+%
+% \subsection{Allocations}
+%
+% \paragraph{Allocations}
+%
+% \begin{macrocode}
+\newbox\ASYbox
+\newcounter{asy}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newwrite\AsyStream
+\newwrite\AsyPreStream
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newif\ifASYinline
+\newif\ifASYattach
+\newif\ifASYkeepAspect
+\ASYkeepAspecttrue
+% \end{macrocode}
+%
+% \subsection{Packages}
+%
+% \begin{macrocode}
+\RequirePackage{keyval}
+\RequirePackage{ifthen}
+\RequirePackage{color,graphicx}
+% \end{macrocode}
+%
+% \paragraph{Emulating packages}
+% We cannot assume that Asymptote users have recent
+% \TeX\ distributions. (E.g., Fedora until recently still shipped teTeX.)
+% So load \textsf{ifpdf} and \textsf{ifxetex} if they exist; otherwise,
+% emulate them.
+%
+% In due course, delete this code and just load the packages.
+% \begin{macrocode}
+\IfFileExists{ifpdf.sty}{
+ \RequirePackage{ifpdf}
+}{
+ \expandafter\newif\csname ifpdf\endcsname
+ \ifx\pdfoutput\@undefined\else
+ \ifcase\pdfoutput\else
+ \pdftrue
+ \fi
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\IfFileExists{ifxetex.sty}{
+ \RequirePackage{ifxetex}
+}{
+ \expandafter\newif\csname ifxetex\endcsname
+ \ifx\XeTeXversion\@undefined\else
+ \xetextrue
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macro}{\CatchFileDef}
+% Used for \cmd\asyinclude.
+% \begin{macrocode}
+\IfFileExists{catchfile.sty}{
+ \RequirePackage{catchfile}
+}{
+ \newcommand\CatchFileDef[3]{%
+ \begingroup
+ \everyeof{%
+ \ENDCATCHFILEMARKER
+ \noexpand
+ }%
+ \long\def\@tempa##1\ENDCATCHFILEMARKER{%
+ \endgroup
+ \def#1{##1}%
+ }%
+ #3%
+ \expandafter\@tempa\@@input #2\relax
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Ensuring attachfile2 is loaded if [attach] is requested}
+% \begin{macrocode}
+\newif\if@asy@attachfile@loaded
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{attachfile2}{\@asy@attachfile@loadedtrue}{}%
+ \let\asy@check@attachfile\asy@check@attachfile@loaded
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\asy@check@attachfile@loaded{%
+ \if@asy@attachfile@loaded\else
+ \PackageError{asymptote}{You must load the attachfile2 package}{^^J%
+ You have requested the [attach] option for some or all of your^^J%
+ Asymptote graphics, which requires the attachfile2 package.^^J%
+ Please load it in the document preamble.^^J%
+ }%
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\asy@check@attachfile{%
+ \AtBeginDocument{\asy@check@attachfile@loaded}%
+ \let\asy@check@attachfile\@empty
+}
+% \end{macrocode}
+%
+% \paragraph{Macros}
+% \begin{macrocode}
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+% \end{macrocode}
+%
+% \subsection{Package options}
+%
+% \begin{macrocode}
+\DeclareOption{inline}{%
+ \ASYinlinetrue
+}
+\DeclareOption{attach}{%
+ \asy@check@attachfile
+ \ASYattachtrue
+}
+\ProcessOptions*
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\asydir{}
+\def\ASYprefix{}
+% \end{macrocode}
+%
+%
+% \subsection{Testing for PDF output}
+% Note this is not quite the same as \cs{ifpdf}, since we still want PDF
+% output when using XeTeX.
+% \begin{macrocode}
+\newif\ifASYPDF
+\ifxetex
+ \ASYPDFtrue
+\else
+ \ifpdf
+ \ASYPDFtrue
+ \fi
+\fi
+\ifASYPDF
+ \def\AsyExtension{pdf}
+\else
+ \def\AsyExtension{eps}
+\fi
+% \end{macrocode}
+%
+% \subsection{Bug squashing}
+%
+% \begin{macrocode}
+\def\unquoteJobname#1"#2"#3\relax{%
+ \def\rawJobname{#1}%
+ \ifx\rawJobname\empty
+ \def\rawJobname{#2}%
+ \fi
+}
+\expandafter\unquoteJobname\jobname""\relax
+% \end{macrocode}
+% Work around jobname bug in MiKTeX 2.5 and 2.6:
+% Turn stars in file names (resulting from spaces, etc.) into minus signs
+% \begin{macrocode}
+\def\fixstar#1*#2\relax{%
+ \def\argtwo{#2}%
+ \ifx\argtwo\empty
+ \gdef\Jobname{#1}%
+ \else
+ \fixstar#1-#2\relax
+ \fi
+}
+\expandafter\fixstar\rawJobname*\relax
+% \end{macrocode}
+%
+% Work around bug in dvips.def: allow spaces in file names.
+% \begin{macrocode}
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp\relax
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile=#1\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup
+}
+% \end{macrocode}
+%
+% \subsection{Input/Output}
+%
+% \begin{macrocode}
+\immediate\openout\AsyPreStream=\jobname.pre\relax
+\AtEndDocument{\immediate\closeout\AsyPreStream}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\WriteAsyLine#1{%
+ \immediate\write\AsyStream{\detokenize{#1}}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\globalASYdefs{}
+\def\WriteGlobalAsyLine#1{%
+ \expandafter\g@addto@macro
+ \expandafter\globalASYdefs
+ \expandafter{\detokenize{#1^^J}}%
+}
+% \end{macrocode}
+%
+% \subsection{Commands for verbatim processing environments}
+%
+% \begin{macrocode}
+\def\ProcessAsymptote#1{%
+ \begingroup
+ \def\CurrentAsymptote{#1}%
+ \let\do\@makeother \dospecials
+ \@makeother\^^L% and whatever other special cases
+ \catcode`\ =10
+ \endlinechar`\^^M \catcode`\^^M=12 \xAsymptote
+}
+% \end{macrocode}
+% Need lots of comment chars here because \meta{line end} is no longer a
+% space character.
+% \begin{macrocode}
+\begingroup
+ \catcode`\^^M=12 \endlinechar=-1\relax%
+ \gdef\xAsymptote{%
+ \expandafter\ProcessAsymptoteLine%
+ }
+ \gdef\ProcessAsymptoteLine#1^^M{%
+ \def\@tempa{#1}%
+ {%
+ \escapechar=-1\relax%
+ \xdef\@tempb{\string\\end\string\{\CurrentAsymptote\string\}}%
+ }%
+ \ifx\@tempa\@tempb%
+ \edef\next{\endgroup\noexpand\end{\CurrentAsymptote}}%
+ \else%
+ \ThisAsymptote{#1}%
+ \let\next\ProcessAsymptoteLine%
+ \fi%
+ \next%
+ }
+\endgroup
+% \end{macrocode}
+%
+% \subsection{User interface}
+%
+% \begin{macrocode}
+\newcommand\asy[1][]{%
+ \stepcounter{asy}%
+ \setkeys{ASYkeys}{#1}%
+% \end{macrocode}
+% Disable the "inline" option if "attach" is enabled:
+% \begin{macrocode}
+ \ifASYattach
+ \ASYinlinefalse
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\asydir\empty\else
+ \def\ASYprefix{\asydir/}%
+ \fi
+ \immediate\write\AsyPreStream{%
+ \noexpand\InputIfFileExists{%
+ \ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
+ }
+ \asy@write@graphic@header
+ \let\ThisAsymptote\WriteAsyLine
+ \ProcessAsymptote{asy}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\endasy{%
+ \asy@finalise@stream
+ \asy@input@graphic
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\asy@write@graphic@header{%
+ \immediate\openout\AsyStream=\ASYprefix\jobname-\the\c@asy.asy\relax
+ \gdef\AsyFile{\ASYprefix\Jobname-\the\c@asy}%
+ \immediate\write\AsyStream{%
+ if(!settings.multipleView) settings.batchView=false;^^J%
+ \ifxetex
+ settings.tex="xelatex";^^J%
+ \else\ifASYPDF
+ settings.tex="pdflatex";^^J%
+ \fi\fi
+ \ifASYinline
+ settings.inlinetex=true;^^J%
+ deletepreamble();^^J%
+ \fi
+ defaultfilename="\Jobname-\the\c@asy";^^J%
+ if(settings.render < 0) settings.render=4;^^J%
+ settings.outformat="";^^J%
+ \ifASYattach
+ settings.inlineimage=false;^^J%
+ settings.embed=false;^^J%
+ settings.toolbar=true;^^J%
+ \else
+ settings.inlineimage=true;^^J%
+ settings.embed=true;^^J%
+ settings.toolbar=false;^^J%
+ viewportmargin=(2,2);^^J%
+ \fi
+ \globalASYdefs
+ }%
+}
+\def\asy@expand@keepAspect{%
+ \ifASYkeepAspect keepAspect=true%
+ \else keepAspect=false%
+ \fi%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\asy@finalise@stream{%
+% \end{macrocode}
+% Setting \verb|size()|. Only inserted if one of the dimensions is
+% set explicitly (i.e., if both height and width are not empty).
+% \begin{macrocode}
+ \ifx\ASYwidth\@empty
+ \ifx\ASYheight\@empty
+ % write nothing!
+ \else
+ \immediate\write\AsyStream{size(0,\ASYheight,\asy@expand@keepAspect);}%
+ \fi
+ \else
+ \ifx\ASYheight\@empty
+ \immediate\write\AsyStream{size(\ASYwidth,0,\asy@expand@keepAspect);}%
+ \else
+ \immediate\write\AsyStream{size(\ASYwidth,\ASYheight,\asy@expand@keepAspect);}%
+ \fi
+ \fi
+% \end{macrocode}
+% Setting \verb|viewportsize=()|. Same logic as for \verb|size()|.
+% Note that \cs{ASYviewportwidth} varies according to \cs{ASYattach},
+% by default, so it needs to be fully expanded before checking if it equals
+% zero.
+% \begin{macrocode}
+ \edef\ASYviewportwidth{\ASYviewportwidth}% locally "freeze" viewportwidth
+ \ifx\ASYviewportwidth\@empty
+ \ifx\ASYviewportheight\@empty
+ % write nothing!
+ \else
+ \immediate\write\AsyStream{viewportsize=(0,\ASYviewportheight);}%
+ \fi
+ \else
+ \ifx\ASYviewportheight\@empty
+ \immediate\write\AsyStream{viewportsize=(\ASYviewportwidth,0);}%
+ \else
+ \immediate\write\AsyStream{%
+ viewportsize=(\ASYviewportwidth,\ASYviewportheight);}%
+ \fi
+ \fi
+ \immediate\closeout\AsyStream
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\asy@input@graphic{%
+ \ifASYinline
+ \IfFileExists{"\AsyFile.tex"}{%
+ \catcode`:=12\relax
+ \@@input"\AsyFile.tex"\relax
+ }{%
+ \PackageWarning{asymptote}{file `\AsyFile.tex' not found}%
+ }%
+ \else
+ \IfFileExists{"\AsyFile.\AsyExtension"}{%
+ \ifASYattach
+ \ifASYPDF
+ \IfFileExists{"\AsyFile+0.pdf"}{%
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile+0".pdf}}%
+ }{%
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile".pdf}}%
+ }%
+ \else
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile.eps"}}%
+ \fi
+ \textattachfile{\AsyFile.\AsyExtension}{\phantom{\copy\ASYbox}}%
+ \vskip-\ht\ASYbox
+ \indent
+ \box\ASYbox
+ \else
+ \ifASYPDF
+ \includegraphics[hiresbb]{"\AsyFile".pdf}%
+ \else
+ \includegraphics[hiresbb]{"\AsyFile.eps"}%
+ \fi
+ \fi
+ }{%
+% \end{macrocode}
+% 3D PRC figures require inline mode.
+% \begin{macrocode}
+ \IfFileExists{"\AsyFile.tex"}{%
+ \catcode`:=12
+ \@@input"\AsyFile.tex"\relax
+ }{%
+ \PackageWarning{asymptote}{%
+ file `\AsyFile.\AsyExtension' not found%
+ }%
+ }%
+ }%
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\asydef{%
+ \let\ThisAsymptote\WriteGlobalAsyLine
+ \ProcessAsymptote{asydef}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\asyinclude[2][]{%
+ \begingroup
+ \stepcounter{asy}%
+ \setkeys{ASYkeys}{#1}%
+ \ifASYattach
+ \ASYinlinefalse
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYprefix{\asydir/}%
+ \fi
+ \immediate\write\AsyPreStream{%
+ \noexpand\InputIfFileExists{%
+ \ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
+ }
+ \asy@write@graphic@header
+ \IfFileExists{#2.asy}{%
+ \CatchFileDef\@tempa{#2.asy}{%
+ \let\do\@makeother
+ \dospecials
+ \endlinechar=10\relax
+ }
+ }{
+ \IfFileExists{#2}{%
+ \CatchFileDef\@tempa{#2}{%
+ \let\do\@makeother
+ \dospecials
+ \endlinechar=10\relax
+ }
+ }{
+ \PackageWarning{asymptote}{file #2 not found}%
+ }
+ }
+ \immediate\write\AsyStream{\unexpanded\expandafter{\@tempa}}%
+ \asy@finalise@stream
+ \asy@input@graphic
+ \endgroup
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand{\ASYanimategraphics}[5][]{%
+ \IfFileExists{_#3.pdf}{%
+ \animategraphics[{#1}]{#2}{_#3}{#4}{#5}%
+ }{}
+}
+% \end{macrocode}
+%
+% \subsection{Keys for graphics processing}
+%
+% \begin{macrocode}
+\newcommand\asysetup[1]{\setkeys{ASYkeys}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\define@key{ASYkeys}{dir}{%
+ \def\asydir{#1}%
+}
+\def\ASYwidth{}
+\define@key{ASYkeys}{width}{%
+ \edef\ASYwidth{\the\dimexpr#1\relax}%
+}
+\def\ASYheight{}
+\define@key{ASYkeys}{height}{%
+ \edef\ASYheight{\the\dimexpr#1\relax}%
+}
+\define@key{ASYkeys}{keepAspect}[true]{%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYkeepAspecttrue}
+ {\ASYkeepAspectfalse}%
+}
+\def\ASYviewportwidth{\ASYdefaultviewportwidth}
+\def\ASYdefaultviewportwidth{%
+ \ifASYattach \@empty \else \the\linewidth \fi
+}
+\define@key{ASYkeys}{viewportwidth}{%
+ \edef\ASYviewportwidth{\the\dimexpr#1\relax}%
+}
+\def\ASYviewportheight{}
+\define@key{ASYkeys}{viewportheight}{%
+ \edef\ASYviewportheight{\the\dimexpr#1\relax}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\define@key{ASYkeys}{inline}[true]{%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYinlinetrue}
+ {\ASYinlinefalse}%
+}
+\define@key{ASYkeys}{attach}[true]{%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYattachtrue}
+ {\ASYattachfalse}%
+}
+% \end{macrocode}
+%
+% \iffalse
+%</pkg>
+% \fi
+%
+% \Finale
+%
diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1
deleted file mode 100644
index d9e680befc7..00000000000
--- a/Build/source/utils/asymptote/doc/asy.1
+++ /dev/null
@@ -1,287 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.TH ASY 1 "1 Dec 2004"
-.SH NAME
-asy \- Asymptote: a script-based vector graphics language
-.SH SYNOPSIS
-.B asy
-.RI [ options ]
-.RI [ file \ ...]
-.SH DESCRIPTION
-\fBAsymptote\fP is a powerful descriptive vector graphics language for
-technical drawings, inspired by MetaPost but with an improved C++-like syntax.
-Asymptote provides for figures the same high-quality level of typesetting that
-LaTeX does for scientific text.
-.SH OPTIONS
-If no arguments are given, Asymptote runs in interactive mode.
-.PP
-If "\-" is given as the file argument, Asymptote reads from standard input.
-.PP
-A summary of options is included below. The effect of most options
-can be negated by prepending
-.B no
-to the option name.
-Default values for most options may also be entered in the
-file
-.B .asy/config.asy
-in the user's home directory using the long form:
-.PP
- import settings;
- batchView=true;
-.PP
-For a complete
-description, see the Info files.
-.TP
-.B \-V,\-View
-View output; command-line only.
-.TP
-.B \-a,\-align C|B|T|Z
-Center, Bottom, Top, or Zero page alignment [C].
-.TP
-.B \-antialias n
-Antialiasing width for rasterized output [2].
--arcballradius pixels Arcball radius [750]
-.TP
-.B \-auto3D
-Automatically activate 3D scene [true].
--autobillboard 3D labels always face viewer by default [true]
-.TP
-.B \-autoimport string
-Module to automatically import.
-.TP
-.B \-autoplain
-Enable automatic importing of plain [true].
-.TP
-.B \-autoplay
-Autoplay 3D animations [false].
-.TP
-.B \-autorotate
-Enable automatic PDF page rotation [false].
-.TP
-.B \-batchMask
-Mask fpu exceptions in batch mode [false].
-.TP
-.B \-batchView
-View output in batch mode [false].
-.TP
-.B \-bw
-Convert all colors to black and white [false].
-.TP
-.B \-cd directory
-Set current directory; command-line only.
-.TP
-.B \-cmyk
-Convert rgb colors to cmyk [false].
-.TP
-.B \-c,\-command string
-Command to autoexecute.
-.TP
-.B \-compact
-Conserve memory at the expense of speed [false].
-.TP
-.B \-d,\-debug
-Enable debugging messages [false].
-.TP
-.B \-divisor n
-Garbage collect using purge(divisor=n) [2].
-.TP
-.B \-doubleclick ms
-Emulated double-click timeout [200].
-.TP
-.B \-embed
-Embed rendered preview image [true].
-.TP
-.B \-exitonEOF
-Exit interactive mode on EOF [true].
-.TP
-.B \-fitscreen
-Fit rendered image to screen [true].
-.TP
-.B \-framedelay ms
-Additional frame delay [0].
-.TP
-.B \-framerate frames/s
-Animation speed [30].
-.TP
-.B \-globalwrite
-Allow write to other directory [false].
-.TP
-.B \-gray
-Convert all colors to grayscale [false].
-.TP
-.B \-h,\-help
-Show summary of options; command-line only.
-.TP
-.B \-historylines n
-Retain n lines of history [1000].
-.TP
-.B \-iconify
-Iconify rendering window [false].
-.TP
-.B \-inlineimage
-Generate inline embedded image [false].
-.TP
-.B \-inlinetex
-Generate inline TeX code [false].
-.TP
-.B \-interactiveMask
-Mask fpu exceptions in interactive mode [true].
-.TP
-.B \-interactiveView
-View output in interactive mode [true].
-.TP
-.B \-interactiveWrite
-Write expressions entered at the prompt to stdout [true].
-.TP
-.B \-k,\-keep
-Keep intermediate files [false].
-.TP
-.B \-keepaux
-Keep intermediate LaTeX .aux files [false].
-.TP
-.B \-level n
-Postscript level [3].
-.TP
-.B \-l,\-listvariables
-List available global functions and variables [false].
-.TP
-.B \-localhistory
-Use a local interactive history file [false].
-.TP
-.B \-loop
-Loop 3D animations [false].
-.TP
-.B \-m,\-mask
-Mask fpu exceptions; command-line only.
-.TP
-.B \-maxtile pair
-Maximum rendering tile size [(0,0)].
-.TP
-.B \-maxviewport pair
-Maximum viewport size [(2048,2048)].
-.TP
-.B \-multiline
-Input code over multiple lines at the prompt [false].
-.TP
-.B \-multipleView
-View output from multiple batch-mode files [false].
-.TP
-.B \-multisample n
-Multisampling width for screen images [4].
-.TP
-.B \-O,\-offset pair
-PostScript offset [(0,0)].
-.TP
-.B \-f,\-outformat format
-Convert each output file to specified format.
-.TP
-.B \-o,\-outname name
-Alternative output directory/filename.
-.TP
-.B \-p,\-parseonly
-Parse file [false].
-.TP
-.B \-pdfreload
-Automatically reload document in pdfviewer [false].
-.TP
-.B \-pdfreloaddelay usec
-Delay before attempting initial pdf reload [750000].
-.TP
-.B \-position pair
-Initial 3D rendering screen position [(0,0)].
-.TP
-.B \-prc
-Embed 3D PRC graphics in PDF output [true].
-.TP
-.B \-prompt string
-Prompt [> ].
-.TP
-.B \-prompt2 string
-Continuation prompt for multiline input [..].
-.TP
-.B \-q,\-quiet
-Suppress welcome message [false].
-.TP
-.B \-render n
-Render 3D graphics using n pixels per bp (-1=auto) [-1].
-.TP
-.B \-resizestep step
-Resize step [1.2].
-.TP
-.B \-reverse
-reverse 3D animations [false].
-.TP
-.B \-rgb
-Convert cmyk colors to rgb [false].
-.TP
-.B \-safe
-Disable system call [true].
-.TP
-.B \-scroll n
-Scroll standard output n lines at a time [0].
-.TP
-.B \-spinstep deg/s
-Spin speed [60].
-.TP
-.B \-svgemulation
-Emulate unimplemented SVG shading [false].
-.TP
-.B \-tabcompletion
-Interactive prompt auto-completion [true].
-.TP
-.B \-tex engine
-latex|pdflatex|xelatex|tex|pdftex|context|none [latex].
-.TP
-.B \-thick
-Render thick 3D lines [true].
-.TP
-.B \-thin
-Render thin 3D lines [true].
-.TP
-.B \-threads
-Use POSIX threads for 3D rendering [true].
-.TP
-.B \-toolbar
-Show 3D toolbar in PDF output [true].
-.TP
-.B \-s,\-translate
-Show translated virtual machine code [false].
-.TP
-.B \-twice
-Run LaTeX twice (to resolve references) [false].
-.TP
-.B \-twosided
-Use two-sided 3D lighting model for rendering [true].
-.TP
-.B \-u,\-user string
-General purpose user string.
-.TP
-.B \-v,\-verbose
-Increase verbosity level (can specify multiple times) [0].
-.TP
-.B \-version
-Show version; command-line only.
-.TP
-.B \-wait
-Wait for child processes to finish before exiting [false].
-.TP
-.B \-warn string
-Enable warning; command-line only.
-.TP
-.B \-where
-Show where listed variables are declared [false].
-.TP
-.B \-zoomfactor factor
-Zoom step factor [1.05].
-.TP
-.B \-zoomstep step
-Mouse motion zoom step [0.1].
-
-.SH SEE ALSO
-Asymptote is documented fully in the asymptote Info page.
-The manual can also be accessed in interactive mode with the "help" command.
-
-.SH AUTHOR
-Asymptote was written by Andy Hammerlindl, John Bowman, and Tom Prince.
-.PP
-This manual page was written by Hubert Chan for the Debian project (but may
-be used by others).
diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf
index d480d1c6d84..5ae18cf90b3 100644
--- a/Build/source/utils/asymptote/doc/asymptote.pdf
+++ b/Build/source/utils/asymptote/doc/asymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.sty b/Build/source/utils/asymptote/doc/asymptote.sty
index 4db253d4095..6518baba61f 100644
--- a/Build/source/utils/asymptote/doc/asymptote.sty
+++ b/Build/source/utils/asymptote/doc/asymptote.sty
@@ -1,304 +1,398 @@
-%%% Asymptote style file for LaTeX
-%%% Contributed by Tom Prince 14 May 2003
-%%% Modified by John Bowman
-%%% Adapted from comment.sty (Under GPL v2+)
-
-\ProvidesPackage{asymptote}[2010/07/10 v1.15 Asymptote style file for LaTeX]
+%%
+%% This is file `asymptote.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% asy-latex.dtx (with options: `pkg')
+%% ____________________________
+%% The ASYMPTOTE package
+%%
+%% (C) 2003 Tom Prince
+%% (C) 2003-2010 John Bowman
+%% (C) 2010 Will Robertson
+%%
+%% Adapted from comment.sty
+%%
+%% Licence: GPL2+
+%%
+\ProvidesPackage{asymptote}
+ [2011/05/15 v1.24 Asymptote style file for LaTeX]
+\def\Asymptote{{\tt Asymptote}}
+\InputIfFileExists{\jobname.pre}{}{}
+\newbox\ASYbox
+\newcounter{asy}
+\newwrite\AsyStream
+\newwrite\AsyPreStream
+\newif\ifASYinline
+\newif\ifASYattach
+\newif\ifASYkeepAspect
+\ASYkeepAspecttrue
\RequirePackage{keyval}
\RequirePackage{ifthen}
-\newif\ifASYdefaultinline
-\newif\ifASYdefaultattach
-\DeclareOption{inline}{\ASYdefaultinlinetrue}
-\DeclareOption{attach}{\ASYdefaultattachtrue}
-\ProcessOptions*
-
-\def\unquoteJobname#1"#2"#3\relax{\def\rawJobname{#1}%
- \ifx\rawJobname\empty\def\rawJobname{#2}\fi}
-\expandafter\unquoteJobname\jobname""\relax
-% Work around jobname bug in MiKTeX 2.5 and 2.6:
-% Turn stars in file names (resulting from spaces, etc.) into minus signs
-\def\fixstar#1*#2\relax{\def\argtwo{#2}\ifx\argtwo\empty\gdef\Jobname{#1}\else
-\fixstar#1-#2\relax\fi}
-\expandafter\fixstar\rawJobname*\relax
-
\RequirePackage{color,graphicx}
-
-\def\makeinnocent#1{\catcode`#1=12 }
+\IfFileExists{ifpdf.sty}{
+ \RequirePackage{ifpdf}
+}{
+ \expandafter\newif\csname ifpdf\endcsname
+ \ifx\pdfoutput\@undefined\else
+ \ifcase\pdfoutput\else
+ \pdftrue
+ \fi
+ \fi
+}
+\IfFileExists{ifxetex.sty}{
+ \RequirePackage{ifxetex}
+}{
+ \expandafter\newif\csname ifxetex\endcsname
+ \ifx\XeTeXversion\@undefined\else
+ \xetextrue
+ \fi
+}
+\IfFileExists{catchfile.sty}{
+ \RequirePackage{catchfile}
+}{
+ \newcommand\CatchFileDef[3]{%
+ \begingroup
+ \everyeof{%
+ \ENDCATCHFILEMARKER
+ \noexpand
+ }%
+ \long\def\@tempa##1\ENDCATCHFILEMARKER{%
+ \endgroup
+ \def#1{##1}%
+ }%
+ #3%
+ \expandafter\@tempa\@@input #2\relax
+ }
+}
+\newif\if@asy@attachfile@loaded
+\AtBeginDocument{%
+ \@ifpackageloaded{attachfile2}{\@asy@attachfile@loadedtrue}{}%
+ \let\asy@check@attachfile\asy@check@attachfile@loaded
+}
+\newcommand\asy@check@attachfile@loaded{%
+ \if@asy@attachfile@loaded\else
+ \PackageError{asymptote}{You must load the attachfile2 package}{^^J%
+ You have requested the [attach] option for some or all of your^^J%
+ Asymptote graphics, which requires the attachfile2 package.^^J%
+ Please load it in the document preamble.^^J%
+ }%
+ \fi
+}
+\newcommand\asy@check@attachfile{%
+ \AtBeginDocument{\asy@check@attachfile@loaded}%
+ \let\asy@check@attachfile\@empty
+}
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
-\newwrite\AsyStream
-\newwrite\AsyPreStream
-\newread\AsyTestStream
-
-\def\AsyInput#1{\openin\AsyTestStream=#1
-\ifeof\AsyTestStream
-\else
- \input #1
-\fi
-\closein\AsyTestStream%
+\DeclareOption{inline}{%
+ \ASYinlinetrue
}
-
-\AsyInput{\jobname.pre}
-
-\immediate\openout\AsyPreStream=\jobname.pre
-
-\newif\ifASYinline
-\newif\ifASYattach
+\DeclareOption{attach}{%
+ \asy@check@attachfile
+ \ASYattachtrue
+}
+\ProcessOptions*
+\def\asydir{}
+\def\ASYprefix{}
\newif\ifASYPDF
-
-\ifx\pdfoutput\undefined
-\else
-\ifcase\pdfoutput
+\ifxetex
+ \ASYPDFtrue
\else
-\ASYPDFtrue
+ \ifpdf
+ \ASYPDFtrue
+ \fi
\fi
+\ifASYPDF
+ \def\AsyExtension{pdf}
+\else
+ \def\AsyExtension{eps}
\fi
-
-\newbox\ASYbox
-\newcounter{asy}
-
-\def\ProcessAsymptote#1% start it all off
-{\begingroup
+\def\unquoteJobname#1"#2"#3\relax{%
+ \def\rawJobname{#1}%
+ \ifx\rawJobname\empty
+ \def\rawJobname{#2}%
+ \fi
+}
+\expandafter\unquoteJobname\jobname""\relax
+\def\fixstar#1*#2\relax{%
+ \def\argtwo{#2}%
+ \ifx\argtwo\empty
+ \gdef\Jobname{#1}%
+ \else
+ \fixstar#1-#2\relax
+ \fi
+}
+\expandafter\fixstar\rawJobname*\relax
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp\relax
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile=#1\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup
+}
+\immediate\openout\AsyPreStream=\jobname.pre\relax
+\AtEndDocument{\immediate\closeout\AsyPreStream}
+\def\WriteAsyLine#1{%
+ \immediate\write\AsyStream{\detokenize{#1}}%
+}
+\def\globalASYdefs{}
+\def\WriteGlobalAsyLine#1{%
+ \expandafter\g@addto@macro
+ \expandafter\globalASYdefs
+ \expandafter{\detokenize{#1^^J}}%
+}
+\def\ProcessAsymptote#1{%
+ \begingroup
\def\CurrentAsymptote{#1}%
- \let\do\makeinnocent \dospecials
- \makeinnocent\^^L% and whatever other special cases
- \endlinechar`\^^M \catcode`\^^M=12 \xAsymptote}
-{\catcode`\^^M=12 \endlinechar=-1 %
+ \let\do\@makeother \dospecials
+ \@makeother\^^L% and whatever other special cases
+ \catcode`\ =10
+ \endlinechar`\^^M \catcode`\^^M=12 \xAsymptote
+}
+\begingroup
+ \catcode`\^^M=12 \endlinechar=-1\relax%
\gdef\xAsymptote{%
- \expandafter\ProcessAsymptoteLine}
- \gdef\ProcessAsymptoteLine#1^^M{\def\test{#1}
- \csarg\ifx{End\CurrentAsymptote Test}\test
- \edef\next{\noexpand\EndOfAsymptote{\CurrentAsymptote}}%
- \else \ThisAsymptote{#1}\let\next\ProcessAsymptoteLine
- \fi \next}
-}
-
-\def\ASYstringmeaning#1{\expandafter\ASYgobblearrow\meaning#1}
-\def\ASYstringcsnoescape#1{\expandafter\ASYgobbleescape\string#1}
-{\escapechar-1
- \expandafter\expandafter\expandafter\gdef
- \expandafter\expandafter\expandafter\ASYgobblearrow
- \expandafter\string\csname macro:->\endcsname{}
-}
-\def\ASYgobbleescape#1{\ifnum`\\=`#1 \else #1\fi}
-
-\def\WriteAsyLine#1{\def\ASYtmp{#1}%
- \immediate\write\AsyStream{\ASYstringmeaning\ASYtmp}}
-
-\def\gedefappend#1#2{%
- \toks@ = \expandafter{#1}%
- \global\edef#1{\the\toks@ #2}%
-}%
-\def\globalASYdefs{}
-\def\WriteGlobalAsyLine#1{\def\ASYtmp{#1^^J}%
-\gedefappend\globalASYdefs{\ASYstringmeaning\ASYtmp}}
-
-\def\EndOfAsymptote#1{\endgroup\end{#1}%
- \csname After#1Asymptote\endcsname}
-\def\AsymptoteEndDef#1{{\escapechar=-1\relax
- \csarg\xdef{End#1Test}{\string\\end\string\{#1\string\}}%
- }}
-
-\def\AfterasyAsymptote{%
- \ifx\ASYwidth\empty
- \ifx\ASYheight\empty
+ \expandafter\ProcessAsymptoteLine%
+ }
+ \gdef\ProcessAsymptoteLine#1^^M{%
+ \def\@tempa{#1}%
+ {%
+ \escapechar=-1\relax%
+ \xdef\@tempb{\string\\end\string\{\CurrentAsymptote\string\}}%
+ }%
+ \ifx\@tempa\@tempb%
+ \edef\next{\endgroup\noexpand\end{\CurrentAsymptote}}%
+ \else%
+ \ThisAsymptote{#1}%
+ \let\next\ProcessAsymptoteLine%
+ \fi%
+ \next%
+ }
+\endgroup
+\newcommand\asy[1][]{%
+ \stepcounter{asy}%
+ \setkeys{ASYkeys}{#1}%
+ \ifASYattach
+ \ASYinlinefalse
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYprefix{\asydir/}%
+ \fi
+ \immediate\write\AsyPreStream{%
+ \noexpand\InputIfFileExists{%
+ \ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
+ }
+ \asy@write@graphic@header
+ \let\ThisAsymptote\WriteAsyLine
+ \ProcessAsymptote{asy}%
+}
+\def\endasy{%
+ \asy@finalise@stream
+ \asy@input@graphic
+}
+\def\asy@write@graphic@header{%
+ \immediate\openout\AsyStream=\ASYprefix\jobname-\the\c@asy.asy\relax
+ \gdef\AsyFile{\ASYprefix\Jobname-\the\c@asy}%
+ \immediate\write\AsyStream{%
+ if(!settings.multipleView) settings.batchView=false;^^J%
+ \ifxetex
+ settings.tex="xelatex";^^J%
+ \else\ifASYPDF
+ settings.tex="pdflatex";^^J%
+ \fi\fi
+ \ifASYinline
+ settings.inlinetex=true;^^J%
+ deletepreamble();^^J%
+ \fi
+ defaultfilename="\Jobname-\the\c@asy";^^J%
+ if(settings.render < 0) settings.render=4;^^J%
+ settings.outformat="";^^J%
+ \ifASYattach
+ settings.inlineimage=false;^^J%
+ settings.embed=false;^^J%
+ settings.toolbar=true;^^J%
\else
- \immediate\write\AsyStream{size(0,\ASYheight);}%
+ settings.inlineimage=true;^^J%
+ settings.embed=true;^^J%
+ settings.toolbar=false;^^J%
+ viewportmargin=(2,2);^^J%
\fi
- \else
- \ifx\ASYheight\empty
- \immediate\write\AsyStream{size(\ASYwidth,0);}%
+ \globalASYdefs
+ }%
+}
+\def\asy@expand@keepAspect{%
+ \ifASYkeepAspect keepAspect=true%
+ \else keepAspect=false%
+ \fi%
+}
+\def\asy@finalise@stream{%
+ \ifx\ASYwidth\@empty
+ \ifx\ASYheight\@empty
+ % write nothing!
\else
- \immediate\write\AsyStream{size(\ASYwidth,\ASYheight);}%
+ \immediate\write\AsyStream{size(0,\ASYheight,\asy@expand@keepAspect);}%
\fi
- \fi
- \ifASYattach
- \def\ASYdefaultviewportwidth{0}%
\else
- \def\ASYdefaultviewportwidth{\the\linewidth}%
+ \ifx\ASYheight\@empty
+ \immediate\write\AsyStream{size(\ASYwidth,0,\asy@expand@keepAspect);}%
+ \else
+ \immediate\write\AsyStream{size(\ASYwidth,\ASYheight,\asy@expand@keepAspect);}%
+ \fi
\fi
- \ifx\ASYviewportwidth\empty
- \ifx\ASYviewportheight\empty
+ \edef\ASYviewportwidth{\ASYviewportwidth}% locally "freeze" viewportwidth
+ \ifx\ASYviewportwidth\@empty
+ \ifx\ASYviewportheight\@empty
+ % write nothing!
\else
\immediate\write\AsyStream{viewportsize=(0,\ASYviewportheight);}%
\fi
\else
- \ifx\ASYviewportheight\empty
+ \ifx\ASYviewportheight\@empty
\immediate\write\AsyStream{viewportsize=(\ASYviewportwidth,0);}%
\else
- \immediate\write%
- \AsyStream{viewportsize=(\ASYviewportwidth,\ASYviewportheight);}%
+ \immediate\write\AsyStream{%
+ viewportsize=(\ASYviewportwidth,\ASYviewportheight);}%
\fi
\fi
- \gdef\ASYwidth{}%
- \gdef\ASYheight{}%
- \gdef\ASYviewportwidth{\ASYdefaultviewportwidth}%
- \gdef\ASYviewportheight{}%
\immediate\closeout\AsyStream
-
+}
+\def\asy@input@graphic{%
\ifASYinline
- \openin\AsyTestStream=\AsyFile.tex
- \else
- \ifASYPDF
- \openin\AsyTestStream=\AsyFile.pdf
- \else
- \openin\AsyTestStream=\AsyFile.eps
- \fi
- \fi
- \ifeof\AsyTestStream
- \ifASYinline
+ \IfFileExists{"\AsyFile.tex"}{%
+ \catcode`:=12\relax
+ \@@input"\AsyFile.tex"\relax
+ }{%
\PackageWarning{asymptote}{file `\AsyFile.tex' not found}%
- \closein\AsyTestStream%
- \else
- \closein\AsyTestStream%
- \openin\AsyTestStream=\AsyFile.tex
- \ifeof\AsyTestStream
+ }%
+ \else
+ \IfFileExists{"\AsyFile.\AsyExtension"}{%
+ \ifASYattach
\ifASYPDF
- \PackageWarning{asymptote}{file `\AsyFile.pdf' not found}%
+ \IfFileExists{"\AsyFile+0.pdf"}{%
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile+0".pdf}}%
+ }{%
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile".pdf}}%
+ }%
\else
- \PackageWarning{asymptote}{file `\AsyFile.eps' not found}%
+ \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{"\AsyFile.eps"}}%
\fi
+ \textattachfile{\AsyFile.\AsyExtension}{\phantom{\copy\ASYbox}}%
+ \vskip-\ht\ASYbox
+ \indent
+ \box\ASYbox
\else
- \catcode`:=12
- \input \AsyFile.tex%
- \fi
- \closein\AsyTestStream%
- \fi
- \else
- \closein\AsyTestStream%
- \ifASYinline
- \catcode`:=12
- \input \AsyFile.tex%
- \else
- \ifASYattach
\ifASYPDF
- \openin\AsyTestStream=\AsyFile+0.pdf
- \fi
- \ifeof\AsyTestStream
- \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile}}%
+ \includegraphics[hiresbb]{"\AsyFile".pdf}%
\else
- \setbox\ASYbox=\hbox{\includegraphics[hiresbb]{\AsyFile+0}}%
+ \includegraphics[hiresbb]{"\AsyFile.eps"}%
\fi
- \textattachfile{\AsyFile.pdf}{\phantom{\copy\ASYbox}}%
- \vskip-\ht\ASYbox%
- \indent%
- \box\ASYbox%
- \closein\AsyTestStream%
- \else
- \includegraphics[hiresbb]{\AsyFile}%
\fi
- \fi
+ }{%
+ \IfFileExists{"\AsyFile.tex"}{%
+ \catcode`:=12
+ \@@input"\AsyFile.tex"\relax
+ }{%
+ \PackageWarning{asymptote}{%
+ file `\AsyFile.\AsyExtension' not found%
+ }%
+ }%
+ }%
\fi
- \relax%
- \endgroup}
-\gdef\ASYwidth{}%
+}
+\def\asydef{%
+ \let\ThisAsymptote\WriteGlobalAsyLine
+ \ProcessAsymptote{asydef}%
+}
+\newcommand\asyinclude[2][]{%
+ \begingroup
+ \stepcounter{asy}%
+ \setkeys{ASYkeys}{#1}%
+ \ifASYattach
+ \ASYinlinefalse
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYprefix{\asydir/}%
+ \fi
+ \immediate\write\AsyPreStream{%
+ \noexpand\InputIfFileExists{%
+ \ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
+ }
+ \asy@write@graphic@header
+ \IfFileExists{#2.asy}{%
+ \CatchFileDef\@tempa{#2.asy}{%
+ \let\do\@makeother
+ \dospecials
+ \endlinechar=10\relax
+ }
+ }{
+ \IfFileExists{#2}{%
+ \CatchFileDef\@tempa{#2}{%
+ \let\do\@makeother
+ \dospecials
+ \endlinechar=10\relax
+ }
+ }{
+ \PackageWarning{asymptote}{file #2 not found}%
+ }
+ }
+ \immediate\write\AsyStream{\unexpanded\expandafter{\@tempa}}%
+ \asy@finalise@stream
+ \asy@input@graphic
+ \endgroup
+}
+\newcommand{\ASYanimategraphics}[5][]{%
+ \IfFileExists{_#3.pdf}{%
+ \animategraphics[{#1}]{#2}{_#3}{#4}{#5}%
+ }{}
+}
+\newcommand\asysetup[1]{\setkeys{ASYkeys}{#1}}
+\define@key{ASYkeys}{dir}{%
+ \def\asydir{#1}%
+}
+\def\ASYwidth{}
\define@key{ASYkeys}{width}{%
- \gdef\ASYwidth{#1}%
+ \edef\ASYwidth{\the\dimexpr#1\relax}%
}
-\gdef\ASYheight{}%
+\def\ASYheight{}
\define@key{ASYkeys}{height}{%
- \gdef\ASYheight{#1}%
+ \edef\ASYheight{\the\dimexpr#1\relax}%
+}
+\define@key{ASYkeys}{keepAspect}[true]{%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYkeepAspecttrue}
+ {\ASYkeepAspectfalse}%
+}
+\def\ASYviewportwidth{\ASYdefaultviewportwidth}
+\def\ASYdefaultviewportwidth{%
+ \ifASYattach \@empty \else \the\linewidth \fi
}
-\gdef\ASYviewportwidth{\ASYdefaultviewportwidth}%
\define@key{ASYkeys}{viewportwidth}{%
- \gdef\ASYviewportwidth{#1}%
+ \edef\ASYviewportwidth{\the\dimexpr#1\relax}%
}
-\gdef\ASYviewportheight{}%
+\def\ASYviewportheight{}
\define@key{ASYkeys}{viewportheight}{%
- \gdef\ASYviewportheight{#1}%
-}
-\define@key{ASYkeys}{attach}[true]{%
- \ifthenelse{\equal{#1}{true}}{\global\ASYattachtrue}{\global\ASYattachfalse}%
+ \edef\ASYviewportheight{\the\dimexpr#1\relax}%
}
\define@key{ASYkeys}{inline}[true]{%
- \ifthenelse{\equal{#1}{true}}{\global\ASYinlinetrue}{\global\ASYinlinefalse}%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYinlinetrue}
+ {\ASYinlinefalse}%
}
-\newcommand\asy[1][]{%
- \begingroup
- \let\par\empty
- \stepcounter{asy}%
- \global\let\ifASYinline\ifASYdefaultinline
- \global\let\ifASYattach\ifASYdefaultattach
- \setkeys{ASYkeys}{#1}%
- \ifASYattach
- \global\ASYinlinefalse
- \fi
- \immediate\write\AsyPreStream%
- {\@backslashchar AsyInput{\jobname-\the\c@asy.pre}}
- \immediate\openout\AsyStream=\jobname-\the\c@asy.asy
- \gdef\AsyFile{\Jobname-\the\c@asy}%
- \immediate\write\AsyStream{if(!settings.multipleView)}%
- \immediate\write\AsyStream{ settings.batchView=false;}%
- \ifx\XeTeXversion\undefined
- \ifASYPDF
- \immediate\write\AsyStream{settings.tex="pdflatex";}%
- \fi
- \else
- \immediate\write\AsyStream{settings.tex="xelatex";}%
- \ASYPDFtrue
- \fi
-
- \ifASYinline
- \immediate\write\AsyStream{settings.inlinetex=true;}%
- \immediate\write\AsyStream{deletepreamble();}%
- \fi
- \immediate\write\AsyStream{defaultfilename="\AsyFile";}%
- \immediate\write\AsyStream{if(settings.render < 0) settings.render=4;}%
- \ifASYattach
- \immediate\write\AsyStream{settings.inlineimage=false;}%
- \immediate\write\AsyStream{settings.embed=false;}%
- \immediate\write\AsyStream{settings.outformat="pdf";}%
- \immediate\write\AsyStream{settings.toolbar=true;}%
- \else
- \immediate\write\AsyStream{settings.inlineimage=true;}%
- \immediate\write\AsyStream{settings.embed=true;}%
- \immediate\write\AsyStream{settings.outformat="";}%
- \immediate\write\AsyStream{settings.toolbar=false;}%
- \immediate\write\AsyStream{viewportmargin=(2,2);}%
- \fi
- \immediate\write\AsyStream{\globalASYdefs}%
- \let\ThisAsymptote\WriteAsyLine%
- \ProcessAsymptote{asy}%
+\define@key{ASYkeys}{attach}[true]{%
+ \ifthenelse{\equal{#1}{true}}
+ {\ASYattachtrue}
+ {\ASYattachfalse}%
}
-\AsymptoteEndDef{asy}
-\def\asydef{%
- \let\ThisAsymptote\WriteGlobalAsyLine%
- \ProcessAsymptote{asydef}}
-\AsymptoteEndDef{asydef}
-\def\AfterasydefAsymptote{}
-
-\AtEndDocument{\immediate\closeout\AsyPreStream}
-
-\newcommand{\ASYanimategraphics}[5][]{%
-\openin\AsyTestStream=_#3.pdf
-\ifeof\AsyTestStream%
-\else%
-\animategraphics[{#1}]{#2}{_#3}{#4}{#5}%
-\fi%
-}
-
-% Work around bug in dvips.def: allow spaces in file names.
-\def\Ginclude@eps#1{%
- \message{<#1>}%
- \bgroup
- \def\@tempa{!}%
- \dimen@\Gin@req@width
- \dimen@ii.1bp%
- \divide\dimen@\dimen@ii
- \@tempdima\Gin@req@height
- \divide\@tempdima\dimen@ii
- \special{PSfile=#1\space
- llx=\Gin@llx\space
- lly=\Gin@lly\space
- urx=\Gin@urx\space
- ury=\Gin@ury\space
- \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
- \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
- \ifGin@clip clip\fi}%
- \egroup}
-
-\def\Asymptote{{\tt Asymptote}}
-
-%%% Local Variables:
-%%% mode: latex
-%%% TeX-master: "shared"
-%%% End:
diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index 6fd28e78456..9a2d6baa88b 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -382,8 +382,8 @@ The @code{ImageMagick} package from
@url{http://www.imagemagick.org/script/binary-releases.php}
@noindent
-is required to support output formats other than @acronym{EPS} and
-@acronym{PDF} (@pxref{convert}).
+is required to support output formats other than @acronym{EPS},
+@acronym{PDF}, @acronym{SVG}, and @acronym{PNG} (@pxref{convert}).
The @code{Python} interpreter from @url{http://www.python.org} is only required
if you wish to try out the graphical user interface (@pxref{GUI}).
@@ -532,7 +532,7 @@ under @code{Microsoft Windows XP}:
@enumerate
@item Click on the @code{Start} button;
@item Right-click on @code{My Computer};
-@item Choose @code{Properties} from the popup menu;
+@item Choose @code{View system information};
@item Click the @code{Advanced} tab;
@item Click the @code{Environment Variables} button.
@end enumerate
@@ -788,14 +788,19 @@ application for the extension @code{asy}).
@noindent
@cindex @code{-V}
This method, known as @emph{batch mode}, outputs a @code{PostScript}
-file @code{test.eps}. The @code{-V} option opens up a @code{PostScript}
-viewer window so you can immediately view the result:
+file @code{test.eps}. If you prefer @acronym{PDF} output, use
+the command line
+@verbatim
+asy -V -f pdf test
+@end verbatim
+In either case, the @code{-V} option opens up a viewer window so you
+can immediately view the result:
@sp 1
@center @image{diagonal}
@cindex @code{bp}
@noindent
-The @code{--} connector joins the two points @code{(0,0)} and
-@code{(100,100)} with a line segment.
+Here, the @code{--} connector joins the two points @code{(0,0)} and
+@code{(100,100)} with a line segment.
@section Drawing in interactive mode
Another method is @emph{interactive mode}, where @code{Asymptote} reads
@@ -3260,12 +3265,14 @@ If exactly one of @code{x} or @code{y} is 0, no size restriction
is imposed in that direction; it will be scaled the same as the other
direction.
+@cindex @code{keepAspect}
@cindex @code{Aspect}
If @code{keepAspect} is set to @code{Aspect} or @code{true},
the picture will be scaled with its aspect ratio preserved such that
the final width is no more than @code{x} and the final height is
no more than @code{y}.
+@cindex @code{keepAspect}
@cindex @code{IgnoreAspect}
If @code{keepAspect} is set to @code{IgnoreAspect} or @code{false},
the picture will be scaled in both directions so that the final width
@@ -3668,6 +3675,10 @@ will be set to the end-of-file, and both reading and writing operations
will be enabled. For security reasons, writing to files in directories
other than the current directory is allowed only if the @code{-globalwrite}
(or @code{-nosafe}) command-line option is specified.
+@cindex @code{mktemp}
+The function @code{string mktemp(string s)} may be used to create and
+return the name of a unique temporary file in the current directory
+based on the string @code{s}.
@cindex @code{stdin}
@cindex @code{stdout}
@@ -3691,6 +3702,8 @@ write(file file, suffix suffix=none);
@cindex @code{flush}
@cindex @code{endl}
@cindex @code{newl}
+@cindex @code{DOSendl}
+@cindex @code{DOSnewl}
@cindex @code{tab}
@cindex @code{comma}
If @code{file} is not specified, @code{stdout} is used and
@@ -3701,6 +3714,8 @@ or one-dimensional arrays. The @code{suffix} may be one of the following:
@code{none} (do nothing), @code{flush} (output buffered data),
@code{endl} (terminate with a newline and flush),
@code{newl} (terminate with a newline),
+@code{DOSendl} (terminate with a DOS newline and flush),
+@code{DOSnewl} (terminate with a DOS newline),
@code{tab} (terminate with a tab), or @code{comma} (terminate with a
comma). Here are some simple examples of data output:
@verbatim
@@ -4631,6 +4646,16 @@ write(f(4,3));
@noindent
and outputs 43.
+@cindex @code{keyword}
+@cindex keyword-only
+Parameters can be specified as ``keyword-only'' by putting @code{keyword}
+immediately before the parameter name, as in @code{int f(int keyword x)} or
+@code{int f(int keyword x=77)}. This forces the caller of the function to use
+a named argument to give a value for this parameter. That is, @code{f(x=42)}
+is legal, but @code{f(25)} is not. Keyword-only parameters must be listed
+after normal parameters in a function definition.
+
+
As a technical detail, we point out that, since variables of the same
name but different signatures are allowed in the same scope, the code
@verbatim
@@ -4715,6 +4740,17 @@ If no arguments are packed, then a zero-length array (as opposed to
arguments are ignored for rest formals and the rest argument is not
bound to a keyword.
+In some cases, keyword-only parameters are helpful to avoid arguments intended
+for the rest parameter to be assigned to other parameters. For example, here
+the use of @code{keyword} is to avoid @code{pnorm(1.0,2.0,0.3)} matching
+@code{1.0} to @code{p}.
+@verbatim
+real pnorm(real keyword p=2.0 ... real[] v)
+{
+ return sum(v^p)^(1/p);
+}
+@end verbatim
+
The overloading resolution in @code{Asymptote} is similar to the
function matching rules used in C++. Every argument match is given a
score. Exact matches score better than matches with casting, and
@@ -5081,9 +5117,10 @@ themselves (in which case they are each initialized to empty arrays).
@cindex @code{array}
@item T[] array(int n, T value, int depth=intMax)
-returns an array consisting of @code{n} deep copies of a 0, 1, or 2
-dimensional array @code{T value}. If @code{depth} is specified, this
-deep copying recurses to no more than the number of levels specified.
+returns an array consisting of @code{n} copies of @code{value}.
+If @code{value} is itself an array, a deep copy of @code{value} is made
+for each entry. If @code{depth} is specified, this deep copying only
+recurses to the specified number of levels.
@cindex @code{sequence}
@item int[] sequence(int n)
@@ -5931,7 +5968,7 @@ to the type. This is regardless of what fields the variable actually possesses.
@cindex @code{asymptote.sty}
@code{Asymptote} comes with a convenient @code{LaTeX} style file
-@code{asymptote.sty} (version 1.15 or later) that makes @code{LaTeX}
+@code{asymptote.sty} that makes @code{LaTeX}
@code{Asymptote}-aware. Entering @code{Asymptote} code
directly into the @code{LaTeX} source file, at the point where it is
needed, keeps figures organized and avoids the need to invent new file
@@ -5940,8 +5977,7 @@ names for each figure. Simply add the line
and enclose your @code{Asymptote} code within a
@code{\begin@{asy@}...\end@{asy@}} environment. As with the
@code{LaTeX} @code{comment} environment, the @code{\end@{asy@}} command
-must appear on a line by itself, with no leading spaces or trailing
-commands/comments.
+must appear on a line by itself, with no trailing commands/comments.
The sample @code{LaTeX} file below, named @code{latexusage.tex}, can
be run as follows:
@@ -5959,11 +5995,11 @@ asy latexusage-*.asy
pdflatex latexusage
@end verbatim
@noindent
-To switch between using @code{latex} and @code{pdflatex} you may first
-need to remove the files @code{latexusage-*}, @code{latexusage.pre}, and
-@code{latexusage.aux}.
+To switch between using inline Asymptote code with @code{latex} and
+@code{pdflatex} you may first need to remove the files @code{latexusage-*.tex}.
@cindex @code{latexmk}
+@cindex @code{perl}
An even better method for processing a @code{LaTeX} file with embedded
@code{Asymptote} code is to use the @code{latexmk} utility from
@quotation
@@ -5981,16 +6017,26 @@ latexmk -pdf latexusage
will then call @code{Asymptote} automatically, recompiling only the figures
that have changed. Since each figure is compiled in a separate
system process, this method also tends to use less memory.
+External @code{Asymptote} code in @code{filename.asy} should be included with
+@cindex @code{asyinclude}
+@verbatim
+\asyinclude[<options>]{<filename.asy>}
+@end verbatim
+@noindent
+so that @code{latexmk} will recognize when the code is changed. Note that
+@code{latemk} requires @code{perl}, available from @url{http://www.perl.org/}.
@cindex @code{width}
@cindex @code{height}
+@cindex @code{keepAspect}
@cindex @code{viewportwidth}
@cindex @code{viewportheight}
@cindex @code{attach}
@cindex @code{inline}
-One can specify @code{width}, @code{height},
+One can specify @code{width}, @code{height}, @code{keepAspect},
@code{viewportwidth}, @code{viewportheight}, @code{attach}, and @code{inline}.
-@code{keyval}-style options to the @code{asy} environment.
+@code{keyval}-style options to the @code{asy} and @code{asyinclude}
+environments.
Three-dimensional @acronym{PRC} files may either be embedded within
the page (the default) or attached as annotated (but printable)
attachments, using the @code{attach} option and the @code{attachfile2}
@@ -7493,21 +7539,29 @@ Here is an example that uses logarithmic scaling of the function values:
@sp 1
@center @image{logimage}
-One can also draw an image directly from a two-dimensional pen array:
+One can also draw an image directly from a two-dimensional pen array
+or a function @code{pen f(int, int)}:
@verbatim
void image(picture pic=currentpicture, pen[][] data,
pair initial, pair final,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool copy=true, bool antialias=false);
+void image(picture pic=currentpicture, pen f(int, int), int width, int height,
+ pair initial, pair final, bool antialias=false);
@end verbatim
@noindent
-as illustrated in the following example:
+as illustrated in the following examples:
@anchor{penimage}
@verbatiminclude penimage.asy
@sp 1
@center @image{penimage}
+@anchor{penfunctionimage}
+@verbatiminclude penfunctionimage.asy
+@sp 1
+@center @image{penfunctionimage}
+
For convenience, the module @code{palette} also defines functions
that may be used to construct a pen array from a given function and palette:
@verbatim
@@ -8273,6 +8327,16 @@ Module @code{three} also defines the three-dimensional margins
@code{BeginDotMargin3}, @code{EndDotMargin3}, @code{DotMargin3},
@code{DotMargins3}, @code{Margin3}, and @code{TrueMargin3}.
+@cindex @code{pixel}
+The routine
+@verbatim
+void pixel(picture pic=currentpicture, triple v, pen p=currentpen,
+ real width=1);
+@end verbatim
+@noindent
+can be used to draw on picture @code{pic} a pixel of width @code{width} at
+position @code{v} using pen @code{p}.
+
Further three-dimensional examples are provided in the files
@code{near_earth.asy}, @code{conicurv.asy}, and (in the @code{animations}
subdirectory) @code{cube.asy}.
@@ -9568,11 +9632,12 @@ Mark Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
@c LocalWords: vectorfieldsphere RightView FrontView BackView BottomView CTZ
@c LocalWords: addViews outprefix addAllViews xsplinetype ysplinetype rotateX
@c LocalWords: usplinetype vsplinetype leftbutton middlebutton rightbutton
-@c LocalWords: rotateY rotateZ wheelup zoomin wheeldown zoomout TeXLive
+@c LocalWords: rotateY rotateZ wheelup zoomin wheeldown zoomout TeXLive pnorm
@c LocalWords: viewportshift signedint signedness psview multiplatform nowarn
@c LocalWords: singlereal singleint writeoverloaded dvisvg reddash lexorder
@c LocalWords: bigdiagonal autobillboard dvisvgm maxtiles hyperrefOptions
@c LocalWords: setpagesize pdfborder controlsystem OmitTickInterval SixViews
@c LocalWords: OmitTickIntervals tickmodifiers autorotated SixViewsUS latexmk
@c LocalWords: ThreeViewsUS ThreeViewsFR SixViewsFR ThreeViews partialsum
-@c LocalWords: defaultrender Vidiassov latexmkrc
+@c LocalWords: defaultrender Vidiassov latexmkrc mktemp DOSendl DOSnewl perl
+@c LocalWords: filename asyinclude latemk penfunctionimage
diff --git a/Build/source/utils/asymptote/doc/diatom.asy b/Build/source/utils/asymptote/doc/diatom.asy
index 2ded75bf0ea..23673dcadf5 100644
--- a/Build/source/utils/asymptote/doc/diatom.asy
+++ b/Build/source/utils/asymptote/doc/diatom.asy
@@ -115,7 +115,7 @@ for(int taxon=0; taxon < n; ++taxon) {
if(taxon == final) yaxis(pic,Right,LeftTicks("%",0,10),above=true);
add(shift(location,0)*pic);
- location += pic.userMax.x;
+ location += pic.userMax().x;
}
add(new void(frame f, transform) {
diff --git a/Build/source/utils/asymptote/doc/extra/intro.asy b/Build/source/utils/asymptote/doc/extra/intro.asy
index 5d7ce12b184..fcafefb32a6 100644
--- a/Build/source/utils/asymptote/doc/extra/intro.asy
+++ b/Build/source/utils/asymptote/doc/extra/intro.asy
@@ -50,7 +50,6 @@ item("4000 downloads/month from primary\hfill\\
{\tt asymptote.sourceforge.net} site alone.");
item("80\ 000 lines of low-level C++ code.");
item("36\ 000 lines of high-level Asymptote code.");
-item("Latest stable release: Version 2.00 (LGPL).");
if(long) {
title("Vector Graphics");
diff --git a/Build/source/utils/asymptote/doc/install-sh b/Build/source/utils/asymptote/doc/install-sh
index a9244eb0786..6781b987bdb 100755
--- a/Build/source/utils/asymptote/doc/install-sh
+++ b/Build/source/utils/asymptote/doc/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,10 +156,6 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
shift;;
-T) no_target_directory=true;;
@@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -208,11 +200,7 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -240,9 +228,9 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -264,7 +252,12 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@@ -392,7 +385,7 @@ do
case $dstdir in
/*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
+ -*) prefix='./';;
*) prefix='';;
esac
@@ -410,7 +403,7 @@ do
for d
do
- test X"$d" = X && continue
+ test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
diff --git a/Build/source/utils/asymptote/doc/latexusage.pre b/Build/source/utils/asymptote/doc/latexusage.pre
deleted file mode 100644
index fd737b3a1e4..00000000000
--- a/Build/source/utils/asymptote/doc/latexusage.pre
+++ /dev/null
@@ -1,3 +0,0 @@
-\AsyInput{latexusage-1.pre}
-\AsyInput{latexusage-2.pre}
-\AsyInput{latexusage-3.pre}
diff --git a/Build/source/utils/asymptote/doc/latexusage.tex b/Build/source/utils/asymptote/doc/latexusage.tex
index ae555a476bd..f3c858348b9 100644
--- a/Build/source/utils/asymptote/doc/latexusage.tex
+++ b/Build/source/utils/asymptote/doc/latexusage.tex
@@ -9,14 +9,14 @@
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
-% Enable this line to support PDF hyperlinks:
-%\usepackage{hyperref}\hypersetup{setpagesize=false,unicode}
-
% Enable this line to support the attach option:
%\usepackage[dvips]{attachfile2}
\begin{document}
+% Optional subdirectory for asy files (no spaces):
+\def\asydir{}
+
\begin{asydef}
// Global Asymptote definitions can be put here.
import three;
@@ -81,8 +81,8 @@ and height to \LaTeX\ explicitly. This 3D example can be viewed
interactively either with Adobe Reader or Asymptote's fast OpenGL-based
renderer. To support {\tt latexmk}, 3D figures should specify
\verb+inline=true+. It is sometimes desirable to embed 3D files as annotated
-attachments; this requires the optional \verb+\usepackage{attachfile2}+
-package and the \verb+attach=true+ option:
+attachments; this requires the \verb+attach=true+ option as well as the
+\verb+attachfile2+ \LaTeX\ package.
\begin{center}
\begin{asy}[height=4cm,inline=true,attach=false]
currentprojection=orthographic(5,4,2);
diff --git a/Build/source/utils/asymptote/doc/options b/Build/source/utils/asymptote/doc/options
deleted file mode 100644
index 742bbd8702b..00000000000
--- a/Build/source/utils/asymptote/doc/options
+++ /dev/null
@@ -1,88 +0,0 @@
-Usage: ../asy [options] [file ...]
-
-Options (negate by replacing - with -no):
-
--V,-View View output; command-line only
--a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C]
--antialias n Antialiasing width for rasterized output [2]
--arcballradius pixels Arcball radius [750]
--auto3D Automatically activate 3D scene [true]
--autobillboard 3D labels always face viewer by default [true]
--autoimport string Module to automatically import
--autoplain Enable automatic importing of plain [true]
--autoplay Autoplay 3D animations [false]
--autorotate Enable automatic PDF page rotation [false]
--batchMask Mask fpu exceptions in batch mode [false]
--batchView View output in batch mode [false]
--bw Convert all colors to black and white [false]
--cd directory Set current directory; command-line only
--cmyk Convert rgb colors to cmyk [false]
--c,-command string Command to autoexecute
--compact Conserve memory at the expense of speed [false]
--d,-debug Enable debugging messages [false]
--divisor n Garbage collect using purge(divisor=n) [2]
--doubleclick ms Emulated double-click timeout [200]
--embed Embed rendered preview image [true]
--exitonEOF Exit interactive mode on EOF [true]
--fitscreen Fit rendered image to screen [true]
--framedelay ms Additional frame delay [0]
--framerate frames/s Animation speed [30]
--globalwrite Allow write to other directory [false]
--gray Convert all colors to grayscale [false]
--h,-help Show summary of options; command-line only
--historylines n Retain n lines of history [1000]
--iconify Iconify rendering window [false]
--inlineimage Generate inline embedded image [false]
--inlinetex Generate inline TeX code [false]
--interactiveMask Mask fpu exceptions in interactive mode [true]
--interactiveView View output in interactive mode [true]
--interactiveWrite Write expressions entered at the prompt to stdout [true]
--k,-keep Keep intermediate files [false]
--keepaux Keep intermediate LaTeX .aux files [false]
--level n Postscript level [3]
--l,-listvariables List available global functions and variables [false]
--localhistory Use a local interactive history file [false]
--loop Loop 3D animations [false]
--m,-mask Mask fpu exceptions; command-line only
--maxtile pair Maximum rendering tile size [(0,0)]
--maxviewport pair Maximum viewport size [(2048,2048)]
--multiline Input code over multiple lines at the prompt [false]
--multipleView View output from multiple batch-mode files [false]
--multisample n Multisampling width for screen images [4]
--O,-offset pair PostScript offset [(0,0)]
--f,-outformat format Convert each output file to specified format
--o,-outname name Alternative output directory/filename
--p,-parseonly Parse file [false]
--pdfreload Automatically reload document in pdfviewer [false]
--pdfreloaddelay usec Delay before attempting initial pdf reload [750000]
--position pair Initial 3D rendering screen position [(0,0)]
--prc Embed 3D PRC graphics in PDF output [true]
--prompt string Prompt [> ]
--prompt2 string Continuation prompt for multiline input [..]
--q,-quiet Suppress welcome message [false]
--render n Render 3D graphics using n pixels per bp (-1=auto) [-1]
--resizestep step Resize step [1.2]
--reverse reverse 3D animations [false]
--rgb Convert cmyk colors to rgb [false]
--safe Disable system call [true]
--scroll n Scroll standard output n lines at a time [0]
--spinstep deg/s Spin speed [60]
--svgemulation Emulate unimplemented SVG shading [false]
--tabcompletion Interactive prompt auto-completion [true]
--tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
--thick Render thick 3D lines [true]
--thin Render thin 3D lines [true]
--threads Use POSIX threads for 3D rendering [true]
--toolbar Show 3D toolbar in PDF output [true]
--s,-translate Show translated virtual machine code [false]
--twice Run LaTeX twice (to resolve references) [false]
--twosided Use two-sided 3D lighting model for rendering [true]
--u,-user string General purpose user string
--v,-verbose Increase verbosity level (can specify multiple times) [0]
--version Show version; command-line only
--wait Wait for child processes to finish before exiting [false]
--warn string Enable warning; command-line only
--where Show where listed variables are declared [false]
--zoomfactor factor Zoom step factor [1.05]
--zoomstep step Mouse motion zoom step [0.1]
-
diff --git a/Build/source/utils/asymptote/doc/penfunctionimage.asy b/Build/source/utils/asymptote/doc/penfunctionimage.asy
new file mode 100644
index 00000000000..38951e550d5
--- /dev/null
+++ b/Build/source/utils/asymptote/doc/penfunctionimage.asy
@@ -0,0 +1,27 @@
+import palette;
+
+size(200);
+
+real fracpart(real x) {return (x-floor(x));}
+
+pair pws(pair z) {
+ pair w=(z+exp(pi*I/5)/0.9)/(1+z/0.9*exp(-pi*I/5));
+ return exp(w)*(w^3-0.5*I);
+}
+
+int N=512;
+
+pair a=(-1,-1);
+pair b=(0.5,0.5);
+real dx=(b-a).x/N;
+real dy=(b-a).y/N;
+
+pen f(int u, int v) {
+ pair z=a+(u*dx,v*dy);
+ pair w=pws(z);
+ real phase=degrees(w,warn=false);
+ real modulus=w == 0 ? 0: fracpart(log(abs(w)));
+ return hsv(phase,1,sqrt(modulus));
+}
+
+image(f,N,N,(0,0),(300,300),antialias=true);
diff --git a/Build/source/utils/asymptote/doc/png/Makefile.in b/Build/source/utils/asymptote/doc/png/Makefile.in
index af5ba0c8b31..38b92bc03d1 100644
--- a/Build/source/utils/asymptote/doc/png/Makefile.in
+++ b/Build/source/utils/asymptote/doc/png/Makefile.in
@@ -1,4 +1,5 @@
-ASYFILES = $(notdir $(wildcard ../*.asy)) latexusage.asy
+ASYFILES = $(notdir $(filter-out $(wildcard ../latexusage-*.asy),$(wildcard ../*.asy)))
+
SOURCE = ../asymptote.texi ../version.texi ../options
ASY = ../asy -dir ../base -config "" -render=0
@@ -16,13 +17,13 @@ latexusage.png: ../latexusage.eps
convert -alpha Off -density 144x144 +antialias -geometry 50%x \
../latexusage.eps latexusage.png
-index.html: $(SOURCE) $(ASYFILES:.asy=.png)
+index.html: $(SOURCE) $(ASYFILES:.asy=.png) latexusage.png
makeinfo --html ../asymptote -o .
asymptote.info: $(SOURCE)
makeinfo --no-warn --no-split ../asymptote
-info: $(SOURCE) $(ASYFILES:.asy=.png)
+info: $(SOURCE) $(ASYFILES:.asy=.png) latexusage.png
makeinfo --no-split ../asymptote
html: index.html
@@ -48,3 +49,6 @@ uninstall:
-cd $(infodir)/asymptote && rm -f asymptote.info *.png
-rmdir $(infodir)/asymptote
FORCE:
+
+Makefile: Makefile.in
+ cd ../..; config.status
diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info
index e72ff70242c..55fbad3858a 100644
--- a/Build/source/utils/asymptote/doc/png/asymptote.info
+++ b/Build/source/utils/asymptote/doc/png/asymptote.info
@@ -1,7 +1,7 @@
This is asymptote.info, produced by makeinfo version 4.13 from
../asymptote.texi.
-This file documents `Asymptote', version 2.02.
+This file documents `Asymptote', version 2.10.
`http://asymptote.sourceforge.net'
@@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir)
Asymptote
*********
-This file documents `Asymptote', version 2.02.
+This file documents `Asymptote', version 2.10.
`http://asymptote.sourceforge.net'
@@ -347,10 +347,10 @@ file::).
`http://www.imagemagick.org/script/binary-releases.php'
-is required to support output formats other than EPS and PDF (*note
-convert::). The `Python' interpreter from `http://www.python.org' is
-only required if you wish to try out the graphical user interface
-(*note GUI::).
+is required to support output formats other than EPS, PDF, SVG, and PNG
+(*note convert::). The `Python' interpreter from
+`http://www.python.org' is only required if you wish to try out the
+graphical user interface (*note GUI::).
Example code will be installed by default in the `examples'
subdirectory of the installation directory (by default, `C:\Program
@@ -454,7 +454,7 @@ ASYMPTOTE_PSVIEWER="C:\Program Files\Ghostgum\gsview\gsview32.exe";
2. Right-click on `My Computer';
- 3. Choose `Properties' from the popup menu;
+ 3. Choose `View system information';
4. Click the `Advanced' tab;
@@ -655,12 +655,14 @@ Desktop `asy' icon (or make `Asymptote' the default application for the
extension `asy').
This method, known as _batch mode_, outputs a `PostScript' file
-`test.eps'. The `-V' option opens up a `PostScript' viewer window so
-you can immediately view the result:
+`test.eps'. If you prefer PDF output, use the command line
+asy -V -f pdf test
+ In either case, the `-V' option opens up a viewer window so you can
+immediately view the result:
-The `--' connector joins the two points `(0,0)' and `(100,100)' with a
-line segment.
+Here, the `--' connector joins the two points `(0,0)' and `(100,100)'
+with a line segment.
3.2 Drawing in interactive mode
===============================
@@ -711,7 +713,7 @@ draw((0,0)--(2,1),Arrow);
To connect several points and create a cyclic path, use the `cycle'
keyword:
-size(100,100);
+size(3cm);
draw((0,0)--(1,0)--(1,1)--(0,1)--cycle);
@@ -2893,7 +2895,9 @@ existing data will be preserved, the position will be set to the
end-of-file, and both reading and writing operations will be enabled.
For security reasons, writing to files in directories other than the
current directory is allowed only if the `-globalwrite' (or `-nosafe')
-command-line option is specified.
+command-line option is specified. The function `string mktemp(string
+s)' may be used to create and return the name of a unique temporary
+file in the current directory based on the string `s'.
There are two special files: `stdin', which reads from the keyboard,
and `stdout', which writes to the terminal. The implicit initializer
@@ -2914,8 +2918,10 @@ written before the data `x'. An arbitrary number of data values may be
listed when writing scalars or one-dimensional arrays. The `suffix' may
be one of the following: `none' (do nothing), `flush' (output buffered
data), `endl' (terminate with a newline and flush), `newl' (terminate
-with a newline), `tab' (terminate with a tab), or `comma' (terminate
-with a comma). Here are some simple examples of data output:
+with a newline), `DOSendl' (terminate with a DOS newline and flush),
+`DOSnewl' (terminate with a DOS newline), `tab' (terminate with a tab),
+or `comma' (terminate with a comma). Here are some simple examples of
+data output:
file fout=output("test.txt");
write(fout,1); // Writes "1"
write(fout); // Writes a new line
@@ -3654,6 +3660,13 @@ x=3;
write(f(4,3));
and outputs 43.
+ Parameters can be specified as "keyword-only" by putting `keyword'
+immediately before the parameter name, as in `int f(int keyword x)' or
+`int f(int keyword x=77)'. This forces the caller of the function to
+use a named argument to give a value for this parameter. That is,
+`f(x=42)' is legal, but `f(25)' is not. Keyword-only parameters must
+be listed after normal parameters in a function definition.
+
As a technical detail, we point out that, since variables of the same
name but different signatures are allowed in the same scope, the code
int f(int x, int x()) {
@@ -3721,6 +3734,15 @@ subtract(... new int[] {10, 1, 2});
ignored for rest formals and the rest argument is not bound to a
keyword.
+ In some cases, keyword-only parameters are helpful to avoid
+arguments intended for the rest parameter to be assigned to other
+parameters. For example, here the use of `keyword' is to avoid
+`pnorm(1.0,2.0,0.3)' matching `1.0' to `p'.
+real pnorm(real keyword p=2.0 ... real[] v)
+{
+ return sum(v^p)^(1/p);
+}
+
The overloading resolution in `Asymptote' is similar to the function
matching rules used in C++. Every argument match is given a score.
Exact matches score better than matches with casting, and matches with
@@ -3961,9 +3983,10 @@ of type `T[]'.
arrays).
`T[] array(int n, T value, int depth=intMax)'
- returns an array consisting of `n' deep copies of a 0, 1, or 2
- dimensional array `T value'. If `depth' is specified, this deep
- copying recurses to no more than the number of levels specified.
+ returns an array consisting of `n' copies of `value'. If `value'
+ is itself an array, a deep copy of `value' is made for each entry.
+ If `depth' is specified, this deep copying only recurses to the
+ specified number of levels.
`int[] sequence(int n)'
if `n >= 1' returns the array `{0,1,...,n-1}' (otherwise returns a
@@ -4642,15 +4665,14 @@ File: asymptote.info, Node: LaTeX usage, Next: Base modules, Prev: Programmin
***************
`Asymptote' comes with a convenient `LaTeX' style file `asymptote.sty'
-(version 1.15 or later) that makes `LaTeX' `Asymptote'-aware. Entering
-`Asymptote' code directly into the `LaTeX' source file, at the point
-where it is needed, keeps figures organized and avoids the need to
-invent new file names for each figure. Simply add the line
-`\usepackage{asymptote}' at the beginning of your file and enclose your
-`Asymptote' code within a `\begin{asy}...\end{asy}' environment. As
-with the `LaTeX' `comment' environment, the `\end{asy}' command must
-appear on a line by itself, with no leading spaces or trailing
-commands/comments.
+that makes `LaTeX' `Asymptote'-aware. Entering `Asymptote' code
+directly into the `LaTeX' source file, at the point where it is needed,
+keeps figures organized and avoids the need to invent new file names
+for each figure. Simply add the line `\usepackage{asymptote}' at the
+beginning of your file and enclose your `Asymptote' code within a
+`\begin{asy}...\end{asy}' environment. As with the `LaTeX' `comment'
+environment, the `\end{asy}' command must appear on a line by itself,
+with no trailing commands/comments.
The sample `LaTeX' file below, named `latexusage.tex', can be run as
follows:
@@ -4662,8 +4684,8 @@ or
pdflatex latexusage
asy latexusage-*.asy
pdflatex latexusage
- To switch between using `latex' and `pdflatex' you may first need to
-remove the files `latexusage-*', `latexusage.pre', and `latexusage.aux'.
+ To switch between using inline Asymptote code with `latex' and
+`pdflatex' you may first need to remove the files `latexusage-*.tex'.
An even better method for processing a `LaTeX' file with embedded
`Asymptote' code is to use the `latexmk' utility from
@@ -4679,17 +4701,21 @@ in a file `latexmkrc' in the same directory. The command
latexmk -pdf latexusage
will then call `Asymptote' automatically, recompiling only the figures
that have changed. Since each figure is compiled in a separate system
-process, this method also tends to use less memory.
+process, this method also tends to use less memory. External
+`Asymptote' code in `filename.asy' should be included with
+\asyinclude[<options>]{<filename.asy>}
+ so that `latexmk' will recognize when the code is changed. Note that
+`latemk' requires `perl', available from `http://www.perl.org/'.
- One can specify `width', `height', `viewportwidth',
+ One can specify `width', `height', `keepAspect', `viewportwidth',
`viewportheight', `attach', and `inline'. `keyval'-style options to
-the `asy' environment. Three-dimensional PRC files may either be
-embedded within the page (the default) or attached as annotated (but
-printable) attachments, using the `attach' option and the `attachfile2'
-(or older `attachfile') `LaTeX' package. The default value of
-`viewportwidth' is `\the\linewidth' for inline 3D figures and `0' for
-attachments. The `inline' option generates inline `LaTeX' code instead
-of EPS or PDF files. This makes 2D LaTeX symbols visible to the
+the `asy' and `asyinclude' environments. Three-dimensional PRC files
+may either be embedded within the page (the default) or attached as
+annotated (but printable) attachments, using the `attach' option and
+the `attachfile2' (or older `attachfile') `LaTeX' package. The default
+value of `viewportwidth' is `\the\linewidth' for inline 3D figures and
+`0' for attachments. The `inline' option generates inline `LaTeX' code
+instead of EPS or PDF files. This makes 2D LaTeX symbols visible to the
`\begin{asy}...\end{asy}' environment. In this mode, Asymptote
correctly aligns 2D LaTeX symbols defined outside of
`\begin{asy}...\end{asy}', but treats their size as zero; an optional
@@ -4716,14 +4742,14 @@ option, labels might not show up in DVI viewers that cannot handle raw
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
-% Enable this line to support PDF hyperlinks:
-%\usepackage{hyperref}\hypersetup{setpagesize=false,unicode}
-
% Enable this line to support the attach option:
%\usepackage[dvips]{attachfile2}
\begin{document}
+% Optional subdirectory for asy files (no spaces):
+\def\asydir{}
+
\begin{asydef}
// Global Asymptote definitions can be put here.
import three;
@@ -4788,8 +4814,8 @@ and height to \LaTeX\ explicitly. This 3D example can be viewed
interactively either with Adobe Reader or Asymptote's fast OpenGL-based
renderer. To support {\tt latexmk}, 3D figures should specify
\verb+inline=true+. It is sometimes desirable to embed 3D files as annotated
-attachments; this requires the optional \verb+\usepackage{attachfile2}+
-package and the \verb+attach=true+ option:
+attachments; this requires the \verb+attach=true+ option as well as the
+\verb+attachfile2+ \LaTeX\ package.
\begin{center}
\begin{asy}[height=4cm,inline=true,attach=false]
currentprojection=orthographic(5,4,2);
@@ -6529,12 +6555,15 @@ palette("$f(x,y)$",range,(0,200),(100,250),Top,Palette,
-One can also draw an image directly from a two-dimensional pen array:
+One can also draw an image directly from a two-dimensional pen array or
+a function `pen f(int, int)':
void image(picture pic=currentpicture, pen[][] data,
pair initial, pair final,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool copy=true, bool antialias=false);
- as illustrated in the following example:
+void image(picture pic=currentpicture, pen f(int, int), int width, int height,
+ pair initial, pair final, bool antialias=false);
+ as illustrated in the following examples:
size(200);
@@ -6552,6 +6581,36 @@ image(v,(0,0),(1,1));
+import palette;
+
+size(200);
+
+real fracpart(real x) {return (x-floor(x));}
+
+pair pws(pair z) {
+ pair w=(z+exp(pi*I/5)/0.9)/(1+z/0.9*exp(-pi*I/5));
+ return exp(w)*(w^3-0.5*I);
+}
+
+int N=512;
+
+pair a=(-1,-1);
+pair b=(0.5,0.5);
+real dx=(b-a).x/N;
+real dy=(b-a).y/N;
+
+pen f(int u, int v) {
+ pair z=a+(u*dx,v*dy);
+ pair w=pws(z);
+ real phase=degrees(w,warn=false);
+ real modulus=w == 0 ? 0: fracpart(log(abs(w)));
+ return hsv(phase,1,sqrt(modulus));
+}
+
+image(f,N,N,(0,0),(300,300),antialias=true);
+
+
+
For convenience, the module `palette' also defines functions that may
be used to construct a pen array from a given function and palette:
pen[] palette(real[] f, pen[] palette);
@@ -7123,6 +7182,12 @@ illustrated in the example `arrows3.asy'.
`BeginDotMargin3', `EndDotMargin3', `DotMargin3', `DotMargins3',
`Margin3', and `TrueMargin3'.
+ The routine
+void pixel(picture pic=currentpicture, triple v, pen p=currentpen,
+ real width=1);
+ can be used to draw on picture `pic' a pixel of width `width' at
+position `v' using pen `p'.
+
Further three-dimensional examples are provided in the files
`near_earth.asy', `conicurv.asy', and (in the `animations'
subdirectory) `cube.asy'.
@@ -7844,89 +7909,89 @@ Usage: ../asy [options] [file ...]
Options (negate by replacing - with -no):
--V,-View View output; command-line only
--a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C]
--antialias n Antialiasing width for rasterized output [2]
--arcballradius pixels Arcball radius [750]
--auto3D Automatically activate 3D scene [true]
--autobillboard 3D labels always face viewer by default [true]
--autoimport string Module to automatically import
--autoplain Enable automatic importing of plain [true]
--autoplay Autoplay 3D animations [false]
--autorotate Enable automatic PDF page rotation [false]
--batchMask Mask fpu exceptions in batch mode [false]
--batchView View output in batch mode [false]
--bw Convert all colors to black and white [false]
--cd directory Set current directory; command-line only
--cmyk Convert rgb colors to cmyk [false]
--c,-command string Command to autoexecute
--compact Conserve memory at the expense of speed [false]
--d,-debug Enable debugging messages [false]
--divisor n Garbage collect using purge(divisor=n) [2]
--doubleclick ms Emulated double-click timeout [200]
--embed Embed rendered preview image [true]
--exitonEOF Exit interactive mode on EOF [true]
--fitscreen Fit rendered image to screen [true]
--framedelay ms Additional frame delay [0]
--framerate frames/s Animation speed [30]
--globalwrite Allow write to other directory [false]
--gray Convert all colors to grayscale [false]
--h,-help Show summary of options; command-line only
--historylines n Retain n lines of history [1000]
--iconify Iconify rendering window [false]
--inlineimage Generate inline embedded image [false]
--inlinetex Generate inline TeX code [false]
--interactiveMask Mask fpu exceptions in interactive mode [true]
--interactiveView View output in interactive mode [true]
--interactiveWrite Write expressions entered at the prompt to stdout [true]
--k,-keep Keep intermediate files [false]
--keepaux Keep intermediate LaTeX .aux files [false]
--level n Postscript level [3]
--l,-listvariables List available global functions and variables [false]
--localhistory Use a local interactive history file [false]
--loop Loop 3D animations [false]
--m,-mask Mask fpu exceptions; command-line only
--maxtile pair Maximum rendering tile size [(0,0)]
--maxviewport pair Maximum viewport size [(2048,2048)]
--multiline Input code over multiple lines at the prompt [false]
--multipleView View output from multiple batch-mode files [false]
--multisample n Multisampling width for screen images [4]
--O,-offset pair PostScript offset [(0,0)]
--f,-outformat format Convert each output file to specified format
--o,-outname name Alternative output directory/filename
--p,-parseonly Parse file [false]
--pdfreload Automatically reload document in pdfviewer [false]
--pdfreloaddelay usec Delay before attempting initial pdf reload [750000]
--position pair Initial 3D rendering screen position [(0,0)]
--prc Embed 3D PRC graphics in PDF output [true]
--prompt string Prompt [> ]
--prompt2 string Continuation prompt for multiline input [..]
--q,-quiet Suppress welcome message [false]
--render n Render 3D graphics using n pixels per bp (-1=auto) [-1]
--resizestep step Resize step [1.2]
--reverse reverse 3D animations [false]
--rgb Convert cmyk colors to rgb [false]
--safe Disable system call [true]
--scroll n Scroll standard output n lines at a time [0]
--spinstep deg/s Spin speed [60]
--svgemulation Emulate unimplemented SVG shading [false]
--tabcompletion Interactive prompt auto-completion [true]
--tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
--thick Render thick 3D lines [true]
--thin Render thin 3D lines [true]
--threads Use POSIX threads for 3D rendering [true]
--toolbar Show 3D toolbar in PDF output [true]
--s,-translate Show translated virtual machine code [false]
--twice Run LaTeX twice (to resolve references) [false]
--twosided Use two-sided 3D lighting model for rendering [true]
--u,-user string General purpose user string
--v,-verbose Increase verbosity level (can specify multiple times) [0]
--version Show version; command-line only
--wait Wait for child processes to finish before exiting [false]
--warn string Enable warning; command-line only
--where Show where listed variables are declared [false]
--zoomfactor factor Zoom step factor [1.05]
--zoomstep step Mouse motion zoom step [0.1]
+-V,-View View output; command-line only
+-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C]
+-antialias n Antialiasing width for rasterized output [2]
+-arcballradius pixels Arcball radius [750]
+-auto3D Automatically activate 3D scene [true]
+-autobillboard 3D labels always face viewer by default [true]
+-autoimport string Module to automatically import
+-autoplain Enable automatic importing of plain [true]
+-autoplay Autoplay 3D animations [false]
+-autorotate Enable automatic PDF page rotation [false]
+-batchMask Mask fpu exceptions in batch mode [false]
+-batchView View output in batch mode [false]
+-bw Convert all colors to black and white [false]
+-cd directory Set current directory; command-line only
+-cmyk Convert rgb colors to cmyk [false]
+-c,-command string Command to autoexecute
+-compact Conserve memory at the expense of speed [false]
+-d,-debug Enable debugging messages [false]
+-divisor n Garbage collect using purge(divisor=n) [2]
+-doubleclick ms Emulated double-click timeout [200]
+-embed Embed rendered preview image [true]
+-exitonEOF Exit interactive mode on EOF [true]
+-fitscreen Fit rendered image to screen [true]
+-framedelay ms Additional frame delay [0]
+-framerate frames/s Animation speed [30]
+-globalwrite Allow write to other directory [false]
+-gray Convert all colors to grayscale [false]
+-h,-help Show summary of options; command-line only
+-historylines n Retain n lines of history [1000]
+-iconify Iconify rendering window [false]
+-inlineimage Generate inline embedded image [false]
+-inlinetex Generate inline TeX code [false]
+-interactiveMask Mask fpu exceptions in interactive mode [true]
+-interactiveView View output in interactive mode [true]
+-interactiveWrite Write expressions entered at the prompt to stdout [true]
+-k,-keep Keep intermediate files [false]
+-keepaux Keep intermediate LaTeX .aux files [false]
+-level n Postscript level [3]
+-l,-listvariables List available global functions and variables [false]
+-localhistory Use a local interactive history file [false]
+-loop Loop 3D animations [false]
+-m,-mask Mask fpu exceptions; command-line only
+-maxtile pair Maximum rendering tile size [(0,0)]
+-maxviewport pair Maximum viewport size [(2048,2048)]
+-multiline Input code over multiple lines at the prompt [false]
+-multipleView View output from multiple batch-mode files [false]
+-multisample n Multisampling width for screen images [4]
+-O,-offset pair PostScript offset [(0,0)]
+-f,-outformat format Convert each output file to specified format
+-o,-outname name Alternative output directory/filename
+-p,-parseonly Parse file [false]
+-pdfreload Automatically reload document in pdfviewer [false]
+-pdfreloaddelay usec Delay before attempting initial pdf reload [750000]
+-position pair Initial 3D rendering screen position [(0,0)]
+-prc Embed 3D PRC graphics in PDF output [true]
+-prompt string Prompt [> ]
+-prompt2 string Continuation prompt for multiline input [..]
+-q,-quiet Suppress welcome message [false]
+-render n Render 3D graphics using n pixels per bp (-1=auto) [-1]
+-resizestep step Resize step [1.2]
+-reverse reverse 3D animations [false]
+-rgb Convert cmyk colors to rgb [false]
+-safe Disable system call [true]
+-scroll n Scroll standard output n lines at a time [0]
+-spinstep deg/s Spin speed [60]
+-svgemulation Emulate unimplemented SVG shading [false]
+-tabcompletion Interactive prompt auto-completion [true]
+-tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
+-thick Render thick 3D lines [true]
+-thin Render thin 3D lines [true]
+-threads Use POSIX threads for 3D rendering [true]
+-toolbar Show 3D toolbar in PDF output [true]
+-s,-translate Show translated virtual machine code [false]
+-twice Run LaTeX twice (to resolve references) [false]
+-twosided Use two-sided 3D lighting model for rendering [true]
+-u,-user string General purpose user string
+-v,-verbose Increase verbosity level (can specify multiple times) [0]
+-version Show version; command-line only
+-wait Wait for child processes to finish before exiting [false]
+-warn string Enable warning; command-line only
+-where Show where listed variables are declared [false]
+-zoomfactor factor Zoom step factor [1.05]
+-zoomstep step Mouse motion zoom step [0.1]
All boolean options can be negated by prepending `no' to the option
name.
@@ -8397,7 +8462,7 @@ Index
(line 14)
* -- <1>: Self & prefix operators.
(line 6)
-* --: Tutorial. (line 125)
+* --: Tutorial. (line 127)
* ---: Bezier curves. (line 83)
* -=: Self & prefix operators.
(line 6)
@@ -8406,7 +8471,7 @@ Index
* -u: Options. (line 183)
* -V <1>: Tutorial. (line 19)
* -V: Configuring. (line 6)
-* ..: Tutorial. (line 125)
+* ..: Tutorial. (line 127)
* .asy: Search paths. (line 13)
* /: Arithmetic & logical.
(line 20)
@@ -8415,7 +8480,7 @@ Index
* 2D graphs: graph. (line 6)
* 3D graphs: graph3. (line 6)
* 3D grids: grid3. (line 6)
-* 3D PostScript: three. (line 570)
+* 3D PostScript: three. (line 576)
* 3D rendering: Compiling from UNIX source.
(line 16)
* :: Arithmetic & logical.
@@ -8438,7 +8503,7 @@ Index
(line 28)
* ^=: Self & prefix operators.
(line 6)
-* ^^: Tutorial. (line 132)
+* ^^: Tutorial. (line 134)
* a4: Configuring. (line 61)
* abort: Data types. (line 322)
* abs <1>: Mathematical functions.
@@ -8464,18 +8529,18 @@ Index
(line 48)
* Airy: Mathematical functions.
(line 48)
-* alias <1>: Arrays. (line 186)
+* alias <1>: Arrays. (line 187)
* alias: Structures. (line 52)
* align: Options. (line 167)
* Align: label. (line 12)
-* all: Arrays. (line 334)
+* all: Arrays. (line 335)
* Allow: Pens. (line 327)
* AND: Arithmetic & logical.
(line 80)
* and: Bezier curves. (line 56)
* angle: Data types. (line 68)
* animate <1>: animation. (line 12)
-* animate <2>: Files. (line 150)
+* animate <2>: Files. (line 154)
* animate: Configuring. (line 67)
* animation: animation. (line 6)
* annotate: annotate. (line 6)
@@ -8505,7 +8570,7 @@ Index
* arrow: label. (line 72)
* Arrow: draw. (line 26)
* arrow: Drawing commands. (line 31)
-* arrow keys: Tutorial. (line 35)
+* arrow keys: Tutorial. (line 37)
* Arrow3: three. (line 543)
* Arrows: draw. (line 26)
* arrows: draw. (line 26)
@@ -8523,6 +8588,7 @@ Index
* asy: Import. (line 102)
* asy-mode: Editing modes. (line 6)
* asy.vim: Editing modes. (line 33)
+* asyinclude: LaTeX usage. (line 44)
* asymptote.sty: LaTeX usage. (line 6)
* asymptote.xml: Editing modes. (line 49)
* ASYMPTOTE_CONFIG: Options. (line 114)
@@ -8536,7 +8602,7 @@ Index
(line 6)
* atleast: Bezier curves. (line 56)
* attach <1>: graph. (line 415)
-* attach: LaTeX usage. (line 46)
+* attach: LaTeX usage. (line 49)
* autoadjust: three. (line 354)
* autoimport: Options. (line 110)
* automatic scaling: graph. (line 682)
@@ -8582,11 +8648,11 @@ Index
* Bi_deriv: Mathematical functions.
(line 48)
* Billboard: three. (line 472)
-* binary format: Files. (line 70)
+* binary format: Files. (line 74)
* binary operators: Arithmetic & logical.
(line 6)
* binarytree: binarytree. (line 6)
-* binput: Files. (line 70)
+* binput: Files. (line 74)
* black stripes: three. (line 210)
* Blank: draw. (line 26)
* block.bottom: flowchart. (line 19)
@@ -8609,10 +8675,10 @@ Index
* BottomView: three. (line 381)
* bounding box: Frames and pictures. (line 168)
* Bounds: graph3. (line 20)
-* boutput: Files. (line 70)
+* boutput: Files. (line 74)
* box <1>: three. (line 305)
* box: Frames and pictures. (line 22)
-* bp: Tutorial. (line 24)
+* bp: Tutorial. (line 26)
* break: Programming. (line 29)
* breakpoints: Debugger. (line 21)
* brick: Pens. (line 251)
@@ -8648,11 +8714,11 @@ Index
* CJK: unicode. (line 12)
* clamped: graph. (line 37)
* clear <1>: Debugger. (line 23)
-* clear: Files. (line 88)
+* clear: Files. (line 92)
* clip: fill. (line 111)
* CLZ: Arithmetic & logical.
(line 80)
-* cm: Tutorial. (line 61)
+* cm: Tutorial. (line 63)
* cmd: Configuring. (line 34)
* cmyk: Pens. (line 34)
* colatitude: Data types. (line 129)
@@ -8662,16 +8728,16 @@ Index
* coloredSegments: tube. (line 25)
* colorless: Pens. (line 54)
* colors: Pens. (line 51)
-* comma: Files. (line 58)
-* comma-separated-value mode: Arrays. (line 367)
+* comma: Files. (line 60)
+* comma-separated-value mode: Arrays. (line 368)
* command-line options <1>: Options. (line 6)
* command-line options: Configuring. (line 83)
* comment character: Files. (line 15)
-* compass directions: Tutorial. (line 104)
+* compass directions: Tutorial. (line 106)
* Compiling from UNIX source: Compiling from UNIX source.
(line 6)
-* complement: Arrays. (line 149)
-* concat: Arrays. (line 182)
+* complement: Arrays. (line 150)
+* concat: Arrays. (line 183)
* conditional <1>: Arithmetic & logical.
(line 73)
* conditional: Programming. (line 8)
@@ -8691,11 +8757,11 @@ Index
* controlSpecifier: Paths and guides. (line 379)
* convert <1>: Options. (line 142)
* convert <2>: animation. (line 6)
-* convert <3>: Files. (line 150)
+* convert <3>: Files. (line 154)
* convert: Configuring. (line 67)
* convertOptions: Options. (line 129)
* Coons shading: fill. (line 74)
-* copy: Arrays. (line 173)
+* copy: Arrays. (line 174)
* Cos: Mathematical functions.
(line 20)
* cos: Mathematical functions.
@@ -8709,10 +8775,10 @@ Index
* cross: Data types. (line 167)
* crossframe: markers. (line 23)
* crosshatch: Pens. (line 267)
-* csv: Arrays. (line 367)
+* csv: Arrays. (line 368)
* CTZ: Arithmetic & logical.
(line 80)
-* cubicroots: Arrays. (line 323)
+* cubicroots: Arrays. (line 324)
* curl <1>: three. (line 6)
* curl: Bezier curves. (line 63)
* curlSpecifier: Paths and guides. (line 391)
@@ -8724,7 +8790,7 @@ Index
* custom tick locations: graph. (line 249)
* cut: Paths and guides. (line 237)
* cycle <1>: three. (line 6)
-* cycle: Tutorial. (line 73)
+* cycle: Tutorial. (line 75)
* cyclic <1>: three. (line 502)
* cyclic <2>: Arrays. (line 39)
* cyclic: Paths and guides. (line 74)
@@ -8751,11 +8817,11 @@ Index
(line 17)
* degrees: Data types. (line 73)
* delete <1>: Arrays. (line 39)
-* delete: Files. (line 145)
+* delete: Files. (line 149)
* description: Description. (line 6)
-* diagonal: Arrays. (line 308)
+* diagonal: Arrays. (line 309)
* diamond: flowchart. (line 57)
-* dimension: Arrays. (line 372)
+* dimension: Arrays. (line 373)
* dir <1>: three. (line 502)
* dir <2>: Paths and guides. (line 98)
* dir <3>: Data types. (line 85)
@@ -8766,7 +8832,9 @@ Index
* dirtime: Paths and guides. (line 152)
* display: Configuring. (line 67)
* do: Programming. (line 29)
-* dot <1>: Arrays. (line 264)
+* DOSendl: Files. (line 60)
+* DOSnewl: Files. (line 60)
+* dot <1>: Arrays. (line 265)
* dot <2>: Data types. (line 98)
* dot: draw. (line 83)
* DotMargin: draw. (line 42)
@@ -8775,7 +8843,7 @@ Index
* DotMargins3: three. (line 559)
* dotted: Pens. (line 95)
* double deferred drawing: three. (line 256)
-* double precision: Files. (line 70)
+* double precision: Files. (line 74)
* Draw: Frames and pictures. (line 147)
* draw: draw. (line 110)
* Draw: draw. (line 26)
@@ -8788,7 +8856,7 @@ Index
* dvisvgm: Configuring. (line 67)
* E <1>: Mathematical functions.
(line 48)
-* E: Tutorial. (line 104)
+* E: Tutorial. (line 106)
* Editing modes: Editing modes. (line 6)
* Ei: Mathematical functions.
(line 48)
@@ -8809,7 +8877,7 @@ Index
* EndBar3: three. (line 543)
* EndDotMargin: draw. (line 42)
* EndDotMargin3: three. (line 559)
-* endl: Files. (line 58)
+* endl: Files. (line 60)
* EndMargin: draw. (line 42)
* EndMargin3: three. (line 559)
* EndPenMargin: draw. (line 42)
@@ -8818,15 +8886,15 @@ Index
* EndPoint: label. (line 57)
* envelope: Frames and pictures. (line 22)
* environment variables: Configuring. (line 87)
-* eof <1>: Arrays. (line 349)
-* eof: Files. (line 88)
-* eol <1>: Arrays. (line 349)
-* eol: Files. (line 88)
+* eof <1>: Arrays. (line 350)
+* eof: Files. (line 92)
+* eol <1>: Arrays. (line 350)
+* eol: Files. (line 92)
* EPS <1>: Options. (line 142)
* EPS: label. (line 80)
* erase <1>: Frames and pictures. (line 7)
* erase <2>: Data types. (line 239)
-* erase: Tutorial. (line 35)
+* erase: Tutorial. (line 37)
* erf: Mathematical functions.
(line 6)
* erfc: Mathematical functions.
@@ -8836,7 +8904,7 @@ Index
* errorbars: graph. (line 484)
* eval: Import. (line 98)
* evenodd <1>: Pens. (line 152)
-* evenodd: Tutorial. (line 146)
+* evenodd: Tutorial. (line 148)
* exit <1>: Debugger. (line 57)
* exit <2>: Interactive mode. (line 59)
* exit: Data types. (line 331)
@@ -8858,14 +8926,14 @@ Index
(line 48)
* fabs: Mathematical functions.
(line 6)
-* face: three. (line 578)
+* face: three. (line 584)
* factorial: Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
(line 15)
* feynman: feynman. (line 6)
* fft <1>: math. (line 26)
-* fft: Arrays. (line 251)
+* fft: Arrays. (line 252)
* FFTW: Compiling from UNIX source.
(line 58)
* file <1>: Debugger. (line 45)
@@ -8879,7 +8947,7 @@ Index
* FillDraw: draw. (line 26)
* filloutside: fill. (line 27)
* fillrule: Pens. (line 152)
-* find <1>: Arrays. (line 158)
+* find <1>: Arrays. (line 159)
* find: Data types. (line 224)
* firstcut: Paths and guides. (line 247)
* fit: Frames and pictures. (line 103)
@@ -8888,7 +8956,7 @@ Index
* floor: Mathematical functions.
(line 26)
* flowchart: flowchart. (line 6)
-* flush: Files. (line 58)
+* flush: Files. (line 60)
* fmod: Mathematical functions.
(line 6)
* font: Pens. (line 192)
@@ -8917,10 +8985,10 @@ Index
(line 39)
* geometry: geometry. (line 6)
* getc: Files. (line 29)
-* getpair: Files. (line 113)
-* getreal: Files. (line 113)
-* getstring: Files. (line 113)
-* gettriple: Files. (line 113)
+* getpair: Files. (line 117)
+* getreal: Files. (line 117)
+* getstring: Files. (line 117)
+* gettriple: Files. (line 117)
* glOptions <1>: Options. (line 129)
* glOptions: three. (line 210)
* GNU Scientific Library: Mathematical functions.
@@ -8950,7 +9018,7 @@ Index
* guide: Paths and guides. (line 300)
* guide3: three. (line 6)
* hatch: Pens. (line 267)
-* height: LaTeX usage. (line 46)
+* height: LaTeX usage. (line 49)
* help <1>: Debugger. (line 30)
* help <2>: Help. (line 6)
* help: Interactive mode. (line 44)
@@ -8960,11 +9028,11 @@ Index
* hex: Data types. (line 280)
* hexidecimal <1>: Pens. (line 59)
* hexidecimal: Data types. (line 280)
-* hidden surface removal: three. (line 578)
+* hidden surface removal: three. (line 584)
* histogram: Mathematical functions.
(line 39)
* history <1>: Interactive mode. (line 59)
-* history: Files. (line 138)
+* history: Files. (line 142)
* historylines: Interactive mode. (line 64)
* HookHead: draw. (line 26)
* HookHead3: three. (line 543)
@@ -8977,7 +9045,7 @@ Index
* i_scaled: Mathematical functions.
(line 48)
* iconic: three. (line 210)
-* identity <1>: Arrays. (line 305)
+* identity <1>: Arrays. (line 306)
* identity <2>: Mathematical functions.
(line 6)
* identity: Transforms. (line 24)
@@ -8993,14 +9061,14 @@ Index
* implicit linear solver: MetaPost. (line 10)
* implicit scaling: Implicit scaling. (line 6)
* import: Import. (line 46)
-* inches: Tutorial. (line 61)
+* inches: Tutorial. (line 63)
* including images: label. (line 80)
* increasing: math. (line 59)
* inheritance: Structures. (line 181)
* initialized: Arrays. (line 39)
* initializers: Variable initializers.
(line 6)
-* inline: LaTeX usage. (line 46)
+* inline: LaTeX usage. (line 49)
* InOutTicks: graph3. (line 34)
* input <1>: Interactive mode. (line 48)
* input: Files. (line 11)
@@ -9031,7 +9099,7 @@ Index
* InTicks: graph3. (line 34)
* intMax: Data types. (line 28)
* intMin: Data types. (line 28)
-* inverse <1>: Arrays. (line 311)
+* inverse <1>: Arrays. (line 312)
* inverse: Transforms. (line 16)
* invert: three. (line 422)
* invisible: Pens. (line 39)
@@ -9044,8 +9112,12 @@ Index
(line 48)
* Kate: Editing modes. (line 49)
* KDE editor: Editing modes. (line 49)
+* keepAspect <1>: LaTeX usage. (line 49)
+* keepAspect: Frames and pictures. (line 54)
* keyboard bindings:: three. (line 169)
* keys: Arrays. (line 39)
+* keyword: Named arguments. (line 37)
+* keyword-only: Named arguments. (line 37)
* keywords: Named arguments. (line 6)
* Korean: unicode. (line 12)
* label: three. (line 466)
@@ -9063,7 +9135,7 @@ Index
* latex: Options. (line 142)
* LaTeX fonts: Pens. (line 192)
* LaTeX usage: LaTeX usage. (line 6)
-* latexmk: LaTeX usage. (line 30)
+* latexmk: LaTeX usage. (line 29)
* latin1: latin1. (line 6)
* latitude: Data types. (line 134)
* latticeshade: fill. (line 32)
@@ -9091,8 +9163,8 @@ Index
* libsigsegv <1>: Help. (line 33)
* libsigsegv: Functions. (line 88)
* limits: graph. (line 636)
-* line: Arrays. (line 349)
-* line mode: Arrays. (line 349)
+* line: Arrays. (line 350)
+* line mode: Arrays. (line 350)
* Linear: graph. (line 682)
* linecap: Pens. (line 129)
* linejoin: Pens. (line 138)
@@ -9119,7 +9191,7 @@ Index
* MacOS X binary distributions: MacOS X binary distributions.
(line 6)
* makepen: Pens. (line 300)
-* map: Arrays. (line 140)
+* map: Arrays. (line 141)
* Margin: draw. (line 42)
* Margin3: three. (line 559)
* margins: three. (line 262)
@@ -9135,7 +9207,7 @@ Index
* mathematical functions: Mathematical functions.
(line 6)
* max <1>: three. (line 502)
-* max <2>: Arrays. (line 230)
+* max <2>: Arrays. (line 231)
* max <3>: Frames and pictures. (line 7)
* max: Paths and guides. (line 264)
* maxbound: Data types. (line 104)
@@ -9156,7 +9228,7 @@ Index
* midpoint: Paths and guides. (line 166)
* MidPoint: label. (line 57)
* min <1>: three. (line 502)
-* min <2>: Arrays. (line 223)
+* min <2>: Arrays. (line 224)
* min <3>: Frames and pictures. (line 7)
* min: Paths and guides. (line 260)
* minbound: Data types. (line 101)
@@ -9164,8 +9236,9 @@ Index
* mintimes: Paths and guides. (line 214)
* miterjoin: Pens. (line 138)
* miterlimit: Pens. (line 147)
-* mm: Tutorial. (line 61)
-* mode: Files. (line 84)
+* mktemp: Files. (line 43)
+* mm: Tutorial. (line 63)
+* mode: Files. (line 88)
* monotonic: graph. (line 37)
* mouse: GUI. (line 6)
* mouse bindings: three. (line 137)
@@ -9174,14 +9247,14 @@ Index
* multisample: three. (line 127)
* multisampling: Compiling from UNIX source.
(line 16)
-* N: Tutorial. (line 104)
-* name: Files. (line 84)
+* N: Tutorial. (line 106)
+* name: Files. (line 88)
* named arguments: Named arguments. (line 6)
* natural: graph. (line 37)
* new <1>: Arrays. (line 109)
* new: Structures. (line 6)
* newframe: Frames and pictures. (line 7)
-* newl: Files. (line 58)
+* newl: Files. (line 60)
* newton: Mathematical functions.
(line 65)
* next: Debugger. (line 42)
@@ -9191,7 +9264,7 @@ Index
* NoFill: draw. (line 26)
* NoMargin: draw. (line 42)
* NoMargin3: three. (line 559)
-* none: Files. (line 58)
+* none: Files. (line 60)
* None: draw. (line 19)
* normal: three. (line 488)
* nosafe: Options. (line 162)
@@ -9247,8 +9320,8 @@ Index
* pack: label. (line 102)
* packing: Rest arguments. (line 30)
* pair <1>: Data types. (line 41)
-* pair: Tutorial. (line 49)
-* pairs: Arrays. (line 247)
+* pair: Tutorial. (line 51)
+* pairs: Arrays. (line 248)
* paperheight: Configuring. (line 61)
* papertype: Configuring. (line 61)
* paperwidth: Configuring. (line 61)
@@ -9262,7 +9335,7 @@ Index
* path: Paths and guides. (line 7)
* path markers: graph. (line 484)
* path3: three. (line 6)
-* path[]: Tutorial. (line 132)
+* path[]: Tutorial. (line 134)
* patterns <1>: patterns. (line 6)
* patterns: Pens. (line 238)
* PDF: Options. (line 142)
@@ -9277,11 +9350,13 @@ Index
* PenMargins2: three. (line 559)
* PenMargins3: three. (line 559)
* periodic: graph. (line 37)
+* perl: LaTeX usage. (line 29)
* perpendicular: geometry. (line 6)
* perspective: three. (line 358)
* picture: Frames and pictures. (line 35)
* picture alignment: Frames and pictures. (line 209)
* piecewisestraight: Paths and guides. (line 81)
+* pixel: three. (line 566)
* Pl: Mathematical functions.
(line 48)
* plain: plain. (line 6)
@@ -9301,11 +9376,11 @@ Index
(line 19)
* postscript: Frames and pictures. (line 271)
* PostScript fonts: Pens. (line 210)
-* PostScript subpath: Tutorial. (line 132)
+* PostScript subpath: Tutorial. (line 134)
* pow10: Mathematical functions.
(line 6)
* prc: three. (line 231)
-* precision: Files. (line 88)
+* precision: Files. (line 92)
* precontrol <1>: three. (line 502)
* precontrol: Paths and guides. (line 128)
* prefix operators: Self & prefix operators.
@@ -9317,15 +9392,15 @@ Index
* psview: Microsoft Windows. (line 16)
* psviewer: Configuring. (line 6)
* psviewerOptions: Options. (line 129)
-* pt: Tutorial. (line 61)
+* pt: Tutorial. (line 63)
* public: Structures. (line 6)
* push: Arrays. (line 39)
* Python usage: Interactive mode. (line 80)
-* quadraticroots: Arrays. (line 314)
+* quadraticroots: Arrays. (line 315)
* quarticroots: math. (line 22)
* quit <1>: Debugger. (line 54)
* quit <2>: Interactive mode. (line 59)
-* quit: Tutorial. (line 35)
+* quit: Tutorial. (line 37)
* quote: Import. (line 116)
* quotient: Arithmetic & logical.
(line 6)
@@ -9341,10 +9416,10 @@ Index
(line 39)
* randMax: Mathematical functions.
(line 39)
-* read: Arrays. (line 390)
+* read: Arrays. (line 391)
* reading: Files. (line 11)
-* reading string arrays: Arrays. (line 359)
-* readline: Files. (line 130)
+* reading string arrays: Arrays. (line 360)
+* readline: Files. (line 134)
* real: Data types. (line 33)
* realDigits: Data types. (line 33)
* realEpsilon: Data types. (line 33)
@@ -9359,7 +9434,7 @@ Index
* reltime: Paths and guides. (line 158)
* remainder: Mathematical functions.
(line 6)
-* rename: Files. (line 147)
+* rename: Files. (line 151)
* render <1>: Options. (line 142)
* render: three. (line 47)
* replace: Data types. (line 252)
@@ -9369,10 +9444,10 @@ Index
* restricted: Structures. (line 6)
* return: Debugger. (line 48)
* reverse <1>: three. (line 502)
-* reverse <2>: Arrays. (line 145)
+* reverse <2>: Arrays. (line 146)
* reverse <3>: Paths and guides. (line 169)
* reverse: Data types. (line 248)
-* rewind: Files. (line 88)
+* rewind: Files. (line 92)
* rfind: Data types. (line 229)
* rgb: Pens. (line 30)
* Riemann zeta function: Mathematical functions.
@@ -9394,10 +9469,10 @@ Index
(line 6)
* runtime imports: Import. (line 98)
* Russian: unicode. (line 7)
-* S: Tutorial. (line 104)
+* S: Tutorial. (line 106)
* safe: Options. (line 162)
* save: Frames and pictures. (line 262)
-* saveline: Files. (line 130)
+* saveline: Files. (line 134)
* scale: three. (line 452)
* Scale: graph. (line 698)
* scale <1>: graph. (line 682)
@@ -9407,21 +9482,21 @@ Index
* scale3: three. (line 449)
* scaled graph: graph. (line 663)
* scientific graph: graph. (line 396)
-* scroll: Files. (line 104)
-* search: Arrays. (line 163)
+* scroll: Files. (line 108)
+* search: Arrays. (line 164)
* search paths: Search paths. (line 6)
* Seascape: Frames and pictures. (line 100)
* secondary axis: graph. (line 813)
* secondaryX: graph. (line 813)
* secondaryY: graph. (line 813)
* seconds: Data types. (line 300)
-* seek: Files. (line 88)
-* seekeof: Files. (line 88)
+* seek: Files. (line 92)
+* seekeof: Files. (line 92)
* segment: math. (line 50)
* segmentation fault: Help. (line 33)
* self operators: Self & prefix operators.
(line 6)
-* sequence: Arrays. (line 127)
+* sequence: Arrays. (line 128)
* settings <1>: Options. (line 114)
* settings: Configuring. (line 23)
* sgn: Mathematical functions.
@@ -9435,7 +9510,7 @@ Index
* showtarget: three. (line 338)
* Si: Mathematical functions.
(line 48)
-* signedint: Files. (line 70)
+* signedint: Files. (line 74)
* SimpleHead: draw. (line 26)
* simplex: simplex. (line 6)
* simpson: Mathematical functions.
@@ -9444,9 +9519,9 @@ Index
(line 20)
* sin: Mathematical functions.
(line 6)
-* single precision: Files. (line 70)
-* singleint: Files. (line 70)
-* singlereal: Files. (line 70)
+* single precision: Files. (line 74)
+* singleint: Files. (line 74)
+* singlereal: Files. (line 74)
* sinh: Mathematical functions.
(line 6)
* SixViews: three. (line 396)
@@ -9467,8 +9542,8 @@ Index
* slopefield: slopefield. (line 6)
* solid: Pens. (line 95)
* solids: solids. (line 9)
-* solve: Arrays. (line 283)
-* sort: Arrays. (line 189)
+* solve: Arrays. (line 284)
+* sort: Arrays. (line 190)
* Spline <1>: graph3. (line 100)
* Spline: graph. (line 34)
* split: Data types. (line 261)
@@ -9481,8 +9556,8 @@ Index
* stack overflow: Functions. (line 88)
* static: Static. (line 6)
* stats: stats. (line 6)
-* stdin: Files. (line 45)
-* stdout: Files. (line 45)
+* stdin: Files. (line 47)
+* stdout: Files. (line 47)
* step: Debugger. (line 39)
* stickframe: markers. (line 16)
* stop: Debugger. (line 10)
@@ -9501,8 +9576,8 @@ Index
* subpictures: Frames and pictures. (line 103)
* substr: Data types. (line 244)
* Subversion: Subversion. (line 6)
-* sum: Arrays. (line 218)
-* superpath: Tutorial. (line 132)
+* sum: Arrays. (line 219)
+* superpath: Tutorial. (line 134)
* Suppress: Pens. (line 331)
* SuppressQuiet: Pens. (line 335)
* surface <1>: graph3. (line 100)
@@ -9510,10 +9585,10 @@ Index
* SVG: Options. (line 142)
* SVN: Subversion. (line 6)
* system <1>: Options. (line 162)
-* system: Files. (line 155)
+* system: Files. (line 159)
* syzygy: syzygy. (line 6)
-* tab: Files. (line 58)
-* tab completion: Tutorial. (line 35)
+* tab: Files. (line 60)
+* tab completion: Tutorial. (line 37)
* Tan: Mathematical functions.
(line 20)
* tan: Mathematical functions.
@@ -9521,7 +9596,7 @@ Index
* tanh: Mathematical functions.
(line 6)
* target: three. (line 338)
-* tell: Files. (line 88)
+* tell: Files. (line 92)
* tension <1>: three. (line 6)
* tension: Bezier curves. (line 56)
* tensionSpecifier: Paths and guides. (line 385)
@@ -9565,12 +9640,12 @@ Index
* transform: Transforms. (line 6)
* transform3: three. (line 432)
* transparency: Pens. (line 222)
-* transpose: Arrays. (line 210)
+* transpose: Arrays. (line 211)
* tree: tree. (line 9)
* trembling: trembling. (line 6)
* triangle: geometry. (line 6)
* triangulate: contour. (line 157)
-* tridiagonal: Arrays. (line 271)
+* tridiagonal: Arrays. (line 272)
* trigonometric integrals: Mathematical functions.
(line 48)
* triple: Data types. (line 108)
@@ -9588,18 +9663,18 @@ Index
* unfill: fill. (line 106)
* UnFill: draw. (line 26)
* unicode: unicode. (line 6)
-* uniform: Arrays. (line 154)
+* uniform: Arrays. (line 155)
* Uninstall: Uninstall. (line 6)
* unique: math. (line 64)
* unit: Data types. (line 78)
* unitbox <1>: three. (line 307)
-* unitbox: Tutorial. (line 153)
+* unitbox: Tutorial. (line 155)
* unitcircle <1>: three. (line 274)
-* unitcircle: Tutorial. (line 126)
+* unitcircle: Tutorial. (line 128)
* unitrand: Mathematical functions.
(line 39)
* unitsize <1>: Frames and pictures. (line 64)
-* unitsize: Tutorial. (line 84)
+* unitsize: Tutorial. (line 86)
* UNIX binary distributions: UNIX binary distributions.
(line 6)
* unpacking: Rest arguments. (line 39)
@@ -9608,7 +9683,7 @@ Index
* update: Files. (line 35)
* UpsideDown: Frames and pictures. (line 95)
* usepackage: Frames and pictures. (line 291)
-* user coordinates: Tutorial. (line 84)
+* user coordinates: Tutorial. (line 86)
* user-defined operators: User-defined operators.
(line 6)
* usleep: Data types. (line 337)
@@ -9619,29 +9694,29 @@ Index
(line 6)
* vectorfield: graph. (line 975)
* vectorfield3: graph3. (line 159)
-* vectorization: Arrays. (line 328)
+* vectorization: Arrays. (line 329)
* verbatim: Frames and pictures. (line 271)
* vertex-dependent colors: three. (line 81)
* Vertical: flowchart. (line 81)
-* viewportheight: LaTeX usage. (line 46)
+* viewportheight: LaTeX usage. (line 49)
* viewportmargin: three. (line 262)
* viewportsize: three. (line 262)
-* viewportwidth: LaTeX usage. (line 46)
+* viewportwidth: LaTeX usage. (line 49)
* views: three. (line 231)
* vim: Editing modes. (line 33)
* virtual functions: Structures. (line 181)
* void: Data types. (line 10)
-* W: Tutorial. (line 104)
+* W: Tutorial. (line 106)
* whatever: Paths and guides. (line 232)
* Wheel: palette. (line 22)
* wheel mouse: GUI. (line 6)
* while: Programming. (line 29)
-* white-space string delimiter mode: Arrays. (line 359)
-* width: LaTeX usage. (line 46)
+* white-space string delimiter mode: Arrays. (line 360)
+* width: LaTeX usage. (line 49)
* windingnumber: Paths and guides. (line 268)
-* word: Arrays. (line 359)
-* write <1>: Arrays. (line 399)
-* write: Files. (line 50)
+* word: Arrays. (line 360)
+* write <1>: Arrays. (line 400)
+* write: Files. (line 52)
* X: three. (line 274)
* xasy: GUI. (line 6)
* xaxis3: graph3. (line 7)
@@ -9649,11 +9724,11 @@ Index
* xelatex: embed. (line 10)
* xequals: graph. (line 294)
* XEquals: graph. (line 280)
-* xinput: Files. (line 70)
+* xinput: Files. (line 74)
* xlimits: graph. (line 636)
* XOR: Arithmetic & logical.
(line 80)
-* xoutput: Files. (line 70)
+* xoutput: Files. (line 74)
* xpart: Data types. (line 89)
* xscale: Transforms. (line 33)
* xscale3: three. (line 440)
@@ -9714,139 +9789,140 @@ Node: UNIX binary distributions11388
Node: MacOS X binary distributions12494
Node: Microsoft Windows13378
Ref: psview14088
-Node: Configuring15009
-Node: Search paths19230
-Node: Compiling from UNIX source20027
-Ref: multisampling20616
-Node: Editing modes23022
-Node: Subversion25454
-Node: Uninstall25917
-Node: Tutorial26267
-Ref: unitcircle30493
-Node: Drawing commands32429
-Node: draw34140
-Ref: arrows35288
-Node: fill40531
-Ref: gradient shading41575
-Node: clip45803
-Node: label46395
-Ref: Label47094
-Node: Bezier curves52819
-Node: Programming56396
-Ref: array iteration57210
-Node: Data types58291
-Ref: format67299
-Node: Paths and guides70902
-Ref: circle71156
-Ref: arctime76644
-Ref: extension80499
-Node: Pens87182
-Ref: fillrule94548
-Ref: basealign95445
-Ref: transparency98271
-Ref: makepen101714
-Ref: overwrite102552
-Node: Transforms103762
-Node: Frames and pictures105553
-Ref: envelope106694
-Ref: size107777
-Ref: unitsize108764
-Ref: shipout109824
-Ref: filltype112157
-Ref: add115294
-Ref: add about116240
-Ref: tex119178
-Node: Files120052
-Ref: cd121017
-Ref: scroll125449
-Node: Variable initializers128522
-Node: Structures131247
-Node: Operators138691
-Node: Arithmetic & logical139005
-Node: Self & prefix operators140979
-Node: User-defined operators141767
-Node: Implicit scaling142678
-Node: Functions143241
-Ref: stack overflow145994
-Node: Default arguments146558
-Node: Named arguments147297
-Node: Rest arguments149459
-Node: Mathematical functions152269
-Node: Arrays156876
-Ref: sort163926
-Ref: tridiagonal166330
-Ref: solve167558
-Node: Slices171751
-Node: Casts175641
-Node: Import177606
-Node: Static182833
-Node: LaTeX usage185727
-Node: Base modules191768
-Node: plain194268
-Node: simplex194920
-Node: math195193
-Node: interpolate197898
-Node: geometry198177
-Node: trembling198771
-Node: stats199122
-Node: patterns199382
-Node: markers199618
-Node: tree201401
-Node: binarytree201589
-Node: drawtree202178
-Node: syzygy202382
-Node: feynman202656
-Node: roundedpath202931
-Node: animation203214
-Ref: animate203631
-Node: embed204770
-Node: slide206373
-Node: MetaPost206713
-Node: unicode207429
-Node: latin1208317
-Node: babel208685
-Node: labelpath208914
-Node: labelpath3209734
-Node: annotate210045
-Node: CAD210516
-Node: graph210826
-Ref: ticks217955
-Ref: pathmarkers231234
-Ref: marker231699
-Ref: markuniform232050
-Ref: errorbars233841
-Ref: automatic scaling237897
-Node: palette248543
-Ref: images248661
-Ref: image252832
-Ref: logimage253310
-Ref: penimage254116
-Node: three254560
-Ref: PostScript3D279102
-Node: obj280794
-Node: graph3281046
-Ref: GaussianSurface286171
-Node: grid3287275
-Node: solids288015
-Node: tube288963
-Node: flowchart291198
-Node: contour295767
-Node: contour3300892
-Node: slopefield301199
-Node: ode302636
-Node: Options302896
-Ref: configuration file308741
-Ref: settings308741
-Ref: convert309942
-Node: Interactive mode312909
-Ref: history315062
-Node: GUI316367
-Node: GUI installation316870
-Node: GUI usage318000
-Node: PostScript to Asymptote318903
-Node: Help319659
-Node: Debugger321395
-Node: Credits323180
-Node: Index324112
+Node: Configuring15020
+Node: Search paths19234
+Node: Compiling from UNIX source20031
+Ref: multisampling20620
+Node: Editing modes23026
+Node: Subversion25458
+Node: Uninstall25921
+Node: Tutorial26271
+Ref: unitcircle30569
+Node: Drawing commands32505
+Node: draw34216
+Ref: arrows35364
+Node: fill40607
+Ref: gradient shading41651
+Node: clip45879
+Node: label46471
+Ref: Label47170
+Node: Bezier curves52895
+Node: Programming56472
+Ref: array iteration57286
+Node: Data types58367
+Ref: format67375
+Node: Paths and guides70978
+Ref: circle71232
+Ref: arctime76720
+Ref: extension80575
+Node: Pens87258
+Ref: fillrule94624
+Ref: basealign95521
+Ref: transparency98347
+Ref: makepen101790
+Ref: overwrite102628
+Node: Transforms103838
+Node: Frames and pictures105629
+Ref: envelope106770
+Ref: size107853
+Ref: unitsize108840
+Ref: shipout109900
+Ref: filltype112233
+Ref: add115370
+Ref: add about116316
+Ref: tex119254
+Node: Files120128
+Ref: cd121093
+Ref: scroll125778
+Node: Variable initializers128851
+Node: Structures131576
+Node: Operators139020
+Node: Arithmetic & logical139334
+Node: Self & prefix operators141308
+Node: User-defined operators142096
+Node: Implicit scaling143007
+Node: Functions143570
+Ref: stack overflow146323
+Node: Default arguments146887
+Node: Named arguments147626
+Node: Rest arguments150197
+Node: Mathematical functions153318
+Node: Arrays157925
+Ref: sort165013
+Ref: tridiagonal167417
+Ref: solve168645
+Node: Slices172838
+Node: Casts176728
+Node: Import178693
+Node: Static183920
+Node: LaTeX usage186814
+Node: Base modules193031
+Node: plain195531
+Node: simplex196183
+Node: math196456
+Node: interpolate199161
+Node: geometry199440
+Node: trembling200034
+Node: stats200385
+Node: patterns200645
+Node: markers200881
+Node: tree202664
+Node: binarytree202852
+Node: drawtree203441
+Node: syzygy203645
+Node: feynman203919
+Node: roundedpath204194
+Node: animation204477
+Ref: animate204894
+Node: embed206033
+Node: slide207636
+Node: MetaPost207976
+Node: unicode208692
+Node: latin1209580
+Node: babel209948
+Node: labelpath210177
+Node: labelpath3210997
+Node: annotate211308
+Node: CAD211779
+Node: graph212089
+Ref: ticks219218
+Ref: pathmarkers232497
+Ref: marker232962
+Ref: markuniform233313
+Ref: errorbars235104
+Ref: automatic scaling239160
+Node: palette249806
+Ref: images249924
+Ref: image254095
+Ref: logimage254573
+Ref: penimage255551
+Ref: penfunctionimage255772
+Node: three256496
+Ref: PostScript3D281241
+Node: obj282933
+Node: graph3283185
+Ref: GaussianSurface288310
+Node: grid3289414
+Node: solids290154
+Node: tube291102
+Node: flowchart293337
+Node: contour297906
+Node: contour3303031
+Node: slopefield303338
+Node: ode304775
+Node: Options305035
+Ref: configuration file310963
+Ref: settings310963
+Ref: convert312164
+Node: Interactive mode315131
+Ref: history317284
+Node: GUI318589
+Node: GUI installation319092
+Node: GUI usage320222
+Node: PostScript to Asymptote321125
+Node: Help321881
+Node: Debugger323617
+Node: Credits325402
+Node: Index326334

End Tag Table
diff --git a/Build/source/utils/asymptote/doc/square.asy b/Build/source/utils/asymptote/doc/square.asy
index 1bff4e438f5..6fd9d2314d7 100644
--- a/Build/source/utils/asymptote/doc/square.asy
+++ b/Build/source/utils/asymptote/doc/square.asy
@@ -1,2 +1,2 @@
-size(100,100);
+size(3cm);
draw((0,0)--(1,0)--(1,1)--(0,1)--cycle);
diff --git a/Build/source/utils/asymptote/drawgroup.h b/Build/source/utils/asymptote/drawgroup.h
index 8cc2cedaa47..6449f6cd08f 100644
--- a/Build/source/utils/asymptote/drawgroup.h
+++ b/Build/source/utils/asymptote/drawgroup.h
@@ -41,8 +41,6 @@ class drawBegin3 : public drawElement {
triple center;
int interaction;
-
- groupmap *g;
public:
drawBegin3(string name, double compression, double granularity,
bool closed, bool tessellate, bool dobreak, bool nobreak,
diff --git a/Build/source/utils/asymptote/drawimage.h b/Build/source/utils/asymptote/drawimage.h
index 1f2c28175a0..09cf1aaf6ba 100644
--- a/Build/source/utils/asymptote/drawimage.h
+++ b/Build/source/utils/asymptote/drawimage.h
@@ -13,26 +13,13 @@
namespace camp {
-enum imagetype {PALETTE, NOPALETTE, RAW};
-
class drawImage : public drawElement {
- vm::array image,palette;
- unsigned char *raw; // For internal use; not buffered, may be overwritten.
- size_t width,height;
+protected:
transform t;
bool antialias;
- imagetype type;
public:
- drawImage(const vm::array& image, const vm::array& palette,
- const transform& t, bool antialias, imagetype type=PALETTE)
- : image(image), palette(palette), t(t), antialias(antialias), type(type) {}
-
- drawImage(const vm::array& image, const transform& t, bool antialias)
- : image(image), t(t), antialias(antialias), type(NOPALETTE) {}
- drawImage(unsigned char *raw, size_t width, size_t height, const transform& t,
- bool antialias)
- : raw(raw), width(width), height(height), t(t), antialias(antialias),
- type(RAW) {}
+ drawImage(const transform& t, bool antialias)
+ : t(t), antialias(antialias) {}
virtual ~drawImage() {}
@@ -41,31 +28,99 @@ public:
b += t*pair(1,1);
}
+ bool svg() {return true;}
+ bool svgpng() {return true;}
+};
+
+class drawPaletteImage : public drawImage {
+ vm::array image;
+ vm::array palette;
+public:
+ drawPaletteImage(const vm::array& image, const vm::array& palette,
+ const transform& t, bool antialias)
+ : drawImage(t,antialias), image(image), palette(palette) {}
+
+ virtual ~drawPaletteImage() {}
+
bool draw(psfile *out) {
out->gsave();
out->concat(t);
- switch(type) {
- case PALETTE:
- out->image(image,palette,antialias);
- break;
- case NOPALETTE:
- out->image(image,antialias);
- break;
- case RAW:
- out->rawimage(raw,width,height,antialias);
- break;
- }
+ out->image(image,palette,antialias);
out->grestore();
return true;
}
- bool svg() {return true;}
- bool svgpng() {return true;}
+ drawElement *transformed(const transform& T) {
+ return new drawPaletteImage(image,palette,T*t,antialias);
+ }
+};
+
+class drawNoPaletteImage : public drawImage {
+ vm::array image;
+public:
+ drawNoPaletteImage(const vm::array& image, const transform& t, bool antialias)
+ : drawImage(t,antialias), image(image) {}
+
+ virtual ~drawNoPaletteImage() {}
+
+ bool draw(psfile *out) {
+ out->gsave();
+ out->concat(t);
+ out->image(image,antialias);
+ out->grestore();
+ return true;
+ }
+
+ drawElement *transformed(const transform& T) {
+ return new drawNoPaletteImage(image,T*t,antialias);
+ }
+};
+
+class drawFunctionImage : public drawImage {
+ vm::array image;
+ vm::stack *Stack;
+ vm::callable *f;
+ Int width, height;
+public:
+ drawFunctionImage(vm::stack *Stack, vm::callable *f, Int width, Int height,
+ const transform& t, bool antialias)
+ : drawImage(t,antialias), image(image), Stack(Stack), f(f),
+ width(width), height(height) {}
+
+ virtual ~drawFunctionImage() {}
+
+ bool draw(psfile *out) {
+ out->gsave();
+ out->concat(t);
+ out->image(Stack,f,width,height,antialias);
+ out->grestore();
+ return true;
+ }
drawElement *transformed(const transform& T) {
- return new drawImage(image,palette,T*t,antialias,type);
+ return new drawFunctionImage(Stack,f,width,height,T*t,antialias);
+ }
+};
+
+class drawRawImage : public drawImage {
+ unsigned char *raw; // For internal use; not buffered, may be overwritten.
+ size_t width,height;
+ bool antialias;
+public:
+ drawRawImage(unsigned char *raw, size_t width, size_t height,
+ const transform& t, bool antialias)
+ : drawImage(t,antialias), raw(raw), width(width), height(height) {}
+
+ virtual ~drawRawImage() {}
+
+ bool draw(psfile *out) {
+ out->gsave();
+ out->concat(t);
+ out->rawimage(raw,width,height,antialias);
+ out->grestore();
+ return true;
}
};
diff --git a/Build/source/utils/asymptote/drawlabel.cc b/Build/source/utils/asymptote/drawlabel.cc
index 484ecf3cb89..c9cb8636e82 100644
--- a/Build/source/utils/asymptote/drawlabel.cc
+++ b/Build/source/utils/asymptote/drawlabel.cc
@@ -39,6 +39,7 @@ int wait(iopipestream &tex, const char *s, const char **abort,
tex << "\n";
tex.wait(s,abort);
}
+
if(!ignore) {
string s=tex.message();
tex.shred();
@@ -49,65 +50,56 @@ int wait(iopipestream &tex, const char *s, const char **abort,
return rc;
}
+// Reads one of the dimensions from the pipe.
+void texdim(iopipestream& tex, double& dest,
+ const string command, const string name,
+ const char **abort)
+{
+ string texbuf;
+
+ tex << ("\\showthe\\" + command + "\\ASYbox\n");
+ tex >> texbuf;
+
+ string cannotread="Cannot read label "+name;
+
+ if (texbuf[0] == '>' && texbuf[1] == ' ')
+ try {
+ dest=lexical::cast<double>(texbuf.c_str()+2,true)*tex2ps;
+ } catch(lexical::bad_cast&) {
+ reportError(cannotread);
+ }
+ else
+ reportError(cannotread);
+
+ tex << "\n";
+ wait(tex,"\n*",abort);
+}
+
bool texbounds(double& width, double& height, double& depth,
iopipestream& tex, string& s, const char **abort, bool warn,
bool Inline)
{
string texbuf;
+
tex << "\\setbox\\ASYbox=\\hbox{" << stripblanklines(s) << "}\n\n";
int rc=wait(tex,texready.c_str(),abort,Inline);
if(rc) {
tex << "\\show 0\n";
tex.wait("\n*");
- if(warn) {
- if(getSetting<bool>("debug")) {
- ostringstream buf;
- buf << "Cannot determine size of label \"" << s << "\"";
- reportWarning(buf);
- }
- return false;
+
+ if(warn && getSetting<bool>("debug")) {
+ ostringstream buf;
+ buf << "Cannot determine size of label \"" << s << "\"";
+ reportWarning(buf);
}
+
return false;
}
- tex << "\\showthe\\wd\\ASYbox\n";
- tex >> texbuf;
-
- string cannotread="Cannot read label ";
- if(texbuf[0] == '>' && texbuf[1] == ' ')
- try {
- width=lexical::cast<double>(texbuf.c_str()+2,true)*tex2ps;
- } catch(lexical::bad_cast&) {
- reportError(cannotread+"width");
- }
- else reportError(cannotread+"width");
- tex << "\n";
- wait(tex,"\n*",abort);
-
- tex << "\\showthe\\ht\\ASYbox\n";
- tex >> texbuf;
- if(texbuf[0] == '>' && texbuf[1] == ' ')
- try {
- height=lexical::cast<double>(texbuf.c_str()+2,true)*tex2ps;
- } catch(lexical::bad_cast&) {
- reportError(cannotread+"height");
- }
- else reportError(cannotread+"height");
- tex << "\n";
- wait(tex,"\n*",abort);
-
- tex << "\\showthe\\dp\\ASYbox\n";
- tex >> texbuf;
- if(texbuf[0] == '>' && texbuf[1] == ' ')
- try {
- depth=lexical::cast<double>(texbuf.c_str()+2,true)*tex2ps;
- } catch(lexical::bad_cast&) {
- reportError(cannotread+"depth");
- }
- else reportError(cannotread+"depth");
- tex << "\n";
- wait(tex,"\n*",abort);
-
+ texdim(tex, width, "wd", "width", abort);
+ texdim(tex, height, "ht", "height", abort);
+ texdim(tex, depth, "dp", "depth", abort);
+
return true;
}
diff --git a/Build/source/utils/asymptote/drawsurface.cc b/Build/source/utils/asymptote/drawsurface.cc
index 9cf80479c3c..dcf05c509fc 100644
--- a/Build/source/utils/asymptote/drawsurface.cc
+++ b/Build/source/utils/asymptote/drawsurface.cc
@@ -24,6 +24,14 @@ void storecolor(GLfloat *colors, int i, const vm::array &pens, int j)
colors[i+2]=p.blue();
colors[i+3]=p.opacity();
}
+
+void storecolor(GLfloat *colors, int i, const RGBAColour& p)
+{
+ colors[i]=p.R;
+ colors[i+1]=p.G;
+ colors[i+2]=p.B;
+ colors[i+3]=p.A;
+}
#endif
void drawSurface::bounds(bbox3& b)
@@ -128,11 +136,14 @@ bool drawSurface::write(prcfile *out, unsigned int *, array *, array *, double,
PRCmaterial m(ambient,diffuse,emissive,specular,opacity,PRCshininess);
- if(straight)
- out->addRectangle(vertices,m);
- else
+ if(straight) {
+ if(colors)
+ out->addQuad(vertices,colors);
+ else
+ out->addRectangle(vertices,m);
+ } else
out->addPatch(controls,m);
-
+
return true;
}
@@ -201,8 +212,9 @@ void drawSurface::render(GLUnurbs *nurb, double size2,
double perspective, bool transparent)
{
#ifdef HAVE_GL
- if(invisible || ((colors ? colors[3]+colors[7]+colors[11]+colors[15] < 4.0
- : diffuse.A < 1.0) ^ transparent)) return;
+ if(invisible ||
+ ((colors ? colors[0].A+colors[1].A+colors[2].A+colors[3].A < 4.0 :
+ diffuse.A < 1.0) ^ transparent)) return;
double s;
static GLfloat Normal[3];
@@ -297,6 +309,10 @@ void drawSurface::render(GLUnurbs *nurb, double size2,
bool havenormal=normal != zero;
if(havebillboard) BB.init();
+ if(colors)
+ for(size_t i=0; i < 4; ++i)
+ storecolor(v,4*i,colors[i]);
+
if(!havenormal || (!straight && fraction(d,size3)*size2 >= pixel)) {
if(lighton) {
if(havenormal && fraction(dperp,size3)*size2 <= 0.1) {
@@ -324,12 +340,12 @@ void drawSurface::render(GLUnurbs *nurb, double size2,
gluNurbsSurface(nurb,8,bezier,8,bezier,12,3,Controls,4,4,GL_MAP2_VERTEX_3);
if(colors) {
static GLfloat linear[]={0.0,0.0,1.0,1.0};
- gluNurbsSurface(nurb,4,linear,4,linear,8,4,colors,2,2,GL_MAP2_COLOR_4);
+ gluNurbsSurface(nurb,4,linear,4,linear,8,4,v,2,2,GL_MAP2_COLOR_4);
}
gluEndSurface(nurb);
} else {
- GLfloat Vertices[12];
+ static GLfloat Vertices[12];
if(havebillboard) {
for(size_t i=0; i < 4; ++i)
@@ -348,16 +364,16 @@ void drawSurface::render(GLUnurbs *nurb, double size2,
if(lighton)
glNormal3fv(Normal);
if(colors)
- glColor4fv(colors);
+ glColor4fv(v);
glVertex3fv(Vertices);
if(colors)
- glColor4fv(colors+8);
+ glColor4fv(v+8);
glVertex3fv(Vertices+6);
if(colors)
- glColor4fv(colors+12);
+ glColor4fv(v+12);
glVertex3fv(Vertices+9);
if(colors)
- glColor4fv(colors+4);
+ glColor4fv(v+4);
glVertex3fv(Vertices+3);
glEnd();
}
@@ -504,11 +520,9 @@ void drawNurbs::render(GLUnurbs *nurb, double size2,
triple m=B.Min();
triple M=B.Max();
- double s;
if(perspective) {
double f=m.getz()*perspective;
double F=M.getz()*perspective;
- s=max(f,F);
if(M.getx() < min(f*Min.getx(),F*Min.getx()) ||
m.getx() > max(f*Max.getx(),F*Max.getx()) ||
M.gety() < min(f*Min.gety(),F*Min.gety()) ||
@@ -516,7 +530,6 @@ void drawNurbs::render(GLUnurbs *nurb, double size2,
M.getz() < Min.getz() ||
m.getz() > Max.getz()) return;
} else {
- s=1.0;
if(M.getx() < Min.getx() || m.getx() > Max.getx() ||
M.gety() < Min.gety() || m.gety() > Max.gety() ||
M.getz() < Min.getz() || m.getz() > Max.getz()) return;
@@ -765,4 +778,48 @@ bool drawTube::write(prcfile *out, unsigned int *, array *, array *, double,
return true;
}
+bool drawPixel::write(prcfile *out, unsigned int *, array *, array *, double,
+ groupsmap&)
+{
+ if(invisible)
+ return true;
+
+ out->addPoint(v,c,width);
+
+ return true;
+}
+
+void drawPixel::render(GLUnurbs *nurb, double size2,
+ const triple& Min, const triple& Max,
+ double perspective, bool transparent)
+{
+#ifdef HAVE_GL
+ if(invisible)
+ return;
+
+ static GLfloat V[4];
+
+ glEnable(GL_COLOR_MATERIAL);
+ glColorMaterial(GL_FRONT_AND_BACK,GL_EMISSION);
+
+ static GLfloat Black[]={0,0,0,1};
+ glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,Black);
+ glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT,Black);
+ glMaterialfv(GL_FRONT_AND_BACK,GL_SPECULAR,Black);
+ glMaterialf(GL_FRONT_AND_BACK,GL_SHININESS,0.0);
+
+ glPointSize(1.0+width);
+
+ glBegin(GL_POINT);
+ storecolor(V,0,c);
+ glColor4fv(V);
+ store(V,v);
+ glVertex3fv(V);
+ glEnd();
+
+ glPointSize(1.0);
+ glDisable(GL_COLOR_MATERIAL);
+#endif
+}
+
} //namespace camp
diff --git a/Build/source/utils/asymptote/drawsurface.h b/Build/source/utils/asymptote/drawsurface.h
index 2a42e110567..c2c71578e82 100644
--- a/Build/source/utils/asymptote/drawsurface.h
+++ b/Build/source/utils/asymptote/drawsurface.h
@@ -49,6 +49,7 @@ protected:
RGBAColour ambient;
RGBAColour emissive;
RGBAColour specular;
+ RGBAColour *colors;
double opacity;
double shininess;
double PRCshininess;
@@ -61,7 +62,6 @@ protected:
bool prc;
#ifdef HAVE_GL
- GLfloat *colors;
triple d; // Maximum deviation of surface from a quadrilateral.
triple dperp;
#endif
@@ -110,17 +110,15 @@ public:
emissive=rgba(vm::read<camp::pen>(p,2));
specular=rgba(vm::read<camp::pen>(p,3));
-#ifdef HAVE_GL
int size=checkArray(&pens);
if(size > 0) {
if(size != 4) reportError(wrongsize);
- colors=new(UseGC) GLfloat[16];
- storecolor(colors,0,pens,0);
- storecolor(colors,8,pens,1);
- storecolor(colors,12,pens,2);
- storecolor(colors,4,pens,3);
+ colors=new(UseGC) RGBAColour[4];
+ colors[0]=rgba(vm::read<camp::pen>(pens,0));
+ colors[1]=rgba(vm::read<camp::pen>(pens,3));
+ colors[2]=rgba(vm::read<camp::pen>(pens,1));
+ colors[3]=rgba(vm::read<camp::pen>(pens,2));
} else colors=NULL;
-#endif
}
drawSurface(const vm::array& t, const drawSurface *s) :
@@ -146,13 +144,13 @@ public:
#ifdef HAVE_GL
center=run::operator *(t,s->center);
normal=run::multshiftless(t,s->normal);
+#endif
if(s->colors) {
- colors=new(UseGC) GLfloat[16];
- for(size_t i=0; i < 16; ++i)
+ colors=new(UseGC) RGBAColour[4];
+ for(size_t i=0; i < 4; ++i)
colors[i]=s->colors[i];
} else colors=NULL;
-#endif
}
bool is3D() {return true;}
@@ -347,8 +345,7 @@ public:
}
#endif
- void render(GLUnurbs *nurb, double size2,
- const triple& Min, const triple& Max,
+ void render(GLUnurbs *nurb, double size2, const triple& Min, const triple& Max,
double perspective, bool transparent);
drawElement *transformed(const vm::array& t);
@@ -532,6 +529,45 @@ public:
}
};
+// Draw a PRC pixel.
+class drawPixel : public drawElement {
+ Triple v;
+ RGBAColour c;
+ double width;
+ bool invisible;
+public:
+ drawPixel(const triple& v0, const pen& p, double width) :
+ c(rgba(p)), width(width) {
+ store(v,v0);
+ invisible=p.invisible();
+ }
+
+ drawPixel(const vm::array& t, const drawPixel *s) :
+ c(s->c), width(s->width), invisible(s->invisible) {
+ triple V=run::operator *(t,triple(s->v[0],s->v[1],s->v[2]));
+ v[0]=V.getx();
+ v[1]=V.gety();
+ v[2]=V.getz();
+ }
+
+ void bounds(bbox3& b) {
+ triple R=0.5*width*triple(1.0,1.0,1.0);
+ b.add(v-R);
+ b.add(v+R);
+ }
+
+ void render(GLUnurbs *nurb, double size2, const triple& Min, const triple& Max,
+
+ double perspective, bool transparent);
+
+ bool write(prcfile *out, unsigned int *, vm::array *, vm::array *, double,
+ groupsmap&);
+
+ drawElement *transformed(const vm::array& t) {
+ return new drawPixel(t,this);
+ }
+};
+
}
#endif
diff --git a/Build/source/utils/asymptote/entry.cc b/Build/source/utils/asymptote/entry.cc
index d133571f136..e2c27681c39 100644
--- a/Build/source/utils/asymptote/entry.cc
+++ b/Build/source/utils/asymptote/entry.cc
@@ -485,12 +485,10 @@ void core_venv::remove(symbol name, const ty *t) {
}
-#ifdef CALLEE_SEARCH
size_t numFormals(ty *t) {
signature *sig = t->getSignature();
return sig ? sig->getNumFormals() : 0;
}
-#endif
void venv::checkName(symbol name)
{
@@ -558,9 +556,7 @@ void venv::namevalue::addType(ty *s) {
#endif
if (t == 0) {
-#if CALLEE_SEARCH
maxFormals = numFormals(s);
-#endif
t = s;
} else {
if (!t->isOverloaded())
@@ -573,11 +569,9 @@ void venv::namevalue::addType(ty *s) {
((overloaded *)t)->add(s);
-#if CALLEE_SEARCH
size_t n = numFormals(s);
if (n > maxFormals)
maxFormals = n;
-#endif
}
RIGHTKIND(t);
@@ -754,7 +748,6 @@ void venv::enter(symbol name, varEntry *v)
varEntry *venv::lookBySignature(symbol name, signature *sig) {
-#ifdef CALLEE_SEARCH
// Rest arguments are complicated and rare. Don't handle them here.
if (sig->hasRest())
return 0;
@@ -769,15 +762,20 @@ varEntry *venv::lookBySignature(symbol name, signature *sig) {
if (nv.maxFormals != sig->getNumFormals())
return 0;
- // At this point, any function with an equivalent an signature will be equal
+ // See if this exactly matches a function in the table.
+ varEntry *ve = core.lookupNonSpecial(name, sig);
+
+ if (!ve)
+ return 0;
+
+ // Keyword-only arguments may cause matching to fail.
+ if (ve->getSignature()->numKeywordOnly > 0)
+ return 0;
+
+ // At this point, any function with an equivalent signature will be equal
// to the result of the normal overloaded function resolution. We may
// safely return it.
- return core.lookupNonSpecial(name, sig);
-
-#else
- // If the optimization is disabled, always return 0.
- return 0;
-#endif
+ return ve;
}
void venv::add(venv& source, varEntry *qualifier, coder &c)
diff --git a/Build/source/utils/asymptote/entry.h b/Build/source/utils/asymptote/entry.h
index c543a5df2c6..0c1441c6a09 100644
--- a/Build/source/utils/asymptote/entry.h
+++ b/Build/source/utils/asymptote/entry.h
@@ -419,12 +419,10 @@ class venv {
};
struct namevalue {
-#ifdef CALLEE_SEARCH
size_t maxFormals;
-#endif
ty *t;
- namevalue() : maxFormals(0), t(0) {}
+ namevalue() : maxFormals(0), t(0) {}
void addType(ty *s);
diff --git a/Build/source/utils/asymptote/env.cc b/Build/source/utils/asymptote/env.cc
index 91edfd41754..09d16f21a04 100644
--- a/Build/source/utils/asymptote/env.cc
+++ b/Build/source/utils/asymptote/env.cc
@@ -1,5 +1,5 @@
/*****
- * env.h
+ * env.cc
* Andy Hammerlindl 2002/6/20
*
* Keeps track of the namespaces of variables and types when traversing
@@ -13,10 +13,6 @@
using namespace types;
-namespace absyntax {
-void clearCachedCalls();
-}
-
namespace trans {
// Instances of this class are passed to types::ty objects so that they can call
@@ -88,7 +84,6 @@ bool protoenv::castable(ty *target, ty *source, symbol name) {
return ct.test(target,source);
}
-#ifdef FASTCAST
bool protoenv::fastCastable(ty *target, ty *source) {
assert(target->kind != types::ty_overloaded);
assert(target->kind != types::ty_error);
@@ -150,7 +145,6 @@ access *protoenv::fastLookupCast(ty *target, ty *source) {
// Fall back on slow routine.
return lookupCast(target, source, symbol::castsym);
}
-#endif
ty *protoenv::castTarget(ty *target, ty *source, symbol name) {
diff --git a/Build/source/utils/asymptote/env.h b/Build/source/utils/asymptote/env.h
index 8146fa813e8..7fd7a003e51 100644
--- a/Build/source/utils/asymptote/env.h
+++ b/Build/source/utils/asymptote/env.h
@@ -99,14 +99,12 @@ public:
access *lookupCast(ty *target, ty *source, symbol name);
bool castable(ty *target, ty *source, symbol name);
-#ifdef FASTCAST
// A cast lookup designed to work quickly with the application matching
// code. The target type must not be overloaded.
bool fastCastable(ty *target, ty *source);
// For the lookup, neither target nor source may be overloaded.
access *fastLookupCast(ty *target, ty *source);
-#endif
// Given overloaded types, this resolves which types should be the target and
// the source of the cast.
diff --git a/Build/source/utils/asymptote/errormsg.h b/Build/source/utils/asymptote/errormsg.h
index 62508cc0ca7..245fe62ed89 100644
--- a/Build/source/utils/asymptote/errormsg.h
+++ b/Build/source/utils/asymptote/errormsg.h
@@ -35,6 +35,23 @@ public:
string name() const {
return filename;
}
+
+ // The filename without the directory and without the '.asy' suffix.
+ // Note that this assumes name are separated by a forward slash.
+ string moduleName() const {
+ size_t start = filename.rfind('/');
+ if (start == filename.npos)
+ start = 0;
+ else
+ // Step over slash.
+ ++start;
+
+ size_t end = filename.rfind(".asy");
+ if (end != filename.size() - 4)
+ end = filename.size();
+
+ return filename.substr(start, end-start);
+ }
// Specifies a newline symbol at the character position given.
void newline() {
@@ -100,6 +117,13 @@ public:
friend ostream& operator << (ostream& out, const position& pos);
+ // Write out just the module name and line number.
+ void printTerse(ostream& out) const
+ {
+ if (file) {
+ out << file->moduleName() << ":" << line;
+ }
+ }
};
extern position nullPos;
diff --git a/Build/source/utils/asymptote/errors b/Build/source/utils/asymptote/errors
index 38739ee2d73..8e84f4d4d9e 100644
--- a/Build/source/utils/asymptote/errors
+++ b/Build/source/utils/asymptote/errors
@@ -1,3 +1,43 @@
+errortest.asy: 476.34: argument after rest argument
+errortest.asy: 477.37: additional rest argument
+errortest.asy: 478.28: argument after rest argument
+errortest.asy: 479.31: additional rest argument
+errortest.asy: 482.22: normal parameter after rest parameter
+errortest.asy: 483.22: normal parameter after rest parameter
+errortest.asy: 484.31: normal parameter after rest parameter
+errortest.asy: 485.31: normal parameter after rest parameter
+errortest.asy: 486.24: normal parameter after keyword-only parameter
+errortest.asy: 487.24: normal parameter after keyword-only parameter
+errortest.asy: 488.24: normal parameter after keyword-only parameter
+errortest.asy: 488.31: normal parameter after keyword-only parameter
+errortest.asy: 489.24: normal parameter after keyword-only parameter
+errortest.asy: 489.31: normal parameter after keyword-only parameter
+errortest.asy: 490.32: normal parameter after keyword-only parameter
+errortest.asy: 491.32: normal parameter after keyword-only parameter
+errortest.asy: 492.32: normal parameter after keyword-only parameter
+errortest.asy: 492.39: normal parameter after keyword-only parameter
+errortest.asy: 493.32: normal parameter after keyword-only parameter
+errortest.asy: 493.39: normal parameter after keyword-only parameter
+errortest.asy: 496.13: expected 'keyword' here
+errortest.asy: 497.13: expected 'keyword' here
+errortest.asy: 498.21: expected 'keyword' here
+errortest.asy: 499.21: expected 'keyword' here
+errortest.asy: 500.36: expected 'keyword' here
+errortest.asy: 500.32: normal parameter after keyword-only parameter
+errortest.asy: 501.36: expected 'keyword' here
+errortest.asy: 501.32: normal parameter after keyword-only parameter
+errortest.asy: 502.21: expected 'keyword' here
+errortest.asy: 503.21: expected 'keyword' here
+errortest.asy: 504.13: expected 'keyword' here
+errortest.asy: 505.13: expected 'keyword' here
+errortest.asy: 506.13: expected 'keyword' here
+errortest.asy: 507.13: expected 'keyword' here
+errortest.asy: 508.13: expected 'keyword' here
+errortest.asy: 509.13: expected 'keyword' here
+errortest.asy: 510.21: expected 'keyword' here
+errortest.asy: 511.21: expected 'keyword' here
+errortest.asy: 512.21: expected 'keyword' here
+errortest.asy: 513.21: expected 'keyword' here
errortest.asy: 12.4: no matching variable 'x.y'
errortest.asy: 16.11: no matching variable of name 'z'
errortest.asy: 20.3: no matching variable 'x'
@@ -114,3 +154,8 @@ errortest.asy: 448.7: could not infer type of initializer
errortest.asy: 452.16: expression is not an array of inferable type
errortest.asy: 457.16: expression is not an array of inferable type
errortest.asy: 463.16: expression is not an array of inferable type
+errortest.asy: 470.7: array expression cannot be used as an address
+errortest.asy: 476.4: cannot call
+'int f(string s=<default> ... int[] a)'
+with parameters
+'(int, int, int, string ... int[])'
diff --git a/Build/source/utils/asymptote/errortest.asy b/Build/source/utils/asymptote/errortest.asy
index ea6885dbff8..1e313702f48 100644
--- a/Build/source/utils/asymptote/errortest.asy
+++ b/Build/source/utils/asymptote/errortest.asy
@@ -463,3 +463,52 @@
for (var i : x)
;
}
+{
+ int[] temp={0};
+ int[] v={0};
+
+ temp[v]= v;
+}
+
+// Keyword and rest errors.
+{
+ int f(string s="" ... int[] a);
+ f(1,2,3 ... new int[] {4,5,6}, "hi");
+ f(1,2,3 ... new int[] {4,5,6} ... new int[] {7,8,9});
+ f(... new int[] {4,5,6}, "hi");
+ f(... new int[] {4,5,6} ... new int[] {7,8,9});
+}
+{
+ int f(... int[] x, int y);
+ int g(... int[] x, int y) { return 7; }
+ int f(string s ... int[] x, int y);
+ int g(string s ... int[] x, int y) { return 7; }
+ int f(int keyword x, int y);
+ int g(int keyword x, int y) { return 7; }
+ int f(int keyword x, int y, string z);
+ int g(int keyword x, int y, string z) { return 7; }
+ int f(real t, int keyword x, int y);
+ int g(real t, int keyword x, int y) { return 7; }
+ int f(real t, int keyword x, int y, string z);
+ int g(real t, int keyword x, int y, string z) { return 7; }
+}
+{
+ int f(int notkeyword x);
+ int g(int notkeyword x) { return 7; }
+ int f(real w, int notkeyword x);
+ int g(real w, int notkeyword x) { return 7; }
+ int f(real w, int keyword y, int notkeyword x);
+ int g(real w, int keyword y, int notkeyword x) { return 7; }
+ int f(real w, int notkeyword y, int keyword x);
+ int g(real w, int notkeyword y, int keyword x) { return 7; }
+ int f(int notkeyword x, int y, string z);
+ int g(int notkeyword x, int y, string z) { return 7; }
+ int f(int notkeyword x, int y);
+ int g(int notkeyword x, int y) { return 7; }
+ int f(int notkeyword x, int y, string z);
+ int g(int notkeyword x, int y, string z) { return 7; }
+ int f(real t, int notkeyword x, int y);
+ int g(real t, int notkeyword x, int y) { return 7; }
+ int f(real t, int notkeyword x, int y, string z);
+ int g(real t, int notkeyword x, int y, string z) { return 7; }
+}
diff --git a/Build/source/utils/asymptote/examples/NURBScurve.asy b/Build/source/utils/asymptote/examples/NURBScurve.asy
index b3b8c393b9e..c4da5c2ff5f 100644
--- a/Build/source/utils/asymptote/examples/NURBScurve.asy
+++ b/Build/source/utils/asymptote/examples/NURBScurve.asy
@@ -14,7 +14,7 @@ triple[] P={
(-31.5909,21.277,6.70051),
(-31.4284,25.4933,6.76745),
(-31.5413,30.3485,6.68777),
- (-31.4896,32.2839,6.58385),
+ (-31.4896,32.2839,6.58385)
};
draw(P,knot,green);
diff --git a/Build/source/utils/asymptote/examples/NURBSsurface.asy b/Build/source/utils/asymptote/examples/NURBSsurface.asy
index 878fd956393..32df6ff98ea 100644
--- a/Build/source/utils/asymptote/examples/NURBSsurface.asy
+++ b/Build/source/utils/asymptote/examples/NURBSsurface.asy
@@ -15,28 +15,28 @@ triple[][] P={{
(-31.5909,21.277,6.70051),
(-31.4284,25.4933,6.76745),
(-31.5413,30.3485,6.68777),
- (-31.4896,32.2839,6.58385),
+ (-31.4896,32.2839,6.58385)
},{
(-28.279,12.001,7.89625),
(-28.4187,14.7353,8.00954),
(-28.5633,21.277,8.22422),
(-28.4433,25.4933,8.31214),
(-28.5266,30.3485,8.20749),
- (-28.4885,32.2839,8.07099),
+ (-28.4885,32.2839,8.07099)
},{
(-20,12.001,10.0379),
(-20,14.7353,10.2001),
(-20,21.277,10.5076),
(-20,25.4933,10.6335),
(-20,30.3485,10.4836),
- (-20,32.2839,10.2881),
+ (-20,32.2839,10.2881)
},{
(-11.721,12.001,7.84024),
(-11.5813,14.7353,7.95269),
(-11.4367,21.277,8.16575),
(-11.5567,25.4933,8.25302),
(-11.4734,30.3485,8.14915),
- (-11.5115,32.2839,8.01367),
+ (-11.5115,32.2839,8.01367)
},{
(-8.79391,12.001,6.39481),
(-8.60483,14.7353,6.48022),
@@ -44,7 +44,8 @@ triple[][] P={{
(-8.57158,25.4933,6.70832),
(-8.45874,30.3485,6.62943),
(-8.51041,32.2839,6.52653)
- }};
+ }
+};
draw(P,uknot,vknot,new pen[] {red,green,blue,magenta});
diff --git a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
index 328447d4ac4..c398aa511c6 100644
--- a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
+++ b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
@@ -1,42 +1,99 @@
size(200);
import palette;
import three;
-
+
+currentprojection=orthographic(1,1,1);
+
triple[] M={
(-1,-1,-1),(0,-1,-1),(1,-1,-1),(1,0,-1),
(1,1,-1),(0,1,-1),(-1,1,-1),(-1,0,-1),
(-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0),
- (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),
- (1,1,1),(0,1,1),(-1,1,1),(-1,0,1)
+ (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),(1,1,1),(0,1,1),(-1,1,1),(-1,0,1)
};
-
-triple[] K={
- (1,-1,-1),(1,0,-1),(1,1,-1),(1,1,0),
- (1,1,1),(1,0,1),(1,-1,1),(1,-1,0),
- (0,0,-1),(0,0,1),(0,-1,0),(0,1,0)
+
+surface[] Squares={
+ surface((1,-1,-1)--(1,1,-1)--(1,1,1)--(1,-1,1)--cycle),
+ surface((-1,-1,-1)--(-1,1,-1)--(-1,1,1)--(-1,-1,1)--cycle),
+ surface((1,1,-1)--(-1,1,-1)--(-1,1,1)--(1,1,1)--cycle),
+ surface((1,-1,-1)--(-1,-1,-1)--(-1,-1,1)--(1,-1,1)--cycle),
+ surface((1,-1,1)--(1,1,1)--(-1,1,1)--(-1,-1,1)--cycle),
+ surface((1,-1,-1)--(1,1,-1)--(-1,1,-1)--(-1,-1,-1)--cycle),
};
-
-surface s;
-
-void recur(triple p, real u, int level) {
- if(level > 1 )
- for(triple V : M)
- recur(p+u*V,u/3,level-1);
- else
- for(triple V : K) {
- transform3 T=shift(p)*scale3(u)*shift(V)*scale3(0.5);
- surface t=T*surface((1,-1,-1)--(1,1,-1)--(1,1,1)--(1,-1,1)--cycle);
- s.append(t);
- s.append(scale3(-1)*t);
+
+int[][] SquaresPoints={
+ {2,3,4,10,16,15,14,9},
+ {0,7,6,11,18,19,12,8},
+ {4,5,6,11,18,17,16,10},
+ {2,1,0,8,12,13,14,9},
+ {12,13,14,15,16,17,18,19},
+ {0,1,2,3,4,5,6,7}
+};
+
+int[][] index={
+ {0,2,4},{0,1},{1,2,4},{2,3},{1,3,4},{0,1},{0,3,4},{2,3},
+ {4,5},{4,5},{4,5},{4,5},
+ {0,2,5},{0,1},{1,2,5},{2,3},{1,3,5},{0,1},{0,3,5},{2,3}
+};
+
+int[] Sponge0=array(n=6,value=1);
+
+int[] eraseFaces(int n, int[] Sponge0) {
+ int[] temp=copy(Sponge0);
+ for(int k : index[n]) {
+ temp[k]=0;
+ }
+ return temp;
+}
+
+int[][] Sponge1=new int[20][];
+for(int n=0; n < 20; ++n) {
+ Sponge1[n]=eraseFaces(n,Sponge0);
+}
+
+int[][] eraseFaces(int n, int[][] Sponge1) {
+ int[][] temp=copy(Sponge1);
+ for(int k : index[n])
+ for(int n1 : SquaresPoints[k])
+ temp[n1][k]=0;
+ return temp;
+}
+
+int[][][] Sponge2=new int[20][][];
+for(int n=0; n < 20; ++n)
+ Sponge2[n]=eraseFaces(n,Sponge1);
+
+int[][][] eraseFaces(int n, int[][][] Sponge2) {
+ int[][][] temp=copy(Sponge2);
+ for(int k : index[n])
+ for(int n2: SquaresPoints[k])
+ for(int n1: SquaresPoints[k])
+ temp[n2][n1][k]=0;
+ return temp;
+}
+
+int[][][][] Sponge3=new int[20][][][];
+for(int n=0; n < 20; ++n)
+ Sponge3[n]=eraseFaces(n,Sponge2);
+
+surface s3;
+real u=2/3;
+for(int n3=0; n3 < 20; ++n3) {
+ surface s2;
+ for(int n2=0; n2 < 20; ++n2) {
+ surface s1;
+ for(int n1=0; n1 < 20; ++n1) {
+ for(int k=0; k < 6; ++k){
+ transform3 T=scale3(u)*shift(M[n1])*scale3(0.5);
+ if(Sponge3[n3][n2][n1][k] > 0) {
+ s1.append(T*Squares[k]);
+ }
+ }
}
+ transform3 T=scale3(u)*shift(M[n2])*scale3(0.5);
+ s2.append(T*s1);
+ }
+ transform3 T=scale3(u)*shift(M[n3])*scale3(0.5);
+ s3.append(T*s2);
}
-
-recur((0,0,0),1/3,3);
-
-surface sf;
-sf.append(s);
-sf.append(rotate(90,Y)*s);
-sf.append(rotate(90,Z)*s);
-sf.colors(palette(sf.map(abs),Rainbow()));
-
-draw(sf,render(compression=Low,merge=true));
+s3.colors(palette(s3.map(abs),Rainbow()));
+draw(s3);
diff --git a/Build/source/utils/asymptote/examples/extrudedcontour.asy b/Build/source/utils/asymptote/examples/extrudedcontour.asy
index 7b2f67459ce..dabd56b9298 100644
--- a/Build/source/utils/asymptote/examples/extrudedcontour.asy
+++ b/Build/source/utils/asymptote/examples/extrudedcontour.asy
@@ -1,6 +1,9 @@
import contour;
import palette;
import graph3;
+
+defaultrender.merge=true;
+
currentprojection=orthographic(25,10,10);
size(0,12cm);
real a=3;
diff --git a/Build/source/utils/asymptote/examples/filesurface.asy b/Build/source/utils/asymptote/examples/filesurface.asy
index 2a93c96ec19..eef9d37f494 100644
--- a/Build/source/utils/asymptote/examples/filesurface.asy
+++ b/Build/source/utils/asymptote/examples/filesurface.asy
@@ -23,8 +23,8 @@ s.colors(palette(s.map(new real(triple v) {return find(level >= v.z);}),
draw(s,meshpen=thick(),render(merge=true));
-triple m=currentpicture.userMin;
-triple M=currentpicture.userMax;
+triple m=currentpicture.userMin();
+triple M=currentpicture.userMax();
triple target=0.5*(m+M);
xaxis3("$x$",Bounds,InTicks);
diff --git a/Build/source/utils/asymptote/examples/floatingdisk.asy b/Build/source/utils/asymptote/examples/floatingdisk.asy
index 2e99ec9c2c1..be8b339767d 100644
--- a/Build/source/utils/asymptote/examples/floatingdisk.asy
+++ b/Build/source/utils/asymptote/examples/floatingdisk.asy
@@ -9,9 +9,11 @@ real l=.7;
pair pA=(-l,0);
pair pB=(l,0);
-
-path waterline=tremble(addnodes(pA..pB,1),angle=10,frequency=0.1,random=50);
-path disk=shift(0,-d)*(scale(R)*unitcircle);
+
+tremble tr=tremble(angle=10,frequency=0.1,random=50,fuzz=1);
+path waterline=tr.deform(pA..pB);
+
+path disk=shift(0,-d)*scale(R)*unitcircle;
path water=waterline--(l,-h)--(-l,-h)--(-l,0)--cycle;
path container=(l,1/7)--(l,-h)--(-l,-h)--(-l,1/7);
@@ -21,4 +23,4 @@ draw(waterline);
draw(container,linewidth(1.5));
-shipout(bbox(2mm,Fill(white)));
+shipout(bbox(2mm));
diff --git a/Build/source/utils/asymptote/examples/interpolate1.asy b/Build/source/utils/asymptote/examples/interpolate1.asy
index 9f8367a52a4..8845c8dd2f8 100644
--- a/Build/source/utils/asymptote/examples/interpolate1.asy
+++ b/Build/source/utils/asymptote/examples/interpolate1.asy
@@ -7,8 +7,6 @@ import graph;
// Test 1: The Runge effect in the Lagrange interpolation of 1/(x^2+1).
unitsize(2cm);
-xlimits(-5,5);
-ylimits(-1,1,Crop);
real f(real x) {return(1/(x^2+1));}
real df(real x) {return(-2*x/(x^2+1)^2);}
@@ -26,9 +24,14 @@ fhorner p=fhorner(h);
draw(graph(p,a,b,n=500),"$x\longmapsto{}L_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\frac{1}{x^2+1}$");
+xlimits(-5,5);
+ylimits(-1,1,Crop);
+
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
+
attach(legend(),point(10S),30S);
+
shipout("runge1");
erase();
@@ -52,11 +55,13 @@ draw(graph(p,a,b,n=500),"$x\longmapsto{}H_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\frac{1}{x^2+1}$");
unitsize(2cm);
+
xlimits(-5,5);
ylimits(-1,5,Crop);
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
+
attach(legend(),point(10S),30S);
shipout("runge2");
@@ -86,7 +91,9 @@ draw(graph(f,a,b),red,"$x\longmapsto{}\cos(x)$");
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
+
attach(legend(),point(10S),30S);
+
shipout("runge3");
erase();
@@ -110,9 +117,12 @@ fhorner p=fhorner(h);
draw(graph(p,a,b,n=500),"$x\longmapsto{}L_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\cos(x)$");
+
ylimits(-1,5,Crop);
+
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
+
attach(legend(),point(10S),30S);
shipout("runge4");
@@ -122,8 +132,6 @@ erase();
// Test 5: The situation is much better using Tchebychev points.
unitsize(2cm);
-xlimits(-5,5);
-ylimits(-1,2,Crop);
real f(real x) {return(1/(x^2+1));}
real df(real x) {return(-2*x/(x^2+1)^2);}
@@ -144,6 +152,9 @@ fhorner p=fhorner(h);
draw(graph(p,a,b,n=500),"$x\longmapsto{}T_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\frac{1}{x^2+1}$");
+xlimits(-5,5);
+ylimits(-1,2,Crop);
+
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
attach(legend(),point(10S),30S);
@@ -155,8 +166,6 @@ erase();
// Test 6: Adding a few more Tchebychev points yields a very good result.
unitsize(2cm);
-xlimits(-5,5);
-ylimits(-1,2,Crop);
real f(real x) {return(1/(x^2+1));}
real df(real x) {return(-2*x/(x^2+1)^2);}
@@ -175,6 +184,9 @@ fhorner p=fhorner(h);
draw(graph(p,a,b,n=500),"$x\longmapsto{}T_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\frac{1}{x^2+1}$");
+xlimits(-5,5);
+ylimits(-1,2,Crop);
+
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
attach(legend(),point(10S),30S);
@@ -187,8 +199,6 @@ erase();
// Test 7: Another Tchebychev example.
unitsize(2cm);
-xlimits(-2,2);
-ylimits(-0.5,2,Crop);
real f(real x) {return(sqrt(abs(x-1)));}
@@ -206,6 +216,9 @@ fhorner p=fhorner(h);
draw(graph(p,a,b,n=500),"$x\longmapsto{}T_{"+string(n)+"}$");
draw(graph(f,a,b),red,"$x\longmapsto{}\sqrt{|x-1|}$");
+xlimits(-2,2);
+ylimits(-0.5,2,Crop);
+
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
attach(legend(),point(10S),30S);
diff --git a/Build/source/utils/asymptote/examples/orthocenter.asy b/Build/source/utils/asymptote/examples/orthocenter.asy
index 73dfde51954..5c6807b4f25 100644
--- a/Build/source/utils/asymptote/examples/orthocenter.asy
+++ b/Build/source/utils/asymptote/examples/orthocenter.asy
@@ -37,5 +37,4 @@ dot("$A'$",Ap,dir(A--Ap),red);
dot("$B'$",Bp,dir(B--Bp),red);
dot("$C'$",Cp,dir(C--Cp),red);
-label(graphic("piicon.eps","width=2.5cm"),Ap,5ENE,red);
-
+label(graphic("piicon","width=2.5cm"),Ap,5ENE,red);
diff --git a/Build/source/utils/asymptote/examples/pdb.asy b/Build/source/utils/asymptote/examples/pdb.asy
index b4f9175ae14..b3b954c8c6a 100644
--- a/Build/source/utils/asymptote/examples/pdb.asy
+++ b/Build/source/utils/asymptote/examples/pdb.asy
@@ -11,6 +11,8 @@ currentlight=White;
defaultrender.merge=true; // Fast low-quality rendering
//defaultrender.merge=false; // Slow high-quality rendering
+bool pixel=false; // Set to true to draw dots as pixels.
+real width=10*linewidth(currentpen);
size(200);
currentprojection=perspective(30,30,15);
@@ -126,7 +128,10 @@ for(chain c : chains) {
for(int i=0; i < c.a.length-1; ++i)
draw(c.a[i].v--c.a[i+1].v,chainpen,currentlight);
for(atom a : c.a)
- dot(a.v,color(a.name),currentlight);
+ if(pixel)
+ pixel(a.v,color(a.name),width);
+ else
+ dot(a.v,color(a.name),currentlight);
natoms += c.a.length;
}
endgroup3();
@@ -136,7 +141,10 @@ write("Number of hetero atoms: ",atoms.length);
begingroup3("hetero");
for(atom h : atoms)
- dot(h.v,color(h.name),currentlight);
+ if(pixel)
+ pixel(h.v,color(h.name),width);
+ else
+ dot(h.v,color(h.name),currentlight);
endgroup3();
write("Number of hetero bonds: ",bonds.length);
@@ -154,7 +162,7 @@ string viewfilename=prefix+".views";
if(!error(input(viewfilename,check=false)))
options="3Dviews2="+viewfilename;
-if(getviews) {
+if(getviews && prc()) {
picture pic;
add(pic,embed("label",currentpicture,options=options),(0,0),N);
label(pic,cameralink("label"),(0,0),S,fontsize(12pt));
diff --git a/Build/source/utils/asymptote/examples/slidedemo.asy b/Build/source/utils/asymptote/examples/slidedemo.asy
index 7a753a54d61..0cbd15af741 100644
--- a/Build/source/utils/asymptote/examples/slidedemo.asy
+++ b/Build/source/utils/asymptote/examples/slidedemo.asy
@@ -1,6 +1,6 @@
// Slide demo.
// Command-line options to enable stepping and/or reverse video:
-// asy [-u stepping=true] [-u reverse=true] slidedemo
+// asy [-u stepping=true] [-u reverse=true] [-u itemstep=true] slidedemo
orientation=Landscape;
diff --git a/Build/source/utils/asymptote/examples/vertexshading.asy b/Build/source/utils/asymptote/examples/vertexshading.asy
index 284ca3230de..ea97b98daf3 100644
--- a/Build/source/utils/asymptote/examples/vertexshading.asy
+++ b/Build/source/utils/asymptote/examples/vertexshading.asy
@@ -1,5 +1,4 @@
import three;
-//settings.prc=false;
size(200);
diff --git a/Build/source/utils/asymptote/examples/worksheet.asy b/Build/source/utils/asymptote/examples/worksheet.asy
index f26797acabb..9894e5802b8 100644
--- a/Build/source/utils/asymptote/examples/worksheet.asy
+++ b/Build/source/utils/asymptote/examples/worksheet.asy
@@ -19,7 +19,7 @@ draw(f,z0--z0+50mm);
add(pic,f,z,Align);
z += step;
-for(int i=1; i <= 14; ++i) {
+for(int i=1; i <= 15; ++i) {
draw(pic,z--z+length);
z += step;
draw(pic,z--z+length,dashed+gray);
@@ -36,6 +36,7 @@ for(int i=1; i <= 14; ++i) {
}
else if(i == 12) label(1);
else if(i == 13) label(2);
+ else if(i == 14) label(3);
}
draw(pic,z--z+length);
diff --git a/Build/source/utils/asymptote/examples/worldmap.asy b/Build/source/utils/asymptote/examples/worldmap.asy
new file mode 100644
index 00000000000..59479fffbe2
--- /dev/null
+++ b/Build/source/utils/asymptote/examples/worldmap.asy
@@ -0,0 +1,87 @@
+settings.outformat="pdf";
+size(20cm);
+
+// The required data file is available here:
+// http://www.uni-graz.at/~schwaige/asymptote/worldmap.dat
+// This data was originally obtained from
+// http://www.ngdc.noaa.gov/mgg_coastline/mapit.jsp
+
+real findtheta(real phi, real epsilon=realEpsilon) {
+ // Determine for given phi the unique solution -pi/2 <= theta <= pi/2 off
+ // 2*theta+sin(2*theta)=pi*sin(phi)
+ // in the non-trivial cases by Newton iteration;
+ // theoretically the initial guess pi*sin(phi)/4 always works.
+ real nwtn(real x, real y) {return x-(2x+sin(2x)-y)/(2+2*cos(2x));};
+ real y=pi*sin(phi);
+ if(y == 0) return 0.0;
+ if(abs(y) == 1) return pi/2;
+ real startv=y/4;
+ real endv=nwtn(startv,y);
+ if(epsilon < 500*realEpsilon) epsilon=500*realEpsilon;
+ while(abs(endv-startv) > epsilon) {startv=endv; endv=nwtn(startv,y);};
+ return endv;
+}
+
+pair mollweide(real lambda, real phi, real lambda0=0){
+ // calculate the Mollweide projection centered at lambda0 for the point
+ // with coordinates(phi,lambda)
+ static real c1=2*sqrt(2)/pi;
+ static real c2=sqrt(2);
+ real theta=findtheta(phi);
+ return(c1*(lambda-lambda0)*cos(theta), c2*sin(theta));
+}
+
+guide gfrompairs(pair[] data){
+ guide gtmp;
+ for(int i=0; i < data.length; ++i) {
+ pair tmp=mollweide(radians(data[i].y),radians(data[i].x));
+ gtmp=gtmp--tmp;
+ }
+ return gtmp;
+}
+
+string datafile="worldmap.dat";
+
+file in=input(datafile,comment="/").line();
+// new commentchar since "#" is contained in the file
+pair[][] arrarrpair=new pair[][] ;
+int cnt=-1;
+bool newseg=false;
+while(true) {
+ if(eof(in)) break;
+ string str=in;
+ string[] spstr=split(str,"");
+
+ if(spstr[0] == "#") {++cnt; arrarrpair[cnt]=new pair[] ; newseg=true;}
+ if(spstr[0] != "#" && newseg) {
+ string[] spstr1=split(str,'\t'); // separator is TAB not SPACE
+ pair tmp=((real) spstr1[1],(real) spstr1[0]);
+ arrarrpair[cnt].push(tmp);
+ }
+}
+
+for(int i=0; i < arrarrpair.length; ++i)
+ draw(gfrompairs(arrarrpair[i]),1bp+black);
+
+// lines of longitude and latitude
+pair[] constlong(real lambda, int np=100) {
+ pair[] tmp;
+ for(int i=0; i <= np; ++i) tmp.push((-90+i*180/np,lambda));
+ return tmp;
+}
+
+pair[] constlat(real phi, int np=100) {
+ pair[] tmp;
+ for(int i=0; i <= 2*np; ++i) tmp.push((phi,-180+i*180/np));
+ return tmp;
+}
+
+for(int j=1; j <= 5; ++j) draw(gfrompairs(constlong(-180+j/6*360)),white);
+draw(gfrompairs(constlong(-180)),1.5bp+white);
+draw(gfrompairs(constlong(180)),1.5bp+white);
+for(int j=0; j <= 12; ++j) draw(gfrompairs(constlat(-90+j/6*180)),white);
+//draw(gfrompairs(constlong(10)),dotted);
+
+close(in);
+shipout(bbox(1mm,darkblue,Fill(lightblue)), view=true);
+
diff --git a/Build/source/utils/asymptote/exp.cc b/Build/source/utils/asymptote/exp.cc
index c464c697cb0..7cda91a6a6d 100644
--- a/Build/source/utils/asymptote/exp.cc
+++ b/Build/source/utils/asymptote/exp.cc
@@ -52,7 +52,8 @@ void exp::transToType(coenv &e, types::ty *target)
return;
}
-#if FASTCAST
+ // See if the cast can be handled by the fastLookupCast method, which does
+ // less memory allocation.
if (ct->kind != ty_overloaded &&
ct->kind != ty_error &&
target->kind != ty_error) {
@@ -63,7 +64,6 @@ void exp::transToType(coenv &e, types::ty *target)
return;
}
}
-#endif
types::ty *source = e.e.castSource(target, ct, symbol::castsym);
if (source==0) {
@@ -108,7 +108,7 @@ void exp::transCall(coenv &e, types::ty *target)
e.c.encode(inst::popcall);
}
-void exp::transConditionalJump(coenv &e, bool cond, Int dest) {
+void exp::transConditionalJump(coenv &e, bool cond, label dest) {
transToType(e, primBoolean());
e.c.useLabel(cond ? inst::cjmp : inst::njmp, dest);
}
@@ -308,7 +308,16 @@ void subscriptExp::transWrite(coenv &e, types::ty *t, exp *value)
array *a = transArray(e);
if (!a)
return;
- assert(equivalent(a->celltype, t));
+
+ if (!equivalent(a->celltype, t))
+ {
+ em.error(getPos());
+ em << "array expression cannot be used as an address";
+
+ // Translate the value for errors.
+ value->transToType(e, t);
+ return;
+ }
index->transToType(e, types::primInt());
@@ -411,7 +420,6 @@ void equalityExp::prettyprint(ostream &out, Int indent)
callExp::prettyprint(out, indent+1);
}
-#ifdef NO_FUNC_OPS
types::ty *equalityExp::getType(coenv &e) {
// Try to the resolve the expression as a function call first.
types::ty *t = callExp::getType(e);
@@ -424,7 +432,6 @@ types::ty *equalityExp::getType(coenv &e) {
// returns bool. In either case, it is safe to return bool.
return primBoolean();
}
-#endif
// From a possibly overloaded type, if there is a unique function type, return
// it, otherwise 0.
@@ -492,7 +499,6 @@ bltin bltinFromName(symbol name) {
return run::boolFuncNeq;
}
-#ifdef NO_FUNC_OPS
types::ty *equalityExp::trans(coenv &e) {
// First, try to handle by normal function resolution.
types::ty *t = callExp::getType(e);
@@ -534,7 +540,6 @@ types::ty *equalityExp::trans(coenv &e) {
return t;
}
}
-#endif
void scaleExp::prettyprint(ostream &out, Int indent)
{
@@ -870,7 +875,6 @@ types::ty *callExp::cacheAppOrVarEntry(coenv &e, bool tacit)
// An attempt at speeding up compilation: See if the source arguments match
// the (possibly overloaded) function exactly.
-#if CALLEE_SEARCH
if (searchable) {
varEntry *ve = callee->getCallee(e, source);
@@ -882,13 +886,13 @@ types::ty *callExp::cacheAppOrVarEntry(coenv &e, bool tacit)
cachedVarEntry = ve;
#ifndef DEBUG_CACHE
// Normally DEBUG_CACHE is not defined and we return here for efficiency
- // reasons. If DEBUG_CACHE is defined, also resolve the function by the
- // normal techniques and make sure we get the same result.
+ // reasons. If DEBUG_CACHE is defined, we instead proceed to resolve
+ // the function by the normal techniques and make sure we get the same
+ // result.
return ((function *)ve->getType())->getResult();
#endif
}
}
-#endif
// Figure out what function types we can call.
types::ty *ft = callee->cgetType(e);
@@ -1144,12 +1148,12 @@ void conditionalExp::prettyprint(ostream &out, Int indent)
void conditionalExp::baseTransToType(coenv &e, types::ty *target) {
test->transToType(e, types::primBoolean());
- Int tlabel = e.c.fwdLabel();
+ label tlabel = e.c.fwdLabel();
e.c.useLabel(inst::cjmp,tlabel);
onFalse->transToType(e, target);
- Int end = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
e.c.useLabel(inst::jmp,end);
e.c.defLabel(tlabel);
@@ -1266,13 +1270,13 @@ types::ty *orExp::trans(coenv &e)
return getType(e);
}
-void orExp::transConditionalJump(coenv &e, bool cond, Int dest)
+void orExp::transConditionalJump(coenv &e, bool cond, label dest)
{
if (cond == true) {
left->transConditionalJump(e, true, dest);
right->transConditionalJump(e, true, dest);
} else { /* cond == false */
- Int end = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
left->transConditionalJump(e, true, end);
right->transConditionalJump(e, false, dest);
@@ -1302,10 +1306,10 @@ types::ty *andExp::trans(coenv &e)
return getType(e);
}
-void andExp::transConditionalJump(coenv &e, bool cond, Int dest)
+void andExp::transConditionalJump(coenv &e, bool cond, label dest)
{
if (cond == true) {
- Int end = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
left->transConditionalJump(e, false, end);
right->transConditionalJump(e, true, dest);
@@ -1425,7 +1429,7 @@ void selfExp::transAsType(coenv &e, types::ty *target)
// Create a temp expression for the destination, so it is not evaluated
// twice.
exp *temp=dest->evaluate(e, target);
- temp->transWrite(e, target, ultimateValue(dest));
+ temp->transWrite(e, target, ultimateValue(temp));
}
void prefixExp::prettyprint(ostream &out, Int indent)
diff --git a/Build/source/utils/asymptote/exp.h b/Build/source/utils/asymptote/exp.h
index 38d6eabe8d3..38a72cba7f5 100644
--- a/Build/source/utils/asymptote/exp.h
+++ b/Build/source/utils/asymptote/exp.h
@@ -19,12 +19,18 @@
namespace trans {
class coenv;
+class coder;
+
+class label_t;
+typedef label_t *label;
+
class application;
}
namespace absyntax {
using trans::coenv;
+using trans::label;
using trans::application;
using trans::access;
using sym::symbol;
@@ -155,7 +161,7 @@ public:
// Evaluate the expression as a boolean. If the result equals cond, jump to
// the label dest, otherwise do not jump. In either case, no value is left
// on the stack.
- virtual void transConditionalJump(coenv &e, bool cond, Int dest);
+ virtual void transConditionalJump(coenv &e, bool cond, label dest);
// This is used to ensure the proper order and number of evaluations. When
// called, it immediately translates code to perform the side-effects
@@ -673,6 +679,12 @@ public:
}
virtual void add(argument a) {
+ if (rest.val) {
+ // TODO: Handle keyword arguments after rest with proper left-to-right
+ // ordering.
+ em.error(a.val->getPos());
+ em << "argument after rest argument";
+ }
args.push_back(a);
}
@@ -681,6 +693,14 @@ public:
add(a);
}
+ virtual void addRest(argument a) {
+ if (rest.val) {
+ em.error(a.val->getPos());
+ em << "additional rest argument";
+ }
+ rest = a;
+ }
+
virtual void prettyprint(ostream &out, Int indent);
virtual size_t size() {
@@ -862,10 +882,8 @@ public:
void prettyprint(ostream &out, Int indent);
-#ifdef NO_FUNC_OPS
types::ty *trans(coenv &e);
types::ty *getType(coenv &e);
-#endif
};
@@ -941,7 +959,7 @@ public:
void prettyprint(ostream &out, Int indent);
types::ty *trans(coenv &e);
- void transConditionalJump(coenv &e, bool cond, Int dest);
+ void transConditionalJump(coenv &e, bool cond, label dest);
};
class andExp : public andOrExp {
@@ -952,7 +970,7 @@ public:
void prettyprint(ostream &out, Int indent);
types::ty *trans(coenv &e);
- void transConditionalJump(coenv &e, bool cond, Int dest);
+ void transConditionalJump(coenv &e, bool cond, label dest);
};
class joinExp : public callExp {
diff --git a/Build/source/utils/asymptote/fftw++.h b/Build/source/utils/asymptote/fftw++.h
index 1b4373a08b6..0ea30502b87 100644
--- a/Build/source/utils/asymptote/fftw++.h
+++ b/Build/source/utils/asymptote/fftw++.h
@@ -18,7 +18,7 @@
#ifndef __fftwpp_h__
#define __fftwpp_h__ 1
-#define __FFTWPP_H_VERSION__ 1.08svn
+#define __FFTWPP_H_VERSION__ 1.08
#include <cstdlib>
#include <fstream>
diff --git a/Build/source/utils/asymptote/fileio.cc b/Build/source/utils/asymptote/fileio.cc
index 3aeb4cbe548..42eeefc27c6 100644
--- a/Build/source/utils/asymptote/fileio.cc
+++ b/Build/source/utils/asymptote/fileio.cc
@@ -138,6 +138,8 @@ void ifile::Read(string& val)
}
}
}
+ size_t pos=s.length()-1;
+ if(s[pos] == '\r') s.erase(pos,1);
val=whitespace+s;
}
diff --git a/Build/source/utils/asymptote/findsym.pl b/Build/source/utils/asymptote/findsym.pl
index 59e3ce79a2d..9cfe6c131b6 100755
--- a/Build/source/utils/asymptote/findsym.pl
+++ b/Build/source/utils/asymptote/findsym.pl
@@ -27,11 +27,7 @@ print header <<END;
// SYM(name) also refers to that symbol.
#ifndef ADDSYMBOL
#define ADDSYMBOL(name) extern sym::symbol PRETRANSLATED_SYMBOL_##name
- #ifdef PRESYM
- #define SYM(name) PRETRANSLATED_SYMBOL_##name
- #else
- #define SYM(name) sym::symbol::trans(#name)
- #endif
+ #define SYM(name) PRETRANSLATED_SYMBOL_##name
#endif
END
diff --git a/Build/source/utils/asymptote/fpu.h b/Build/source/utils/asymptote/fpu.h
index 5fa7205b43f..ca42c60feb7 100644
--- a/Build/source/utils/asymptote/fpu.h
+++ b/Build/source/utils/asymptote/fpu.h
@@ -10,8 +10,8 @@
#ifdef HAVE_FEENABLEEXCEPT
#include <fenv.h>
-inline Int fpu_exceptions() {
- Int excepts=0;
+inline int fpu_exceptions() {
+ int excepts=0;
#ifdef FE_INVALID
excepts |= FE_INVALID;
#endif
diff --git a/Build/source/utils/asymptote/frame.h b/Build/source/utils/asymptote/frame.h
index ee050050061..804e89baeae 100644
--- a/Build/source/utils/asymptote/frame.h
+++ b/Build/source/utils/asymptote/frame.h
@@ -21,53 +21,66 @@ class frame : public gc {
size_t numFormals;
Int numLocals;
+ // With the SIMPLE_FRAME flag, the size of frames cannot be changed at
+ // runtime. This is an issue for runnable-at-a-time mode, where global
+ // variables can be continually added. To handle this, the frame for
+ // global variables is an "indirect" frame. It holds one variable, which is
+ // a link to another frame. When the subframe is too small, a larger
+ // runtime array is allocated, and the link is changed.
+ enum {DIRECT_FRAME, INDIRECT_FRAME} style;
+
#ifdef DEBUG_FRAME
string name;
#endif
+ frame(string name)
+ : parent(new frame("<subframe of " + name + ">", 0, 0)),
+ numFormals(0), numLocals(1), style(INDIRECT_FRAME)
+#ifdef DEBUG_FRAME
+ , name(name)
+#endif
+ {}
+
public:
frame(string name, frame *parent, size_t numFormals)
- : parent(parent), numFormals(numFormals), numLocals(0)
+ : parent(parent), numFormals(numFormals), numLocals(0),
+ style(DIRECT_FRAME)
#ifdef DEBUG_FRAME
, name(name)
#endif
-
{}
- size_t getNumFormals() {
- return numFormals;
- }
- Int getNumLocals() {
- return numLocals;
+ static frame *indirect_frame(string name) {
+ return new frame(name);
}
frame *getParent() {
return parent;
}
+ // Which variable stores the link to the parent frame.
+ Int parentIndex() {
+ return numFormals;
+ }
+
Int size() {
- return (Int) (1+numFormals+numLocals);
+ if (style == DIRECT_FRAME)
+ return (Int) (1+numFormals+numLocals);
+ else
+ return parent->size();
}
access *accessFormal(size_t index) {
assert(index < numFormals);
- return new localAccess((Int) (1 + index), this);
+ assert(style == DIRECT_FRAME);
+ return new localAccess((Int) (index), this);
}
access *allocLocal() {
- return new localAccess((Int) (1 + numFormals + numLocals++), this);
- }
-
- // Checks if the frame f is a descendent of this frame.
- // For our purposes, a frame is its own descendant.
- bool isDescendant(frame *f)
- {
- while (f != 0) {
- if (f == this)
- return true;
- f = f->parent;
- }
- return false;
+ if (style == DIRECT_FRAME)
+ return new localAccess((Int) (1 + numFormals + numLocals++), this);
+ else
+ return parent->allocLocal();
}
};
diff --git a/Build/source/utils/asymptote/fundec.cc b/Build/source/utils/asymptote/fundec.cc
index 4f6218dc8f5..c83dd4b2345 100644
--- a/Build/source/utils/asymptote/fundec.cc
+++ b/Build/source/utils/asymptote/fundec.cc
@@ -22,7 +22,7 @@ varinit *Default=new definit(nullPos);
void formal::prettyprint(ostream &out, Int indent)
{
- prettyname(out, "formal",indent);
+ prettyname(out, keywordOnly ? "formal (keyword only)" : "formal", indent);
base->prettyprint(out, indent+1);
if (start) start->prettyprint(out, indent+1);
@@ -58,14 +58,22 @@ void formals::prettyprint(ostream &out, Int indent)
{
prettyname(out, "formals",indent);
- for(list<formal *>::iterator p = fields.begin(); p != fields.end(); ++p)
+ for (list<formal *>::iterator p = fields.begin(); p != fields.end(); ++p)
(*p)->prettyprint(out, indent+1);
}
void formals::addToSignature(signature& sig,
- coenv &e, bool encodeDefVal, bool tacit) {
- for(list<formal *>::iterator p = fields.begin(); p != fields.end(); ++p)
- sig.add((*p)->trans(e, encodeDefVal, tacit));
+ coenv &e, bool encodeDefVal, bool tacit)
+{
+ for (list<formal *>::iterator p = fields.begin(); p != fields.end(); ++p) {
+ formal& f=**p;
+ types::formal tf = f.trans(e, encodeDefVal, tacit);
+
+ if (f.isKeywordOnly())
+ sig.addKeywordOnly(tf);
+ else
+ sig.add(tf);
+ }
if (rest) {
if (!tacit && rest->getDefaultValue()) {
@@ -133,23 +141,22 @@ public:
};
void transDefault(coenv &e, position pos, varEntry *v, varinit *init) {
- // This roughly translates into the expression
+ // This roughly translates into the statement
// if (isDefault(x))
// x=init;
// where x is the variable in v and isDefault is a function that tests
// whether x is the default argument token.
- varEntryExp vee(pos, v);
- ifStm is(pos,
- new callExp(pos,
- new varEntryExp(pos,
- new function(primBoolean(), v->getType()),
- run::isDefault),
- &vee),
- new expStm(pos,
- new basicAssignExp(pos,
- v,
- init)));
- is.trans(e);
+
+ v->encode(READ, pos, e.c);
+
+ label end = e.c.fwdLabel();
+ e.c.useLabel(inst::jump_if_not_default, end);
+
+ init->transToType(e, v->getType());
+ v->encode(WRITE, pos, e.c);
+ e.c.encodePop();
+
+ e.c.defLabel(end);
}
void formal::transAsVar(coenv &e, Int index) {
diff --git a/Build/source/utils/asymptote/fundec.h b/Build/source/utils/asymptote/fundec.h
index 499505d765d..5dd0dab85be 100644
--- a/Build/source/utils/asymptote/fundec.h
+++ b/Build/source/utils/asymptote/fundec.h
@@ -19,12 +19,13 @@ class formal : public absyn {
decidstart *start;
bool Explicit;
varinit *defval;
+ bool keywordOnly;
public:
formal(position pos, ty *base, decidstart *start=0, varinit *defval=0,
- bool Explicit= false)
+ bool Explicit= false, bool keywordOnly=false)
: absyn(pos), base(base), start(start), Explicit(Explicit),
- defval(defval) {}
+ defval(defval), keywordOnly(keywordOnly) {}
virtual void prettyprint(ostream &out, Int indent);
@@ -50,6 +51,10 @@ public:
bool getExplicit() {
return Explicit;
}
+
+ bool isKeywordOnly() {
+ return keywordOnly;
+ }
};
class formals : public absyn {
@@ -58,21 +63,44 @@ class formals : public absyn {
mem::list<formal *> fields;
formal *rest;
+ // If the list of formals contains at least one keyword-only formal.
+ bool keywordOnly;
+
void addToSignature(types::signature& sig,
coenv &e, bool encodeDefVal, bool tacit);
public:
formals(position pos)
- : absyn(pos), rest(0) {}
+ : absyn(pos), rest(0), keywordOnly(false) {}
virtual ~formals() {}
virtual void prettyprint(ostream &out, Int indent);
virtual void add(formal *f) {
+ if (f->isKeywordOnly()) {
+ keywordOnly = true;
+ }
+ else if (rest) {
+ em.error(f->getPos());
+ em << "normal parameter after rest parameter";
+ }
+ else if (keywordOnly) {
+ em.error(f->getPos());
+ em << "normal parameter after keyword-only parameter";
+ }
+
fields.push_back(f);
}
virtual void addRest(formal *f) {
+ if (rest) {
+ em.error(f->getPos());
+ em << "additional rest parameter";
+ }
+ else if (f->isKeywordOnly()) {
+ em.error(f->getPos());
+ em << "rest parameter declared as keyword-only";
+ }
rest = f;
}
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc
index 9a0a78486b8..784638626f6 100644
--- a/Build/source/utils/asymptote/glrender.cc
+++ b/Build/source/utils/asymptote/glrender.cc
@@ -44,7 +44,7 @@ bool glthread=false;
bool initialize=true;
using camp::picture;
-using camp::drawImage;
+using camp::drawRawImage;
using camp::transform;
using camp::pair;
using camp::triple;
@@ -387,8 +387,9 @@ void Export()
if(w > h*Aspect) w=(int) (h*Aspect+0.5);
else h=(int) (w/Aspect+0.5);
// Render an antialiased image.
- drawImage *Image=new drawImage(data,fullWidth,fullHeight,
- transform(0.0,0.0,w,0.0,0.0,h),antialias);
+ drawRawImage *Image=new drawRawImage(data,fullWidth,fullHeight,
+ transform(0.0,0.0,w,0.0,0.0,h),
+ antialias);
pic.append(Image);
pic.shipout(NULL,Prefix,Format,0.0,false,View);
delete Image;
diff --git a/Build/source/utils/asymptote/inst.h b/Build/source/utils/asymptote/inst.h
index b1b0511f660..fbbe6d873d8 100644
--- a/Build/source/utils/asymptote/inst.h
+++ b/Build/source/utils/asymptote/inst.h
@@ -23,48 +23,46 @@ struct inst; class stack; class program;
// A function "lambda," that is, the code that runs a function.
// It also needs the closure of the enclosing module or function to run.
struct lambda : public gc {
-#ifdef DEBUG_FRAME
- lambda()
- : name("<unnamed>") {}
- virtual ~lambda() {}
- string name;
-#endif
-
// The instructions to follow.
program *code;
- // The number of parameters of the function. This does not include the
- // closure of the enclosing module or function.
- size_t params;
+ // The index of the link to the parent closure in the frame corresponding to
+ // this function.
+ size_t parentIndex;
// The total number of items that will be stored in the closure of this
- // function. Includes the higher closure, the parameters, and the local
- // variables.
+ // function. Includes a link to the higher closure, the parameters, and the
+ // local variables.
// NOTE: In order to help garbage collection, this could be modified to
// have one array store escaping items, and another to store non-
// escaping items.
- size_t vars;
+ size_t framesize;
+
+ // States whether any of the variables escape the function, in which case a
+ // closure needs to be allocated when the function is called. It is
+ // initially set to "maybe" and it is computed the first time the function
+ // is called.
+ enum { NEEDS_CLOSURE, DOESNT_NEED_CLOSURE, MAYBE_NEEDS_CLOSURE} closureReq;
+
+#ifdef DEBUG_FRAME
+ string name;
+
+ lambda()
+ : closureReq(MAYBE_NEEDS_CLOSURE), name("<unnamed>") {}
+ virtual ~lambda() {}
+#else
+ lambda()
+ : closureReq(MAYBE_NEEDS_CLOSURE) {}
+#endif
};
// The code run is just a string of instructions. The ops are actual commands
// to be run, but constants, labels, and other objects can be in the code.
struct inst : public gc {
enum opcode {
- pop, intpush, constpush,
- varpush, varsave, fieldpush, fieldsave,
- builtin, jmp, cjmp, njmp, popcall,
- pushclosure, makefunc, ret,
- alloc, pushframe, popframe,
-
-#ifdef COMBO
- // Combo instructions:
- // varpop = varsave+pop and fieldpop = fieldsave+pop
- varpop, fieldpop,
-
- // gejmp = bltin greater-than-equal (for ints) + cjmp OR
- // = bltin less-than-equal + njmp
- gejmp
-#endif
+#define OPCODE(name,type) name,
+#include "opcodes.h"
+#undef OPCODE
};
opcode op;
position pos;
diff --git a/Build/source/utils/asymptote/install-sh b/Build/source/utils/asymptote/install-sh
index a9244eb0786..6781b987bdb 100755
--- a/Build/source/utils/asymptote/install-sh
+++ b/Build/source/utils/asymptote/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,10 +156,6 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
shift;;
-T) no_target_directory=true;;
@@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -208,11 +200,7 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -240,9 +228,9 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -264,7 +252,12 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@@ -392,7 +385,7 @@ do
case $dstdir in
/*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
+ -*) prefix='./';;
*) prefix='';;
esac
@@ -410,7 +403,7 @@ do
for d
do
- test X"$d" = X && continue
+ test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
diff --git a/Build/source/utils/asymptote/item.h b/Build/source/utils/asymptote/item.h
index 9be21ab7b6f..5c5423cbf63 100644
--- a/Build/source/utils/asymptote/item.h
+++ b/Build/source/utils/asymptote/item.h
@@ -89,23 +89,23 @@ public:
template<class T>
item(T *p)
- : i((Int) p) {
+ : p((void *) p) {
assert(!empty());
}
template<class T>
item(const T &p)
- : i((Int) new(UseGC) T(p)) {
+ : p(new(UseGC) T(p)) {
assert(!empty());
}
template<class T>
item& operator= (T *a)
- { i=(Int) a; return *this; }
+ { p=(void *) a; return *this; }
template<class T>
item& operator= (const T &it)
- { i=(Int) new(UseGC) T(it); return *this; }
+ { p=new(UseGC) T(it); return *this; }
#else
bool empty() const
{return *kind == typeid(void);}
@@ -195,19 +195,29 @@ private:
};
};
+#ifdef SIMPLE_FRAME
+// In the simple implementation, a frame is just an array of items.
+typedef item frame;
+#else
class frame : public gc {
#ifdef DEBUG_FRAME
string name;
+ Int parentIndex;
#endif
- typedef mem::vector<item> vars_t;
- vars_t vars;
+ typedef mem::vector<item> internal_vars_t;
+ internal_vars_t vars;
+
+ // Allow the stack direct access to vars.
+ friend class stack;
public:
#ifdef DEBUG_FRAME
- frame(string name, size_t size)
- : name(name), vars(size)
+ frame(string name, Int parentIndex, size_t size)
+ : name(name), parentIndex(parentIndex), vars(size)
{}
string getName() { return name; }
+
+ Int getParentIndex() { return parentIndex; }
#else
frame(size_t size)
: vars(size)
@@ -228,6 +238,8 @@ public:
vars.resize(n);
}
};
+#endif
+
template<typename T>
inline T get(const item& it)
diff --git a/Build/source/utils/asymptote/lex.yy.cc b/Build/source/utils/asymptote/lex.yy.cc
index 5422374042f..b3c2d642faf 100644
--- a/Build/source/utils/asymptote/lex.yy.cc
+++ b/Build/source/utils/asymptote/lex.yy.cc
@@ -767,20 +767,20 @@ int yy_flex_debug = 1;
static yyconst flex_int16_t yy_rule_linenum[122] =
{ 0,
- 204, 205, 207, 213, 217, 218, 228, 229, 230, 231,
- 235, 236, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 260, 265, 271, 277, 285, 288, 289, 290,
- 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
- 301, 303, 304, 305, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
- 322, 323, 324, 325, 326, 327, 328, 329, 331, 332,
- 333, 334, 335, 336, 338, 339, 340, 341, 342, 344,
- 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, 357, 358, 359, 360, 361, 363, 364, 365,
-
- 366, 367, 370, 377, 384, 386, 388, 390, 392, 395,
- 397, 398, 404, 408, 412, 416, 419, 423, 424, 425,
- 429
+ 205, 206, 208, 214, 218, 219, 229, 230, 231, 232,
+ 236, 237, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 261, 266, 272, 278, 286, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 332, 333,
+ 334, 335, 336, 337, 339, 340, 341, 342, 343, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 364, 365, 366,
+
+ 367, 368, 371, 378, 385, 387, 389, 391, 393, 396,
+ 398, 399, 405, 409, 413, 417, 420, 424, 425, 426,
+ 430
} ;
/* The intent behind this definition is that it'll catch
@@ -821,7 +821,8 @@ using mem::string;
#include "opsymbols.h"
-#define YY_NO_UNPUT
+static void yyunput(int, char *);
+void (*unused)(int,char *) = yyunput;
fileinfo* fi;
Int tokPos;
@@ -984,7 +985,7 @@ void getstring(void)
-#line 988 "lex.yy.cc"
+#line 989 "lex.yy.cc"
#define INITIAL 0
#define lexcomment 1
@@ -1231,10 +1232,10 @@ YY_DECL
register int yy_act;
/* %% [7.0] user's declarations go here */
-#line 201 "camp.l"
+#line 202 "camp.l"
-#line 1238 "lex.yy.cc"
+#line 1239 "lex.yy.cc"
if ( !(yy_init) )
{
@@ -1350,23 +1351,23 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 204 "camp.l"
+#line 205 "camp.l"
{adjust(); /*commentDepth++;*/}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 205 "camp.l"
+#line 206 "camp.l"
{adjust(); /*commentDepth--;*/
/*if (commentDepth == 0)*/ BEGIN INITIAL; }
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 207 "camp.l"
+#line 208 "camp.l"
{adjust(); newline(); continue; }
YY_BREAK
case YY_STATE_EOF(lexcomment):
-#line 208 "camp.l"
+#line 209 "camp.l"
{adjust();
setEOF("comment not terminated");
BEGIN INITIAL;
@@ -1375,7 +1376,7 @@ case YY_STATE_EOF(lexcomment):
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 213 "camp.l"
+#line 214 "camp.l"
{adjust(); continue; }
YY_BREAK
@@ -1386,19 +1387,19 @@ case 5:
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 217 "camp.l"
+#line 218 "camp.l"
{adjust(); BEGIN INITIAL;}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 218 "camp.l"
+#line 219 "camp.l"
{adjust();
BEGIN INITIAL;
getstring();
return STRING; }
YY_BREAK
case YY_STATE_EOF(texstring):
-#line 222 "camp.l"
+#line 223 "camp.l"
{adjust();
setEOF("string not terminated");
BEGIN INITIAL;
@@ -1409,22 +1410,22 @@ case YY_STATE_EOF(texstring):
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
-#line 228 "camp.l"
+#line 229 "camp.l"
{adjust(); newline(); append('\n'); continue; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 229 "camp.l"
+#line 230 "camp.l"
{adjust(); append('\\'); append('\\'); continue; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 230 "camp.l"
+#line 231 "camp.l"
{adjust(); append('\"'); continue; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 231 "camp.l"
+#line 232 "camp.l"
{adjust(); append(*yytext); }
YY_BREAK
@@ -1435,19 +1436,19 @@ case 11:
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 235 "camp.l"
+#line 236 "camp.l"
{adjust(); BEGIN INITIAL;}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 236 "camp.l"
+#line 237 "camp.l"
{adjust();
BEGIN INITIAL;
getstring();
return STRING; }
YY_BREAK
case YY_STATE_EOF(cstring):
-#line 240 "camp.l"
+#line 241 "camp.l"
{adjust();
setEOF("string not terminated");
BEGIN INITIAL;
@@ -1458,52 +1459,52 @@ case YY_STATE_EOF(cstring):
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 246 "camp.l"
+#line 247 "camp.l"
{adjust(); newline(); append('\n'); continue; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 247 "camp.l"
+#line 248 "camp.l"
{adjust(); append(yytext[1]); continue; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 248 "camp.l"
+#line 249 "camp.l"
{adjust(); append('\a'); continue; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 249 "camp.l"
+#line 250 "camp.l"
{adjust(); append('\b'); continue; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 250 "camp.l"
+#line 251 "camp.l"
{adjust(); append('\f'); continue; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 251 "camp.l"
+#line 252 "camp.l"
{adjust(); append('\n'); continue; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 252 "camp.l"
+#line 253 "camp.l"
{adjust(); append('\r'); continue; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 253 "camp.l"
+#line 254 "camp.l"
{adjust(); append('\t'); continue; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 254 "camp.l"
+#line 255 "camp.l"
{adjust(); append('\v'); continue; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 255 "camp.l"
+#line 256 "camp.l"
{adjust();
char x=(char)(yytext[1]-'0');
append(x);
@@ -1512,7 +1513,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 260 "camp.l"
+#line 261 "camp.l"
{adjust();
char x=(char)((yytext[1]-'0')*8+yytext[2]-'0');
append(x);
@@ -1521,7 +1522,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 265 "camp.l"
+#line 266 "camp.l"
{adjust();
char x=(char)((yytext[1]-'0')*64+(yytext[2]-'0')*8
+yytext[3]-'0');
@@ -1531,7 +1532,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 271 "camp.l"
+#line 272 "camp.l"
{adjust();
char x=(char) (yytext[2] <= '9' ? yytext[2]-'0' :
10+yytext[2]-'A');
@@ -1541,7 +1542,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 277 "camp.l"
+#line 278 "camp.l"
{adjust();
char x=(char) ((yytext[2] <= '9' ? yytext[2]-'0' :
10+yytext[2]-'A')*16
@@ -1553,390 +1554,390 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 285 "camp.l"
+#line 286 "camp.l"
{adjust(); append(*yytext); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 288 "camp.l"
+#line 289 "camp.l"
{adjust(); continue;}
YY_BREAK
case 29:
/* rule 29 can match eol */
YY_RULE_SETUP
-#line 289 "camp.l"
+#line 290 "camp.l"
{adjust(); newline(); continue;}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 290 "camp.l"
+#line 291 "camp.l"
{adjust(); continue;}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 291 "camp.l"
+#line 292 "camp.l"
{adjust(); return ','; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 292 "camp.l"
+#line 293 "camp.l"
{adjust(); return ':'; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 293 "camp.l"
+#line 294 "camp.l"
{adjust(); return ';'; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 294 "camp.l"
+#line 295 "camp.l"
{adjust(); return '('; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 295 "camp.l"
+#line 296 "camp.l"
{adjust(); return ')'; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 296 "camp.l"
+#line 297 "camp.l"
{adjust(); return '['; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 297 "camp.l"
+#line 298 "camp.l"
{adjust(); return ']'; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 298 "camp.l"
+#line 299 "camp.l"
{adjust(); return '{'; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 299 "camp.l"
+#line 300 "camp.l"
{adjust(); return '}'; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 300 "camp.l"
+#line 301 "camp.l"
{adjust(); return '.'; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 301 "camp.l"
+#line 302 "camp.l"
{adjust(); return ELLIPSIS; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 303 "camp.l"
+#line 304 "camp.l"
{DEFSYMBOL(SYM_PLUS); return '+'; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 304 "camp.l"
+#line 305 "camp.l"
{DEFSYMBOL(SYM_MINUS); return '-'; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 305 "camp.l"
+#line 306 "camp.l"
{DEFSYMBOL(SYM_TIMES); return '*'; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 306 "camp.l"
+#line 307 "camp.l"
{DEFSYMBOL(SYM_DIVIDE); return '/'; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 307 "camp.l"
+#line 308 "camp.l"
{DEFSYMBOL(SYM_MOD); return '%'; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 308 "camp.l"
+#line 309 "camp.l"
{DEFSYMBOL(SYM_CARET); return '^'; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 309 "camp.l"
+#line 310 "camp.l"
{savesymbol(SYM_CARET); return '^'; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 310 "camp.l"
+#line 311 "camp.l"
{adjust(); return '?'; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 311 "camp.l"
+#line 312 "camp.l"
{adjust(); return ASSIGN; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 312 "camp.l"
+#line 313 "camp.l"
{DEFSYMBOL(SYM_EQ); return EQ; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 313 "camp.l"
+#line 314 "camp.l"
{DEFSYMBOL(SYM_NEQ); return NEQ; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 314 "camp.l"
+#line 315 "camp.l"
{DEFSYMBOL(SYM_LT); return LT; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 315 "camp.l"
+#line 316 "camp.l"
{DEFSYMBOL(SYM_LE); return LE; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 316 "camp.l"
+#line 317 "camp.l"
{DEFSYMBOL(SYM_GT); return GT; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 317 "camp.l"
+#line 318 "camp.l"
{DEFSYMBOL(SYM_GE); return GE; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 318 "camp.l"
+#line 319 "camp.l"
{DEFSYMBOL(SYM_CAND); return CAND; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 319 "camp.l"
+#line 320 "camp.l"
{DEFSYMBOL(SYM_COR); return COR; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 320 "camp.l"
+#line 321 "camp.l"
{DEFSYMBOL(SYM_LOGNOT); return LOGNOT; }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 321 "camp.l"
+#line 322 "camp.l"
{DEFSYMBOL(SYM_CARETS); return CARETS; }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 322 "camp.l"
+#line 323 "camp.l"
{DEFSYMBOL(SYM_COLONS); return COLONS; }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 323 "camp.l"
+#line 324 "camp.l"
{DEFSYMBOL(SYM_INCR); return INCR; }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 324 "camp.l"
+#line 325 "camp.l"
{DEFSYMBOL(SYM_DOTS); return DOTS; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 325 "camp.l"
+#line 326 "camp.l"
{DEFSYMBOL(SYM_DASHES); return DASHES; }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 326 "camp.l"
+#line 327 "camp.l"
{DEFSYMBOL(SYM_LONGDASH); return LONGDASH; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 327 "camp.l"
+#line 328 "camp.l"
{DEFSYMBOL(SYM_AMPERSAND); return AMPERSAND; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 328 "camp.l"
+#line 329 "camp.l"
{DEFSYMBOL(SYM_BAR); return BAR; }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 329 "camp.l"
+#line 330 "camp.l"
{makeopsymbol(); return OPERATOR; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 331 "camp.l"
+#line 332 "camp.l"
{savesymbol(SYM_PLUS); return SELFOP; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 332 "camp.l"
+#line 333 "camp.l"
{savesymbol(SYM_MINUS); return SELFOP; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 333 "camp.l"
+#line 334 "camp.l"
{savesymbol(SYM_TIMES); return SELFOP; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 334 "camp.l"
+#line 335 "camp.l"
{savesymbol(SYM_DIVIDE); return SELFOP; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 335 "camp.l"
+#line 336 "camp.l"
{savesymbol(SYM_MOD); return SELFOP; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 336 "camp.l"
+#line 337 "camp.l"
{savesymbol(SYM_CARET); return SELFOP; }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 338 "camp.l"
+#line 339 "camp.l"
{adjust(); return AND; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 339 "camp.l"
+#line 340 "camp.l"
{DEFSYMBOL(SYM_CONTROLS); return CONTROLS; }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 340 "camp.l"
+#line 341 "camp.l"
{DEFSYMBOL(SYM_TENSION); return TENSION; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 341 "camp.l"
+#line 342 "camp.l"
{DEFSYMBOL(SYM_ATLEAST); return ATLEAST; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 342 "camp.l"
+#line 343 "camp.l"
{DEFSYMBOL(SYM_CURL); return CURL; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 344 "camp.l"
+#line 345 "camp.l"
{adjust(); return IF; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 345 "camp.l"
+#line 346 "camp.l"
{adjust(); return ELSE; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 346 "camp.l"
+#line 347 "camp.l"
{adjust(); return WHILE; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 347 "camp.l"
+#line 348 "camp.l"
{adjust(); return FOR; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 348 "camp.l"
+#line 349 "camp.l"
{adjust(); return DO; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 349 "camp.l"
+#line 350 "camp.l"
{adjust(); return RETURN_; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 350 "camp.l"
+#line 351 "camp.l"
{adjust(); return BREAK; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 351 "camp.l"
+#line 352 "camp.l"
{adjust(); return CONTINUE; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 352 "camp.l"
+#line 353 "camp.l"
{adjust(); return STRUCT; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 353 "camp.l"
+#line 354 "camp.l"
{adjust(); return TYPEDEF; }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 354 "camp.l"
+#line 355 "camp.l"
{adjust(); return NEW; }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 355 "camp.l"
+#line 356 "camp.l"
{adjust(); return ACCESS; }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 356 "camp.l"
+#line 357 "camp.l"
{adjust(); return IMPORT; }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 357 "camp.l"
+#line 358 "camp.l"
{adjust(); return UNRAVEL; }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 358 "camp.l"
+#line 359 "camp.l"
{adjust(); return FROM; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 359 "camp.l"
+#line 360 "camp.l"
{adjust(); return INCLUDE; }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 360 "camp.l"
+#line 361 "camp.l"
{adjust(); return QUOTE; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 361 "camp.l"
+#line 362 "camp.l"
{adjust(); makemod(trans::EXPLICIT_STATIC);
return MODIFIER; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 363 "camp.l"
+#line 364 "camp.l"
{adjust(); makeperm(trans::PUBLIC); return PERM; }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 364 "camp.l"
+#line 365 "camp.l"
{adjust(); makeperm(trans::PRIVATE); return PERM; }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 365 "camp.l"
+#line 366 "camp.l"
{adjust(); makeperm(trans::RESTRICTED); return PERM; }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 366 "camp.l"
+#line 367 "camp.l"
{adjust(); return THIS; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 367 "camp.l"
+#line 368 "camp.l"
{adjust(); return EXPLICIT; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 370 "camp.l"
+#line 371 "camp.l"
try {
adjust(); yylval.e= new intExp(here(), lexical::cast<Int>(yytext));
} catch (lexical::bad_cast&) {
@@ -1947,7 +1948,7 @@ try {
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 377 "camp.l"
+#line 378 "camp.l"
try {
adjust(); yylval.e= new realExp(here(), lexical::cast<double>(yytext));
} catch (lexical::bad_cast&) {
@@ -1958,53 +1959,53 @@ try {
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 384 "camp.l"
+#line 385 "camp.l"
{
adjust(); yylval.e= new booleanExp(here(), true); return LIT; }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 386 "camp.l"
+#line 387 "camp.l"
{
adjust(); yylval.e= new booleanExp(here(), false); return LIT; }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 388 "camp.l"
+#line 389 "camp.l"
{
adjust(); yylval.e= new nullExp(here()); return LIT; }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 390 "camp.l"
+#line 391 "camp.l"
{
adjust(); yylval.e= new cycleExp(here()); return LIT; }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 392 "camp.l"
+#line 393 "camp.l"
{
adjust(); yylval.e= new newPictureExp(here()); return LIT; }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 395 "camp.l"
+#line 396 "camp.l"
{adjust(); BEGIN opname; }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 397 "camp.l"
+#line 398 "camp.l"
{adjust(); continue;}
YY_BREAK
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
-#line 398 "camp.l"
+#line 399 "camp.l"
{adjust(); newline(); continue;}
YY_BREAK
case YY_STATE_EOF(opname):
-#line 399 "camp.l"
+#line 400 "camp.l"
{adjust();
setEOF("missing operator name");
BEGIN INITIAL;
@@ -2013,7 +2014,7 @@ case YY_STATE_EOF(opname):
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 404 "camp.l"
+#line 405 "camp.l"
{ savesymbol(SYM_CARET);
BEGIN INITIAL;
return ID;
@@ -2021,7 +2022,7 @@ YY_RULE_SETUP
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 408 "camp.l"
+#line 409 "camp.l"
{
makeopsymbol();
BEGIN INITIAL;
@@ -2029,7 +2030,7 @@ YY_RULE_SETUP
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 412 "camp.l"
+#line 413 "camp.l"
{
makeopsymbol();
BEGIN INITIAL;
@@ -2037,40 +2038,40 @@ YY_RULE_SETUP
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 416 "camp.l"
+#line 417 "camp.l"
{}
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 419 "camp.l"
+#line 420 "camp.l"
{
makesymbol();
return ID; }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 423 "camp.l"
+#line 424 "camp.l"
{adjust(); /*commentDepth = 1;*/ BEGIN lexcomment; }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 424 "camp.l"
+#line 425 "camp.l"
{startstring(); BEGIN texstring; }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 425 "camp.l"
+#line 426 "camp.l"
{startstring(); BEGIN cstring; }
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(lexformat):
-#line 427 "camp.l"
+#line 428 "camp.l"
{ setEOF("unexpected end of input"); yyterminate(); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 429 "camp.l"
+#line 430 "camp.l"
{adjust();
error();
em << "invalid token";
@@ -2080,10 +2081,10 @@ YY_RULE_SETUP
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 435 "camp.l"
+#line 436 "camp.l"
ECHO;
YY_BREAK
-#line 2087 "lex.yy.cc"
+#line 2088 "lex.yy.cc"
case YY_END_OF_BUFFER:
{
@@ -3216,4 +3217,4 @@ void yyfree (void * ptr )
/* %ok-for-header */
-#line 435 "camp.l"
+#line 436 "camp.l"
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index bd07c34a537..6be24a1df42 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -53,6 +53,12 @@ namespace run {
void purge();
}
+#ifdef PROFILE
+namespace vm {
+extern void dumpProfile();
+};
+#endif
+
#ifdef HAVE_LIBSIGSEGV
void stackoverflow_handler (int, stackoverflow_context_t)
{
@@ -155,6 +161,10 @@ void *asymain(void *A)
}
}
+#ifdef PROFILE
+ vm::dumpProfile();
+#endif
+
if(getSetting<bool>("wait")) {
int status;
while(wait(&status) > 0);
diff --git a/Build/source/utils/asymptote/mathop.h b/Build/source/utils/asymptote/mathop.h
index 97772d8e799..572a9f7ee1b 100644
--- a/Build/source/utils/asymptote/mathop.h
+++ b/Build/source/utils/asymptote/mathop.h
@@ -143,7 +143,8 @@ struct times<Int> {
Int operator() (Int x, Int y, size_t i=0) {
if(y == 0) return 0;
if(y < 0) {y=-y; x=-x;}
- if(x > Int_MAX/y || x < Int_MIN/y)
+ if((y > int_MAX || x > int_MAX/(int) y || x < int_MIN/(int) y) &&
+ (x > Int_MAX/y || x < Int_MIN/y))
integeroverflow(i);
return x*y;
}
diff --git a/Build/source/utils/asymptote/memory.h b/Build/source/utils/asymptote/memory.h
index 6f91095fb52..ccf0436c500 100644
--- a/Build/source/utils/asymptote/memory.h
+++ b/Build/source/utils/asymptote/memory.h
@@ -121,13 +121,17 @@ template <typename T, typename Container = vector<T> >
struct stack : public std::stack<T, Container>, public gc {
};
+#define PAIR_ALLOC gc_allocator<std::pair<CONST Key,T> > /* space */
+
#undef GC_CONTAINER
#define GC_CONTAINER(KIND) \
- template <typename Key, typename T, typename Compare = std::less<Key> > \
- struct KIND : public \
- std::KIND<Key,T,Compare,gc_allocator<std::pair<Key,T> > >, public gc { \
- KIND() : std::KIND<Key,T,Compare,gc_allocator<std::pair<Key,T> > > () {} \
+ template <typename Key, \
+ typename T, \
+ typename Compare = std::less<Key> > \
+ struct KIND : public std::KIND<Key,T,Compare,PAIR_ALLOC>, public gc \
+ { \
+ KIND() : std::KIND<Key,T,Compare,PAIR_ALLOC> () {} \
}
GC_CONTAINER(map);
@@ -141,10 +145,10 @@ GC_CONTAINER(multimap);
typename Hash = EXT::hash<Key>, \
typename Eq = std::equal_to<Key> > \
struct KIND : public \
- EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > >, public gc { \
- KIND() : EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > > () {} \
+ EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC>, public gc { \
+ KIND() : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> () {} \
KIND(size_t n) \
- : EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > > (n) {} \
+ : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> (n) {} \
}
GC_CONTAINER(unordered_map);
@@ -154,6 +158,8 @@ GC_CONTAINER(unordered_multimap);
#undef EXT
#endif
+#undef PAIR_ALLOC
+
#ifdef USEGC
typedef std::basic_string<char,std::char_traits<char>,
gc_allocator<char> > string;
diff --git a/Build/source/utils/asymptote/opcodes.h b/Build/source/utils/asymptote/opcodes.h
new file mode 100644
index 00000000000..71c0de41aa8
--- /dev/null
+++ b/Build/source/utils/asymptote/opcodes.h
@@ -0,0 +1,46 @@
+/*****
+ * opcodes.h
+ * Andy Hammerlindl 2010/10/24
+ *
+ * A list of the virtual machine opcodes, defined by the macro OPCODE.
+ *****/
+
+/* The first parameter is the name of the opcode. The second parameter is a
+ * character indicating what additional information (if any) is encoded with
+ * the opcode:
+ * x - nothing
+ * n - integer
+ * t - item
+ * b - builtin
+ * l - lambda pointer
+ * o - instruction offset
+ */
+
+OPCODE(nop, 'x')
+OPCODE(pop,'x')
+OPCODE(intpush,'n')
+OPCODE(constpush,'t')
+OPCODE(varpush,'n')
+OPCODE(varsave,'n')
+OPCODE(fieldpush,'n')
+OPCODE(fieldsave,'n')
+OPCODE(builtin,'b')
+OPCODE(jmp,'o')
+OPCODE(cjmp,'o')
+OPCODE(njmp,'o')
+OPCODE(popcall,'x')
+OPCODE(pushclosure,'x')
+OPCODE(makefunc,'l')
+OPCODE(ret,'x')
+OPCODE(pushframe,'n')
+OPCODE(popframe,'x')
+
+OPCODE(push_default,'x')
+OPCODE(jump_if_not_default,'o')
+
+#ifdef COMBO
+OPCODE(varpop,'n')
+OPCODE(fieldpop,'n')
+
+OPCODE(gejmp,'o')
+#endif
diff --git a/Build/source/utils/asymptote/opsymbols.pl b/Build/source/utils/asymptote/opsymbols.pl
index 3f18388bc53..6ff3c9d1ecd 100755
--- a/Build/source/utils/asymptote/opsymbols.pl
+++ b/Build/source/utils/asymptote/opsymbols.pl
@@ -27,13 +27,6 @@ END
sub add {
print header "OPSYMBOL(\"".$_[0]."\", " . $_[1] . ");\n";
- my $sym = $_[0];
- my $name = $_[1];
- print header <<END;
-#ifndef PRESYM
-#define $name sym::symbol::opTrans("$sym")
-#endif
-END
}
open(lexer, "camp.l") ||
diff --git a/Build/source/utils/asymptote/path.cc b/Build/source/utils/asymptote/path.cc
index 070ec2acd61..338c48d7d41 100644
--- a/Build/source/utils/asymptote/path.cc
+++ b/Build/source/utils/asymptote/path.cc
@@ -13,7 +13,6 @@
#include "angle.h"
#include "camperror.h"
#include "mathop.h"
-#include "arrayop.h"
#include "predicates.h"
#include "rounding.h"
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index 3ebdf94e6db..dd2352d756b 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -241,6 +241,18 @@ void texinit()
} else {
if(!dir.empty())
cmd.push_back("-output-directory="+dir.substr(0,dir.length()-1));
+ if(getSetting<bool>("inlinetex")) {
+ string name=stripDir(stripExt((outname())));
+ size_t pos=name.rfind("-");
+ if(pos < string::npos) {
+ name=stripExt(name).substr(0,pos);
+ unlink((name+".aux").c_str());
+ cmd.push_back("-jobname="+name.substr(0,pos));
+#ifdef __CYGWIN__
+ cmd.push_back("NUL"); // For MikTeX
+#endif
+ }
+ }
cmd.push_back("\\scrollmode");
}
@@ -366,27 +378,48 @@ bool picture::texprocess(const string& texname, const string& outname,
bool first=true;
transform t=shift(bboxshift)*T;
bool shift=!t.isIdentity();
- string beginspecial="TeXDict begin @defspecial";
- string endspecial="@fedspecial end";
+
+ const string beginspecial="TeXDict begin @defspecial";
+ const size_t beginlength=beginspecial.size();
+ const string endspecial="@fedspecial end";
+ const size_t endlength=endspecial.size();
+
while(getline(fin,s)) {
- if(s.find("%%DocumentPaperSizes:") == 0) continue;
- if(s.find("%!PS-Adobe-") == 0) {
- fout.header();
- } else if(first && s.find("%%BoundingBox:") == 0) {
- bbox box=b;
- box.shift(bboxshift);
- if(verbose > 2) BoundingBox(cout,box);
- fout.BoundingBox(box);
- first=false;
- } else if(shift && s.find(beginspecial) == 0) {
- fout.verbatimline(s);
- fout.gsave();
- fout.concat(t);
- } else if(shift && s.find(endspecial) == 0) {
- fout.grestore();
- fout.verbatimline(s);
- } else
- fout.verbatimline(s);
+ if (s[0] == '%') {
+ if (s.find("%%DocumentPaperSizes:") == 0)
+ continue;
+
+ if(s.find("%!PS-Adobe-") == 0) {
+ fout.header();
+ continue;
+ }
+
+ if (first && s.find("%%BoundingBox:") == 0) {
+ bbox box=b;
+ box.shift(bboxshift);
+ if(verbose > 2) BoundingBox(cout,box);
+ fout.BoundingBox(box);
+ first=false;
+ continue;
+ }
+ }
+
+ if (shift) {
+ if (s.compare(0, beginlength, beginspecial) == 0) {
+ fout.verbatimline(s);
+ fout.gsave();
+ fout.concat(t);
+ continue;
+ }
+ if (s.compare(0, endlength, endspecial) == 0) {
+ fout.grestore();
+ fout.verbatimline(s);
+ continue;
+ }
+ }
+
+ // For the default line, output it unchanged.
+ fout.verbatimline(s);
}
}
if(!keep) {
@@ -430,6 +463,7 @@ int picture::epstopdf(const string& epsname, const string& pdfname)
cmd.push_back("-dMaxSubsetPct=100");
cmd.push_back("-dPDFSETTINGS=/prepress");
cmd.push_back("-dCompatibilityLevel=1.4");
+ cmd.push_back("-P");
if(safe)
cmd.push_back("-dSAFER");
if(!getSetting<bool>("autorotate"))
@@ -878,7 +912,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
}
if(status) {
if(xobject) {
- if(transparency)
+ if(pdf || transparency)
status=(epstopdf(prename,Outname(prefix,"pdf",standardout)) == 0);
} else {
if(context) prename=stripDir(prename);
diff --git a/Build/source/utils/asymptote/prc/Makefile b/Build/source/utils/asymptote/prc/Makefile
index 22f67e29725..af1a50084dd 100644
--- a/Build/source/utils/asymptote/prc/Makefile
+++ b/Build/source/utils/asymptote/prc/Makefile
@@ -10,6 +10,12 @@ FILES = PRCbitStream oPRCFile PRCdouble writePRC
test: $(FILES:=.o) test.cc
$(CXX) $(CFLAGS) -o test $(FILES:=.o) test.cc -lz
+test_tess: $(FILES:=.o) test_tess.cc
+ $(CXX) $(CFLAGS) -o test_tess $(FILES:=.o) test_tess.cc -lz
+
+test_mesh: $(FILES:=.o) test_mesh.cc
+ $(CXX) $(CFLAGS) -o test_mesh $(FILES:=.o) test_mesh.cc -lz
+
.SUFFIXES: .c .cc .o .d
.cc.o:
$(CXX) $(CFLAGS) $(INCL) -o $@ -c $<
@@ -31,4 +37,4 @@ ifeq (,$(findstring clean,${MAKECMDGOALS}))
endif
clean:
- rm -f *.o *.d test.prc test
+ rm -f *.o *.d test test_tess
diff --git a/Build/source/utils/asymptote/prc/PRC.h b/Build/source/utils/asymptote/prc/PRC.h
index 8acaa453ca3..9ce6ea70e0e 100644
--- a/Build/source/utils/asymptote/prc/PRC.h
+++ b/Build/source/utils/asymptote/prc/PRC.h
@@ -1,7 +1,20 @@
#ifndef __PRC_H
#define __PRC_H
+#ifdef _MSC_VER
+#if _MSC_VER >= 1600
+#include <stdint.h>
+#else
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed long int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;
+#endif // _MSC_VER >= 1600
+#else
#include <inttypes.h>
+#endif // _MSC_VER
//const uint32_t PRCVersion=7094; // For Adobe Reader 8 or later
const uint32_t PRCVersion=8137; // For Adobe Reader 9 or later
diff --git a/Build/source/utils/asymptote/prc/PRCbitStream.cc b/Build/source/utils/asymptote/prc/PRCbitStream.cc
index 6ee4d8b45e7..bb013dcefe9 100644
--- a/Build/source/utils/asymptote/prc/PRCbitStream.cc
+++ b/Build/source/utils/asymptote/prc/PRCbitStream.cc
@@ -81,6 +81,19 @@ void PRCbitStream::compress()
deflateEnd(&strm);
}
+void PRCbitStream::write(std::ostream &out) const
+{
+ if(compressed)
+ {
+ out.write((char*)data,compressedDataSize);
+ }
+ else
+ {
+ cerr << "Attempt to write stream before compression." << endl;
+ exit(1);
+ }
+}
+
unsigned int PRCbitStream::getSize() const
{
if(compressed)
diff --git a/Build/source/utils/asymptote/prc/PRCbitStream.h b/Build/source/utils/asymptote/prc/PRCbitStream.h
index 89482168f9e..67142586e50 100644
--- a/Build/source/utils/asymptote/prc/PRCbitStream.h
+++ b/Build/source/utils/asymptote/prc/PRCbitStream.h
@@ -21,8 +21,23 @@
#ifndef __PRC_BIT_STREAM_H
#define __PRC_BIT_STREAM_H
+#ifdef _MSC_VER
+#include <stdio.h>
+#if _MSC_VER >= 1600
+#include <stdint.h>
+#else
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed long int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;
+#endif // _MSC_VER >= 1600
+#else
#include <inttypes.h>
+#endif // _MSC_VER
#include <string>
+#include <iostream>
#include <stdlib.h>
#define CHUNK_SIZE (1024)
@@ -52,6 +67,7 @@ class PRCbitStream
PRCbitStream& operator <<(const char*);
void compress();
+ void write(std::ostream &out) const;
private:
void writeBit(bool);
void writeBits(uint32_t,uint8_t);
diff --git a/Build/source/utils/asymptote/prc/oPRCFile.cc b/Build/source/utils/asymptote/prc/oPRCFile.cc
index bef8191d703..cc4c302209f 100644
--- a/Build/source/utils/asymptote/prc/oPRCFile.cc
+++ b/Build/source/utils/asymptote/prc/oPRCFile.cc
@@ -30,6 +30,12 @@
#define WriteUnsignedInteger( value ) out << (uint32_t)(value);
#define WriteInteger( value ) out << (int32_t)(value);
+#define WriteDouble( value ) out << (double)(value);
+#define WriteString( value ) out << (value);
+#define WriteUncompressedUnsignedInteger( value ) writeUncompressedUnsignedInteger(out, (uint32_t)(value));
+#define WriteUncompressedBlock( value, count ) out.write((char *)(value),(count));
+#define SerializeFileStructureUncompressedUniqueId( value ) (value).serializeFileStructureUncompressedUniqueId(out);
+#define SerializeCompressedUniqueId( value ) (value).serializeCompressedUniqueId(out);
#define SerializeContentPRCBase write(out);
#define SerializeRgbColor( value ) (value).serializeRgbColor(out);
#define SerializePicture( value ) (value).serializePicture(out);
@@ -39,46 +45,51 @@
#define SerializeFontKeysSameFont( value ) (value).serializeFontKeysSameFont(out);
#define SerializeMaterial( value ) (value)->serializeMaterial(out);
+#define SerializeUserData UserData(0,0).write(out);
+#define SerializeEmptyContentPRCBase EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
#define SerializeCategory1LineStyle( value ) (value)->serializeCategory1LineStyle(out);
#define SerializeCoordinateSystem( value ) (value)->serializeCoordinateSystem(out);
#define SerializeRepresentationItem( value ) (value)->serializeRepresentationItem(out);
#define SerializePartDefinition( value ) (value)->serializePartDefinition(out);
#define SerializeProductOccurrence( value ) (value)->serializeProductOccurrence(out);
-#define SerializeContextAndBodies( value ) (fileStructure->value)->serializeContextAndBodies(out);
-#define SerializeGeometrySummary( value ) (fileStructure->value)->serializeGeometrySummary(out);
-#define SerializeContextGraphics( value ) (fileStructure->value)->serializeContextGraphics(out);
+#define SerializeContextAndBodies( value ) (value)->serializeContextAndBodies(out);
+#define SerializeGeometrySummary( value ) (value)->serializeGeometrySummary(out);
+#define SerializeContextGraphics( value ) (value)->serializeContextGraphics(out);
+#define SerializeStartHeader serializeStartHeader(out);
+#define SerializeUncompressedFiles \
+ { \
+ const uint32_t number_of_uncompressed_files = uncompressed_files.size(); \
+ WriteUncompressedUnsignedInteger (number_of_uncompressed_files) \
+ for(PRCUncompressedFileList::const_iterator it = uncompressed_files.begin(); it != uncompressed_files.end(); it++) \
+ { \
+ WriteUncompressedUnsignedInteger ((*it)->file_size) \
+ WriteUncompressedBlock ((*it)->data, (*it)->file_size) \
+ } \
+ }
+#define SerializeModelFileData serializeModelFileData(modelFile_out); modelFile_out.compress();
+#define SerializeUnit( value ) (value).serializeUnit(out);
using std::string;
using namespace std;
-void PRCCompressedSection::write(ostream &out)
+// Map [0,1] to [0,255]
+inline uint8_t byte(double r)
{
- if(prepared)
- out.write((char*)data,getSize());
+ if(r < 0.0) r=0.0;
+ else if(r > 1.0) r=1.0;
+ int a=(int)(256.0*r);
+ if(a == 256) a=255;
+ return a;
}
-void PRCCompressedSection::prepare()
-{
- writeData();
- compress();
- prepared = true;
-}
-
-uint32_t PRCCompressedSection::getSize()
-{
- if(!prepared)
- return m1;
- else
- return out.getSize();
-}
-
-void PRCGlobalsSection::writeData()
+void PRCFileStructure::serializeFileStructureGlobals(PRCbitStream &out)
{
// even though this is technically not part of this section,
// it is handled here for convenience
- out << (uint32_t)(0); // number of schemas
- uint32_t i=0; // universal index for PRC standard compatibility
- out << (uint32_t)PRC_TYPE_ASM_FileStructureGlobals;
+ const uint32_t number_of_schema = 0;
+ WriteUnsignedInteger (number_of_schema)
+
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureGlobals)
PRCSingleAttribute sa((int32_t)PRCVersion);
PRCAttribute a("__PRC_RESERVED_ATTRIBUTE_PRCInternalVersion");
@@ -86,37 +97,39 @@ void PRCGlobalsSection::writeData()
ContentPRCBase cb;
cb.addAttribute(a);
cb.serializeContentPRCBase(out);
- out << numberOfReferencedFileStructures; // no referencing of file structures
- out << tessellationChordHeightRatio;
- out << tessellationAngleDegrees;
- out << defaultFontFamilyName; // markup serialization helper
+ WriteUnsignedInteger (number_of_referenced_file_structures)
+ // SerializeFileStructureInternalGlobalData
+ WriteDouble (tessellation_chord_height_ratio)
+ WriteDouble (tessellation_angle_degree)
+
+ // SerializeMarkupSerializationHelper
+ WriteString (default_font_family_name)
const uint32_t number_of_fonts = font_keys_of_font.size();
WriteUnsignedInteger (number_of_fonts)
- for (i=0;i<number_of_fonts;i++)
+ for (uint32_t i=0;i<number_of_fonts;i++)
{
SerializeFontKeysSameFont (font_keys_of_font[i])
}
-
const uint32_t number_of_colors = colors.size();
WriteUnsignedInteger (number_of_colors)
- for (i=0;i<number_of_colors;i++)
+ for (uint32_t i=0;i<number_of_colors;i++)
SerializeRgbColor (colors[i])
const uint32_t number_of_pictures = pictures.size();
WriteUnsignedInteger (number_of_pictures)
- for (i=0;i<number_of_pictures;i++)
+ for (uint32_t i=0;i<number_of_pictures;i++)
SerializePicture (pictures[i])
const uint32_t number_of_texture_definitions = texture_definitions.size();
WriteUnsignedInteger (number_of_texture_definitions)
- for (i=0;i<number_of_texture_definitions;i++)
+ for (uint32_t i=0;i<number_of_texture_definitions;i++)
SerializeTextureDefinition (texture_definitions[i])
const uint32_t number_of_materials = materials.size();
WriteUnsignedInteger (number_of_materials)
- for (i=0;i<number_of_materials;i++)
+ for (uint32_t i=0;i<number_of_materials;i++)
SerializeMaterial (materials[i])
out << (uint32_t)1 // number of line patterns hard coded for now
@@ -128,95 +141,100 @@ void PRCGlobalsSection::writeData()
const uint32_t number_of_styles = styles.size();
WriteUnsignedInteger (number_of_styles)
- for (i=0;i<number_of_styles;i++)
+ for (uint32_t i=0;i<number_of_styles;i++)
SerializeCategory1LineStyle (styles[i])
- out << numberOfFillPatterns;
+ const uint32_t number_of_fill_patterns = 0;
+ WriteUnsignedInteger (number_of_fill_patterns)
const uint32_t number_of_reference_coordinate_systems = reference_coordinate_systems.size();
WriteUnsignedInteger (number_of_reference_coordinate_systems)
- for (i=0;i<number_of_reference_coordinate_systems;i++)
+ for (uint32_t i=0;i<number_of_reference_coordinate_systems;i++)
SerializeCoordinateSystem (reference_coordinate_systems[i])
- userData.write(out);
+ SerializeUserData
}
-void PRCTreeSection::writeData()
+void PRCFileStructure::serializeFileStructureTree(PRCbitStream &out)
{
- out << (uint32_t)(PRC_TYPE_ASM_FileStructureTree);
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureTree)
- EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
+ SerializeEmptyContentPRCBase
uint32_t number_of_part_definitions = part_definitions.size();
- WriteUnsignedInteger (number_of_part_definitions)
+ WriteUnsignedInteger (number_of_part_definitions)
for (uint32_t i=0;i<number_of_part_definitions;i++)
- SerializePartDefinition (part_definitions[i])
+ SerializePartDefinition (part_definitions[i])
uint32_t number_of_product_occurrences = product_occurrences.size();
- WriteUnsignedInteger (number_of_product_occurrences)
+ WriteUnsignedInteger (number_of_product_occurrences)
for (uint32_t i=0;i<number_of_product_occurrences;i++)
{
product_occurrences[i]->unit_information.unit_from_CAD_file = true;
product_occurrences[i]->unit_information.unit = unit;
- SerializeProductOccurrence (product_occurrences[i])
+ SerializeProductOccurrence (product_occurrences[i])
}
- // File Structure Internal Data
- out << (uint32_t)(PRC_TYPE_ASM_FileStructure);
- EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
- out << makePRCID(); // next available index
- out << (uint32_t)1; // product occurrence index
+ // SerializeFileStructureInternalData
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructure)
+ SerializeEmptyContentPRCBase
+ const uint32_t next_available_index = makePRCID();
+ WriteUnsignedInteger (next_available_index)
+ const uint32_t index_product_occurence = number_of_product_occurrences; // Asymptote (oPRCFile) specific - we write the root product last
+ WriteUnsignedInteger (index_product_occurence)
- UserData(0,0).write(out);
+ SerializeUserData
}
-void PRCTessellationSection::writeData()
+void PRCFileStructure::serializeFileStructureTessellation(PRCbitStream &out)
{
- out << (uint32_t)(PRC_TYPE_ASM_FileStructureTessellation);
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureTessellation)
- EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
+ SerializeEmptyContentPRCBase
const uint32_t number_of_tessellations = tessellations.size();
- WriteUnsignedInteger (number_of_tessellations)
+ WriteUnsignedInteger (number_of_tessellations)
for (uint32_t i=0;i<number_of_tessellations;i++)
tessellations[i]->serializeBaseTessData(out);
- UserData(0,0).write(out); // no user data
+
+ SerializeUserData
}
-void PRCGeometrySection::writeData()
+void PRCFileStructure::serializeFileStructureGeometry(PRCbitStream &out)
{
- WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureGeometry)
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureGeometry)
- EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
- const uint32_t number_of_contexts = fileStructure->contexts.size();
- WriteUnsignedInteger (number_of_contexts)
- for (uint32_t i=0;i<number_of_contexts;i++)
- SerializeContextAndBodies (contexts[i])
+ SerializeEmptyContentPRCBase
+ const uint32_t number_of_contexts = contexts.size();
+ WriteUnsignedInteger (number_of_contexts)
+ for (uint32_t i=0;i<number_of_contexts;i++)
+ SerializeContextAndBodies (contexts[i])
- UserData(0,0).write(out);
+ SerializeUserData
}
-void PRCExtraGeometrySection::writeData()
+void PRCFileStructure::serializeFileStructureExtraGeometry(PRCbitStream &out)
{
- WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureExtraGeometry)
+ WriteUnsignedInteger (PRC_TYPE_ASM_FileStructureExtraGeometry)
- EMPTY_CONTENTPRCBASE.serializeContentPRCBase(out);
- const uint32_t number_of_contexts = fileStructure->contexts.size();
- WriteUnsignedInteger (number_of_contexts)
- for (uint32_t i=0;i<number_of_contexts;i++)
- {
- SerializeGeometrySummary (contexts[i])
- SerializeContextGraphics (contexts[i])
- }
+ SerializeEmptyContentPRCBase
+ const uint32_t number_of_contexts = contexts.size();
+ WriteUnsignedInteger (number_of_contexts)
+ for (uint32_t i=0;i<number_of_contexts;i++)
+ {
+ SerializeGeometrySummary (contexts[i])
+ SerializeContextGraphics (contexts[i])
+ }
- UserData(0,0).write(out);
+ SerializeUserData
}
-void PRCModelFile::writeData()
+void oPRCFile::serializeModelFileData(PRCbitStream &out)
{
// even though this is technically not part of this section,
// it is handled here for convenience
- out << (uint32_t)(0); // number of schemas
- out << (uint32_t)(PRC_TYPE_ASM_ModelFile);
+ const uint32_t number_of_schema = 0;
+ WriteUnsignedInteger (number_of_schema)
+ WriteUnsignedInteger (PRC_TYPE_ASM_ModelFile)
PRCSingleAttribute sa((int32_t)PRCVersion);
PRCAttribute a("__PRC_RESERVED_ATTRIBUTE_PRCInternalVersion");
@@ -225,90 +243,65 @@ void PRCModelFile::writeData()
cb.addAttribute(a);
cb.serializeContentPRCBase(out);
- writeUnit(out,true,unit); // unit is specified, and happens to come from a CAD file
+ SerializeUnit (unit)
out << (uint32_t)1; // 1 product occurrence
//UUID
- out << parent->fileStructures[0]->header.fileStructureUUID[0]
- << parent->fileStructures[0]->header.fileStructureUUID[1]
- << parent->fileStructures[0]->header.fileStructureUUID[2]
- << parent->fileStructures[0]->header.fileStructureUUID[3];
+ SerializeCompressedUniqueId( fileStructures[0]->file_structure_uuid )
// index+1
- out << (uint32_t)parent->fileStructures[0]->tree.product_occurrences.size();
+ out << (uint32_t)fileStructures[0]->product_occurrences.size();
// active
out << true;
out << (uint32_t)0; // index in model file
- UserData(0,0).write(out);
+ SerializeUserData
}
-void makeFileUUID(uint32_t *UUID)
+void makeFileUUID(PRCUniqueId& UUID)
{
// make a UUID
static uint32_t count = 0;
++count;
// the minimum requirement on UUIDs is that all must be unique in the file
- UUID[0] = 0x33595341; // some constant
- UUID[1] = time(NULL); // the time
- UUID[2] = count;
- UUID[3] = 0xa5a55a5a; // Something random, not seeded by the time, would be nice. But for now, a constant
+ UUID.id0 = 0x33595341; // some constant
+ UUID.id1 = (uint32_t)time(NULL); // the time
+ UUID.id2 = count;
+ UUID.id3 = 0xa5a55a5a; // Something random, not seeded by the time, would be nice. But for now, a constant
// maybe add something else to make it more unique
// so multiple files can be combined
// a hash of some data perhaps?
}
-void makeAppUUID(uint32_t *UUID)
-{
- UUID[0] = UUID[1] = UUID[2] = UUID[3] = 0;
-}
-
-void writeUINT32_T(ostream &out, uint32_t data)
+void makeAppUUID(PRCUniqueId& UUID)
{
-#ifdef WORDS_BIGENDIAN
- out.write(((char*)&data)+3,1);
- out.write(((char*)&data)+2,1);
- out.write(((char*)&data)+1,1);
- out.write(((char*)&data)+0,1);
-#else
- out.write(((char*)&data)+0,1);
- out.write(((char*)&data)+1,1);
- out.write(((char*)&data)+2,1);
- out.write(((char*)&data)+3,1);
-#endif
+ UUID.id0 = UUID.id1 = UUID.id2 = UUID.id3 = 0;
}
-void PRCUncompressedFile::write(ostream &out)
+void PRCUncompressedFile::write(ostream &out) const
{
if(data!=NULL)
{
- writeUINT32_T(out,file_size);
+ WriteUncompressedUnsignedInteger (file_size)
out.write((char*)data,file_size);
}
}
-uint32_t PRCUncompressedFile::getSize()
+uint32_t PRCUncompressedFile::getSize() const
{
return sizeof(file_size)+file_size;
}
-void PRCStartHeader::write(ostream &out)
+void PRCStartHeader::serializeStartHeader(ostream &out) const
{
- out.write("PRC",3);
- writeUINT32_T(out,minimal_version_for_read);
- writeUINT32_T(out,authoring_version);
- writeUINT32_T(out,fileStructureUUID[0]);
- writeUINT32_T(out,fileStructureUUID[1]);
- writeUINT32_T(out,fileStructureUUID[2]);
- writeUINT32_T(out,fileStructureUUID[3]);
-
- writeUINT32_T(out,applicationUUID[0]);
- writeUINT32_T(out,applicationUUID[1]);
- writeUINT32_T(out,applicationUUID[2]);
- writeUINT32_T(out,applicationUUID[3]);
+ WriteUncompressedBlock ("PRC",3)
+ WriteUncompressedUnsignedInteger (minimal_version_for_read)
+ WriteUncompressedUnsignedInteger (authoring_version)
+ SerializeFileStructureUncompressedUniqueId( file_structure_uuid );
+ SerializeFileStructureUncompressedUniqueId( application_uuid );
}
-uint32_t PRCStartHeader::getSize()
+uint32_t PRCStartHeader::getStartHeaderSize() const
{
return 3+(2+2*4)*sizeof(uint32_t);
}
@@ -316,64 +309,65 @@ uint32_t PRCStartHeader::getSize()
void PRCFileStructure::write(ostream &out)
{
- header.write(out);
- uint32_t number_of_uncompressed_files = uncompressedFiles.size();
- writeUINT32_T(out,number_of_uncompressed_files);
- for(list<PRCUncompressedFile>::iterator i = uncompressedFiles.begin(); i != uncompressedFiles.end(); i++)
- i->write(out);
- globals.write(out);
- tree.write(out);
- tessellations.write(out);
- geometry.write(out);
- extraGeometry.write(out);
-}
-
+ // SerializeFileStructureHeader
+ SerializeStartHeader
+ SerializeUncompressedFiles
+ globals_out.write(out);
+ tree_out.write(out);
+ tessellations_out.write(out);
+ geometry_out.write(out);
+ extraGeometry_out.write(out);
+}
+
+#define SerializeFileStructureGlobals serializeFileStructureGlobals(globals_out); globals_out.compress(); sizes[1]=globals_out.getSize();
+#define SerializeFileStructureTree serializeFileStructureTree(tree_out); tree_out.compress(); sizes[2]=tree_out.getSize();
+#define SerializeFileStructureTessellation serializeFileStructureTessellation(tessellations_out); tessellations_out.compress(); sizes[3]=tessellations_out.getSize();
+#define SerializeFileStructureGeometry serializeFileStructureGeometry(geometry_out); geometry_out.compress(); sizes[4]=geometry_out.getSize();
+#define SerializeFileStructureExtraGeometry serializeFileStructureExtraGeometry(extraGeometry_out); extraGeometry_out.compress(); sizes[5]=extraGeometry_out.getSize();
+#define FlushSerialization resetGraphicsAndName();
void PRCFileStructure::prepare()
{
- globals.prepare();
- resetGraphicsAndName();
+ uint32_t size = 0;
+ size += getStartHeaderSize();
+ size += sizeof(uint32_t);
+ for(PRCUncompressedFileList::const_iterator it = uncompressed_files.begin(); it != uncompressed_files.end(); it++)
+ size += (*it)->getSize();
+ sizes[0]=size;
- tree.prepare();
- resetGraphicsAndName();
+ SerializeFileStructureGlobals
+ FlushSerialization
- tessellations.prepare();
- resetGraphicsAndName();
+ SerializeFileStructureTree
+ FlushSerialization
- geometry.prepare();
- resetGraphicsAndName();
+ SerializeFileStructureTessellation
+ FlushSerialization
- extraGeometry.prepare();
- resetGraphicsAndName();
+ SerializeFileStructureGeometry
+ FlushSerialization
+
+ SerializeFileStructureExtraGeometry
+ FlushSerialization
}
uint32_t PRCFileStructure::getSize()
{
uint32_t size = 0;
- size += header.getSize();
- size += sizeof(uint32_t);
- for(list<PRCUncompressedFile>::iterator i = uncompressedFiles.begin(); i != uncompressedFiles.end(); i++)
- size += i->getSize();
- size += globals.getSize();
- size += tree.getSize();
- size += tessellations.getSize();
- size += geometry.getSize();
- size += extraGeometry.getSize();
+ for(size_t i=0; i<6; i++)
+ size += sizes[i];
return size;
}
void PRCFileStructureInformation::write(ostream &out)
{
- writeUINT32_T(out,UUID[0]);
- writeUINT32_T(out,UUID[1]);
- writeUINT32_T(out,UUID[2]);
- writeUINT32_T(out,UUID[3]);
+ SerializeFileStructureUncompressedUniqueId( UUID );
- writeUINT32_T(out,reserved);
- writeUINT32_T(out,number_of_offsets);
+ WriteUncompressedUnsignedInteger (reserved)
+ WriteUncompressedUnsignedInteger (number_of_offsets)
for(uint32_t i = 0; i < number_of_offsets; ++i)
{
- writeUINT32_T(out,offsets[i]);
+ WriteUncompressedUnsignedInteger (offsets[i])
}
}
@@ -384,28 +378,25 @@ uint32_t PRCFileStructureInformation::getSize()
void PRCHeader::write(ostream &out)
{
- startHeader.write(out);
- writeUINT32_T(out,number_of_file_structures);
+ SerializeStartHeader
+ WriteUncompressedUnsignedInteger (number_of_file_structures)
for(uint32_t i = 0; i < number_of_file_structures; ++i)
{
fileStructureInformation[i].write(out);
}
- writeUINT32_T(out,model_file_offset);
- writeUINT32_T(out,file_size);
- uint32_t number_of_uncompressed_files = uncompressedFiles.size();
- writeUINT32_T(out,number_of_uncompressed_files);
- for(list<PRCUncompressedFile>::iterator i = uncompressedFiles.begin(); i != uncompressedFiles.end(); i++)
- i->write(out);
+ WriteUncompressedUnsignedInteger (model_file_offset)
+ WriteUncompressedUnsignedInteger (file_size)
+ SerializeUncompressedFiles
}
uint32_t PRCHeader::getSize()
{
- uint32_t size = startHeader.getSize() + sizeof(uint32_t);
+ uint32_t size = getStartHeaderSize() + sizeof(uint32_t);
for(uint32_t i = 0; i < number_of_file_structures; ++i)
size += fileStructureInformation[i].getSize();
size += 3*sizeof(uint32_t);
- for(list<PRCUncompressedFile>::iterator i = uncompressedFiles.begin(); i != uncompressedFiles.end(); i++)
- size += i->getSize();
+ for(PRCUncompressedFileList::const_iterator it = uncompressed_files.begin(); it != uncompressed_files.end(); it++)
+ size += (*it)->getSize();
return size;
}
@@ -419,52 +410,58 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
{
if(!group.lines.empty())
{
- bool same_color = true;
- const PRCRgbColor &color = group.lines.front().color;
- for(PRCtesslineList::const_iterator lit=group.lines.begin(); lit!=group.lines.end(); lit++)
- if(color!=lit->color)
- {
- same_color = false;
- break;
- }
- map<PRCVector3d,uint32_t> points;
- PRC3DWireTess *tess = new PRC3DWireTess();
- if(!same_color)
- {
- tess->is_segment_color = true;
- tess->is_rgba = false;
- }
- for(PRCtesslineList::const_iterator lit=group.lines.begin(); lit!=group.lines.end(); lit++)
+ for(PRCtesslineMap::const_iterator wit=group.lines.begin(); wit!=group.lines.end(); wit++)
{
- tess->wire_indexes.push_back(lit->point.size());
- for(uint32_t i=0; i<lit->point.size(); i++)
- {
- map<PRCVector3d,uint32_t>::iterator pPoint = points.find(lit->point[i]);
- if(pPoint!=points.end())
- tess->wire_indexes.push_back(pPoint->second);
- else
+ bool same_color = true;
+ const PRCtesslineList& lines = wit->second;
+ const PRCRgbColor &color = lines.front().color;
+ for(PRCtesslineList::const_iterator lit=lines.begin(); lit!=lines.end(); lit++)
+ if(color!=lit->color)
{
- uint32_t point_index = m1;
- points.insert(make_pair(lit->point[i],(point_index = tess->coordinates.size())));
- tess->wire_indexes.push_back(point_index);
- tess->coordinates.push_back(lit->point[i].x);
- tess->coordinates.push_back(lit->point[i].y);
- tess->coordinates.push_back(lit->point[i].z);
+ same_color = false;
+ break;
}
- if(!same_color && i>0)
+ map<PRCVector3d,uint32_t> points;
+ PRC3DWireTess *tess = new PRC3DWireTess();
+ if(!same_color)
+ {
+ tess->is_segment_color = true;
+ tess->is_rgba = false;
+ }
+ for(PRCtesslineList::const_iterator lit=lines.begin(); lit!=lines.end(); lit++)
+ {
+ tess->wire_indexes.push_back(lit->point.size());
+ for(uint32_t i=0; i<lit->point.size(); i++)
{
- tess->rgba_vertices.push_back((uint8_t)(255*lit->color.red));
- tess->rgba_vertices.push_back((uint8_t)(255*lit->color.green));
- tess->rgba_vertices.push_back((uint8_t)(255*lit->color.blue));
+ map<PRCVector3d,uint32_t>::iterator pPoint = points.find(lit->point[i]);
+ if(pPoint!=points.end())
+ tess->wire_indexes.push_back(pPoint->second);
+ else
+ {
+ uint32_t point_index = m1;
+ points.insert(make_pair(lit->point[i],(point_index = tess->coordinates.size())));
+ tess->wire_indexes.push_back(point_index);
+ tess->coordinates.push_back(lit->point[i].x);
+ tess->coordinates.push_back(lit->point[i].y);
+ tess->coordinates.push_back(lit->point[i].z);
+ }
+ if(!same_color && i>0)
+ {
+ tess->rgba_vertices.push_back(byte(lit->color.red));
+ tess->rgba_vertices.push_back(byte(lit->color.green));
+ tess->rgba_vertices.push_back(byte(lit->color.blue));
+ }
}
}
+ const uint32_t tess_index = add3DWireTess(tess);
+ PRCPolyWire *polyWire = new PRCPolyWire();
+ polyWire->index_tessellation = tess_index;
+ if(same_color)
+ polyWire->index_of_line_style = addColourWidth(RGBAColour(color.red,color.green,color.blue),wit->first);
+ else
+ polyWire->index_of_line_style = addColourWidth(RGBAColour(1,1,1),wit->first);
+ part_definition->addPolyWire(polyWire);
}
- const uint32_t tess_index = add3DWireTess(tess);
- PRCPolyWire *polyWire = new PRCPolyWire();
- polyWire->index_tessellation = tess_index;
- if(same_color)
- polyWire->index_of_line_style = addColour(RGBAColour(color.red,color.green,color.blue));
- part_definition->addPolyWire(polyWire);
}
// make rectangles pairs of triangles in a tesselation
if(!group.rectangles.empty())
@@ -488,7 +485,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
uint32_t vertex_indices[4];
for(size_t i = (degenerate?1:0); i < 4; ++i)
{
- map<PRCVector3d,uint32_t>::iterator pPoint = points.find(rit->vertices[i]);
+ map<PRCVector3d,uint32_t>::const_iterator pPoint = points.find(rit->vertices[i]);
if(pPoint!=points.end())
vertex_indices[i] = pPoint->second;
else
@@ -535,7 +532,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
part_definition->addPolyBrepModel(polyBrepModel);
}
}
-
+
if(!group.points.empty())
{
for(PRCpointsetMap::const_iterator pit=group.points.begin(); pit!=group.points.end(); pit++)
@@ -547,6 +544,30 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
}
}
+ if(!group.pointsets.empty())
+ {
+ for(std::vector<PRCPointSet*>::iterator pit=group.pointsets.begin(); pit!=group.pointsets.end(); pit++)
+ {
+ part_definition->addPointSet(*pit);
+ }
+ }
+
+ if(!group.polymodels.empty())
+ {
+ for(std::vector<PRCPolyBrepModel*>::iterator pit=group.polymodels.begin(); pit!=group.polymodels.end(); pit++)
+ {
+ part_definition->addPolyBrepModel(*pit);
+ }
+ }
+
+ if(!group.polywires.empty())
+ {
+ for(std::vector<PRCPolyWire*>::iterator pit=group.polywires.begin(); pit!=group.polywires.end(); pit++)
+ {
+ part_definition->addPolyWire(*pit);
+ }
+ }
+
if(!group.wires.empty())
{
PRCTopoContext *wireContext = NULL;
@@ -590,7 +611,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
for(PRCfaceList::iterator fit=faces.begin(); fit!=faces.end(); fit++)
{
- if(fit->transform || group.options.do_break ||
+ if(fit->transform || group.options.do_break ||
(fit->transparent && !group.options.no_break))
{
PRCShell *shell = new PRCShell;
@@ -600,7 +621,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
PRCBrepData *body = new PRCBrepData;
body->addConnex(connex);
const uint32_t body_index = context->addBrepData(body);
-
+
PRCBrepModel *brepmodel = new PRCBrepModel();
brepmodel->index_of_line_style = fit->style;
brepmodel->context_id = context_index;
@@ -653,13 +674,13 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
PRCTopoContext *context = NULL;
const uint32_t context_index = getTopoContext(context);
PRCCompressedBrepData *body = new PRCCompressedBrepData;
-
+
body->serial_tolerance=group.options.compression;
body->brep_data_compressed_tolerance=0.1*group.options.compression;
for(PRCcompfaceList::const_iterator fit=compfaces.begin(); fit!=compfaces.end(); fit++)
{
- if(group.options.do_break ||
+ if(group.options.do_break ||
(fit->transparent && !group.options.no_break))
{
PRCCompressedBrepData *body = new PRCCompressedBrepData;
@@ -737,7 +758,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
part_definition->representation_item.clear();
parent_part_definition->addSet(set);
delete product_occurrence;
- delete part_definition;
+ delete part_definition;
}
// Third option - create product
else if ( !product_occurrence->index_son_occurrence.empty() || !part_definition->representation_item.empty())
@@ -763,7 +784,7 @@ void oPRCFile::doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definitio
delete product_occurrence;
delete part_definition;
}
-
+
}
bool oPRCFile::finish()
@@ -773,7 +794,7 @@ bool oPRCFile::finish()
// write each section's bit data
fileStructures[0]->prepare();
- modelFile.prepare();
+ SerializeModelFileData
// create the header
@@ -782,41 +803,29 @@ bool oPRCFile::finish()
header.fileStructureInformation = new PRCFileStructureInformation[number_of_file_structures];
for(uint32_t i = 0; i < number_of_file_structures; ++i)
{
- header.fileStructureInformation[i].UUID[0] = fileStructures[i]->header.fileStructureUUID[0];
- header.fileStructureInformation[i].UUID[1] = fileStructures[i]->header.fileStructureUUID[1];
- header.fileStructureInformation[i].UUID[2] = fileStructures[i]->header.fileStructureUUID[2];
- header.fileStructureInformation[i].UUID[3] = fileStructures[i]->header.fileStructureUUID[3];
+ header.fileStructureInformation[i].UUID = fileStructures[i]->file_structure_uuid;
header.fileStructureInformation[i].reserved = 0;
header.fileStructureInformation[i].number_of_offsets = 6;
header.fileStructureInformation[i].offsets = new uint32_t[6];
}
- header.startHeader.minimal_version_for_read = PRCVersion;
- header.startHeader.authoring_version = PRCVersion;
- makeFileUUID(header.startHeader.fileStructureUUID);
- makeAppUUID(header.startHeader.applicationUUID);
+ header.minimal_version_for_read = PRCVersion;
+ header.authoring_version = PRCVersion;
+ makeFileUUID(header.file_structure_uuid);
+ makeAppUUID(header.application_uuid);
header.file_size = getSize();
- header.model_file_offset = header.file_size - modelFile.getSize();
+ header.model_file_offset = header.file_size - modelFile_out.getSize();
uint32_t currentOffset = header.getSize();
for(uint32_t i = 0; i < number_of_file_structures; ++i)
{
- header.fileStructureInformation[i].offsets[0] = currentOffset; // header offset
- currentOffset += fileStructures[i]->header.getSize() + sizeof(uint32_t);
- for(list<PRCUncompressedFile>::iterator j = fileStructures[i]->uncompressedFiles.begin(); j != fileStructures[i]->uncompressedFiles.end(); j++)
- currentOffset += j->getSize();
- header.fileStructureInformation[i].offsets[1] = currentOffset; // globals offset
- currentOffset += fileStructures[i]->globals.getSize();
- header.fileStructureInformation[i].offsets[2] = currentOffset; // tree offset
- currentOffset += fileStructures[i]->tree.getSize();
- header.fileStructureInformation[i].offsets[3] = currentOffset; // tessellations offset
- currentOffset += fileStructures[i]->tessellations.getSize();
- header.fileStructureInformation[i].offsets[4] = currentOffset; // geometry offset
- currentOffset += fileStructures[i]->geometry.getSize();
- header.fileStructureInformation[i].offsets[5] = currentOffset; // extra geometry offset
- currentOffset += fileStructures[i]->extraGeometry.getSize();
+ for(size_t j=0; j<6; j++)
+ {
+ header.fileStructureInformation[i].offsets[j] = currentOffset;
+ currentOffset += fileStructures[i]->sizes[j];
+ }
}
// write the data
@@ -827,7 +836,7 @@ bool oPRCFile::finish()
fileStructures[i]->write(output);
}
- modelFile.write(output);
+ modelFile_out.write(output);
output.flush();
for(uint32_t i = 0; i < number_of_file_structures; ++i)
@@ -846,18 +855,16 @@ uint32_t oPRCFile::getSize()
size += fileStructures[i]->getSize();
}
- size += modelFile.getSize();
+ size += modelFile_out.getSize();
return size;
}
-#define REPORT_ERROR( value ) { cerr << value << endl; return m1; }
-
uint32_t PRCFileStructure::addPicture(EPRCPictureDataFormat format, uint32_t size, const uint8_t *p, uint32_t width, uint32_t height, string name)
{
if(size==0 || p==NULL)
- REPORT_ERROR( "image not set" )
+ { cerr << "image not set" << endl; return m1; }
PRCPicture picture(name);
- PRCUncompressedFile uncompressedFile;
+ PRCUncompressedFile* uncompressed_file = new PRCUncompressedFile;
uint32_t components=0;
uint8_t *data = NULL;
switch(format)
@@ -871,27 +878,27 @@ uint32_t PRCFileStructure::addPicture(EPRCPictureDataFormat format, uint32_t siz
case KEPRCPicture_BITMAP_GREYA_BYTE:
components = 2;
if(width==0 || height==0)
- REPORT_ERROR( "width or height parameter not set" )
+ { cerr << "width or height parameter not set" << endl; return m1; }
if (size < width*height*components)
- REPORT_ERROR( "image too small" )
-
+ { cerr << "image too small" << endl; return m1; }
+
{
uint32_t compressedDataSize = 0;
const int CHUNK= 1024; // is this reasonable?
-
+
z_stream strm;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
if(deflateInit(&strm,Z_DEFAULT_COMPRESSION) != Z_OK)
- REPORT_ERROR ( "Compression initialization failed" )
+ { cerr << "Compression initialization failed" << endl; return m1; }
unsigned int sizeAvailable = deflateBound(&strm,size);
uint8_t *compressedData = (uint8_t*) malloc(sizeAvailable);
strm.avail_in = size;
strm.next_in = (unsigned char*)p;
strm.next_out = (unsigned char*)compressedData;
strm.avail_out = sizeAvailable;
-
+
int code;
unsigned int chunks = 0;
while((code = deflate(&strm,Z_FINISH)) == Z_OK)
@@ -905,79 +912,79 @@ uint32_t PRCFileStructure::addPicture(EPRCPictureDataFormat format, uint32_t siz
sizeAvailable += CHUNK;
}
compressedDataSize = sizeAvailable-strm.avail_out;
-
+
if(code != Z_STREAM_END)
{
deflateEnd(&strm);
free(compressedData);
- REPORT_ERROR ( "Compression error" )
+ { cerr << "Compression error" << endl; return m1; }
}
-
+
deflateEnd(&strm);
size = compressedDataSize;
data = new uint8_t[compressedDataSize];
memcpy(data, compressedData, compressedDataSize);
free(compressedData);
}
- uncompressedFiles.push_back(uncompressedFile);
- uncompressedFiles.back().file_size = size;
- uncompressedFiles.back().data = data;
+ uncompressed_files.push_back(uncompressed_file);
+ uncompressed_files.back()->file_size = size;
+ uncompressed_files.back()->data = data;
picture.format = format;
- picture.uncompressed_file_index = uncompressedFiles.size()-1;
+ picture.uncompressed_file_index = uncompressed_files.size()-1;
picture.pixel_width = width;
picture.pixel_height = height;
- globals.pictures.push_back(picture);
- return globals.pictures.size()-1;
+ pictures.push_back(picture);
+ return pictures.size()-1;
break;
case KEPRCPicture_PNG:
case KEPRCPicture_JPG:
data = new uint8_t[size];
memcpy(data, p, size);
- uncompressedFiles.push_back(uncompressedFile);
- uncompressedFiles.back().file_size = size;
- uncompressedFiles.back().data = data;
+ uncompressed_files.push_back(uncompressed_file);
+ uncompressed_files.back()->file_size = size;
+ uncompressed_files.back()->data = data;
picture.format = format;
- picture.uncompressed_file_index = uncompressedFiles.size()-1;
+ picture.uncompressed_file_index = uncompressed_files.size()-1;
picture.pixel_width = 0; // width and height are ignored for JPG and PNG pictures - but let us keep things clean
picture.pixel_height = 0;
- globals.pictures.push_back(picture);
- return globals.pictures.size()-1;
+ pictures.push_back(picture);
+ return pictures.size()-1;
break;
default:
- REPORT_ERROR( "unknown picture format" )
+ { cerr << "unknown picture format" << endl; return m1; }
}
return m1;
}
-#undef REPORT_ERROR
-uint32_t PRCFileStructure::addTextureDefinition(PRCTextureDefinition *pTextureDefinition)
+uint32_t PRCFileStructure::addTextureDefinition(PRCTextureDefinition*& pTextureDefinition)
{
- globals.texture_definitions.push_back(pTextureDefinition);
- return globals.texture_definitions.size()-1;
+ texture_definitions.push_back(pTextureDefinition);
+ pTextureDefinition = NULL;
+ return texture_definitions.size()-1;
}
uint32_t PRCFileStructure::addRgbColor(const PRCRgbColor &color)
{
- globals.colors.push_back(color);
- return 3*(globals.colors.size()-1);
+ colors.push_back(color);
+ return 3*(colors.size()-1);
}
uint32_t PRCFileStructure::addRgbColorUnique(const PRCRgbColor &color)
{
- for(uint32_t i = 0; i < globals.colors.size(); ++i)
+ for(uint32_t i = 0; i < colors.size(); ++i)
{
- if(globals.colors[i] == color)
+ if(colors[i] == color)
return 3*i;
}
- globals.colors.push_back(color);
- return 3*(globals.colors.size()-1);
+ colors.push_back(color);
+ return 3*(colors.size()-1);
}
uint32_t oPRCFile::addColor(const PRCRgbColor &color)
{
- PRCcolorMap::iterator pColor = colorMap.find(color);
+ PRCcolorMap::const_iterator pColor = colorMap.find(color);
uint32_t color_index = m1;
if(pColor!=colorMap.end())
return pColor->second;
@@ -989,11 +996,11 @@ uint32_t oPRCFile::addColor(const PRCRgbColor &color)
uint32_t oPRCFile::addColour(const RGBAColour &colour)
{
- PRCcolourMap::iterator pColour = colourMap.find(colour);
+ PRCcolourMap::const_iterator pColour = colourMap.find(colour);
if(pColour!=colourMap.end())
return pColour->second;
const uint32_t color_index = addColor(PRCRgbColor(colour.R, colour.G, colour.B));
- PRCStyle *style = new PRCStyle();
+ PRCStyle *style = new PRCStyle();
style->line_width = 1.0;
style->is_vpicture = false;
style->line_pattern_vpicture_index = 0;
@@ -1007,11 +1014,32 @@ uint32_t oPRCFile::addColour(const RGBAColour &colour)
return style_index;
}
+uint32_t oPRCFile::addColourWidth(const RGBAColour &colour, double width)
+{
+ RGBAColourWidth colourwidth(colour.R, colour.G, colour.B, colour.A, width);
+ PRCcolourwidthMap::const_iterator pColour = colourwidthMap.find(colourwidth);
+ if(pColour!=colourwidthMap.end())
+ return pColour->second;
+ const uint32_t color_index = addColor(PRCRgbColor(colour.R, colour.G, colour.B));
+ PRCStyle *style = new PRCStyle();
+ style->line_width = width;
+ style->is_vpicture = false;
+ style->line_pattern_vpicture_index = 0;
+ style->is_material = false;
+ style->color_material_index = color_index;
+ style->is_transparency_defined = (colour.A < 1.0);
+ style->transparency = (uint8_t)(colour.A * 256);
+ style->additional = 0;
+ const uint32_t style_index = fileStructures[0]->addStyle(style);
+ colourwidthMap.insert(make_pair(colourwidth,style_index));
+ return style_index;
+}
+
uint32_t oPRCFile::addTransform(PRCGeneralTransformation3d*& transform)
{
if(!transform)
return m1;
- PRCtransformMap::iterator pTransform = transformMap.find(*transform);
+ PRCtransformMap::const_iterator pTransform = transformMap.find(*transform);
if(pTransform!=transformMap.end())
return pTransform->second;
PRCCoordinateSystem *coordinateSystem = new PRCCoordinateSystem();
@@ -1024,10 +1052,10 @@ uint32_t oPRCFile::addTransform(PRCGeneralTransformation3d*& transform)
uint32_t oPRCFile::addMaterial(const PRCmaterial &material)
{
- PRCmaterialMap::iterator pMaterial = materialMap.find(material);
+ PRCmaterialMap::const_iterator pMaterial = materialMap.find(material);
if(pMaterial!=materialMap.end())
return pMaterial->second;
- PRCMaterialGeneric *materialGeneric = new PRCMaterialGeneric();
+ PRCMaterialGeneric *materialGeneric = new PRCMaterialGeneric();
const PRCRgbColor ambient(material.ambient.R, material.ambient.G, material.ambient.B);
materialGeneric->ambient = addColor(ambient);
const PRCRgbColor diffuse(material.diffuse.R, material.diffuse.G, material.diffuse.B);
@@ -1041,17 +1069,36 @@ uint32_t oPRCFile::addMaterial(const PRCmaterial &material)
materialGeneric->diffuse_alpha = material.diffuse.A;
materialGeneric->emissive_alpha = material.emissive.A;
materialGeneric->specular_alpha = material.specular.A;
- const uint32_t material_index = fileStructures[0]->addMaterialGeneric(materialGeneric);
- PRCStyle *style = new PRCStyle();
+ const uint32_t material_index = addMaterialGeneric(materialGeneric);
+ PRCStyle *style = new PRCStyle();
style->line_width = 0.0;
style->is_vpicture = false;
style->line_pattern_vpicture_index = 0;
style->is_material = true;
- style->color_material_index = material_index;
style->is_transparency_defined = (material.alpha < 1.0);
style->transparency = (uint8_t)(material.alpha * 256);
style->additional = 0;
- const uint32_t style_index = fileStructures[0]->addStyle(style);
+ if(material.picture!=NULL && material.picture_width!=0 && material.picture_height!=0)
+ {
+ const uint32_t picture_index =
+ addPicture((material.picture_rgba?KEPRCPicture_BITMAP_RGBA_BYTE:KEPRCPicture_BITMAP_RGB_BYTE),
+ material.picture_width*material.picture_height*(material.picture_rgba?4:3),material.picture,material.picture_width,material.picture_height);
+ PRCTextureDefinition *textureDefinition = new PRCTextureDefinition;
+ textureDefinition->picture_index = picture_index;
+ textureDefinition->texture_function = material.picture_replace ? KEPRCTextureFunction_Replace : KEPRCTextureFunction_Modulate;
+ textureDefinition->texture_wrapping_mode_S = KEPRCTextureWrappingMode_ClampToEdge;
+ textureDefinition->texture_wrapping_mode_T = KEPRCTextureWrappingMode_ClampToEdge;
+ textureDefinition->texture_mapping_attribute_components = material.picture_rgba ? PRC_TEXTURE_MAPPING_COMPONENTS_RGBA : PRC_TEXTURE_MAPPING_COMPONENTS_RGB;
+ const uint32_t texture_definition_index = addTextureDefinition(textureDefinition);
+ PRCTextureApplication *textureApplication = new PRCTextureApplication;
+ textureApplication->material_generic_index = material_index;
+ textureApplication->texture_definition_index = texture_definition_index;
+ const uint32_t texture_application_index = addTextureApplication(textureApplication);
+ style->color_material_index = texture_application_index;
+ }
+ else
+ style->color_material_index = material_index;
+ const uint32_t style_index = addStyle(style);
materialMap.insert(make_pair(material,style_index)).first;
return style_index;
}
@@ -1125,23 +1172,421 @@ PRCgroup& oPRCFile::findGroup()
face.transparent = m.alpha < 1.0; \
face.style = addMaterial(m);
-void oPRCFile::addPoint(const double P[3], const RGBAColour &c)
+void oPRCFile::addPoint(const double P[3], const RGBAColour &c, double w)
{
PRCgroup &group = findGroup();
- group.points[addColour(c)].push_back(PRCVector3d(P[0],P[1],P[2]));
+ group.points[addColourWidth(c,w)].push_back(PRCVector3d(P[0],P[1],P[2]));
}
-void oPRCFile::addLine(uint32_t n, const double P[][3], const RGBAColour &c)
+void oPRCFile::addPoints(uint32_t n, const double P[][3], const RGBAColour &c, double w)
+{
+ if(n==0 || P==NULL)
+ return;
+ PRCgroup &group = findGroup();
+ PRCPointSet *pointset = new PRCPointSet();
+ group.pointsets.push_back(pointset);
+ pointset->index_of_line_style = addColourWidth(c,w);
+ for(uint32_t i=0; i<n; i++)
+ pointset->point.push_back(PRCVector3d(P[i][0],P[i][1],P[i][2]));
+}
+
+void oPRCFile::addTriangles(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[][3], const PRCmaterial &m,
+ uint32_t nN, const double N[][3], const uint32_t NI[][3],
+ uint32_t nT, const double T[][2], const uint32_t TI[][3],
+ uint32_t nC, const RGBAColour C[], const uint32_t CI[][3],
+ uint32_t nM, const PRCmaterial M[], const uint32_t MI[])
+{
+ if(nP==0 || P==NULL || nI==0 || PI==NULL)
+ return;
+ PRCgroup &group = findGroup();
+
+ const bool triangle_color = (nM != 0 && M != NULL && MI != NULL);
+ const bool vertex_color = (nC != 0 && C != NULL && CI != NULL);
+ const bool has_normals = (nN != 0 && N != NULL && NI != NULL);
+ const bool textured = (nT != 0 && T != NULL && TI != NULL);
+
+ PRC3DTess *tess = new PRC3DTess();
+ PRCTessFace *tessFace = new PRCTessFace();
+ tessFace->used_entities_flag = textured ? PRC_FACETESSDATA_TriangleTextured : PRC_FACETESSDATA_Triangle;
+ tessFace->number_of_texture_coordinate_indexes = textured ? 1 : 0;
+ for(uint32_t i=0; i<nP; i++)
+ {
+ tess->coordinates.push_back(P[i][0]);
+ tess->coordinates.push_back(P[i][1]);
+ tess->coordinates.push_back(P[i][2]);
+ }
+ if(has_normals)
+ for(uint32_t i=0; i<nN; i++)
+ {
+ tess->normal_coordinate.push_back(N[i][0]);
+ tess->normal_coordinate.push_back(N[i][1]);
+ tess->normal_coordinate.push_back(N[i][2]);
+ }
+ if(textured)
+ for(uint32_t i=0; i<nT; i++)
+ {
+ tess->texture_coordinate.push_back(T[i][0]);
+ tess->texture_coordinate.push_back(T[i][1]);
+ }
+ for(uint32_t i=0; i<nI; i++)
+ {
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][0]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][0]);
+ tess->triangulated_index.push_back(3*PI[i][0]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][1]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][1]);
+ tess->triangulated_index.push_back(3*PI[i][1]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][2]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][2]);
+ tess->triangulated_index.push_back(3*PI[i][2]);
+ }
+ tessFace->sizes_triangulated.push_back(nI);
+ if(triangle_color)
+ {
+#ifdef __GNUC__
+ uint32_t styles[nM];
+#else
+ std::vector<uint32_t> styles(nM);
+#endif
+ for(uint32_t i=0; i<nM; i++)
+ styles[i] = addMaterial(M[i]);
+ for(uint32_t i=0; i<nI; i++)
+ tessFace->line_attributes.push_back(styles[MI[i]]);
+ }
+ else
+ tessFace->line_attributes.push_back(addMaterial(m));
+ if(vertex_color)
+ {
+ tessFace->is_rgba=false;
+ for(uint32_t i=0; i<nI; i++)
+ if(1.0 != C[CI[i][0]].A || 1.0 != C[CI[i][1]].A || 1.0 != C[CI[i][2]].A)
+ {
+ tessFace->is_rgba=true;
+ break;
+ }
+
+ for(uint32_t i=0; i<nI; i++)
+ {
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
+ }
+ }
+ tess->addTessFace(tessFace);
+ const uint32_t tess_index = add3DTess(tess);
+ PRCPolyBrepModel *polyBrepModel = new PRCPolyBrepModel();
+ polyBrepModel->index_tessellation = tess_index;
+ polyBrepModel->is_closed = group.options.closed;
+// if(!triangle_color)
+// polyBrepModel->index_of_line_style = addMaterial(m);
+ group.polymodels.push_back(polyBrepModel);
+}
+
+void oPRCFile::addQuads(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[][4], const PRCmaterial &m,
+ uint32_t nN, const double N[][3], const uint32_t NI[][4],
+ uint32_t nT, const double T[][2], const uint32_t TI[][4],
+ uint32_t nC, const RGBAColour C[], const uint32_t CI[][4],
+ uint32_t nM, const PRCmaterial M[], const uint32_t MI[])
+{
+ if(nP==0 || P==NULL || nI==0 || PI==NULL)
+ return;
+ PRCgroup &group = findGroup();
+
+ const bool triangle_color = (nM != 0 && M != NULL && MI != NULL);
+ const bool vertex_color = (nC != 0 && C != NULL && CI != NULL);
+ const bool has_normals = (nN != 0 && N != NULL && NI != NULL);
+ const bool textured = (nT != 0 && T != NULL && TI != NULL);
+
+ PRC3DTess *tess = new PRC3DTess();
+ PRCTessFace *tessFace = new PRCTessFace();
+ tessFace->used_entities_flag = textured ? PRC_FACETESSDATA_TriangleTextured : PRC_FACETESSDATA_Triangle;
+ tessFace->number_of_texture_coordinate_indexes = textured ? 1 : 0;
+ for(uint32_t i=0; i<nP; i++)
+ {
+ tess->coordinates.push_back(P[i][0]);
+ tess->coordinates.push_back(P[i][1]);
+ tess->coordinates.push_back(P[i][2]);
+ }
+ if(has_normals)
+ for(uint32_t i=0; i<nN; i++)
+ {
+ tess->normal_coordinate.push_back(N[i][0]);
+ tess->normal_coordinate.push_back(N[i][1]);
+ tess->normal_coordinate.push_back(N[i][2]);
+ }
+ if(textured)
+ for(uint32_t i=0; i<nT; i++)
+ {
+ tess->texture_coordinate.push_back(T[i][0]);
+ tess->texture_coordinate.push_back(T[i][1]);
+ }
+ for(uint32_t i=0; i<nI; i++)
+ {
+ // first triangle
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][0]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][0]);
+ tess->triangulated_index.push_back(3*PI[i][0]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][1]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][1]);
+ tess->triangulated_index.push_back(3*PI[i][1]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][3]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][3]);
+ tess->triangulated_index.push_back(3*PI[i][3]);
+ // second triangle
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][1]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][1]);
+ tess->triangulated_index.push_back(3*PI[i][1]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][2]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][2]);
+ tess->triangulated_index.push_back(3*PI[i][2]);
+ if(has_normals)
+ tess->triangulated_index.push_back(3*NI[i][3]);
+ if(textured)
+ tess->triangulated_index.push_back(2*TI[i][3]);
+ tess->triangulated_index.push_back(3*PI[i][3]);
+ }
+ tessFace->sizes_triangulated.push_back(2*nI);
+ if(triangle_color)
+ {
+#ifdef __GNUC__
+ uint32_t styles[nM];
+#else
+ std::vector<uint32_t> styles(nM);
+#endif
+ for(uint32_t i=0; i<nM; i++)
+ styles[i] = addMaterial(M[i]);
+ for(uint32_t i=0; i<nI; i++)
+ {
+ tessFace->line_attributes.push_back(styles[MI[i]]);
+ tessFace->line_attributes.push_back(styles[MI[i]]);
+ }
+ }
+ else
+ tessFace->line_attributes.push_back(addMaterial(m));
+ if(vertex_color)
+ {
+ tessFace->is_rgba=false;
+ for(uint32_t i=0; i<nI; i++)
+ if(1.0 != C[CI[i][0]].A || 1.0 != C[CI[i][1]].A || 1.0 != C[CI[i][2]].A)
+ {
+ tessFace->is_rgba=true;
+ break;
+ }
+
+ for(uint32_t i=0; i<nI; i++)
+ {
+ // first triangle
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
+ // second triangle
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
+ }
+ }
+ tess->addTessFace(tessFace);
+ const uint32_t tess_index = add3DTess(tess);
+ PRCPolyBrepModel *polyBrepModel = new PRCPolyBrepModel();
+ polyBrepModel->index_tessellation = tess_index;
+ polyBrepModel->is_closed = group.options.closed;
+// if(!triangle_color)
+// polyBrepModel->index_of_line_style = addMaterial(m);
+ group.polymodels.push_back(polyBrepModel);
+}
+
+void oPRCFile::addQuad(const double P[][3], const RGBAColour C[])
+{
+ PRCgroup &group = findGroup();
+
+ PRC3DTess *tess = new PRC3DTess();
+ PRCTessFace *tessFace = new PRCTessFace();
+ tessFace->used_entities_flag = PRC_FACETESSDATA_Triangle;
+ tessFace->number_of_texture_coordinate_indexes = 0;
+ for(uint32_t i=0; i < 4; i++)
+ {
+ tess->coordinates.push_back(P[i][0]);
+ tess->coordinates.push_back(P[i][1]);
+ tess->coordinates.push_back(P[i][2]);
+ }
+
+ tess->triangulated_index.push_back(3*0);
+ tess->triangulated_index.push_back(3*1);
+ tess->triangulated_index.push_back(3*2);
+
+ tess->triangulated_index.push_back(3*1);
+ tess->triangulated_index.push_back(3*3);
+ tess->triangulated_index.push_back(3*2);
+
+ tessFace->sizes_triangulated.push_back(2);
+
+ tessFace->is_rgba=
+ (C[0].A != 1.0 || C[1].A != 1.0 || C[2].A != 1.0 || C[3].A != 1.0);
+
+ // first triangle
+ tessFace->rgba_vertices.push_back(byte(C[0].R));
+ tessFace->rgba_vertices.push_back(byte(C[0].G));
+ tessFace->rgba_vertices.push_back(byte(C[0].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[0].A));
+
+ tessFace->rgba_vertices.push_back(byte(C[1].R));
+ tessFace->rgba_vertices.push_back(byte(C[1].G));
+ tessFace->rgba_vertices.push_back(byte(C[1].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[1].A));
+
+ tessFace->rgba_vertices.push_back(byte(C[2].R));
+ tessFace->rgba_vertices.push_back(byte(C[2].G));
+ tessFace->rgba_vertices.push_back(byte(C[2].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[2].A));
+
+ // second triangle
+ tessFace->rgba_vertices.push_back(byte(C[1].R));
+ tessFace->rgba_vertices.push_back(byte(C[1].G));
+ tessFace->rgba_vertices.push_back(byte(C[1].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[1].A));
+
+ tessFace->rgba_vertices.push_back(byte(C[3].R));
+ tessFace->rgba_vertices.push_back(byte(C[3].G));
+ tessFace->rgba_vertices.push_back(byte(C[3].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[3].A));
+
+ tessFace->rgba_vertices.push_back(byte(C[2].R));
+ tessFace->rgba_vertices.push_back(byte(C[2].G));
+ tessFace->rgba_vertices.push_back(byte(C[2].B));
+ if(tessFace->is_rgba)
+ tessFace->rgba_vertices.push_back(byte(C[2].A));
+
+ tess->addTessFace(tessFace);
+ const uint32_t tess_index = add3DTess(tess);
+ PRCPolyBrepModel *polyBrepModel = new PRCPolyBrepModel();
+ polyBrepModel->index_tessellation = tess_index;
+ polyBrepModel->is_closed = group.options.closed;
+ group.polymodels.push_back(polyBrepModel);
+}
+
+void oPRCFile::addLines(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[],
+ const RGBAColour &c, double w, bool segment_color,
+ uint32_t nC, const RGBAColour C[], uint32_t nCI, const uint32_t CI[])
+{
+ if(nP==0 || P==NULL || nI==0 || PI==NULL)
+ return;
+
+ const bool vertex_color = (nC != 0 && C != NULL && CI != NULL);
+
+ PRCgroup &group = findGroup();
+ PRC3DWireTess *tess = new PRC3DWireTess();
+ for(uint32_t i=0; i<nP; i++)
+ {
+ tess->coordinates.push_back(P[i][0]);
+ tess->coordinates.push_back(P[i][1]);
+ tess->coordinates.push_back(P[i][2]);
+ }
+ for(uint32_t i=0; i<nI;)
+ {
+ tess->wire_indexes.push_back(PI[i]);
+ const uint32_t ni = i+PI[i]+1;
+ for(i++; i<ni; i++)
+ tess->wire_indexes.push_back(3*PI[i]);
+ }
+ if(vertex_color)
+ {
+ tess->is_segment_color = segment_color;
+ tess->is_rgba=false;
+ for(uint32_t i=0; i<nCI; i++)
+ if(1.0 != C[CI[i]].A)
+ {
+ tess->is_rgba=true;
+ break;
+ }
+
+ for(uint32_t i=0; i<nCI; i++)
+ {
+ tess->rgba_vertices.push_back(byte(C[CI[i]].R));
+ tess->rgba_vertices.push_back(byte(C[CI[i]].G));
+ tess->rgba_vertices.push_back(byte(C[CI[i]].B));
+ if(tess->is_rgba)
+ tess->rgba_vertices.push_back(byte(C[CI[i]].A));
+ }
+ }
+ const uint32_t tess_index = add3DWireTess(tess);
+ PRCPolyWire *polyWire = new PRCPolyWire();
+ polyWire->index_tessellation = tess_index;
+ if(vertex_color)
+ polyWire->index_of_line_style = addColourWidth(RGBAColour(1,1,1),w);
+ else
+ polyWire->index_of_line_style = addColourWidth(c,w);
+ group.polywires.push_back(polyWire);
+}
+
+void oPRCFile::addLine(uint32_t n, const double P[][3], const RGBAColour &c, double w)
{
PRCgroup &group = findGroup();
if(group.options.tess)
{
- group.lines.push_back(PRCtessline());
- group.lines.back().color.red = c.R;
- group.lines.back().color.green = c.G;
- group.lines.back().color.blue = c.B;
+ group.lines[w].push_back(PRCtessline());
+ PRCtessline& line = group.lines[w].back();
+ line.color.red = c.R;
+ line.color.green = c.G;
+ line.color.blue = c.B;
for(uint32_t i=0; i<n; i++)
- group.lines.back().point.push_back(PRCVector3d(P[i][0],P[i][1],P[i][2]));
+ line.point.push_back(PRCVector3d(P[i][0],P[i][1],P[i][2]));
}
else
{
@@ -1174,7 +1619,7 @@ void oPRCFile::addBezierCurve(uint32_t n, const double cP[][3],
void oPRCFile::addCurve(uint32_t d, uint32_t n, const double cP[][3], const double *k, const RGBAColour &c, const double w[])
{
ADDWIRE(PRCNURBSCurve)
- curve->is_rational = w;
+ curve->is_rational = (w!=NULL);
curve->degree = d;
curve->control_point.resize(n);
for(uint32_t i = 0; i < n; i++)
@@ -1245,7 +1690,7 @@ void oPRCFile::addPatch(const double cP[][3], const PRCmaterial &m)
if(group.options.compression == 0.0)
{
ADDFACE(PRCNURBSSurface)
-
+
surface->is_rational = false;
surface->degree_in_u = 3;
surface->degree_in_v = 3;
@@ -1289,7 +1734,7 @@ void oPRCFile::addSurface(uint32_t dU, uint32_t dV, uint32_t nU, uint32_t nV,
{
ADDFACE(PRCNURBSSurface)
- surface->is_rational = w;
+ surface->is_rational = (w!=NULL);
surface->degree_in_u = dU;
surface->degree_in_v = dV;
surface->control_point.resize(nU*nV);
@@ -1436,6 +1881,18 @@ void oPRCFile::addCylinder(double radius, double height, const PRCmaterial &m, P
surface->radius = radius;
}
+void oPRCFile::addCone(double radius, double height, const PRCmaterial &m, PRCFACETRANSFORM)
+{
+ ADDFACE(PRCCone)
+ SETTRANSF
+ surface->uv_domain.min.x = 0;
+ surface->uv_domain.max.x = 2*pi;
+ surface->uv_domain.min.y = (height>0)?0:height;
+ surface->uv_domain.max.y = (height>0)?height:0;
+ surface->bottom_radius = radius;
+ surface->semi_angle = -atan(radius/height);;
+}
+
void oPRCFile::addTorus(double major_radius, double minor_radius, double angle1, double angle2, const PRCmaterial &m, PRCFACETRANSFORM)
{
ADDFACE(PRCTorus)
@@ -1455,37 +1912,37 @@ void oPRCFile::addTorus(double major_radius, double minor_radius, double angle1,
uint32_t PRCFileStructure::addMaterialGeneric(PRCMaterialGeneric*& pMaterialGeneric)
{
- globals.materials.push_back(pMaterialGeneric);
+ materials.push_back(pMaterialGeneric);
pMaterialGeneric = NULL;
- return globals.materials.size()-1;
+ return materials.size()-1;
}
uint32_t PRCFileStructure::addTextureApplication(PRCTextureApplication*& pTextureApplication)
{
- globals.materials.push_back(pTextureApplication);
+ materials.push_back(pTextureApplication);
pTextureApplication = NULL;
- return globals.materials.size()-1;
+ return materials.size()-1;
}
uint32_t PRCFileStructure::addStyle(PRCStyle*& pStyle)
{
- globals.styles.push_back(pStyle);
+ styles.push_back(pStyle);
pStyle = NULL;
- return globals.styles.size()-1;
+ return styles.size()-1;
}
uint32_t PRCFileStructure::addPartDefinition(PRCPartDefinition*& pPartDefinition)
{
- tree.part_definitions.push_back(pPartDefinition);
- pPartDefinition = NULL;
- return tree.part_definitions.size()-1;
+ part_definitions.push_back(pPartDefinition);
+ pPartDefinition = NULL;
+ return part_definitions.size()-1;
}
uint32_t PRCFileStructure::addProductOccurrence(PRCProductOccurrence*& pProductOccurrence)
{
- tree.product_occurrences.push_back(pProductOccurrence);
+ product_occurrences.push_back(pProductOccurrence);
pProductOccurrence = NULL;
- return tree.product_occurrences.size()-1;
+ return product_occurrences.size()-1;
}
uint32_t PRCFileStructure::addTopoContext(PRCTopoContext*& pTopoContext)
@@ -1504,56 +1961,56 @@ uint32_t PRCFileStructure::getTopoContext(PRCTopoContext*& pTopoContext)
uint32_t PRCFileStructure::add3DTess(PRC3DTess*& p3DTess)
{
- tessellations.tessellations.push_back(p3DTess);
+ tessellations.push_back(p3DTess);
p3DTess = NULL;
- return tessellations.tessellations.size()-1;
+ return tessellations.size()-1;
}
uint32_t PRCFileStructure::add3DWireTess(PRC3DWireTess*& p3DWireTess)
{
- tessellations.tessellations.push_back(p3DWireTess);
+ tessellations.push_back(p3DWireTess);
p3DWireTess = NULL;
- return tessellations.tessellations.size()-1;
+ return tessellations.size()-1;
}
/*
uint32_t PRCFileStructure::addMarkupTess(PRCMarkupTess*& pMarkupTess)
{
- tessellations.tessellations.push_back(pMarkupTess);
+ tessellations.push_back(pMarkupTess);
pMarkupTess = NULL;
- return tessellations.tessellations.size()-1;
+ return tessellations.size()-1;
}
uint32_t PRCFileStructure::addMarkup(PRCMarkup*& pMarkup)
{
- tree.markups.push_back(pMarkup);
+ markups.push_back(pMarkup);
pMarkup = NULL;
- return tree.markups.size()-1;
+ return markups.size()-1;
}
uint32_t PRCFileStructure::addAnnotationItem(PRCAnnotationItem*& pAnnotationItem)
{
- tree.annotation_entities.push_back(pAnnotationItem);
+ annotation_entities.push_back(pAnnotationItem);
pAnnotationItem = NULL;
- return tree.annotation_entities.size()-1;
+ return annotation_entities.size()-1;
}
*/
uint32_t PRCFileStructure::addCoordinateSystem(PRCCoordinateSystem*& pCoordinateSystem)
{
- globals.reference_coordinate_systems.push_back(pCoordinateSystem);
+ reference_coordinate_systems.push_back(pCoordinateSystem);
pCoordinateSystem = NULL;
- return globals.reference_coordinate_systems.size()-1;
+ return reference_coordinate_systems.size()-1;
}
uint32_t PRCFileStructure::addCoordinateSystemUnique(PRCCoordinateSystem*& pCoordinateSystem)
{
- for(uint32_t i = 0; i < globals.reference_coordinate_systems.size(); ++i)
+ for(uint32_t i = 0; i < reference_coordinate_systems.size(); ++i)
{
- if(*(globals.reference_coordinate_systems[i])==*pCoordinateSystem) {
+ if(*(reference_coordinate_systems[i])==*pCoordinateSystem) {
pCoordinateSystem = NULL;
return i;
}
}
- globals.reference_coordinate_systems.push_back(pCoordinateSystem);
+ reference_coordinate_systems.push_back(pCoordinateSystem);
pCoordinateSystem = NULL;
- return globals.reference_coordinate_systems.size()-1;
+ return reference_coordinate_systems.size()-1;
}
diff --git a/Build/source/utils/asymptote/prc/oPRCFile.h b/Build/source/utils/asymptote/prc/oPRCFile.h
index 48683bf36da..643a0ff6e44 100644
--- a/Build/source/utils/asymptote/prc/oPRCFile.h
+++ b/Build/source/utils/asymptote/prc/oPRCFile.h
@@ -66,21 +66,61 @@ struct RGBAColour
}
};
typedef std::map<RGBAColour,uint32_t> PRCcolourMap;
+
+struct RGBAColourWidth
+{
+ RGBAColourWidth(double r=0.0, double g=0.0, double b=0.0, double a=1.0, double w=1.0) :
+ R(r), G(g), B(b), A(a), W(w) {}
+ double R,G,B,A,W;
+
+ bool operator==(const RGBAColourWidth &c) const
+ {
+ return (R==c.R && G==c.G && B==c.B && A==c.A && W==c.W);
+ }
+ bool operator!=(const RGBAColourWidth &c) const
+ {
+ return !(R==c.R && G==c.G && B==c.B && A==c.A && W==c.W);
+ }
+ bool operator<(const RGBAColourWidth &c) const
+ {
+ if(R!=c.R)
+ return (R<c.R);
+ if(G!=c.G)
+ return (G<c.G);
+ if(B!=c.B)
+ return (B<c.B);
+ if(A!=c.A)
+ return (A<c.A);
+ return (W<c.W);
+ }
+};
+typedef std::map<RGBAColourWidth,uint32_t> PRCcolourwidthMap;
+
typedef std::map<PRCRgbColor,uint32_t> PRCcolorMap;
struct PRCmaterial
{
- PRCmaterial() : alpha(1.0),shininess(1.0) {}
+ PRCmaterial() : alpha(1.0),shininess(1.0),
+ picture(NULL), picture_width(0), picture_height(0), picture_rgba(false), picture_replace(false) {}
PRCmaterial(const RGBAColour &a, const RGBAColour &d, const RGBAColour &e,
- const RGBAColour &s, double p, double h) :
- ambient(a), diffuse(d), emissive(e), specular(s), alpha(p), shininess(h) {}
+ const RGBAColour &s, double p, double h,
+ const uint8_t* pic=NULL, uint32_t picw=0, uint32_t pich=0, bool pica=false, bool picr=false) :
+ ambient(a), diffuse(d), emissive(e), specular(s), alpha(p), shininess(h),
+ picture(pic), picture_width(picw), picture_height(pich), picture_rgba(pica), picture_replace(picr) {}
RGBAColour ambient,diffuse,emissive,specular;
double alpha,shininess;
+ const uint8_t* picture;
+ uint32_t picture_width;
+ uint32_t picture_height;
+ bool picture_rgba; // is there alpha component?
+ bool picture_replace; // replace material color with texture color? if false - just modify
bool operator==(const PRCmaterial &m) const
{
return (ambient==m.ambient && diffuse==m.diffuse && emissive==m.emissive
- && specular==m.specular && alpha==m.alpha && shininess==m.shininess);
+ && specular==m.specular && alpha==m.alpha && shininess==m.shininess
+ && picture==m.picture && picture_width==m.picture_width && picture_height==m.picture_height
+ && picture_rgba==m.picture_rgba && picture_replace==m.picture_replace);
}
bool operator<(const PRCmaterial &m) const
{
@@ -94,7 +134,17 @@ struct PRCmaterial
return (specular<m.specular);
if(alpha!=m.alpha)
return (alpha<m.alpha);
- return (shininess<m.shininess);
+ if(shininess!=m.shininess)
+ return (shininess<m.shininess);
+ if(picture!=m.picture)
+ return (picture<m.picture);
+ if(picture_width!=m.picture_width)
+ return (picture_width<m.picture_width);
+ if(picture_height!=m.picture_height)
+ return (picture_height<m.picture_height);
+ if(picture_rgba!=m.picture_rgba)
+ return (picture_rgba<m.picture_rgba);
+ return (picture_replace<m.picture_replace);
}
};
typedef std::map<PRCmaterial,uint32_t> PRCmaterialMap;
@@ -106,12 +156,22 @@ struct PRCtessrectangle // rectangle
};
typedef std::vector<PRCtessrectangle> PRCtessrectangleList;
+struct PRCtesstriangles // triangle
+{
+ std::vector<PRCVector3d> vertices;
+ std::vector<PRCVector3d> normals;
+ std::vector<RGBAColour> colors;
+ uint32_t style;
+};
+typedef std::vector<PRCtesstriangles> PRCtesstrianglesList;
+
struct PRCtessline // polyline
{
std::vector<PRCVector3d> point;
PRCRgbColor color;
};
typedef std::list<PRCtessline> PRCtesslineList;
+typedef std::map<double, PRCtesslineList> PRCtesslineMap;
struct PRCface
{
@@ -148,12 +208,12 @@ class PRCoptions
public:
double compression;
double granularity;
-
- bool closed; // render the surface as one-sided; may yield faster rendering
+
+ bool closed; // render the surface as one-sided; may yield faster rendering
bool tess; // use tessellated mesh to store straight patches
- bool do_break; //
+ bool do_break; //
bool no_break; // do not render transparent patches as one-faced nodes
-
+
PRCoptions(double compression=0.0, double granularity=0.0, bool closed=false,
bool tess=false, bool do_break=true, bool no_break=false)
: compression(compression), granularity(granularity), closed(closed),
@@ -168,9 +228,12 @@ class PRCgroup
PRCfaceList faces;
PRCcompfaceList compfaces;
PRCtessrectangleList rectangles;
- PRCtesslineList lines;
+ PRCtesslineMap lines;
PRCwireList wires;
PRCpointsetMap points;
+ std::vector<PRCPointSet*> pointsets;
+ std::vector<PRCPolyBrepModel*> polymodels;
+ std::vector<PRCPolyWire*> polywires;
std::string name;
std::list<PRCgroup> groupList;
PRCGeneralTransformation3d* transform;
@@ -178,150 +241,8 @@ class PRCgroup
};
typedef std::list<PRCgroup> PRCgroupList;
-class PRCCompressedSection
-{
- public:
- PRCCompressedSection(oPRCFile *p) : data(0),prepared(false),parent(p),fileStructure(NULL),
- out(data,0) {}
- PRCCompressedSection(PRCFileStructure *fs) : data(0),prepared(false),parent(NULL),fileStructure(fs),
- out(data,0) {}
- virtual ~PRCCompressedSection()
- {
- free(data);
- }
- void write(std::ostream&);
- void prepare();
- uint32_t getSize();
-
- private:
- virtual void writeData() = 0;
- uint8_t *data;
- protected:
- void compress()
- {
- out.compress();
- }
- bool prepared;
- oPRCFile *parent;
- PRCFileStructure *fileStructure;
- PRCbitStream out; // order matters: PRCbitStream must be initialized last
-};
-
-class PRCGlobalsSection : public PRCCompressedSection
-{
- public:
- PRCGlobalsSection(PRCFileStructure *fs, uint32_t i) :
- PRCCompressedSection(fs),numberOfReferencedFileStructures(0),
- tessellationChordHeightRatio(2000.0),tessellationAngleDegrees(40.0),
- defaultFontFamilyName(""),
- numberOfFillPatterns(0),
- userData(0,0),index(i) {}
- virtual ~PRCGlobalsSection() {
- for(PRCTextureDefinitionList::iterator i = texture_definitions.begin();
- i != texture_definitions.end(); i++)
- delete *i;
- for(PRCMaterialList::iterator i = materials.begin();
- i != materials.end(); i++)
- delete *i;
- for(PRCStyleList::iterator i = styles.begin();
- i != styles.end(); i++)
- delete *i;
- for(PRCCoordinateSystemList::iterator i =
- reference_coordinate_systems.begin();
- i != reference_coordinate_systems.end(); i++)
- delete *i;
- }
- uint32_t numberOfReferencedFileStructures;
- double tessellationChordHeightRatio;
- double tessellationAngleDegrees;
- std::string defaultFontFamilyName;
- std::vector<PRCRgbColor> colors;
- std::vector<PRCPicture> pictures;
- PRCTextureDefinitionList texture_definitions;
- PRCMaterialList materials;
- PRCStyleList styles;
- uint32_t numberOfFillPatterns;
- PRCCoordinateSystemList reference_coordinate_systems;
- std::vector<PRCFontKeysSameFont> font_keys_of_font;
- UserData userData;
- private:
- uint32_t index;
- virtual void writeData();
-};
-
-class PRCTreeSection : public PRCCompressedSection
-{
- public:
- PRCTreeSection(PRCFileStructure *fs, uint32_t i) :
- PRCCompressedSection(fs),unit(1),index(i) {}
- virtual ~PRCTreeSection()
- {
- for(PRCPartDefinitionList::iterator it=part_definitions.begin(); it!=part_definitions.end(); ++it) delete *it;
- for(PRCProductOccurrenceList::iterator it=product_occurrences.begin(); it!=product_occurrences.end(); ++it) delete *it;
- }
-
- PRCPartDefinitionList part_definitions;
- PRCProductOccurrenceList product_occurrences;
-/*
- PRCMarkupList markups;
- PRCAnnotationItemList annotation_entities;
- */
- double unit;
- private:
- uint32_t index;
- virtual void writeData();
-};
-
-class PRCTessellationSection : public PRCCompressedSection
-{
- public:
- PRCTessellationSection(PRCFileStructure *fs, uint32_t i) :
- PRCCompressedSection(fs),index(i) {}
- virtual ~PRCTessellationSection() {
- for(PRCTessList::iterator it=tessellations.begin();
- it!=tessellations.end(); ++it)
- delete *it;
- }
- PRCTessList tessellations;
- private:
- uint32_t index;
- virtual void writeData();
-};
-
-class PRCGeometrySection : public PRCCompressedSection
-{
- public:
- PRCGeometrySection(PRCFileStructure *fs, uint32_t i) :
- PRCCompressedSection(fs),index(i) {}
- virtual ~PRCGeometrySection() {}
- private:
- uint32_t index;
- virtual void writeData();
-};
-
-class PRCExtraGeometrySection : public PRCCompressedSection
-{
- public:
- PRCExtraGeometrySection(PRCFileStructure *fs, uint32_t i) :
- PRCCompressedSection(fs),index(i) {}
- virtual ~PRCExtraGeometrySection() {}
- private:
- uint32_t index;
- virtual void writeData();
-};
-
-class PRCModelFile : public PRCCompressedSection
-{
- public:
- PRCModelFile(oPRCFile *p) : PRCCompressedSection(p), unit(1) {}
- double unit;
- virtual ~PRCModelFile() {}
- private:
- virtual void writeData();
-};
-
-void makeFileUUID(uint32_t*);
-void makeAppUUID(uint32_t*);
+void makeFileUUID(PRCUniqueId&);
+void makeAppUUID(PRCUniqueId&);
class PRCUncompressedFile
{
@@ -334,54 +255,101 @@ class PRCUncompressedFile
uint8_t *data;
// std::string file_name;
- void write(std::ostream&);
+ void write(std::ostream&) const;
- uint32_t getSize();
+ uint32_t getSize() const;
};
+typedef std::deque <PRCUncompressedFile*> PRCUncompressedFileList;
class PRCStartHeader
{
public:
uint32_t minimal_version_for_read; // PRCVersion
uint32_t authoring_version; // PRCVersion
- uint32_t fileStructureUUID[4];
- uint32_t applicationUUID[4]; // should be 0
+ PRCUniqueId file_structure_uuid;
+ PRCUniqueId application_uuid; // should be 0
- void write(std::ostream&);
+ PRCStartHeader() :
+ minimal_version_for_read(PRCVersion), authoring_version(PRCVersion) {}
+ void serializeStartHeader(std::ostream&) const;
- uint32_t getSize();
+ uint32_t getStartHeaderSize() const;
};
-class PRCFileStructure
+class PRCFileStructure : public PRCStartHeader
{
- private:
- oPRCFile *parent;
- uint32_t index;
public:
- PRCStartHeader header;
- std::list<PRCUncompressedFile> uncompressedFiles;
+ uint32_t number_of_referenced_file_structures;
+ double tessellation_chord_height_ratio;
+ double tessellation_angle_degree;
+ std::string default_font_family_name;
+ std::vector<PRCRgbColor> colors;
+ std::vector<PRCPicture> pictures;
+ PRCUncompressedFileList uncompressed_files;
+ PRCTextureDefinitionList texture_definitions;
+ PRCMaterialList materials;
+ PRCStyleList styles;
+ PRCCoordinateSystemList reference_coordinate_systems;
+ std::vector<PRCFontKeysSameFont> font_keys_of_font;
+ PRCPartDefinitionList part_definitions;
+ PRCProductOccurrenceList product_occurrences;
+// PRCMarkupList markups;
+// PRCAnnotationItemList annotation_entities;
+ double unit;
PRCTopoContextList contexts;
+ PRCTessList tessellations;
+
+ uint32_t sizes[6];
+ uint8_t *globals_data;
+ PRCbitStream globals_out; // order matters: PRCbitStream must be initialized last
+ uint8_t *tree_data;
+ PRCbitStream tree_out;
+ uint8_t *tessellations_data;
+ PRCbitStream tessellations_out;
+ uint8_t *geometry_data;
+ PRCbitStream geometry_out;
+ uint8_t *extraGeometry_data;
+ PRCbitStream extraGeometry_out;
~PRCFileStructure () {
- for(PRCTopoContextList::iterator i = contexts.begin();
- i != contexts.end(); i++)
- delete *i;
+ for(PRCUncompressedFileList::iterator it=uncompressed_files.begin(); it!=uncompressed_files.end(); ++it) delete *it;
+ for(PRCTextureDefinitionList::iterator it=texture_definitions.begin(); it!=texture_definitions.end(); ++it) delete *it;
+ for(PRCMaterialList::iterator it=materials.begin(); it!=materials.end(); ++it) delete *it;
+ for(PRCStyleList::iterator it=styles.begin(); it!=styles.end(); ++it) delete *it;
+ for(PRCTopoContextList::iterator it=contexts.begin(); it!=contexts.end(); ++it) delete *it;
+ for(PRCTessList::iterator it=tessellations.begin(); it!=tessellations.end(); ++it) delete *it;
+ for(PRCPartDefinitionList::iterator it=part_definitions.begin(); it!=part_definitions.end(); ++it) delete *it;
+ for(PRCProductOccurrenceList::iterator it=product_occurrences.begin(); it!=product_occurrences.end(); ++it) delete *it;
+ for(PRCCoordinateSystemList::iterator it=reference_coordinate_systems.begin(); it!=reference_coordinate_systems.end(); it++)
+ delete *it;
+
+ free(globals_data);
+ free(tree_data);
+ free(tessellations_data);
+ free(geometry_data);
+ free(extraGeometry_data);
}
-
- PRCGlobalsSection globals;
- PRCTreeSection tree;
- PRCTessellationSection tessellations;
- PRCGeometrySection geometry;
- PRCExtraGeometrySection extraGeometry;
-
- PRCFileStructure(oPRCFile *p, uint32_t i) : parent(p),index(i),
- globals(this,i),tree(this,i),tessellations(this,i),geometry(this,i),
- extraGeometry(this,i) {}
+
+ PRCFileStructure() :
+ number_of_referenced_file_structures(0),
+ tessellation_chord_height_ratio(2000.0),tessellation_angle_degree(40.0),
+ default_font_family_name(""),
+ unit(1),
+ globals_data(NULL),globals_out(globals_data,0),
+ tree_data(NULL),tree_out(tree_data,0),
+ tessellations_data(NULL),tessellations_out(tessellations_data,0),
+ geometry_data(NULL),geometry_out(geometry_data,0),
+ extraGeometry_data(NULL),extraGeometry_out(extraGeometry_data,0) {}
void write(std::ostream&);
void prepare();
uint32_t getSize();
+ void serializeFileStructureGlobals(PRCbitStream&);
+ void serializeFileStructureTree(PRCbitStream&);
+ void serializeFileStructureTessellation(PRCbitStream&);
+ void serializeFileStructureGeometry(PRCbitStream&);
+ void serializeFileStructureExtraGeometry(PRCbitStream&);
uint32_t addPicture(EPRCPictureDataFormat format, uint32_t size, const uint8_t *picture, uint32_t width=0, uint32_t height=0, std::string name="");
- uint32_t addTextureDefinition(PRCTextureDefinition *pTextureDefinition);
+ uint32_t addTextureDefinition(PRCTextureDefinition*& pTextureDefinition);
uint32_t addRgbColor(const PRCRgbColor &color);
uint32_t addRgbColorUnique(const PRCRgbColor &color);
uint32_t addMaterialGeneric(PRCMaterialGeneric*& pMaterialGeneric);
@@ -405,7 +373,7 @@ class PRCFileStructure
class PRCFileStructureInformation
{
public:
- uint32_t UUID[4];
+ PRCUniqueId UUID;
uint32_t reserved; // 0
uint32_t number_of_offsets;
uint32_t *offsets;
@@ -415,15 +383,14 @@ class PRCFileStructureInformation
uint32_t getSize();
};
-class PRCHeader
+class PRCHeader : public PRCStartHeader
{
public :
- PRCStartHeader startHeader;
uint32_t number_of_file_structures;
PRCFileStructureInformation *fileStructureInformation;
uint32_t model_file_offset;
uint32_t file_size; // not documented
- std::list<PRCUncompressedFile> uncompressedFiles;
+ PRCUncompressedFileList uncompressed_files;
void write(std::ostream&);
uint32_t getSize();
@@ -434,40 +401,42 @@ typedef std::map <PRCGeneralTransformation3d,uint32_t> PRCtransformMap;
class oPRCFile
{
public:
- oPRCFile(std::ostream &os, double unit=1, uint32_t n=1) :
+ oPRCFile(std::ostream &os, double u=1, uint32_t n=1) :
number_of_file_structures(n),
- fileStructures(new PRCFileStructure*[n]),modelFile(this),
+ fileStructures(new PRCFileStructure*[n]),
+ unit(u),
+ modelFile_data(NULL),modelFile_out(modelFile_data,0),
fout(NULL),output(os)
{
for(uint32_t i = 0; i < number_of_file_structures; ++i)
{
- fileStructures[i] = new PRCFileStructure(this,i);
- fileStructures[i]->header.minimal_version_for_read = PRCVersion;
- fileStructures[i]->header.authoring_version = PRCVersion;
- makeFileUUID(fileStructures[i]->header.fileStructureUUID);
- makeAppUUID(fileStructures[i]->header.applicationUUID);
- fileStructures[i]->tree.unit = unit;
+ fileStructures[i] = new PRCFileStructure();
+ fileStructures[i]->minimal_version_for_read = PRCVersion;
+ fileStructures[i]->authoring_version = PRCVersion;
+ makeFileUUID(fileStructures[i]->file_structure_uuid);
+ makeAppUUID(fileStructures[i]->application_uuid);
+ fileStructures[i]->unit = u;
}
- modelFile.unit = unit;
}
-
- oPRCFile(const std::string &name, double unit=1, uint32_t n=1) :
+
+ oPRCFile(const std::string &name, double u=1, uint32_t n=1) :
number_of_file_structures(n),
- fileStructures(new PRCFileStructure*[n]),modelFile(this),
+ fileStructures(new PRCFileStructure*[n]),
+ unit(u),
+ modelFile_data(NULL),modelFile_out(modelFile_data,0),
fout(new std::ofstream(name.c_str(),
std::ios::out|std::ios::binary|std::ios::trunc)),
output(*fout)
{
for(uint32_t i = 0; i < number_of_file_structures; ++i)
{
- fileStructures[i] = new PRCFileStructure(this,i);
- fileStructures[i]->header.minimal_version_for_read = PRCVersion;
- fileStructures[i]->header.authoring_version = PRCVersion;
- makeFileUUID(fileStructures[i]->header.fileStructureUUID);
- makeAppUUID(fileStructures[i]->header.applicationUUID);
- fileStructures[i]->tree.unit = unit;
+ fileStructures[i] = new PRCFileStructure();
+ fileStructures[i]->minimal_version_for_read = PRCVersion;
+ fileStructures[i]->authoring_version = PRCVersion;
+ makeFileUUID(fileStructures[i]->file_structure_uuid);
+ makeAppUUID(fileStructures[i]->application_uuid);
+ fileStructures[i]->unit = u;
}
- modelFile.unit = unit;
}
~oPRCFile()
@@ -477,21 +446,25 @@ class oPRCFile
delete[] fileStructures;
if(fout != NULL)
delete fout;
+ free(modelFile_data);
}
void begingroup(const char *name, PRCoptions *options=NULL,
const double t[][4]=NULL);
void endgroup();
-
+
bool finish();
uint32_t getSize();
-
+
const uint32_t number_of_file_structures;
PRCFileStructure **fileStructures;
PRCHeader header;
- PRCModelFile modelFile;
+ PRCUnit unit;
+ uint8_t *modelFile_data;
+ PRCbitStream modelFile_out; // order matters: PRCbitStream must be initialized last
PRCcolorMap colorMap;
PRCcolourMap colourMap;
+ PRCcolourwidthMap colourwidthMap;
PRCmaterialMap materialMap;
PRCgroup rootGroup;
PRCtransformMap transformMap;
@@ -500,12 +473,29 @@ class oPRCFile
void doGroup(PRCgroup& group, PRCPartDefinition *parent_part_definition, PRCProductOccurrence *parent_product_occurrence);
uint32_t addColor(const PRCRgbColor &color);
uint32_t addColour(const RGBAColour &colour);
+ uint32_t addColourWidth(const RGBAColour &colour, double width);
uint32_t addMaterial(const PRCmaterial &material);
uint32_t addTransform(PRCGeneralTransformation3d*& transform);
- void addPoint(const double P[3], const RGBAColour &c);
- void addLine(uint32_t n, const double P[][3], const RGBAColour &c);
+ void addPoint(const double P[3], const RGBAColour &c, double w=1.0);
+ void addPoints(uint32_t n, const double P[][3], const RGBAColour &c, double w=1.0);
+ void addLines(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[],
+ const RGBAColour &c, double w, bool segment_color,
+ uint32_t nC, const RGBAColour C[], uint32_t nCI, const uint32_t CI[]);
+ void addTriangles(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[][3], const PRCmaterial &m,
+ uint32_t nN, const double N[][3], const uint32_t NI[][3],
+ uint32_t nT, const double T[][2], const uint32_t TI[][3],
+ uint32_t nC, const RGBAColour C[], const uint32_t CI[][3],
+ uint32_t nM, const PRCmaterial M[], const uint32_t MI[]);
+ void addQuads(uint32_t nP, const double P[][3], uint32_t nI, const uint32_t PI[][4], const PRCmaterial &m,
+ uint32_t nN, const double N[][3], const uint32_t NI[][4],
+ uint32_t nT, const double T[][2], const uint32_t TI[][4],
+ uint32_t nC, const RGBAColour C[], const uint32_t CI[][4],
+ uint32_t nM, const PRCmaterial M[], const uint32_t MI[]);
+ void addLine(uint32_t n, const double P[][3], const RGBAColour &c, double w=1.0);
void addBezierCurve(uint32_t n, const double cP[][3], const RGBAColour &c);
void addCurve(uint32_t d, uint32_t n, const double cP[][3], const double *k, const RGBAColour &c, const double w[]);
+ void addQuad(const double P[][3], const RGBAColour C[]);
+
void addRectangle(const double P[][3], const PRCmaterial &m);
void addPatch(const double cP[][3], const PRCmaterial &m);
void addSurface(uint32_t dU, uint32_t dV, uint32_t nU, uint32_t nV,
@@ -517,6 +507,7 @@ class oPRCFile
void addSphere(double radius, const PRCmaterial &m, PRCFACETRANSFORM);
void addDisk(double radius, const PRCmaterial &m, PRCFACETRANSFORM);
void addCylinder(double radius, double height, const PRCmaterial &m, PRCFACETRANSFORM);
+ void addCone(double radius, double height, const PRCmaterial &m, PRCFACETRANSFORM);
void addTorus(double major_radius, double minor_radius, double angle1, double angle2, const PRCmaterial &m, PRCFACETRANSFORM);
#undef PRCFACETRANSFORM
@@ -598,6 +589,7 @@ class oPRCFile
return fileStructures[fileStructure]->addCoordinateSystemUnique(pCoordinateSystem);
}
private:
+ void serializeModelFileData(PRCbitStream&);
std::ofstream *fout;
std::ostream &output;
};
diff --git a/Build/source/utils/asymptote/prc/test.cc b/Build/source/utils/asymptote/prc/test.cc
index 98a6c226c43..61577a1ff77 100644
--- a/Build/source/utils/asymptote/prc/test.cc
+++ b/Build/source/utils/asymptote/prc/test.cc
@@ -31,6 +31,13 @@ extern const double pi;
int main()
{
+ // List of pictures used; keep track of memory allocated to free it in the end
+ // shared pointers or garbage collector may be an alternative
+ uint8_t *picture1 = NULL;
+ uint8_t *picture2 = NULL;
+ uint8_t *picture3 = NULL;
+ uint8_t *picture4 = NULL;
+
oPRCFile file("test.prc");
const size_t N_COLOURS = 32;
@@ -265,35 +272,33 @@ int main()
{0,-1.5,0.15},{0.84,-1.5,0.15},{1.5,-0.84,0.15},{1.5,0,0.15},
},
};
- const size_t NUMBER_OF_TEAPOTS = 2;
- double shifted_controlPoints[NUMBER_OF_TEAPOTS][NUMBER_OF_PATCHES][16][3];
- for(size_t teapot = 0; teapot < NUMBER_OF_TEAPOTS; ++teapot)
- for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
- for(size_t i = 0; i < 16; ++i)
- {
- shifted_controlPoints[teapot][patch][i][0] = controlPoints[patch][i][0]+6*teapot;
- shifted_controlPoints[teapot][patch][i][1] = controlPoints[patch][i][1];
- shifted_controlPoints[teapot][patch][i][2] = controlPoints[patch][i][2];
- }
+ file.begingroup("Teapot");
for(size_t i = 0; i < NUMBER_OF_PATCHES; ++i)
{
- // was so in old API
- // psn[i] = new PRCsurface(&file,3,3,4,4,controlPoints[i],knotsU,knotsV,colours[i%N_COLOURS]);
- // file.add(psn[i]);
- file.begingroup("Teapot");
- if (1) file.addPatch(controlPoints[i],materials[i%N_COLOURS]);
- file.endgroup();
- if (0) file.addSurface(3,3,4,4,controlPoints[i],knotsU,knotsV,materials[i%N_COLOURS],NULL); // use (too) general API for the same result as above
+ if(1) file.addPatch(controlPoints[i],materials[i%N_COLOURS]);
+ if(0) file.addSurface(3,3,4,4,controlPoints[i],knotsU,knotsV,materials[i%N_COLOURS],NULL); // use (too) general API for the same result as above
}
-// file.begingroup("Teapot rendered in the way of opaque surfacesPRCNOBREAKPRCCOMPRESSLOW");
-// for(size_t i = 0; i < NUMBER_OF_PATCHES; ++i)
-// {
-// file.addPatch(shifted_controlPoints[1][i],materials[i%N_COLOURS]); // force joining together of patches, damaging transparency
-// }
-// file.endgroup();
+ file.endgroup();
+
+ double t[4][4];
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=6;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=0;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+
+ PRCoptions teapotopt;
+ teapotopt.no_break = true;
+ teapotopt.do_break = false;
+ teapotopt.compression = 0.0001;
+ // force joining together of patches, damaging transparency
+ file.begingroup("Teapot rendered in the way of opaque surfaces and transferred",&teapotopt,t);
+ for(size_t i = 0; i < NUMBER_OF_PATCHES; ++i)
+ {
+ file.addPatch(controlPoints[i],materials[i%N_COLOURS]);
+ }
+ file.endgroup();
}
-
-if(1) {
+
const size_t NUMBER_OF_POINTS = 31;
double points[NUMBER_OF_POINTS][3];
for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
@@ -319,47 +324,425 @@ if(1) {
}
knots[3+NUMBER_OF_POINTS] = (3+NUMBER_OF_POINTS+1)/3;
- double point[3] = {11,0,0};
- file.begingroup("point");
- file.addPoint(point, RGBAColour(1.0,0.0,0.0));
- file.endgroup();
-
-// RGBAColour red(1.0,0.0,0.0);
-// PRCline pl(&file,NUMBER_OF_POINTS,points,red);
-// file.add(&pl);
- file.begingroup("polyline");
- file.addLine(NUMBER_OF_POINTS, points, RGBAColour(1.0,0.0,0.0));
- file.endgroup();
-
- file.begingroup("polylines");
- file.addLine(NUMBER_OF_POINTS, shifted_points[0], RGBAColour(0.0,1.0,0.0));
- file.addLine(NUMBER_OF_POINTS, shifted_points[1], RGBAColour(1.0,1.0,0.0));
- file.endgroup();
-
-// RGBAColour white(1.0,1.0,1.0);
-// PRCcurve pc(&file,3,NUMBER_OF_POINTS,points,knots,white);
-// file.add(&pc);
+ PRCoptions grpopt;
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ if(1){
+ double point1[3] = {11,0,0};
+ double point2[3] = {12,0,0};
+ double points[2][3] = {{9,0,0},{10,0,0}};
+ file.begingroup("points",&grpopt);
+ file.addPoint(point1, RGBAColour(1.0,0.0,0.0));
+ file.addPoint(point2, RGBAColour(1.0,0.0,0.0));
+ file.addPoints(2, points, RGBAColour(1.0,0.0,0.0,0.5),10);
+ file.endgroup();
+ }
+
+ if(1){
+ PRCoptions grpopt;
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ grpopt.closed = true;
+
+ double t[4][4];
+
+ const size_t nP = 5;
+ double P[nP][3] = {{0,0,0},{1,0,0},{1,1,0},{0,1,0},{0,2,0}};
+ const size_t nI = 3;
+ uint32_t PI[nI][3] = {{0,1,3},{1,2,3},{3,2,4}};
+ const size_t nM = 2;
+ PRCmaterial M[nM];
+ M[0] = PRCmaterial(
+ RGBAColour(0.0,0.0,0.18),
+ RGBAColour(0.0,0.0,0.878431),
+ RGBAColour(0.0,0.0,0.32),
+ RGBAColour(0.0,0.0,0.072),
+ 1.0,0.1);
+ M[1] = PRCmaterial(
+ RGBAColour(0.18,0.0,0.0),
+ RGBAColour(0.878431,0.0,0.0),
+ RGBAColour(0.32,0.0,0.0),
+ RGBAColour(0.072,0.0,0.0),
+ 0.5,0.1);
+ uint32_t MI[nI] = {0,1,0};
+ const size_t nN = 2;
+ double N[nN][3] = {{0,0,1},{0,0,-1}};
+ uint32_t NI[nI][3] = {{0,0,0},{0,0,0},{1,1,1}};
+
+ const uint32_t nC = 3;
+ RGBAColour C[nC];
+ uint32_t CI[nI][3] = {{0,0,0},{1,1,1},{1,1,2}};
+
+ PRCmaterial materialGreen(
+ RGBAColour(0.0,0.18,0.0),
+ RGBAColour(0.0,0.878431,0.0),
+ RGBAColour(0.0,0.32,0.0),
+ RGBAColour(0.0,0.072,0.0),
+ 1.0,0.1);
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=-1;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("triangles_onecolor_with_normals",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialGreen, nN, N, NI, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ file.begingroup("triangles_onecolor",&grpopt);
+ file.addTriangles(nP, P, nI, PI, materialGreen, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=1;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("triangles_manymaterials",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialGreen, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, nM, M, MI);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=2;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ PRCmaterial materialBase(
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(1,1,1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ 1.0,0.1);
+ C[0] = RGBAColour(1,0,0,0.1);
+ C[1] = RGBAColour(0,1,0,0.5);
+ C[2] = RGBAColour(0,0,1,0.9);
+ file.begingroup("triangles_rgba_vertexcolors_on_opaque_a_component_of_vertexcolor_ignored",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialBase, 0, NULL, NULL, 0, NULL, NULL, nC, C, CI, 0, NULL, NULL);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=3;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ PRCmaterial materialTransparent(
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(1,1,1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ 0.3,0.1);
+ C[0] = RGBAColour(1,0,0,0.1);
+ C[1] = RGBAColour(0,1,0,0.5);
+ C[2] = RGBAColour(0,0,1,0.9);
+ file.begingroup("triangles_rgba_vertexcolors_on_transparent_a_component_of_vertexcolor_ignored",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialTransparent, 0, NULL, NULL, 0, NULL, NULL, nC, C, CI, 0, NULL, NULL);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=4;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ C[0] = RGBAColour(1,0,0,0.5);
+ C[1] = RGBAColour(0,1,0,0.5);
+ C[2] = RGBAColour(0,0,1,0.5);
+ file.begingroup("triangles_rgb_vertexcolors_on_transparent_may_not_work_in_OpenGL",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialTransparent, 0, NULL, NULL, 0, NULL, NULL, nC, C, CI, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=5;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ const uint32_t picture_width=2;
+ const uint32_t picture_height=2;
+ const uint8_t picRGB[picture_width*picture_height*3] =
+ {255,0,0, 0,255,0, 0,0,255, 0,0,0 };
+// {255,255,0, 255,0,0, 255,0,0, 255,0,0 };
+// { 255,0,0, 255,255,0, 255,255,0, 255,255,255 };
+// {255,0,0, 0,255,0, 0,0,255, 0,0,0 };
+
+ const uint8_t picRGBA[picture_width*picture_height*4] =
+ {255,0,0,255, 0,255,0,150, 0,0,255,150, 0,0,0,100 };
+// (1,0) 2 3 (1,1)
+// (0,0) 0 1 (1,0)
+ uint8_t *pictureRGB = new uint8_t[picture_width*picture_height*3];
+ for(size_t i=0; i<picture_width*picture_height*3; i++) pictureRGB[i]=picRGB[i];
+ picture1 = pictureRGB;
+ uint8_t *pictureRGBA = new uint8_t[picture_width*picture_height*4];
+ for(size_t i=0; i<picture_width*picture_height*4; i++) pictureRGBA[i]=picRGBA[i];
+ picture2 = pictureRGBA;
+ const uint32_t nT = 4;
+ const double T[nT][2] = { {0.1,0.1}, {0.9,0.1}, {0.9,0.9}, {0.9,0.1} };
+ uint32_t TI[nI][3] = {{0,1,3},{1,2,3},{3,2,3}};
+
+ PRCmaterial materialBase(
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(1,1,1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ 1.0,0.1,
+ pictureRGB, picture_width, picture_height, false, false);
+ file.begingroup("triangles_rgb_texture",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialBase, 0, NULL, NULL, nT, T, TI, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=6;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ PRCmaterial materialTransparent(
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(1,1,1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ 0.3,0.1,
+ pictureRGBA, picture_width, picture_height, true, true);
+ file.begingroup("triangles_rgba_texture_replacing",&grpopt,t);
+ file.addTriangles(nP, P, nI, PI, materialTransparent, 0, NULL, NULL, nT, T, TI, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ }
+
+ if(1){
+ PRCoptions grpopt;
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ grpopt.closed = true;
+
+ double t[4][4];
+
+ const size_t nP = 6;
+ double P[nP][3] = {{3+0,0,0},{3+1,0,0},{3+0,1,0},{3+1,1,0},{3+0,2,0},{3+1,2,0}};
+ const size_t nI = 2;
+ uint32_t PI[nI][4] = {{0,1,3,2},{2,3,5,4}};
+ const size_t nM = 2;
+ PRCmaterial M[nM];
+ M[0] = PRCmaterial(
+ RGBAColour(0.0,0.0,0.18),
+ RGBAColour(0.0,0.0,0.878431),
+ RGBAColour(0.0,0.0,0.32),
+ RGBAColour(0.0,0.0,0.072),
+ 1.0,0.1);
+ M[1] = PRCmaterial(
+ RGBAColour(0.18,0.0,0.0),
+ RGBAColour(0.878431,0.0,0.0),
+ RGBAColour(0.32,0.0,0.0),
+ RGBAColour(0.072,0.0,0.0),
+ 0.5,0.1);
+ uint32_t MI[nI] = {0,1};
+ const size_t nN = 2;
+ double N[nN][3] = {{0,0,1},{0,0,-1}};
+ uint32_t NI[nI][4] = {{0,0,0,0},{1,1,1,1}};
+
+ const uint32_t nC = 3;
+ RGBAColour C[nC];
+ uint32_t CI[nI][4] = {{0,0,1,1},{1,1,2,2}};
+ C[0] = RGBAColour(1,0,0,0.5);
+ C[1] = RGBAColour(0,1,0,0.5);
+ C[2] = RGBAColour(0,0,1,0.5);
+
+ PRCmaterial materialGreen(
+ RGBAColour(0.0,0.18,0.0),
+ RGBAColour(0.0,0.878431,0.0),
+ RGBAColour(0.0,0.32,0.0),
+ RGBAColour(0.0,0.072,0.0),
+ 1.0,0.1);
+
+ PRCmaterial materialBase(
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(1,1,1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ 1.0,0.1);
+
+ PRCmaterial materialTransparent(
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(1,1,1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ 0.3,0.1);
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=-1;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("quads_onecolor_with_normals",&grpopt,t);
+ file.addQuads(nP, P, nI, PI, materialGreen, nN, N, NI, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ file.begingroup("quads_onecolor",&grpopt);
+ file.addQuads(nP, P, nI, PI, materialGreen, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=1;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("quads_manymaterials",&grpopt,t);
+ file.addQuads(nP, P, nI, PI, materialGreen, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, nM, M, MI);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=2;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("quads_rgb_vertexcolors_on_transparent_may_not_work_in_OpenGL",&grpopt,t);
+ file.addQuads(nP, P, nI, PI, materialTransparent, 0, NULL, NULL, 0, NULL, NULL, nC, C, CI, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ if(1){
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=5;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ const uint32_t picture_width=2;
+ const uint32_t picture_height=2;
+ const uint8_t picRGB[picture_width*picture_height*3] =
+ {255,0,0, 0,255,0, 0,0,255, 0,0,0 };
+// {255,255,0, 255,0,0, 255,0,0, 255,0,0 };
+// { 255,0,0, 255,255,0, 255,255,0, 255,255,255 };
+// {255,0,0, 0,255,0, 0,0,255, 0,0,0 };
+
+ const uint8_t picRGBA[picture_width*picture_height*4] =
+ {255,0,0,255, 0,255,0,150, 0,0,255,150, 0,0,0,100 };
+// (1,0) 2 3 (1,1)
+// (0,0) 0 1 (1,0)
+ uint8_t *pictureRGB = new uint8_t[picture_width*picture_height*3];
+ for(size_t i=0; i<picture_width*picture_height*3; i++) pictureRGB[i]=picRGB[i];
+ picture3 = pictureRGB;
+ uint8_t *pictureRGBA = new uint8_t[picture_width*picture_height*4];
+ for(size_t i=0; i<picture_width*picture_height*4; i++) pictureRGBA[i]=picRGBA[i];
+ picture4 = pictureRGBA;
+ const uint32_t nT = 3;
+ const double T[nT][2] = { {0.1,0.1}, {0.5,0.5}, {0.9,0.9} };
+ uint32_t TI[nI][4] = {{0,0,1,1},{1,1,2,2}};
+
+ PRCmaterial materialBase(
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(1,1,1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ RGBAColour(0.1,0.1,0.1,1),
+ 1.0,0.1,
+ pictureRGB, picture_width, picture_height, false, false);
+ file.begingroup("quads_rgb_texture",&grpopt,t);
+ file.addQuads(nP, P, nI, PI, materialBase, 0, NULL, NULL, nT, T, TI, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=6;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ PRCmaterial materialTransparent(
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(1,1,1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ RGBAColour(0.1,0.1,0.1,0.3),
+ 0.6,0.1,
+ pictureRGBA, picture_width, picture_height, true, true);
+ file.begingroup("quads_rgba_texture_replacing",&grpopt,t);
+ file.addQuads(nP, P, nI, PI, materialTransparent, 0, NULL, NULL, nT, T, TI, 0, NULL, NULL, 0, NULL, NULL);
+ file.endgroup();
+ }
+
+ }
+
+ if(1){
+ file.begingroup("polyline",&grpopt);
+ file.addLine(NUMBER_OF_POINTS, points, RGBAColour(1.0,0.0,0.0));
+ file.endgroup();
+
+ file.begingroup("polylines",&grpopt);
+ file.addLine(NUMBER_OF_POINTS, shifted_points[0], RGBAColour(0.0,1.0,0.0),2.0);
+ file.addLine(NUMBER_OF_POINTS, shifted_points[1], RGBAColour(1.0,1.0,0.0),2.0);
+ file.endgroup();
+ }
+
+ if(1){
+ PRCoptions grpopt;
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ grpopt.closed = true;
+
+ double t[4][4];
+
+ const size_t nP = 5;
+ double P[nP][3] = {{0,0,0},{1,0,0},{1,1,0},{0,1,0},{0,2,0}};
+ const size_t nI = 1+5 + 1+3;
+ uint32_t PI[nI] = {5,0,1,2,3,0, 3,2,4,3 }; // square of 5 points, wire of 2 points
+ const uint32_t nC = 5; // number of colors
+ RGBAColour C[nC]; // color for segments
+ C[0] = RGBAColour(1,0,0);
+ C[1] = RGBAColour(0,1,0);
+ C[2] = RGBAColour(0,0,1);
+ C[3] = RGBAColour(0,0,0);
+ C[4] = RGBAColour(1,1,0);
+ const uint32_t nCI = 5-1 + 3-1; // number of segments
+ uint32_t CI[nCI] = { 0,1,2,3, 4,4 };
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=5;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("polyline_indexed_one_color",&grpopt,t);
+ file.addLines(nP, P, nI, PI, RGBAColour(1,0,0), 1, false, 0, NULL, 0, NULL);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=6;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ file.begingroup("polyline_indexed_color_per_segment",&grpopt,t);
+ file.addLines(nP, P, nI, PI, RGBAColour(1,0,0), 2, true, nC, C, nCI, CI);
+ file.endgroup();
+
+ t[0][0]=1; t[0][1]=0; t[0][2]=0; t[0][3]=0;
+ t[1][0]=0; t[1][1]=1; t[1][2]=0; t[1][3]=0;
+ t[2][0]=0; t[2][1]=0; t[2][2]=1; t[2][3]=7;
+ t[3][0]=0; t[3][1]=0; t[3][2]=0; t[3][3]=1;
+ const uint32_t nCI2 = 5 + 3; // number of vertices
+ uint32_t CI2[nCI2] = { 0,1,2,3,0, 4,4,4 };
+ file.begingroup("polyline_indexed_color_per_vertex_is_broken",&grpopt,t);
+ file.addLines(nP, P, nI, PI, RGBAColour(1,0,0), 2, false, nC, C, nCI2, CI2);
+ file.endgroup();
+ }
+
if(1)
{
file.begingroup("bezier_wire");
file.addBezierCurve(NUMBER_OF_POINTS,points,RGBAColour(1.0,1.0,1.0));
file.endgroup();
}
- if(0)
+ if(1)
{
file.begingroup("NURBS_wire");
file.addCurve(3, NUMBER_OF_POINTS, points, knots, RGBAColour(1.0,1.0,1.0), NULL); // genarl API for the above
file.endgroup();
}
- }
-
// following box examples show a) different ways to represent a surface consisting of flat rectangles
// b) that the only way to have almost working transparency is a set of NURBS bodies.
// (Or may be other topology types like plane also work
// demonstration how non-transparent materials work the same for all kinds of objects
- if (1) { // demonstration how non-transparent materials work the same for all kinds of objects
+ if(1) { // demonstration how non-transparent materials work the same for all kinds of objects
const size_t NUMBER_OF_PATCHES = 6;
double vertices[NUMBER_OF_PATCHES][4][3] =
{
@@ -417,20 +800,30 @@ if(1) {
RGBAColour(0.0,0.072,0.0),
1.0,0.1);
+ PRCoptions grpopt;
file.begingroup("TransparentBox");
- file.begingroup("SetOfNURBSBodies");
+ grpopt.no_break = false;
+ grpopt.do_break = true;
+ grpopt.tess = false;
+ file.begingroup("TransparentBoxSetOfNURBSBodies",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[0][patch], materials[(patch*5)%N_COLOURS]);
}
file.endgroup();
- file.begingroup("NURBSFacesPRCNOBREAK");
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = false;
+ file.begingroup("TransparentBoxNURBSFaces",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[1][patch], materials[(patch*5)%N_COLOURS]);
}
file.endgroup();
- file.begingroup("TessellatedPRCTESS");
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ file.begingroup("TransparentBoxTessellated",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[2][patch], materials[(patch*5)%N_COLOURS]);
@@ -439,19 +832,28 @@ if(1) {
file.endgroup();
file.begingroup("Box");
- file.begingroup("TessellatedPRCTESS");
+ grpopt.no_break = false;
+ grpopt.do_break = false;
+ grpopt.tess = true;
+ file.begingroup("BoxTessellated",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[3][patch], materialGreen);
}
file.endgroup();
- file.begingroup("NURBSFaces");
+ grpopt.no_break = true;
+ grpopt.do_break = false;
+ grpopt.tess = false;
+ file.begingroup("BoxNURBSFaces",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[4][patch], materialGreen);
}
file.endgroup();
- file.begingroup("SetOfNURBSBodiesPRCDOBREAK");
+ grpopt.no_break = false;
+ grpopt.do_break = true;
+ grpopt.tess = false;
+ file.begingroup("BoxSetOfNURBSBodies",&grpopt);
for(size_t patch = 0; patch < NUMBER_OF_PATCHES; ++patch)
{
file.addRectangle(shifted_vertices[5][patch], materialGreen);
@@ -460,62 +862,6 @@ if(1) {
file.endgroup();
}
- if(0) { // test disk
- PRCTopoContext *diskContext = new PRCTopoContext;
- uint32_t context_index = file.addTopoContext(diskContext);
-
- PRCBrepData *body = new PRCBrepData;
- uint32_t body_index = diskContext->addBrepData(body);
- PRCConnex *connex = new PRCConnex;
- body->addConnex(connex);
- PRCShell *shell = new PRCShell;
- // shell->shell_is_closed = true;
- connex->addShell(shell);
- PRCFace *face = new PRCFace;
- shell->addFace(face,2);
- PRCRuled *surface = new PRCRuled;
- face->base_surface=surface;
-
- PRCCircle *first_curve = new PRCCircle;
- first_curve->radius = 1;
- surface->first_curve=first_curve;
- PRCCircle *second_curve = new PRCCircle;
- second_curve->radius = 0;
- surface->second_curve=second_curve;
-
- surface->uv_domain.min.x = 0;
- surface->uv_domain.max.x = 1;
- surface->uv_domain.min.y = 0;
- surface->uv_domain.max.y = 2*pi;
- surface->parameterization_on_v_coeff_a = -1;
- surface->parameterization_on_v_coeff_b = 2*pi;
-
- surface->has_transformation = true;
- surface->geometry_is_2D = false;
- surface->behaviour = PRC_TRANSFORMATION_Translate|PRC_TRANSFORMATION_Rotate;
- surface->origin.Set(0,0,0);
- surface->x_axis.Set(1,0,0);
- surface->y_axis.Set(0,1,0);
-
- PRCBrepModel *brepmodel = new PRCBrepModel("disk");
- brepmodel->context_id = context_index;
- brepmodel->body_id = body_index;
- brepmodel->is_closed = true; // we do not need to see the tube from inside
- brepmodel->index_of_line_style = 0;
-// file.addBrepModel(brepmodel);
-
- PRCSingleWireBody *firstCurveBody = new PRCSingleWireBody;
- uint32_t first_curve_body_index = diskContext->addSingleWireBody(firstCurveBody);
- PRCWireEdge *firstCurveEdge = new PRCWireEdge;
- firstCurveBody->setWireEdge(firstCurveEdge);
- firstCurveEdge->curve_3d = surface->first_curve;
- PRCWire *firstCurveWire = new PRCWire("firstCurveWire");
- firstCurveWire->index_of_line_style = 0;
- firstCurveWire->context_id = context_index;
- firstCurveWire->body_id = first_curve_body_index;
-// file.addWire(firstCurveWire);
- }
-
if(1) {
PRCmaterial materialGreen(
RGBAColour(0.0,0.18,0.0),
@@ -523,242 +869,82 @@ if(1) {
RGBAColour(0.0,0.32,0.0),
RGBAColour(0.0,0.072,0.0),
1.0,0.1);
+ PRCoptions grpopt;
+ grpopt.closed = true;
+
+ file.begingroup("Complex elements, one-sided");
const double disk_origin[3] = {11,0,2};
const double disk_x_axis[3] = {1,0,0};
const double disk_y_axis[3] = {0,-1,0};
const double disk_scale = 2;
- file.begingroup("diskPRCCLOSED");
+ file.begingroup("disk",&grpopt);
file.addDisk(1,materialGreen,disk_origin,disk_x_axis,disk_y_axis,disk_scale);
file.endgroup();
const double hs_origin[3] = {11,0,2};
const double hs_x_axis[3] = {1,0,0};
const double hs_y_axis[3] = {0,1,0};
const double hs_scale = 2;
- file.begingroup("hemispherePRCCLOSED");
+ file.begingroup("hemisphere",&grpopt);
file.addHemisphere(1,materialGreen,hs_origin,hs_x_axis,hs_y_axis,hs_scale);
file.endgroup();
const double cyl_origin[3] = {11,0,1};
const double cyl_x_axis[3] = {1,0,0};
const double cyl_y_axis[3] = {0,1,0};
const double cyl_scale = 1;
- file.begingroup("cylinderPRCCLOSED");
+ file.begingroup("cylinder",&grpopt);
file.addCylinder(1,1,materialGreen,cyl_origin,cyl_x_axis,cyl_y_axis,cyl_scale);
file.endgroup();
- const double sp_origin[3] = {11,0,1};
+ const double cone_origin[3] = {11,0,1};
+ const double cone_x_axis[3] = {1,0,0};
+ const double cone_y_axis[3] = {0,-1,0};
+ const double cone_scale = 1;
+ file.begingroup("cone",&grpopt);
+ file.addCone(1,1,materialGreen,cone_origin,cone_x_axis,cone_y_axis,cone_scale);
+ file.endgroup();
+ const double sp_origin[3] = {11,0,-1};
const double sp_x_axis[3] = {1,0,0};
const double sp_y_axis[3] = {0,1,0};
const double sp_scale = 1;
- file.begingroup("spherePRCCLOSED");
+ file.begingroup("sphere",&grpopt);
file.addSphere(0.5,materialGreen,sp_origin,sp_x_axis,sp_y_axis,sp_scale);
file.endgroup();
const double tor_origin[3] = {11,0,0};
const double tor_x_axis[3] = {1,0,0};
const double tor_y_axis[3] = {0,1,0};
const double tor_scale = 1;
- file.begingroup("torusPRCCLOSED");
+ file.begingroup("torus",&grpopt);
file.addTorus(0.5,0.1,0,360,materialGreen,tor_origin,tor_x_axis,tor_y_axis,tor_scale);
file.endgroup();
+
+ const size_t NUMBER_OF_POINTS = 4;
+ double cpoints[NUMBER_OF_POINTS][3];
+ cpoints[0][0] = 1; cpoints[0][1] = 0; cpoints[0][2] = 0;
+ cpoints[1][0] = 1; cpoints[1][1] = 0.552284749830793; cpoints[1][2] = 0;
+ cpoints[2][0] = 0.552284749830793; cpoints[2][1] = 1; cpoints[2][2] = 0;
+ cpoints[3][0] = 0; cpoints[3][1] = 1; cpoints[3][2] = 0;
+ double opoints[NUMBER_OF_POINTS][3];
+ opoints[0][0] = 1.1*1; opoints[0][1] = 1.1*0; opoints[0][2] = 0;
+ opoints[1][0] = 1.1*1; opoints[1][1] = 1.1*0.552284749830793; opoints[1][2] = 0;
+ opoints[2][0] = 1.1*0.552284749830793; opoints[2][1] = 1.1*1; opoints[2][2] = 0;
+ opoints[3][0] = 1.1*0; opoints[3][1] = 1.1*1; opoints[3][2] = 0;
+ const double tube_origin[3] = {11,0,0};
+ const double tube_x_axis[3] = {1,0,0};
+ const double tube_y_axis[3] = {0,1,0};
+ const double tube_scale = 1;
+ file.begingroup("tube",&grpopt);
+ file.addTube(NUMBER_OF_POINTS,cpoints,opoints,false,materialGreen,tube_origin,tube_x_axis,tube_y_axis,tube_scale);
+ file.endgroup();
+
+ file.endgroup();
}
- if(0) { // Blend01 tube around a Composite curve - no good at corners
- const size_t NUMBER_OF_POINTS = 4;
- double points[NUMBER_OF_POINTS][3];
- points[0][0] = 1; points[0][1] = 0; points[0][2] = 0;
- points[1][0] = 1; points[1][1] = 0.552284749830793; points[1][2] = 0;
- points[2][0] = 0.552284749830793; points[2][1] = 1; points[2][2] = 0;
- points[3][0] = 0; points[3][1] = 1; points[3][2] = 0;
- double qoints[NUMBER_OF_POINTS][3];
- qoints[0][0] = 0; qoints[0][1] = 1; qoints[0][2] = 0;
- qoints[1][0] = 0; qoints[1][1] = 1; qoints[1][2] = 0.552284749830793;
- qoints[2][0] = 0; qoints[2][1] = 0.552284749830793; qoints[2][2] = 1;
- qoints[3][0] = 0; qoints[3][1] = 0; qoints[3][2] = 1;
-// for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
-// {
-// points[i][0] = 3.5*cos(3.0*i/NUMBER_OF_POINTS*2.0*pi);
-// points[i][1] = 3.5*sin(3.0*i/NUMBER_OF_POINTS*2.0*pi);
-// points[i][2] = 5.0*i/NUMBER_OF_POINTS-1.0;
-// }
-
- double knots[3+NUMBER_OF_POINTS+1];
- knots[0] = 1;
- for(size_t i = 1; i < 3+NUMBER_OF_POINTS; ++i)
- {
- knots[i] = (i+2)/3; // integer division is intentional
- }
- knots[3+NUMBER_OF_POINTS] = (3+NUMBER_OF_POINTS+1)/3;
-
- PRCTopoContext *tubeContext = new PRCTopoContext;
- uint32_t context_index = file.addTopoContext(tubeContext);
-
- PRCBrepData *body = new PRCBrepData;
- uint32_t body_index = tubeContext->addBrepData(body);
- PRCConnex *connex = new PRCConnex;
- body->addConnex(connex);
- PRCShell *shell = new PRCShell;
- connex->addShell(shell);
- PRCFace *face = new PRCFace;
- shell->addFace(face);
- PRCBlend01 *surface = new PRCBlend01;
- face->base_surface=surface;
-
- PRCNURBSCurve *center_curve = new PRCNURBSCurve;
- center_curve->is_rational = false;
- center_curve->degree = 3;
- for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
- center_curve->control_point.push_back(PRCControlPoint(points[i][0]+0.0,points[i][1],points[i][2]));
- for(size_t i = 0; i < 3+NUMBER_OF_POINTS+1; ++i)
- center_curve->knot.push_back(knots[i]);
- surface->center_curve=center_curve;
-
- PRCNURBSCurve *origin_curve = new PRCNURBSCurve;
- origin_curve->is_rational = false;
- origin_curve->degree = 3;
- for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
- origin_curve->control_point.push_back(PRCControlPoint(points[i][0]*1.01+0.0,points[i][1]*1.01,points[i][2]));
- for(size_t i = 0; i < 3+NUMBER_OF_POINTS+1; ++i)
- origin_curve->knot.push_back(knots[i]);
- surface->origin_curve=origin_curve;
-
- surface->uv_domain.min.x = 0;
- surface->uv_domain.max.x = 2*pi;
- surface->uv_domain.min.y = 1; // first knot
- surface->uv_domain.max.y = 2; // last knot
- PRCBrepModel *brepmodel = new PRCBrepModel("Tube");
- brepmodel->context_id = context_index;
- brepmodel->body_id = body_index;
- brepmodel->is_closed = true; // we do not need to see the tube from inside
- brepmodel->index_of_line_style = 0;
-// file.addBrepModel(brepmodel);
-
- PRCSingleWireBody *originCurveBody = new PRCSingleWireBody;
- uint32_t origin_curve_body_index = tubeContext->addSingleWireBody(originCurveBody);
- PRCWireEdge *originCurveEdge = new PRCWireEdge;
- originCurveBody->setWireEdge(originCurveEdge);
- originCurveEdge->curve_3d = surface->origin_curve;
- PRCWire *originCurveWire = new PRCWire("originCurveWire");
- originCurveWire->index_of_line_style = 0;
- originCurveWire->context_id = context_index;
- originCurveWire->body_id = origin_curve_body_index;
-// file.addWire(originCurveWire);
-
- PRCSingleWireBody *centerCurveBody = new PRCSingleWireBody;
- uint32_t center_curve_body_index = tubeContext->addSingleWireBody(centerCurveBody);
- PRCWireEdge *centerCurveEdge = new PRCWireEdge;
- centerCurveBody->setWireEdge(centerCurveEdge);
- centerCurveEdge->curve_3d = surface->center_curve;
- PRCWire *centerCurveWire = new PRCWire("centerCurveWire");
- centerCurveWire->index_of_line_style = 0;
- centerCurveWire->context_id = context_index;
- centerCurveWire->body_id = center_curve_body_index;
-// file.addWire(centerCurveWire);
-
- PRCNURBSCurve *Center_curve = new PRCNURBSCurve;
- Center_curve->is_rational = false;
- Center_curve->degree = 3;
- for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
- Center_curve->control_point.push_back(PRCControlPoint(qoints[i][0],qoints[i][1],qoints[i][2]));
- for(size_t i = 0; i < 3+NUMBER_OF_POINTS+1; ++i)
- Center_curve->knot.push_back(knots[i]);
-
- PRCNURBSCurve *Origin_curve = new PRCNURBSCurve;
- Origin_curve->is_rational = false;
- Origin_curve->degree = 3;
- for(size_t i = 0; i < NUMBER_OF_POINTS; ++i)
- Origin_curve->control_point.push_back(PRCControlPoint(qoints[i][0],qoints[i][1]*1.01,qoints[i][2]*1.01));
- for(size_t i = 0; i < 3+NUMBER_OF_POINTS+1; ++i)
- Origin_curve->knot.push_back(knots[i]);
-
- PRCSingleWireBody *OriginCurveBody = new PRCSingleWireBody;
- uint32_t Origin_curve_body_index = tubeContext->addSingleWireBody(OriginCurveBody);
- PRCWireEdge *OriginCurveEdge = new PRCWireEdge;
- OriginCurveBody->setWireEdge(OriginCurveEdge);
-// OriginCurveEdge->origin_curve=Origin_curve;
- PRCWire *OriginCurveWire = new PRCWire("OriginCurveWire");
- OriginCurveWire->index_of_line_style = 0;
- OriginCurveWire->context_id = context_index;
- OriginCurveWire->body_id = Origin_curve_body_index;
-// file.addWire(OriginCurveWire);
-
- PRCSingleWireBody *CenterCurveBody = new PRCSingleWireBody;
- uint32_t Center_curve_body_index = tubeContext->addSingleWireBody(CenterCurveBody);
- PRCWireEdge *CenterCurveEdge = new PRCWireEdge;
- CenterCurveBody->setWireEdge(CenterCurveEdge);
-// CenterCurveEdge->setCurve(Center_curve);
- PRCWire *CenterCurveWire = new PRCWire("CenterCurveWire");
- CenterCurveWire->index_of_line_style = 0;
- CenterCurveWire->context_id = context_index;
- CenterCurveWire->body_id = Center_curve_body_index;
-// file.addWire(CenterCurveWire);
-
- PRCComposite *compositeCenter_curve = new PRCComposite;
- compositeCenter_curve->base_curve.push_back(centerCurveEdge->curve_3d);
- compositeCenter_curve->base_sense.push_back(true);
- compositeCenter_curve->base_curve.push_back(CenterCurveEdge->curve_3d);
- compositeCenter_curve->base_sense.push_back(true);
- compositeCenter_curve->is_closed = false;
- compositeCenter_curve->interval.min = 0;
- compositeCenter_curve->interval.max = 2;
-
- PRCSingleWireBody *compositeCenterCurveBody = new PRCSingleWireBody;
- uint32_t compositeCenter_curve_body_index = tubeContext->addSingleWireBody(compositeCenterCurveBody);
- PRCWireEdge *compositeCenterCurveEdge = new PRCWireEdge;
- compositeCenterCurveBody->setWireEdge(compositeCenterCurveEdge);
-// compositeCenterCurveEdge->setCurve(compositeCenter_curve);
- PRCWire *compositeCenterCurveWire = new PRCWire("compositeCenterCurveWire");
- compositeCenterCurveWire->index_of_line_style = 0;
- compositeCenterCurveWire->context_id = context_index;
- compositeCenterCurveWire->body_id = compositeCenter_curve_body_index;
-// file.addWire(compositeCenterCurveWire);
-
- PRCComposite *compositeOrigin_curve = new PRCComposite;
- compositeOrigin_curve->base_curve.push_back(originCurveEdge->curve_3d);
- compositeOrigin_curve->base_sense.push_back(true);
- compositeOrigin_curve->base_curve.push_back(OriginCurveEdge->curve_3d);
- compositeOrigin_curve->base_sense.push_back(true);
- compositeOrigin_curve->is_closed = false;
- compositeOrigin_curve->interval.min = 0;
- compositeOrigin_curve->interval.max = 2;
-
- PRCSingleWireBody *compositeOriginCurveBody = new PRCSingleWireBody;
- uint32_t compositeOrigin_curve_body_index = tubeContext->addSingleWireBody(compositeOriginCurveBody);
- PRCWireEdge *compositeOriginCurveEdge = new PRCWireEdge;
- compositeOriginCurveBody->setWireEdge(compositeOriginCurveEdge);
-// compositeOriginCurveEdge->setCurve(compositeOrigin_curve);
- PRCWire *compositeOriginCurveWire = new PRCWire("compositeOriginCurveWire");
- compositeOriginCurveWire->index_of_line_style = 0;
- compositeOriginCurveWire->context_id = context_index;
- compositeOriginCurveWire->body_id = compositeOrigin_curve_body_index;
-// file.addWire(compositeOriginCurveWire);
-
- PRCBrepData *cbody = new PRCBrepData;
- uint32_t cbody_index = tubeContext->addBrepData(cbody);
- PRCConnex *cconnex = new PRCConnex;
- cbody->addConnex(cconnex);
- PRCShell *cshell = new PRCShell;
- cconnex->addShell(cshell);
- PRCFace *cface = new PRCFace;
- cshell->addFace(cface);
- PRCBlend01 *csurface = new PRCBlend01;
- cface->base_surface=csurface;
-
- csurface->uv_domain.min.x = 0;
- csurface->uv_domain.max.x = 2*pi;
- csurface->uv_domain.min.y = 0; // first knot
- csurface->uv_domain.max.y = 2; // last knot
- csurface->center_curve = compositeCenterCurveEdge->curve_3d;
- csurface->origin_curve = compositeOriginCurveEdge->curve_3d;
- PRCBrepModel *cbrepmodel = new PRCBrepModel("cTube");
- cbrepmodel->context_id = context_index;
- cbrepmodel->body_id = cbody_index;
- cbrepmodel->is_closed = true; // we do not need to see the tube from inside
- cbrepmodel->index_of_line_style = 0;
-// file.addBrepModel(cbrepmodel);
-
-
- }
-
- file.finish();
+ file.finish();
+
+ delete[] picture1;
+ delete[] picture2;
+ delete[] picture3;
+ delete[] picture4;
return 0;
}
diff --git a/Build/source/utils/asymptote/prc/writePRC.cc b/Build/source/utils/asymptote/prc/writePRC.cc
index 7e1e1358bd9..ecc6179b36c 100644
--- a/Build/source/utils/asymptote/prc/writePRC.cc
+++ b/Build/source/utils/asymptote/prc/writePRC.cc
@@ -29,6 +29,10 @@
#include <fstream>
#include <sstream>
+#ifndef __GNUC__
+#include <vector>
+#endif
+
using namespace std;
#ifndef __GNUC_PREREQ
@@ -112,7 +116,23 @@ uint32_t Log2(uint32_t x)
#define SerializeContentSingleAttribute( value ) (value).serializeSingleAttribute(pbs);
#define SerializeAttribute( value ) (value).serializeAttribute(pbs);
#define SerializeAttributeData serializeAttributes(pbs);
+#define WriteUncompressedUnsignedInteger( value ) writeUncompressedUnsignedInteger(out, (uint32_t)(value));
+#define SerializeFileStructureUncompressedUniqueId( value ) (value).serializeFileStructureUncompressedUniqueId(out);
+void writeUncompressedUnsignedInteger(ostream &out, uint32_t data)
+{
+#ifdef WORDS_BIGENDIAN
+ out.write(((char*)&data)+3,1);
+ out.write(((char*)&data)+2,1);
+ out.write(((char*)&data)+1,1);
+ out.write(((char*)&data)+0,1);
+#else
+ out.write(((char*)&data)+0,1);
+ out.write(((char*)&data)+1,1);
+ out.write(((char*)&data)+2,1);
+ out.write(((char*)&data)+3,1);
+#endif
+}
double PRCVector3d::Length()
{
@@ -139,7 +159,7 @@ void UserData::write(PRCbitStream &pbs)
for(uint32_t i = 0; i < quot; ++i)
pbs << data[i];
for(uint32_t j = 0; j < rem; ++j) // 0-based, big endian bit counting
- pbs << (bool)(data[quot] & (0x80 >> j));
+ pbs << (bool)((data[quot] & (0x80 >> j))!=0);
}
}
@@ -412,7 +432,7 @@ uint32_t current_layer_index = m1;
uint32_t current_index_of_line_style = m1;
uint16_t current_behaviour_bit_field = 1;
-void writeGraphics(PRCbitStream &pbs,uint32_t l,uint32_t i,uint32_t b,bool force)
+void writeGraphics(PRCbitStream &pbs,uint32_t l,uint32_t i,uint16_t b,bool force)
{
if(force || current_layer_index != l || current_index_of_line_style != i || current_behaviour_bit_field != b)
{
@@ -974,9 +994,7 @@ uint32_t makePRCID()
void writeUnit(PRCbitStream &out,bool fromCAD,double unit)
{
- static const double inches=72;
- static const double cm=inches/2.54;
- out << fromCAD << 10.0/cm; // Use bp.
+ out << fromCAD << unit;
}
void writeEmptyMarkups(PRCbitStream &out)
@@ -1273,13 +1291,23 @@ void PRCCompressedFace::serializeCompressedNurbs(PRCbitStream &pbs, double brep
const uint32_t number_of_control_point_in_u = degree_in_u + 1;
const uint32_t number_of_control_point_in_v = degree_in_v + 1;
+
+#ifdef __GNUC__
PRCVector3d P[number_of_control_point_in_u][number_of_control_point_in_v];
+#else
+ vector<vector<PRCVector3d> > P(number_of_control_point_in_u, vector<PRCVector3d>(number_of_control_point_in_v));
+#endif
for(uint32_t i=0;i<number_of_control_point_in_u;i++)
for(uint32_t j=0;j<number_of_control_point_in_v;j++)
P[i][j] = control_point[i*number_of_control_point_in_v+j];
+#ifdef __GNUC__
itriple compressed_control_point[number_of_control_point_in_u][number_of_control_point_in_v];
uint32_t control_point_type[number_of_control_point_in_u][number_of_control_point_in_v];
-
+#else
+ vector<vector<itriple> > compressed_control_point(number_of_control_point_in_u, vector<itriple>(number_of_control_point_in_v));
+ vector<vector<uint32_t> > control_point_type(number_of_control_point_in_u, vector<uint32_t>(number_of_control_point_in_v));
+#endif
+
uint32_t number_of_bits_for_isomin = 1;
uint32_t number_of_bits_for_rest = 1;
@@ -1491,6 +1519,17 @@ void PRCSphere::serializeSphere(PRCbitStream &pbs)
WriteDouble ( radius )
}
+void PRCCone::serializeCone(PRCbitStream &pbs)
+{
+ WriteUnsignedInteger (PRC_TYPE_SURF_Cone)
+
+ SerializeContentSurface
+ SerializeTransformation
+ SerializeUVParameterization
+ WriteDouble ( bottom_radius )
+ WriteDouble ( semi_angle )
+}
+
void PRCCylinder::serializeCylinder(PRCbitStream &pbs)
{
WriteUnsignedInteger (PRC_TYPE_SURF_Cylinder)
@@ -1815,24 +1854,32 @@ uint32_t PRCTopoContext::addCompressedBrepData(PRCCompressedBrepData*& pCompress
void PRCSingleWireBody::serializeSingleWireBody(PRCbitStream &pbs)
{
- WriteUnsignedInteger ( PRC_TYPE_TOPO_SingleWireBody)
+ WriteUnsignedInteger ( PRC_TYPE_TOPO_SingleWireBody)
- SerializeContentBody
- SerializePtrTopology ( wire_edge )
+ SerializeContentBody
+ SerializePtrTopology ( wire_edge )
+}
+
+void PRCUniqueId::serializeCompressedUniqueId(PRCbitStream &pbs) const
+{
+ WriteUnsignedInteger (id0)
+ WriteUnsignedInteger (id1)
+ WriteUnsignedInteger (id2)
+ WriteUnsignedInteger (id3)
}
-void PRCUniqueId::serializeCompressedUniqueId(PRCbitStream &pbs)
+void PRCUniqueId::serializeFileStructureUncompressedUniqueId(std::ostream& out) const
{
- WriteUnsignedInteger (unique_id0)
- WriteUnsignedInteger (unique_id1)
- WriteUnsignedInteger (unique_id2)
- WriteUnsignedInteger (unique_id3)
+ WriteUncompressedUnsignedInteger (id0)
+ WriteUncompressedUnsignedInteger (id1)
+ WriteUncompressedUnsignedInteger (id2)
+ WriteUncompressedUnsignedInteger (id3)
}
void PRCUnit::serializeUnit(PRCbitStream &pbs)
{
- WriteBoolean (unit_from_CAD_file)
- WriteDouble (unit)
+ WriteBoolean (unit_from_CAD_file)
+ WriteDouble (unit)
}
void PRCProductOccurrence::serializeProductOccurrence(PRCbitStream &pbs)
@@ -1872,7 +1919,7 @@ void PRCProductOccurrence::serializeProductOccurrence(PRCbitStream &pbs)
const bool has_location = location != NULL;
WriteBit (has_location)
if (has_location)
- location->serializeTransformation3d (pbs);
+ location->serializeTransformation3d (pbs);
WriteUnsignedInteger (0) // number_of_references
diff --git a/Build/source/utils/asymptote/prc/writePRC.h b/Build/source/utils/asymptote/prc/writePRC.h
index 2ec5ebc427d..390e8042150 100644
--- a/Build/source/utils/asymptote/prc/writePRC.h
+++ b/Build/source/utils/asymptote/prc/writePRC.h
@@ -24,7 +24,9 @@
#include <vector>
#include <deque>
#include <list>
+#ifdef __GNUC__
#include <ext/slist>
+#endif
#include <map>
#include <iostream>
#include "PRCbitStream.h"
@@ -33,7 +35,7 @@
#include <math.h>
static const uint32_t m1=(uint32_t)-1;
-static const double pi=acos(-1);
+static const double pi=acos(-1.0);
class PRCVector3d
{
@@ -100,7 +102,7 @@ public :
return out;
}
};
-
+/*
class UUID
{
public:
@@ -112,7 +114,9 @@ class UUID
}
private:
uint32_t id0,id1,id2,id3;
-};
+}; */
+
+void writeUncompressedUnsignedInteger(std::ostream &out, uint32_t data);
uint32_t makeCADID();
uint32_t makePRCID();
@@ -243,7 +247,7 @@ class ContentPRCBase : public PRCAttributes
name(n),type_eligible_for_reference(efr),CAD_identifier(ci),
CAD_persistent_identifier(cpi),PRC_unique_identifier(pi) {}
void serializeContentPRCBase(PRCbitStream&);
- uint32_t getPRCID() { return PRC_unique_identifier; }
+ uint32_t getPRCID() const { return PRC_unique_identifier; }
std::string name;
bool type_eligible_for_reference;
uint32_t CAD_identifier, CAD_persistent_identifier, PRC_unique_identifier;
@@ -271,7 +275,7 @@ extern uint32_t current_layer_index;
extern uint32_t current_index_of_line_style;
extern uint16_t current_behaviour_bit_field;
-void writeGraphics(PRCbitStream&,uint32_t=m1,uint32_t=m1,uint32_t=1,bool=false);
+void writeGraphics(PRCbitStream&,uint32_t=m1,uint32_t=m1,uint16_t=1,bool=false);
void resetGraphics();
void resetGraphicsAndName();
@@ -581,6 +585,7 @@ public:
PRCRepresentationItemContent(n) {}
virtual ~PRCRepresentationItem() {}
virtual void serializeRepresentationItem(PRCbitStream &pbs) = 0;
+ virtual uint32_t getType() const = 0;
};
typedef std::deque <PRCRepresentationItem*> PRCRepresentationItemList;
@@ -591,6 +596,7 @@ public:
PRCRepresentationItem(n), has_brep_data(true), context_id(m1), body_id(m1), is_closed(false) {}
void serializeBrepModel(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializeBrepModel(pbs); }
+ uint32_t getType() const { return PRC_TYPE_RI_BrepModel; }
bool has_brep_data;
uint32_t context_id;
uint32_t body_id;
@@ -604,6 +610,7 @@ public:
PRCRepresentationItem(n), is_closed(false) {}
void serializePolyBrepModel(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializePolyBrepModel(pbs); }
+ uint32_t getType() const { return PRC_TYPE_RI_PolyBrepModel; }
bool is_closed;
};
@@ -614,6 +621,7 @@ public:
PRCRepresentationItem(n) {}
void serializePointSet(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializePointSet(pbs); }
+ uint32_t getType() const { return PRC_TYPE_RI_PointSet; }
std::vector<PRCVector3d> point;
};
@@ -624,6 +632,7 @@ public:
PRCRepresentationItem(n), has_wire_body(true), context_id(m1), body_id(m1) {}
void serializeWire(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializeWire(pbs); }
+ uint32_t getType() const { return PRC_TYPE_RI_Curve; }
bool has_wire_body;
uint32_t context_id;
uint32_t body_id;
@@ -636,6 +645,7 @@ public:
PRCRepresentationItem(n) {}
void serializePolyWire(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializePolyWire(pbs); }
+ uint32_t getType() const { return PRC_TYPE_RI_PolyWire; }
};
class PRCSet : public PRCRepresentationItem
@@ -653,6 +663,7 @@ public:
uint32_t addWire(PRCWire*& pWire);
uint32_t addPolyWire(PRCPolyWire*& pPolyWire);
uint32_t addRepresentationItem(PRCRepresentationItem*& pRepresentationItem);
+ uint32_t getType() const { return PRC_TYPE_RI_Set; }
PRCRepresentationItemList elements;
};
@@ -807,7 +818,9 @@ public:
~PRCCoordinateSystem() { delete axis_set; }
void serializeCoordinateSystem(PRCbitStream&);
void serializeRepresentationItem(PRCbitStream &pbs) { serializeCoordinateSystem(pbs); }
- void setAxisSet(PRCTransformation3d*& transform) { axis_set = transform; transform = NULL; }
+ void setAxisSet(PRCGeneralTransformation3d*& transform) { axis_set = transform; transform = NULL; }
+ void setAxisSet(PRCCartesianTransformation3d*& transform) { axis_set = transform; transform = NULL; }
+ uint32_t getType() const { return PRC_TYPE_RI_CoordinateSystem; }
PRCTransformation3d *axis_set;
bool operator==(const PRCCoordinateSystem &t) const
{
@@ -1093,6 +1106,19 @@ public:
double radius;
};
+class PRCCone : public PRCSurface, public PRCTransformation, public PRCUVParameterization
+{
+public:
+ PRCCone() :
+ PRCSurface() {}
+ PRCCone(std::string n) :
+ PRCSurface(n) {}
+ void serializeCone(PRCbitStream &pbs);
+ void serializeSurface(PRCbitStream &pbs) { serializeCone(pbs); }
+ double bottom_radius;
+ double semi_angle;
+};
+
class PRCCylinder : public PRCSurface, public PRCTransformation, public PRCUVParameterization
{
public:
@@ -1335,18 +1361,20 @@ typedef std::deque <PRCTopoContext*> PRCTopoContextList;
class PRCUniqueId
{
public:
- PRCUniqueId() : unique_id0(0), unique_id1(0), unique_id2(0), unique_id3(0) {}
- void serializeCompressedUniqueId(PRCbitStream&);
- uint32_t unique_id0;
- uint32_t unique_id1;
- uint32_t unique_id2;
- uint32_t unique_id3;
+ PRCUniqueId() : id0(0), id1(0), id2(0), id3(0) {}
+ void serializeCompressedUniqueId(PRCbitStream&) const;
+ void serializeFileStructureUncompressedUniqueId(std::ostream& out) const;
+ uint32_t id0;
+ uint32_t id1;
+ uint32_t id2;
+ uint32_t id3;
};
class PRCUnit
{
public:
PRCUnit() : unit_from_CAD_file(false), unit(1) {}
+ PRCUnit(double u, bool ufcf=true) : unit_from_CAD_file(ufcf), unit(u) {}
void serializeUnit(PRCbitStream&);
bool unit_from_CAD_file;
double unit;
diff --git a/Build/source/utils/asymptote/prcfile.h b/Build/source/utils/asymptote/prcfile.h
index 168f1eb0bf4..4443859b502 100644
--- a/Build/source/utils/asymptote/prcfile.h
+++ b/Build/source/utils/asymptote/prcfile.h
@@ -12,9 +12,12 @@ inline RGBAColour rgba(pen p) {
return RGBAColour(p.red(),p.green(),p.blue(),p.opacity());
}
+static const double inches=72;
+static const double cm=inches/2.54;
+
class prcfile : public oPRCFile {
public:
- prcfile(string name) : oPRCFile(name.c_str()) {}
+ prcfile(string name) : oPRCFile(name.c_str(),10.0/cm) {} // Use bp.
};
} //namespace camp
diff --git a/Build/source/utils/asymptote/profile.py b/Build/source/utils/asymptote/profile.py
new file mode 100644
index 00000000000..f09ea6dea00
--- /dev/null
+++ b/Build/source/utils/asymptote/profile.py
@@ -0,0 +1,96 @@
+import sys
+from pprint import pprint
+
+# Unused line numbers required by kcachegrind.
+POS = '1'
+
+def nameFromNode(tree):
+ name = tree['name']
+ pos = tree['pos']
+ if pos.endswith(": "):
+ pos = pos[:-2]
+ return (name, pos)
+
+def addFuncNames(tree, s):
+ s.add(nameFromNode(tree))
+ for child in tree['children']:
+ addFuncNames(child, s)
+
+def funcNames(tree):
+ s = set()
+ addFuncNames(tree, s)
+ return s
+
+def computeTotals(tree):
+ for child in tree['children']:
+ computeTotals(child)
+ tree['instTotal'] = (tree['instructions']
+ + sum(child['instTotal'] for child in tree['children']))
+ tree['nsecsTotal'] = (tree['nsecs']
+ + sum(child['nsecsTotal'] for child in tree['children']))
+
+def printName(name, prefix=''):
+ print prefix+"fl=", name[1]
+ print prefix+"fn=", name[0]
+
+class Arc:
+ def __init__(self):
+ self.calls = 0
+ self.instTotal = 0
+ self.nsecsTotal = 0
+
+ def add(self, tree):
+ self.calls += tree['calls']
+ self.instTotal += tree['instTotal']
+ self.nsecsTotal += tree['nsecsTotal']
+
+class Func:
+ def __init__(self):
+ self.instructions = 0
+ self.nsecs = 0
+ self.arcs = {}
+
+ def addChildTime(self, tree):
+ arc = self.arcs.setdefault(nameFromNode(tree), Arc())
+ arc.add(tree)
+
+ def analyse(self, tree):
+ self.instructions += tree['instructions']
+ self.nsecs += tree['nsecs']
+ for child in tree['children']:
+ self.addChildTime(child)
+
+ def dump(self):
+ print POS, self.instructions, self.nsecs
+ for name in self.arcs:
+ printName(name, prefix='c')
+ arc = self.arcs[name]
+ print "calls="+str(arc.calls), POS
+ print POS, arc.instTotal, arc.nsecsTotal
+ print
+
+def analyse(funcs, tree):
+ funcs[nameFromNode(tree)].analyse(tree)
+ for child in tree['children']:
+ analyse(funcs, child)
+
+def dump(funcs):
+ print "events: Instructions Nanoseconds"
+ for name in funcs:
+ printName(name)
+ funcs[name].dump()
+
+rawdata = __import__("asyprof")
+profile = rawdata.profile
+
+computeTotals(profile)
+names = funcNames(profile)
+
+funcs = {}
+for name in names:
+ funcs[name] = Func()
+
+analyse(funcs, profile)
+dump(funcs)
+
+#pprint(names)
diff --git a/Build/source/utils/asymptote/profiler.h b/Build/source/utils/asymptote/profiler.h
new file mode 100644
index 00000000000..bd914d55d12
--- /dev/null
+++ b/Build/source/utils/asymptote/profiler.h
@@ -0,0 +1,434 @@
+/*****
+ * profiler.h
+ * Andy Hammerlindl 2010/07/24
+ *
+ * Profiler for the execution of the virtual machine bytecode.
+ *****/
+
+#ifndef PROFILER_H
+#define PROFILER_H
+
+#include <sys/time.h>
+
+#include <iostream>
+
+#include "inst.h"
+
+namespace vm {
+
+#ifdef DEBUG_BLTIN
+string lookupBltin(bltin b);
+#endif
+
+inline position positionFromLambda(lambda *func) {
+ if (func == 0)
+ return position();
+
+ program& code = *func->code;
+
+ // Check for empty program.
+ if (code.begin() == code.end())
+ return position();
+
+ return code.begin()->pos;
+}
+
+inline void printNameFromLambda(ostream& out, lambda *func) {
+ if (!func) {
+ out << "<top level>";
+ return;
+ }
+
+#ifdef DEBUG_FRAME
+ string name = func->name;
+#else
+ string name = "";
+#endif
+
+ // If unnamed, use the pointer address.
+ if (name.empty())
+ out << func;
+ else
+ out << name;
+
+ out << " at ";
+ positionFromLambda(func).printTerse(out);
+}
+
+inline void printNameFromBltin(ostream& out, bltin b) {
+#ifdef DEBUG_BLTIN
+ string name = lookupBltin(b);
+#else
+ string name = "";
+#endif
+
+ if (!name.empty())
+ out << name << " ";
+ out << "(builtin at " << (void *)b << ")";
+}
+
+class profiler : public gc {
+ // To do call graph analysis, each call stack that occurs in practice is
+ // represented by a node. For instance, if f and g are functions, then
+ // f -> g -> g
+ // is represented by a node and
+ // g -> f -> g
+ // is represented by a different one.
+ struct node {
+ // The top-level function of the call stack. It is either an asymptote
+ // function with a given lambda, or a builtin function, with a given
+ // bltin.
+ lambda *func;
+ bltin cfunc;
+
+ // The number of times the top-level function has been called resulting in
+ // this specific call stack.
+ int calls;
+
+ // The number of bytecode instructions executed with this exact call stack.
+ // It does not include time spent in called function.
+ int instructions;
+
+ // Number of instructions spent in this function or its children. This is
+ // computed by computeTotals.
+ int instTotal;
+
+ // The number of real-time nanoseconds spent in this node. WARNING: May
+ // be wildly inaccurate.
+ long long nsecs;
+
+ // Total including children.
+ long long nsecsTotal;
+
+ // Call stacks resulting from calls during this call stack.
+ mem::vector<node> children;
+
+ node()
+ : func(0), cfunc(0), calls(0),
+ instructions(0), instTotal(0),
+ nsecs(0), nsecsTotal(0) {}
+
+ node(lambda *func)
+ : func(func), cfunc(0), calls(0),
+ instructions(0), instTotal(0),
+ nsecs(0), nsecsTotal(0) {}
+
+ node(bltin b)
+ : func(0), cfunc(b), calls(0),
+ instructions(0), instTotal(0),
+ nsecs(0), nsecsTotal(0) {}
+
+ // Return the call stack resulting from a call to func when this call
+ // stack is current.
+ node *getChild(lambda *func) {
+ size_t n = children.size();
+ for (size_t i = 0; i < n; ++i)
+ if (children[i].func == func)
+ return &children[i];
+
+ // Not found, create a new one.
+ children.push_back(node(func));
+ return &children.back();
+ }
+ node *getChild(bltin func) {
+ size_t n = children.size();
+ for (size_t i = 0; i < n; ++i)
+ if (children[i].cfunc == func)
+ return &children[i];
+
+ // Not found, create a new one.
+ children.push_back(node(func));
+ return &children.back();
+ }
+
+ void computeTotals() {
+ instTotal = instructions;
+ nsecsTotal = nsecs;
+ size_t n = children.size();
+ for (size_t i = 0; i < n; ++i) {
+ children[i].computeTotals();
+ instTotal += children[i].instTotal;
+ nsecsTotal += children[i].nsecsTotal;
+ }
+ }
+
+
+
+ void pydump(ostream& out) {
+#ifdef DEBUG_FRAME
+ string name = func ? func->name : "<top level>";
+#else
+ string name = "";
+#endif
+
+ out << "dict(\n"
+ << " name = '" << name << " " << func << "',\n"
+ << " pos = '" << positionFromLambda(func) << "',\n"
+ << " calls = " << calls << ",\n"
+ << " instructions = " << instructions << ",\n"
+ << " nsecs = " << nsecs << ",\n"
+ << " children = [\n";
+
+ size_t n = children.size();
+ for (size_t i = 0; i < n; ++i) {
+ children[i].pydump(out);
+ out << ",\n";
+ }
+
+ out << " ])\n";
+ }
+ };
+
+ // An empty call stack.
+ node emptynode;
+
+ // All of the callstacks.
+ std::stack<node *> callstack;
+
+ node &topnode() {
+ return *callstack.top();
+ }
+
+ // Arc representing one function calling another. Used only for building
+ // the output for kcachegrind.
+ struct arc : public gc {
+ int calls;
+ int instTotal;
+ long long nsecsTotal;
+
+ arc() : calls(0), instTotal(0), nsecsTotal(0) {}
+
+ void add(node& n) {
+ calls += n.calls;
+ instTotal += n.instTotal;
+ nsecsTotal += n.nsecsTotal;
+ }
+ };
+
+ // Representing one function and its calls to other functions.
+ struct fun : public gc {
+ int instructions;
+ long long nsecs;
+ mem::map<lambda *, arc> arcs;
+ mem::map<bltin, arc> carcs;
+
+ fun() : instructions(0), nsecs(0) {}
+
+ void addChildTime(node& n) {
+ if (n.cfunc)
+ carcs[n.cfunc].add(n);
+ else
+ arcs[n.func].add(n);
+ }
+
+ void analyse(node& n) {
+ instructions += n.instructions;
+ nsecs += n.nsecs;
+ size_t numChildren = n.children.size();
+ for (size_t i = 0; i < numChildren; ++i)
+ addChildTime(n.children[i]);
+ }
+
+ void dump(ostream& out) {
+ // The unused line number needed by kcachegrind.
+ static const string POS = "1";
+
+ out << POS << " " << instructions << " " << nsecs << "\n";
+ for (mem::map<lambda *, arc>::iterator i = arcs.begin();
+ i != arcs.end();
+ ++i)
+ {
+ lambda *l = i->first;
+ arc& a = i->second;
+
+ out << "cfl=" << positionFromLambda(l) << "\n";
+
+ out << "cfn=";
+ printNameFromLambda(out, l);
+ out << "\n";
+
+ out << "calls=" << a.calls << " " << POS << "\n";
+ out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
+ }
+ for (mem::map<bltin, arc>::iterator i = carcs.begin();
+ i != carcs.end();
+ ++i)
+ {
+ bltin b = i->first;
+ arc& a = i->second;
+
+ out << "cfl=C++ code" << endl;
+
+ out << "cfn=";
+ printNameFromBltin(out, b);
+ out << "\n";
+
+ out << "calls=" << a.calls << " " << POS << "\n";
+ out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
+ }
+ }
+ };
+
+ // The data for each asymptote function.
+ mem::map<lambda *, fun> funs;
+
+ // The data for each C++ function.
+ mem::map<bltin, fun> cfuns;
+
+ void analyseNode(node& n) {
+ fun& f = n.cfunc ? cfuns[n.cfunc] :
+ funs[n.func];
+
+ f.analyse(n);
+
+ size_t numChildren = n.children.size();
+ for (size_t i = 0; i < numChildren; ++i)
+ analyseNode(n.children[i]);
+ }
+
+ // Convert data in the tree of callstack nodes into data for each function.
+ void analyseData() {
+ emptynode.computeTotals();
+ analyseNode(emptynode);
+ }
+
+
+ // Timing data.
+ struct timeval timestamp;
+
+ void startLap() {
+ gettimeofday(&timestamp, 0);
+ }
+
+ long long timeAndResetLap() {
+ struct timeval now;
+ gettimeofday(&now, 0);
+ long long nsecs = 1000000000LL * (now.tv_sec - timestamp.tv_sec) +
+ 1000LL * (now.tv_usec - timestamp.tv_usec);
+ timestamp = now;
+ return nsecs;
+ }
+
+ // Called whenever the stack is about to change, in order to record the time
+ // duration for the current node.
+ void recordTime() {
+ topnode().nsecs += timeAndResetLap();
+ }
+
+public:
+ profiler();
+
+ void beginFunction(lambda *func);
+ void endFunction(lambda *func);
+ void beginFunction(bltin func);
+ void endFunction(bltin func);
+ void recordInstruction();
+
+ // TODO: Add position, type of instruction info to profiling.
+
+ // Dump all of the data out in a format that can be read into Python.
+ void pydump(ostream &out);
+
+ // Dump all of the data in a format for kcachegrind.
+ void dump(ostream& out);
+
+};
+
+inline profiler::profiler()
+ : emptynode()
+{
+ callstack.push(&emptynode);
+ startLap();
+}
+
+inline void profiler::beginFunction(lambda *func) {
+ assert(func);
+ assert(!callstack.empty());
+
+ recordTime();
+
+ callstack.push(topnode().getChild(func));
+ ++topnode().calls;
+}
+
+inline void profiler::endFunction(lambda *func) {
+ assert(func);
+ assert(!callstack.empty());
+ assert(topnode().func == func);
+
+ recordTime();
+
+ callstack.pop();
+}
+
+inline void profiler::beginFunction(bltin cfunc) {
+ assert(cfunc);
+ assert(!callstack.empty());
+
+ recordTime();
+
+ callstack.push(topnode().getChild(cfunc));
+ ++topnode().calls;
+}
+
+inline void profiler::endFunction(bltin cfunc) {
+ assert(cfunc);
+ assert(!callstack.empty());
+ assert(topnode().cfunc == cfunc);
+
+ recordTime();
+
+ callstack.pop();
+}
+
+inline void profiler::recordInstruction() {
+ assert(!callstack.empty());
+ ++topnode().instructions;
+}
+
+inline void profiler::pydump(ostream& out) {
+ out << "profile = ";
+ emptynode.pydump(out);
+}
+
+inline void profiler::dump(ostream& out) {
+ analyseData();
+
+ out << "events: Instructions Nanoseconds\n";
+
+ for (mem::map<lambda *, fun>::iterator i = funs.begin();
+ i != funs.end();
+ ++i)
+ {
+ lambda *l = i->first;
+ fun& f = i->second;
+
+ out << "fl=" << positionFromLambda(l) << "\n";
+
+ out << "fn=";
+ printNameFromLambda(out, l);
+ out << "\n";
+
+ f.dump(out);
+ }
+ for (mem::map<bltin, fun>::iterator i = cfuns.begin();
+ i != cfuns.end();
+ ++i)
+ {
+ bltin b = i->first;
+ fun& f = i->second;
+
+ out << "fl=C++ code\n";
+
+ out << "fn=";
+ printNameFromBltin(out, b);
+ out << "\n";
+
+ f.dump(out);
+ }
+}
+
+
+} // namespace vm
+
+#endif // PROFILER_H
diff --git a/Build/source/utils/asymptote/program.cc b/Build/source/utils/asymptote/program.cc
index 8c59b5f4c67..746b9721da5 100644
--- a/Build/source/utils/asymptote/program.cc
+++ b/Build/source/utils/asymptote/program.cc
@@ -14,19 +14,18 @@
namespace vm {
static const char* opnames[] = {
- "pop", "intpush", "constpush",
- "varpush", "varsave", "fieldpush", "fieldsave",
- "builtin", "jmp", "cjmp", "njmp", "call",
- "pushclosure", "makefunc", "ret",
- "alloc", "pushframe", "popframe",
-
-#ifdef COMBO
- "varpop", "fieldpop",
- "gejmp"
-#endif
+#define OPCODE(name, type) #name,
+#include "opcodes.h"
+#undef OPCODE
};
static const Int numOps = (Int)(sizeof(opnames)/sizeof(char *));
+static const char optypes[] = {
+#define OPCODE(name, type) type,
+#include "opcodes.h"
+#undef OPCODE
+};
+
#ifdef DEBUG_BLTIN
mem::map<bltin,string> bltinRegistry;
@@ -41,7 +40,9 @@ string lookupBltin(bltin b) {
ostream& operator<< (ostream& out, const item& i)
{
-/*
+#if COMPACT
+ out << "<item>";
+#else
// TODO: Make a data structure mapping typeids to print functions.
if (i.empty())
out << "empty";
@@ -58,12 +59,19 @@ ostream& operator<< (ostream& out, const item& i)
else if (i.type() == typeid(frame)) {
out << "frame";
#ifdef DEBUG_FRAME
- out << " " << (get<frame *>(i))->getName();
+ {
+ frame *f = get<frame *>(i);
+ if (f)
+ out << " " << f->getName();
+ else
+ out << " <null>";
+ }
#endif
}
else
out << "type " << demangle(i.type().name());
-*/
+#endif
+
return out;
}
@@ -76,48 +84,35 @@ void printInst(ostream& out, const program::label& code,
Int i = (Int)code->op;
if (i < 0 || i >= numOps) {
- out << "<<invalid op>> " << i;
+ out << "<<invalid op>>" << i;
+ return;
}
out << opnames[i];
- switch (code->op) {
- case inst::intpush:
- case inst::varpush:
- case inst::varsave:
- case inst::fieldpush:
- case inst::fieldsave:
- case inst::alloc:
-#ifdef COMBO
- case inst::varpop:
- case inst::fieldpop:
-#endif
+ switch (optypes[i]) {
+ case 'n':
{
out << " " << get<Int>(*code);
break;
}
- case inst::constpush:
+ case 't':
{
item c = code->ref;
out << " " << c;
break;
}
-#ifdef DEBUG_BLTIN
- case inst::builtin:
+ case 'b':
{
+#ifdef DEBUG_BLTIN
string s=lookupBltin(get<bltin>(*code));
out << " " << (!s.empty() ? s : "<unnamed>") << " ";
+#endif
break;
}
-#endif
- case inst::jmp:
- case inst::cjmp:
- case inst::njmp:
-#ifdef COMBO
- case inst::gejmp:
-#endif
+ case 'o':
{
char f = out.fill('0');
out << " i";
@@ -127,13 +122,13 @@ void printInst(ostream& out, const program::label& code,
break;
}
-#ifdef DEBUG_FRAME
- case inst::makefunc:
+ case 'l':
{
+#ifdef DEBUG_FRAME
out << " " << get<lambda*>(*code)->name << " ";
+#endif
break;
}
-#endif
default: {
/* nothing else to do */
diff --git a/Build/source/utils/asymptote/program.h b/Build/source/utils/asymptote/program.h
index 4e3e8e8f986..84fea7461e0 100644
--- a/Build/source/utils/asymptote/program.h
+++ b/Build/source/utils/asymptote/program.h
@@ -37,6 +37,7 @@ public: // interface
public: //interface
label& operator++();
label& operator--();
+ bool defined() const;
bool operator==(const label& right) const;
bool operator!=(const label& right) const;
inst& operator*() const;
@@ -51,8 +52,7 @@ private:
friend class program;
};
-// Prints one instruction (including arguments) and returns how many
-// positions in the code stream were shown.
+// Prints one instruction (including arguments).
void printInst(std::ostream& out, const program::label& code,
const program::label& base);
@@ -78,6 +78,8 @@ inline program::label& program::label::operator++()
{ ++where; return *this; }
inline program::label& program::label::operator--()
{ --where; return *this; }
+inline bool program::label::defined() const
+{ return (code != 0); }
inline bool program::label::operator==(const label& right) const
{ return (code == right.code) && (where == right.where); }
inline bool program::label::operator!=(const label& right) const
diff --git a/Build/source/utils/asymptote/psfile.cc b/Build/source/utils/asymptote/psfile.cc
index 659f7e09057..c2f0f24982e 100644
--- a/Build/source/utils/asymptote/psfile.cc
+++ b/Build/source/utils/asymptote/psfile.cc
@@ -15,11 +15,15 @@
#include "settings.h"
#include "errormsg.h"
#include "array.h"
+#include "stack.h"
using std::ofstream;
using std::setw;
using vm::array;
using vm::read;
+using vm::stack;
+using vm::callable;
+using vm::pop;
namespace camp {
@@ -48,6 +52,7 @@ psfile::psfile(const string& filename, bool pdfformat)
}
static const char *inconsistent="inconsistent colorspaces";
+static const char *rectangular="matrix is not rectangular";
void psfile::writefromRGB(unsigned char r, unsigned char g, unsigned char b,
ColorSpace colorspace, size_t ncomponents)
@@ -324,7 +329,7 @@ void psfile::latticeshade(const vm::array& a, const transform& t)
array *ai=read<array *>(a,--i);
checkArray(ai);
size_t aisize=ai->size();
- if(aisize != m) reportError("shading matrix must be rectangular");
+ if(aisize != m) reportError(rectangular);
for(size_t j=0; j < m; j++) {
pen *p=read<pen *>(ai,j);
p->convert();
@@ -561,7 +566,10 @@ void psfile::image(const array& a, const array& P, bool antialias)
double max=min;
for(size_t i=0; i < asize; i++) {
array *ai=read<array *>(a,i);
- for(size_t j=0; j < a0size; j++) {
+ size_t size=ai->size();
+ if(size != a0size)
+ reportError(rectangular);
+ for(size_t j=0; j < size; j++) {
double val=read<double>(ai,j);
if(val > max) max=val;
else if(val < min) min=val;
@@ -607,7 +615,10 @@ void psfile::image(const array& a, bool antialias)
beginImage(ncomponents*a0size*asize);
for(size_t i=0; i < asize; i++) {
array *ai=read<array *>(a,i);
- for(size_t j=0; j < a0size; j++) {
+ size_t size=ai->size();
+ if(size != a0size)
+ reportError(rectangular);
+ for(size_t j=0; j < size; j++) {
pen *p=read<pen *>(ai,j);
p->convert();
if(!p->promote(colorspace))
@@ -618,6 +629,41 @@ void psfile::image(const array& a, bool antialias)
endImage(antialias,a0size,asize,ncomponents);
}
+void psfile::image(stack *Stack, callable *f, Int width, Int height,
+ bool antialias)
+{
+ if(width <= 0 || height <= 0) return;
+
+ Stack->push(0);
+ Stack->push(0);
+ f->call(Stack);
+ pen p=pop<pen>(Stack);
+
+ setopacity(p);
+
+ ColorSpace colorspace=p.colorspace();
+ checkColorSpace(colorspace);
+
+ size_t ncomponents=ColorComponents[colorspace];
+
+ imageheader(width,height,colorspace);
+
+ beginImage(ncomponents*width*height);
+ for(Int i=0; i < width; i++) {
+ for(Int j=0; j < height; j++) {
+ Stack->push(i);
+ Stack->push(j);
+ f->call(Stack);
+ pen p=pop<pen>(Stack);
+ p.convert();
+ if(!p.promote(colorspace))
+ reportError(inconsistent);
+ write(&p,ncomponents);
+ }
+ }
+ endImage(antialias,width,height,ncomponents);
+}
+
void psfile::outImage(bool antialias, size_t width, size_t height,
size_t ncomponents)
{
diff --git a/Build/source/utils/asymptote/psfile.h b/Build/source/utils/asymptote/psfile.h
index 1cc4e18ebaf..4251be86599 100644
--- a/Build/source/utils/asymptote/psfile.h
+++ b/Build/source/utils/asymptote/psfile.h
@@ -18,6 +18,7 @@
#include "bbox.h"
#include "pen.h"
#include "array.h"
+#include "callable.h"
namespace camp {
@@ -297,6 +298,9 @@ public:
void image(const vm::array& a, const vm::array& p, bool antialias);
void image(const vm::array& a, bool antialias);
+ void image(vm::stack *Stack, vm::callable *f, Int width, Int height,
+ bool antialias);
+
void rawimage(unsigned char *a, size_t width, size_t height, bool antialias);
virtual void gsave(bool tex=false) {
diff --git a/Build/source/utils/asymptote/record.cc b/Build/source/utils/asymptote/record.cc
index 8bb26176aa0..e07d4b2bcab 100644
--- a/Build/source/utils/asymptote/record.cc
+++ b/Build/source/utils/asymptote/record.cc
@@ -22,7 +22,7 @@ record::record(symbol name, frame *level)
e()
{
assert(init);
-#ifdef DEBUG_STACK
+#ifdef DEBUG_FRAME
init->name = "struct "+string(name);
#endif
}
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc
index 85f5f2c1d84..0d8e5040c6f 100644
--- a/Build/source/utils/asymptote/runarray.cc
+++ b/Build/source/utils/asymptote/runarray.cc
@@ -462,6 +462,7 @@ Int LUdecompose(double *a, size_t n, size_t* index, bool warn=true)
}
namespace run {
+
void dividebyzero(size_t i)
{
ostringstream buf;
@@ -478,12 +479,6 @@ void integeroverflow(size_t i)
error(buf);
}
-void checkSize(Int n, Int depth)
-{
- if(n < 0) error("cannot create a negative length array");
- if(depth < 0) error("cannot copy to a negative depth");
-}
-
}
// Autogenerated routines:
@@ -496,10 +491,10 @@ void checkSize(Int n, Int depth)
#endif
namespace run {
// Create an empty array.
-#line 451 "runarray.in"
+#line 446 "runarray.in"
void emptyArray(stack *Stack)
{
-#line 452 "runarray.in"
+#line 447 "runarray.in"
{Stack->push<array*>(new array(0)); return;}
}
@@ -508,11 +503,11 @@ void emptyArray(stack *Stack)
// is popped off the stack, followed by each dimension in reverse order.
// The array itself is technically a one dimensional array of one
// dimension arrays and so on.
-#line 461 "runarray.in"
+#line 456 "runarray.in"
void newDeepArray(stack *Stack)
{
Int depth=vm::pop<Int>(Stack);
-#line 462 "runarray.in"
+#line 457 "runarray.in"
assert(depth > 0);
Int *dims = new Int[depth];
@@ -531,11 +526,11 @@ void newDeepArray(stack *Stack)
// Creates an array with elements already specified. First, the number
// of elements is popped off the stack, followed by each element in
// reverse order.
-#line 481 "runarray.in"
+#line 476 "runarray.in"
void newInitializedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 482 "runarray.in"
+#line 477 "runarray.in"
assert(n >= 0);
array *a = new array(n);
@@ -548,12 +543,12 @@ void newInitializedArray(stack *Stack)
// Similar to newInitializedArray, but after the n elements, append another
// array to it.
-#line 495 "runarray.in"
+#line 490 "runarray.in"
void newAppendedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array* tail=vm::pop<array*>(Stack);
-#line 496 "runarray.in"
+#line 491 "runarray.in"
assert(n >= 0);
array *a = new array(n);
@@ -567,48 +562,30 @@ void newAppendedArray(stack *Stack)
}
// Produce an array of n deep copies of value.
-#line 510 "runarray.in"
-void copyArray0(stack *Stack)
-{
- Int depth=vm::pop<Int>(Stack,Int_MAX);
- item value=vm::pop(Stack);
- Int n=vm::pop<Int>(Stack);
-#line 511 "runarray.in"
- checkSize(n,depth);
- {Stack->push<array*>(new array((size_t) n, value, (size_t) 0)); return;}
-}
-
-#line 516 "runarray.in"
-void copyArray1(stack *Stack)
-{
- Int depth=vm::pop<Int>(Stack,Int_MAX);
- item value=vm::pop(Stack);
- Int n=vm::pop<Int>(Stack);
-#line 517 "runarray.in"
- checkSize(n,depth);
- if(depth > 1) depth=1;
- {Stack->push<array*>(new array((size_t) n, value, (size_t) depth)); return;}
-}
-
-#line 523 "runarray.in"
-void copyArray2(stack *Stack)
+// typeDepth is the true depth of the array determined at compile-time when the
+// operations for the array type are added. This typeDepth argument is
+// automatically pushed on the stack and is not visible to the user.
+#line 508 "runarray.in"
+void copyArray(stack *Stack)
{
+ Int typeDepth=vm::pop<Int>(Stack);
Int depth=vm::pop<Int>(Stack,Int_MAX);
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
-#line 524 "runarray.in"
- checkSize(n,depth);
- if(depth > 2) depth=2;
- {Stack->push<array*>(new array((size_t) n, value, (size_t) depth)); return;}
+#line 509 "runarray.in"
+ if(n < 0) error("cannot create a negative length array");
+ if(depth < 0) error("cannot copy to a negative depth");
+ if(depth > typeDepth) depth=typeDepth;
+ {Stack->push<array*>(new array((size_t) n, value, depth)); return;}
}
// Read an element from an array. Checks for initialization & bounds.
-#line 531 "runarray.in"
+#line 517 "runarray.in"
void arrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 532 "runarray.in"
+#line 518 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) {
ostringstream buf;
@@ -619,37 +596,37 @@ void arrayRead(stack *Stack)
}
// Slice a substring from an array.
-#line 543 "runarray.in"
+#line 529 "runarray.in"
void arraySliceRead(stack *Stack)
{
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 544 "runarray.in"
+#line 530 "runarray.in"
checkArray(a);
{Stack->push(a->slice(left, right)); return;}
}
// Slice a substring from an array. This implements the cases a[i:] and a[:]
// where the endpoint is not given, and assumed to be the length of the array.
-#line 551 "runarray.in"
+#line 537 "runarray.in"
void arraySliceReadToEnd(stack *Stack)
{
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 552 "runarray.in"
+#line 538 "runarray.in"
size_t len=checkArray(a);
{Stack->push(a->slice(left, (Int)len)); return;}
}
// Read an element from an array of arrays. Check bounds and initialize
// as necessary.
-#line 559 "runarray.in"
+#line 545 "runarray.in"
void arrayArrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 560 "runarray.in"
+#line 546 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) i=new array(0);
{Stack->push(i); return;}
@@ -657,13 +634,13 @@ void arrayArrayRead(stack *Stack)
// Write an element to an array. Increase size if necessary.
// TODO: Add arrayWriteAndPop
-#line 568 "runarray.in"
+#line 554 "runarray.in"
void arrayWrite(stack *Stack)
{
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 569 "runarray.in"
+#line 555 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -677,27 +654,27 @@ void arrayWrite(stack *Stack)
{Stack->push(value); return;}
}
-#line 583 "runarray.in"
+#line 569 "runarray.in"
void arraySliceWrite(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 584 "runarray.in"
+#line 570 "runarray.in"
checkArray(src);
checkArray(dest);
dest->setSlice(left, right, src);
{Stack->push<array*>(src); return;}
}
-#line 591 "runarray.in"
+#line 577 "runarray.in"
void arraySliceWriteToEnd(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 592 "runarray.in"
+#line 578 "runarray.in"
checkArray(src);
size_t len=checkArray(dest);
dest->setSlice(left, (Int) len, src);
@@ -705,20 +682,20 @@ void arraySliceWriteToEnd(stack *Stack)
}
// Returns the length of an array.
-#line 600 "runarray.in"
+#line 586 "runarray.in"
void arrayLength(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 601 "runarray.in"
+#line 587 "runarray.in"
{Stack->push<Int>((Int) checkArray(a)); return;}
}
// Returns an array of integers representing the keys of the array.
-#line 606 "runarray.in"
+#line 592 "runarray.in"
void arrayKeys(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 607 "runarray.in"
+#line 593 "runarray.in"
size_t size=checkArray(a);
array *keys=new array();
@@ -732,33 +709,33 @@ void arrayKeys(stack *Stack)
}
// Return the cyclic flag for an array.
-#line 621 "runarray.in"
+#line 607 "runarray.in"
void arrayCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 622 "runarray.in"
+#line 608 "runarray.in"
checkArray(a);
{Stack->push<bool>(a->cyclic()); return;}
}
-#line 627 "runarray.in"
+#line 613 "runarray.in"
void arraySetCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 628 "runarray.in"
+#line 614 "runarray.in"
checkArray(a);
a->cyclic(b);
{Stack->push<bool>(b); return;}
}
// Check to see if an array element is initialized.
-#line 635 "runarray.in"
+#line 621 "runarray.in"
void arrayInitializedHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
Int n=vm::pop<Int>(Stack);
-#line 636 "runarray.in"
+#line 622 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -768,62 +745,62 @@ void arrayInitializedHelper(stack *Stack)
}
// Returns the initialize method for an array.
-#line 646 "runarray.in"
+#line 632 "runarray.in"
void arrayInitialized(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 647 "runarray.in"
+#line 633 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;}
}
// The helper function for the cyclic method that sets the cyclic flag.
-#line 652 "runarray.in"
+#line 638 "runarray.in"
void arrayCyclicHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 653 "runarray.in"
+#line 639 "runarray.in"
checkArray(a);
a->cyclic(b);
}
// Set the cyclic flag for an array.
-#line 659 "runarray.in"
+#line 645 "runarray.in"
void arrayCyclic(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 660 "runarray.in"
+#line 646 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;}
}
// The helper function for the push method that does the actual operation.
-#line 665 "runarray.in"
+#line 651 "runarray.in"
void arrayPushHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
item x=vm::pop(Stack);
-#line 666 "runarray.in"
+#line 652 "runarray.in"
checkArray(a);
a->push(x);
{Stack->push(x); return;}
}
// Returns the push method for an array.
-#line 673 "runarray.in"
+#line 659 "runarray.in"
void arrayPush(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 674 "runarray.in"
+#line 660 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;}
}
// The helper function for the append method that appends b to a.
-#line 679 "runarray.in"
+#line 665 "runarray.in"
void arrayAppendHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
-#line 680 "runarray.in"
+#line 666 "runarray.in"
checkArray(a);
size_t size=checkArray(b);
for(size_t i=0; i < size; i++)
@@ -831,20 +808,20 @@ void arrayAppendHelper(stack *Stack)
}
// Returns the append method for an array.
-#line 688 "runarray.in"
+#line 674 "runarray.in"
void arrayAppend(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 689 "runarray.in"
+#line 675 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;}
}
// The helper function for the pop method.
-#line 694 "runarray.in"
+#line 680 "runarray.in"
void arrayPopHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 695 "runarray.in"
+#line 681 "runarray.in"
size_t asize=checkArray(a);
if(asize == 0)
error("cannot pop element from empty array");
@@ -852,22 +829,22 @@ void arrayPopHelper(stack *Stack)
}
// Returns the pop method for an array.
-#line 703 "runarray.in"
+#line 689 "runarray.in"
void arrayPop(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 704 "runarray.in"
+#line 690 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;}
}
// The helper function for the insert method.
-#line 709 "runarray.in"
+#line 695 "runarray.in"
void arrayInsertHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * x=vm::pop<array *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 710 "runarray.in"
+#line 696 "runarray.in"
size_t asize=checkArray(a);
checkArray(x);
if(a->cyclic() && asize > 0) i=imod(i,asize);
@@ -877,39 +854,39 @@ void arrayInsertHelper(stack *Stack)
}
// Returns the insert method for an array.
-#line 720 "runarray.in"
+#line 706 "runarray.in"
void arrayInsert(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 721 "runarray.in"
+#line 707 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;}
}
// Returns the delete method for an array.
-#line 726 "runarray.in"
+#line 712 "runarray.in"
void arrayDelete(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 727 "runarray.in"
+#line 713 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;}
}
-#line 731 "runarray.in"
+#line 717 "runarray.in"
void arrayAlias(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 732 "runarray.in"
+#line 718 "runarray.in"
{Stack->push<bool>(a==b); return;}
}
// Return array formed by indexing array a with elements of integer array b
-#line 737 "runarray.in"
+#line 723 "runarray.in"
void arrayIntArray(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 738 "runarray.in"
+#line 724 "runarray.in"
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
array *r=new array(bsize);
@@ -927,13 +904,13 @@ void arrayIntArray(stack *Stack)
// returns the complement of the integer array a in {0,2,...,n-1},
// so that b[complement(a,b.length)] yields the complement of b[a].
-#line 756 "runarray.in"
+#line 742 "runarray.in"
// Intarray* complement(Intarray *a, Int n);
-void gen_runarray33(stack *Stack)
+void gen_runarray31(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
Intarray * a=vm::pop<Intarray *>(Stack);
-#line 757 "runarray.in"
+#line 743 "runarray.in"
size_t asize=checkArray(a);
array *r=new array(0);
bool *keep=new bool[n];
@@ -950,12 +927,12 @@ void gen_runarray33(stack *Stack)
}
// Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n
-#line 774 "runarray.in"
+#line 760 "runarray.in"
void arraySequence(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 775 "runarray.in"
+#line 761 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -967,12 +944,12 @@ void arraySequence(stack *Stack)
}
// Return the array {0,1,...n-1}
-#line 787 "runarray.in"
+#line 773 "runarray.in"
// Intarray* sequence(Int n);
-void gen_runarray35(stack *Stack)
+void gen_runarray33(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 788 "runarray.in"
+#line 774 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -982,12 +959,12 @@ void gen_runarray35(stack *Stack)
}
// Apply a function to each element of an array
-#line 798 "runarray.in"
+#line 784 "runarray.in"
void arrayFunction(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 799 "runarray.in"
+#line 785 "runarray.in"
size_t size=checkArray(a);
array *b=new array(size);
for(size_t i=0; i < size; ++i) {
@@ -998,12 +975,12 @@ void arrayFunction(stack *Stack)
{Stack->push<array*>(b); return;}
}
-#line 810 "runarray.in"
+#line 796 "runarray.in"
void arraySort(stack *Stack)
{
callable * less=vm::pop<callable *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 811 "runarray.in"
+#line 797 "runarray.in"
array *c=copyArray(a);
compareFunc=less;
FuncStack=Stack;
@@ -1011,13 +988,13 @@ void arraySort(stack *Stack)
{Stack->push<array*>(c); return;}
}
-#line 819 "runarray.in"
+#line 805 "runarray.in"
void arraySearch(stack *Stack)
{
callable * less=vm::pop<callable *>(Stack);
item key=vm::pop(Stack);
array * a=vm::pop<array *>(Stack);
-#line 820 "runarray.in"
+#line 806 "runarray.in"
size_t size=a->size();
compareFunc=less;
FuncStack=Stack;
@@ -1035,12 +1012,12 @@ void arraySearch(stack *Stack)
{Stack->push<Int>(0); return;}
}
-#line 838 "runarray.in"
+#line 824 "runarray.in"
// bool all(boolarray *a);
-void gen_runarray39(stack *Stack)
+void gen_runarray37(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 839 "runarray.in"
+#line 825 "runarray.in"
size_t size=checkArray(a);
bool c=true;
for(size_t i=0; i < size; i++)
@@ -1048,12 +1025,12 @@ void gen_runarray39(stack *Stack)
{Stack->push<bool>(c); return;}
}
-#line 847 "runarray.in"
+#line 833 "runarray.in"
// boolarray* !(boolarray* a);
-void gen_runarray40(stack *Stack)
+void gen_runarray38(stack *Stack)
{
boolarray* a=vm::pop<boolarray*>(Stack);
-#line 848 "runarray.in"
+#line 834 "runarray.in"
size_t size=checkArray(a);
array *c=new array(size);
for(size_t i=0; i < size; i++)
@@ -1061,12 +1038,12 @@ void gen_runarray40(stack *Stack)
{Stack->push<boolarray*>(c); return;}
}
-#line 856 "runarray.in"
+#line 842 "runarray.in"
// Int sum(boolarray *a);
-void gen_runarray41(stack *Stack)
+void gen_runarray39(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 857 "runarray.in"
+#line 843 "runarray.in"
size_t size=checkArray(a);
Int sum=0;
for(size_t i=0; i < size; i++)
@@ -1074,19 +1051,19 @@ void gen_runarray41(stack *Stack)
{Stack->push<Int>(sum); return;}
}
-#line 865 "runarray.in"
+#line 851 "runarray.in"
void arrayCopy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 866 "runarray.in"
+#line 852 "runarray.in"
{Stack->push<array*>(copyArray(a)); return;}
}
-#line 870 "runarray.in"
+#line 856 "runarray.in"
void arrayConcat(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 871 "runarray.in"
+#line 857 "runarray.in"
// a is an array of arrays to be concatenated together.
// The signature is
// T[] concat(... T[][] a);
@@ -1113,27 +1090,27 @@ void arrayConcat(stack *Stack)
{Stack->push<array*>(result); return;}
}
-#line 898 "runarray.in"
+#line 884 "runarray.in"
void array2Copy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 899 "runarray.in"
+#line 885 "runarray.in"
{Stack->push<array*>(copyArray2(a)); return;}
}
-#line 903 "runarray.in"
+#line 889 "runarray.in"
void array3Copy(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 904 "runarray.in"
+#line 890 "runarray.in"
{Stack->push<array*>(copyArray3(a)); return;}
}
-#line 908 "runarray.in"
+#line 894 "runarray.in"
void array2Transpose(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 909 "runarray.in"
+#line 895 "runarray.in"
size_t asize=checkArray(a);
array *c=new array(0);
for(size_t i=0; i < asize; i++) {
@@ -1160,12 +1137,12 @@ void array2Transpose(stack *Stack)
// permutation (021 or 120, etc; original is 012).
// Transpose by sending respective members to the permutated locations:
// return the array obtained by putting a[i][j][k] into position perm{ijk}.
-#line 936 "runarray.in"
+#line 922 "runarray.in"
void array3Transpose(stack *Stack)
{
array * perm=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 937 "runarray.in"
+#line 923 "runarray.in"
const size_t DIM=3;
if(checkArray(perm) != DIM) {
@@ -1249,13 +1226,13 @@ void array3Transpose(stack *Stack)
// In a boolean array, find the index of the nth true value or -1 if not found
// If n is negative, search backwards.
-#line 1021 "runarray.in"
+#line 1007 "runarray.in"
// Int find(boolarray *a, Int n=1);
-void gen_runarray48(stack *Stack)
+void gen_runarray46(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 1022 "runarray.in"
+#line 1008 "runarray.in"
size_t size=checkArray(a);
Int j=-1;
if(n > 0)
@@ -1273,13 +1250,13 @@ void gen_runarray48(stack *Stack)
// construct vector obtained by replacing those elements of b for which the
// corresponding elements of a are false by the corresponding element of c.
-#line 1040 "runarray.in"
+#line 1026 "runarray.in"
void arrayConditional(stack *Stack)
{
array * c=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 1041 "runarray.in"
+#line 1027 "runarray.in"
size_t size=checkArray(a);
array *r=new array(size);
if(b && c) {
@@ -1303,22 +1280,22 @@ void arrayConditional(stack *Stack)
}
// Return an n x n identity matrix.
-#line 1065 "runarray.in"
+#line 1051 "runarray.in"
// realarray2* identity(Int n);
-void gen_runarray50(stack *Stack)
+void gen_runarray48(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 1066 "runarray.in"
+#line 1052 "runarray.in"
{Stack->push<realarray2*>(Identity(n)); return;}
}
// Return the inverse of an n x n matrix a using Gauss-Jordan elimination.
-#line 1071 "runarray.in"
+#line 1057 "runarray.in"
// realarray2* inverse(realarray2 *a);
-void gen_runarray51(stack *Stack)
+void gen_runarray49(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1072 "runarray.in"
+#line 1058 "runarray.in"
a=copyArray2(a);
size_t n=checkArray(a);
checkSquare(a);
@@ -1411,14 +1388,14 @@ void gen_runarray51(stack *Stack)
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an array of length n.
// If no solution exists, return an empty array.
-#line 1165 "runarray.in"
+#line 1151 "runarray.in"
// realarray* solve(realarray2 *a, realarray *b, bool warn=true);
-void gen_runarray52(stack *Stack)
+void gen_runarray50(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1166 "runarray.in"
+#line 1152 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray*>(new array(0)); return;}
@@ -1470,14 +1447,14 @@ void gen_runarray52(stack *Stack)
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an n x m matrix.
// If no solution exists, return an empty array.
-#line 1218 "runarray.in"
+#line 1204 "runarray.in"
// realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true);
-void gen_runarray53(stack *Stack)
+void gen_runarray51(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1219 "runarray.in"
+#line 1205 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray2*>(new array(0)); return;}
@@ -1539,12 +1516,12 @@ void gen_runarray53(stack *Stack)
}
// Compute the determinant of an n x n matrix.
-#line 1281 "runarray.in"
+#line 1267 "runarray.in"
// real determinant(realarray2 *a);
-void gen_runarray54(stack *Stack)
+void gen_runarray52(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1282 "runarray.in"
+#line 1268 "runarray.in"
real *A;
copyArray2C(A,a);
size_t n=checkArray(a);
@@ -1559,13 +1536,13 @@ void gen_runarray54(stack *Stack)
{Stack->push<real>(det); return;}
}
-#line 1297 "runarray.in"
+#line 1283 "runarray.in"
// realarray* *(realarray2 *a, realarray *b);
-void gen_runarray55(stack *Stack)
+void gen_runarray53(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1298 "runarray.in"
+#line 1284 "runarray.in"
size_t n=checkArray(a);
size_t m=checkArray(b);
array *c=new array(n);
@@ -1583,13 +1560,13 @@ void gen_runarray55(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1316 "runarray.in"
+#line 1302 "runarray.in"
// realarray* *(realarray *a, realarray2 *b);
-void gen_runarray56(stack *Stack)
+void gen_runarray54(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1317 "runarray.in"
+#line 1303 "runarray.in"
size_t n=checkArray(a);
if(n != checkArray(b)) error(incommensurate);
real *A;
@@ -1617,53 +1594,53 @@ void gen_runarray56(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1345 "runarray.in"
+#line 1331 "runarray.in"
// Intarray2* *(Intarray2 *a, Intarray2 *b);
-void gen_runarray57(stack *Stack)
+void gen_runarray55(stack *Stack)
{
Intarray2 * b=vm::pop<Intarray2 *>(Stack);
Intarray2 * a=vm::pop<Intarray2 *>(Stack);
-#line 1346 "runarray.in"
+#line 1332 "runarray.in"
{Stack->push<Intarray2*>(mult<Int>(a,b)); return;}
}
-#line 1350 "runarray.in"
+#line 1336 "runarray.in"
// realarray2* *(realarray2 *a, realarray2 *b);
-void gen_runarray58(stack *Stack)
+void gen_runarray56(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1351 "runarray.in"
+#line 1337 "runarray.in"
{Stack->push<realarray2*>(mult<real>(a,b)); return;}
}
-#line 1355 "runarray.in"
+#line 1341 "runarray.in"
// pairarray2* *(pairarray2 *a, pairarray2 *b);
-void gen_runarray59(stack *Stack)
+void gen_runarray57(stack *Stack)
{
pairarray2 * b=vm::pop<pairarray2 *>(Stack);
pairarray2 * a=vm::pop<pairarray2 *>(Stack);
-#line 1356 "runarray.in"
+#line 1342 "runarray.in"
{Stack->push<pairarray2*>(mult<pair>(a,b)); return;}
}
-#line 1360 "runarray.in"
+#line 1346 "runarray.in"
// triple *(realarray2 *t, triple v);
-void gen_runarray60(stack *Stack)
+void gen_runarray58(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 1361 "runarray.in"
+#line 1347 "runarray.in"
{Stack->push<triple>(*t*v); return;}
}
-#line 1365 "runarray.in"
+#line 1351 "runarray.in"
// pair project(triple v, realarray2 *t);
-void gen_runarray61(stack *Stack)
+void gen_runarray59(stack *Stack)
{
realarray2 * t=vm::pop<realarray2 *>(Stack);
triple v=vm::pop<triple>(Stack);
-#line 1366 "runarray.in"
+#line 1352 "runarray.in"
size_t n=checkArray(t);
if(n != 4) error(incommensurate);
array *t0=read<array*>(t,0);
@@ -1688,13 +1665,13 @@ void gen_runarray61(stack *Stack)
}
// Compute the dot product of vectors a and b.
-#line 1391 "runarray.in"
+#line 1377 "runarray.in"
// real dot(realarray *a, realarray *b);
-void gen_runarray62(stack *Stack)
+void gen_runarray60(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1392 "runarray.in"
+#line 1378 "runarray.in"
size_t n=checkArrays(a,b);
real sum=0.0;
for(size_t i=0; i < n; ++i)
@@ -1703,13 +1680,13 @@ void gen_runarray62(stack *Stack)
}
// Compute the complex dot product of vectors a and b.
-#line 1401 "runarray.in"
+#line 1387 "runarray.in"
// pair dot(pairarray *a, pairarray *b);
-void gen_runarray63(stack *Stack)
+void gen_runarray61(stack *Stack)
{
pairarray * b=vm::pop<pairarray *>(Stack);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1402 "runarray.in"
+#line 1388 "runarray.in"
size_t n=checkArrays(a,b);
pair sum=zero;
for(size_t i=0; i < n; ++i)
@@ -1724,15 +1701,15 @@ void gen_runarray63(stack *Stack)
// [ a[2] b[2] c[2] ]
// [ ... ]
// [ c[n-1] a[n-1] b[n-1] ]
-#line 1417 "runarray.in"
+#line 1403 "runarray.in"
// realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f);
-void gen_runarray64(stack *Stack)
+void gen_runarray62(stack *Stack)
{
realarray * f=vm::pop<realarray *>(Stack);
realarray * c=vm::pop<realarray *>(Stack);
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1418 "runarray.in"
+#line 1404 "runarray.in"
size_t n=checkArrays(a,b);
checkEqual(n,checkArray(c));
checkEqual(n,checkArray(f));
@@ -1829,16 +1806,16 @@ void gen_runarray64(stack *Stack)
}
// Root solve by Newton-Raphson
-#line 1515 "runarray.in"
+#line 1501 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false);
-void gen_runarray65(stack *Stack)
+void gen_runarray63(stack *Stack)
{
bool verbose=vm::pop<bool>(Stack,false);
real x=vm::pop<real>(Stack);
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1517 "runarray.in"
+#line 1503 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
Int i=0;
size_t oldPrec=0;
@@ -1884,9 +1861,9 @@ void gen_runarray65(stack *Stack)
// Root solve by Newton-Raphson bisection
// cf. routine rtsafe (Press et al., Numerical Recipes, 1991).
-#line 1563 "runarray.in"
+#line 1549 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false);
-void gen_runarray66(stack *Stack)
+void gen_runarray64(stack *Stack)
{
bool verbose=vm::pop<bool>(Stack,false);
real x2=vm::pop<real>(Stack);
@@ -1894,7 +1871,7 @@ void gen_runarray66(stack *Stack)
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1565 "runarray.in"
+#line 1551 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
size_t oldPrec=0;
if(verbose)
@@ -1972,16 +1949,16 @@ void gen_runarray66(stack *Stack)
{Stack->push<real>((j == iterations) ? DBL_MAX : x); return;}
}
-#line 1643 "runarray.in"
+#line 1629 "runarray.in"
// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
-void gen_runarray67(stack *Stack)
+void gen_runarray65(stack *Stack)
{
real dxmax=vm::pop<real>(Stack,0);
real acc=vm::pop<real>(Stack,DBL_EPSILON);
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
-#line 1645 "runarray.in"
+#line 1631 "runarray.in"
real integral;
if(dxmax <= 0) dxmax=fabs(b-a);
Func=f;
@@ -1992,13 +1969,13 @@ void gen_runarray67(stack *Stack)
}
// Compute the fast Fourier transform of a pair array
-#line 1656 "runarray.in"
+#line 1642 "runarray.in"
// pairarray* fft(pairarray *a, Int sign=1);
-void gen_runarray68(stack *Stack)
+void gen_runarray66(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1657 "runarray.in"
+#line 1643 "runarray.in"
unsigned n=(unsigned) checkArray(a);
#ifdef HAVE_LIBFFTW3
array *c=new array(n);
@@ -2027,12 +2004,12 @@ void gen_runarray68(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 1686 "runarray.in"
+#line 1672 "runarray.in"
// Intarray2* triangulate(pairarray *z);
-void gen_runarray69(stack *Stack)
+void gen_runarray67(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1687 "runarray.in"
+#line 1673 "runarray.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
@@ -2066,12 +2043,12 @@ void gen_runarray69(stack *Stack)
{Stack->push<Intarray2*>(t); return;}
}
-#line 1721 "runarray.in"
+#line 1707 "runarray.in"
// real norm(realarray *a);
-void gen_runarray70(stack *Stack)
+void gen_runarray68(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 1722 "runarray.in"
+#line 1708 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2081,12 +2058,12 @@ void gen_runarray70(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1732 "runarray.in"
+#line 1718 "runarray.in"
// real norm(realarray2 *a);
-void gen_runarray71(stack *Stack)
+void gen_runarray69(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1733 "runarray.in"
+#line 1719 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2100,12 +2077,12 @@ void gen_runarray71(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1747 "runarray.in"
+#line 1733 "runarray.in"
// real norm(triplearray2 *a);
-void gen_runarray72(stack *Stack)
+void gen_runarray70(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1748 "runarray.in"
+#line 1734 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2119,12 +2096,12 @@ void gen_runarray72(stack *Stack)
{Stack->push<real>(sqrt(M)); return;}
}
-#line 1762 "runarray.in"
+#line 1748 "runarray.in"
// real change2(triplearray2 *a);
-void gen_runarray73(stack *Stack)
+void gen_runarray71(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1763 "runarray.in"
+#line 1749 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<real>(0.0); return;}
@@ -2145,13 +2122,13 @@ void gen_runarray73(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1784 "runarray.in"
+#line 1770 "runarray.in"
// triple minbezier(triplearray2 *P, triple b);
-void gen_runarray74(stack *Stack)
+void gen_runarray72(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1785 "runarray.in"
+#line 1771 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2160,13 +2137,13 @@ void gen_runarray74(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1794 "runarray.in"
+#line 1780 "runarray.in"
// triple maxbezier(triplearray2 *P, triple b);
-void gen_runarray75(stack *Stack)
+void gen_runarray73(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1795 "runarray.in"
+#line 1781 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2175,13 +2152,13 @@ void gen_runarray75(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1804 "runarray.in"
+#line 1790 "runarray.in"
// pair minratio(triplearray2 *P, pair b);
-void gen_runarray76(stack *Stack)
+void gen_runarray74(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1805 "runarray.in"
+#line 1791 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2191,13 +2168,13 @@ void gen_runarray76(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1815 "runarray.in"
+#line 1801 "runarray.in"
// pair maxratio(triplearray2 *P, pair b);
-void gen_runarray77(stack *Stack)
+void gen_runarray75(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1816 "runarray.in"
+#line 1802 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2207,11 +2184,11 @@ void gen_runarray77(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1826 "runarray.in"
+#line 1812 "runarray.in"
// realarray* _projection();
-void gen_runarray78(stack *Stack)
+void gen_runarray76(stack *Stack)
{
-#line 1827 "runarray.in"
+#line 1813 "runarray.in"
#ifdef HAVE_GL
array *a=new array(14);
gl::projection P=gl::camera();
@@ -2248,164 +2225,160 @@ namespace trans {
void gen_runarray_venv(venv &ve)
{
-#line 450 "runarray.in"
+#line 445 "runarray.in"
REGISTER_BLTIN(run::emptyArray,"emptyArray");
-#line 456 "runarray.in"
+#line 451 "runarray.in"
REGISTER_BLTIN(run::newDeepArray,"newDeepArray");
-#line 478 "runarray.in"
+#line 473 "runarray.in"
REGISTER_BLTIN(run::newInitializedArray,"newInitializedArray");
-#line 493 "runarray.in"
+#line 488 "runarray.in"
REGISTER_BLTIN(run::newAppendedArray,"newAppendedArray");
-#line 509 "runarray.in"
- REGISTER_BLTIN(run::copyArray0,"copyArray0");
+#line 504 "runarray.in"
+ REGISTER_BLTIN(run::copyArray,"copyArray");
#line 516 "runarray.in"
- REGISTER_BLTIN(run::copyArray1,"copyArray1");
-#line 523 "runarray.in"
- REGISTER_BLTIN(run::copyArray2,"copyArray2");
-#line 530 "runarray.in"
REGISTER_BLTIN(run::arrayRead,"arrayRead");
-#line 542 "runarray.in"
+#line 528 "runarray.in"
REGISTER_BLTIN(run::arraySliceRead,"arraySliceRead");
-#line 549 "runarray.in"
+#line 535 "runarray.in"
REGISTER_BLTIN(run::arraySliceReadToEnd,"arraySliceReadToEnd");
-#line 557 "runarray.in"
+#line 543 "runarray.in"
REGISTER_BLTIN(run::arrayArrayRead,"arrayArrayRead");
-#line 566 "runarray.in"
+#line 552 "runarray.in"
REGISTER_BLTIN(run::arrayWrite,"arrayWrite");
-#line 583 "runarray.in"
+#line 569 "runarray.in"
REGISTER_BLTIN(run::arraySliceWrite,"arraySliceWrite");
-#line 591 "runarray.in"
+#line 577 "runarray.in"
REGISTER_BLTIN(run::arraySliceWriteToEnd,"arraySliceWriteToEnd");
-#line 599 "runarray.in"
+#line 585 "runarray.in"
REGISTER_BLTIN(run::arrayLength,"arrayLength");
-#line 605 "runarray.in"
+#line 591 "runarray.in"
REGISTER_BLTIN(run::arrayKeys,"arrayKeys");
-#line 620 "runarray.in"
+#line 606 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicFlag,"arrayCyclicFlag");
-#line 627 "runarray.in"
+#line 613 "runarray.in"
REGISTER_BLTIN(run::arraySetCyclicFlag,"arraySetCyclicFlag");
-#line 634 "runarray.in"
+#line 620 "runarray.in"
REGISTER_BLTIN(run::arrayInitializedHelper,"arrayInitializedHelper");
-#line 645 "runarray.in"
+#line 631 "runarray.in"
REGISTER_BLTIN(run::arrayInitialized,"arrayInitialized");
-#line 651 "runarray.in"
+#line 637 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicHelper,"arrayCyclicHelper");
-#line 658 "runarray.in"
+#line 644 "runarray.in"
REGISTER_BLTIN(run::arrayCyclic,"arrayCyclic");
-#line 664 "runarray.in"
+#line 650 "runarray.in"
REGISTER_BLTIN(run::arrayPushHelper,"arrayPushHelper");
-#line 672 "runarray.in"
+#line 658 "runarray.in"
REGISTER_BLTIN(run::arrayPush,"arrayPush");
-#line 678 "runarray.in"
+#line 664 "runarray.in"
REGISTER_BLTIN(run::arrayAppendHelper,"arrayAppendHelper");
-#line 687 "runarray.in"
+#line 673 "runarray.in"
REGISTER_BLTIN(run::arrayAppend,"arrayAppend");
-#line 693 "runarray.in"
+#line 679 "runarray.in"
REGISTER_BLTIN(run::arrayPopHelper,"arrayPopHelper");
-#line 702 "runarray.in"
+#line 688 "runarray.in"
REGISTER_BLTIN(run::arrayPop,"arrayPop");
-#line 708 "runarray.in"
+#line 694 "runarray.in"
REGISTER_BLTIN(run::arrayInsertHelper,"arrayInsertHelper");
-#line 719 "runarray.in"
+#line 705 "runarray.in"
REGISTER_BLTIN(run::arrayInsert,"arrayInsert");
-#line 725 "runarray.in"
+#line 711 "runarray.in"
REGISTER_BLTIN(run::arrayDelete,"arrayDelete");
-#line 731 "runarray.in"
+#line 717 "runarray.in"
REGISTER_BLTIN(run::arrayAlias,"arrayAlias");
-#line 736 "runarray.in"
+#line 722 "runarray.in"
REGISTER_BLTIN(run::arrayIntArray,"arrayIntArray");
-#line 754 "runarray.in"
- addFunc(ve, run::gen_runarray33, IntArray(), SYM(complement), formal(IntArray(), SYM(a), false, false), formal(primInt(), SYM(n), false, false));
-#line 773 "runarray.in"
+#line 740 "runarray.in"
+ addFunc(ve, run::gen_runarray31, IntArray(), SYM(complement), formal(IntArray(), SYM(a), false, false), formal(primInt(), SYM(n), false, false));
+#line 759 "runarray.in"
REGISTER_BLTIN(run::arraySequence,"arraySequence");
-#line 786 "runarray.in"
- addFunc(ve, run::gen_runarray35, IntArray(), SYM(sequence), formal(primInt(), SYM(n), false, false));
-#line 797 "runarray.in"
+#line 772 "runarray.in"
+ addFunc(ve, run::gen_runarray33, IntArray(), SYM(sequence), formal(primInt(), SYM(n), false, false));
+#line 783 "runarray.in"
REGISTER_BLTIN(run::arrayFunction,"arrayFunction");
-#line 810 "runarray.in"
+#line 796 "runarray.in"
REGISTER_BLTIN(run::arraySort,"arraySort");
-#line 819 "runarray.in"
+#line 805 "runarray.in"
REGISTER_BLTIN(run::arraySearch,"arraySearch");
-#line 838 "runarray.in"
- addFunc(ve, run::gen_runarray39, primBoolean(), SYM(all), formal(booleanArray(), SYM(a), false, false));
-#line 847 "runarray.in"
- addFunc(ve, run::gen_runarray40, booleanArray(), SYM_LOGNOT, formal(booleanArray(), SYM(a), false, false));
-#line 856 "runarray.in"
- addFunc(ve, run::gen_runarray41, primInt(), SYM(sum), formal(booleanArray(), SYM(a), false, false));
-#line 865 "runarray.in"
+#line 824 "runarray.in"
+ addFunc(ve, run::gen_runarray37, primBoolean(), SYM(all), formal(booleanArray(), SYM(a), false, false));
+#line 833 "runarray.in"
+ addFunc(ve, run::gen_runarray38, booleanArray(), SYM_LOGNOT, formal(booleanArray(), SYM(a), false, false));
+#line 842 "runarray.in"
+ addFunc(ve, run::gen_runarray39, primInt(), SYM(sum), formal(booleanArray(), SYM(a), false, false));
+#line 851 "runarray.in"
REGISTER_BLTIN(run::arrayCopy,"arrayCopy");
-#line 870 "runarray.in"
+#line 856 "runarray.in"
REGISTER_BLTIN(run::arrayConcat,"arrayConcat");
-#line 898 "runarray.in"
+#line 884 "runarray.in"
REGISTER_BLTIN(run::array2Copy,"array2Copy");
-#line 903 "runarray.in"
+#line 889 "runarray.in"
REGISTER_BLTIN(run::array3Copy,"array3Copy");
-#line 908 "runarray.in"
+#line 894 "runarray.in"
REGISTER_BLTIN(run::array2Transpose,"array2Transpose");
-#line 932 "runarray.in"
+#line 918 "runarray.in"
REGISTER_BLTIN(run::array3Transpose,"array3Transpose");
-#line 1019 "runarray.in"
- addFunc(ve, run::gen_runarray48, primInt(), SYM(find), formal(booleanArray(), SYM(a), false, false), formal(primInt(), SYM(n), true, false));
-#line 1038 "runarray.in"
+#line 1005 "runarray.in"
+ addFunc(ve, run::gen_runarray46, primInt(), SYM(find), formal(booleanArray(), SYM(a), false, false), formal(primInt(), SYM(n), true, false));
+#line 1024 "runarray.in"
REGISTER_BLTIN(run::arrayConditional,"arrayConditional");
-#line 1064 "runarray.in"
- addFunc(ve, run::gen_runarray50, realArray2(), SYM(identity), formal(primInt(), SYM(n), false, false));
-#line 1070 "runarray.in"
- addFunc(ve, run::gen_runarray51, realArray2(), SYM(inverse), formal(realArray2(), SYM(a), false, false));
-#line 1162 "runarray.in"
- addFunc(ve, run::gen_runarray52, realArray(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1215 "runarray.in"
- addFunc(ve, run::gen_runarray53, realArray2(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1280 "runarray.in"
- addFunc(ve, run::gen_runarray54, primReal(), SYM(determinant), formal(realArray2(), SYM(a), false, false));
-#line 1297 "runarray.in"
- addFunc(ve, run::gen_runarray55, realArray(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1316 "runarray.in"
- addFunc(ve, run::gen_runarray56, realArray(), SYM_TIMES, formal(realArray(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1345 "runarray.in"
- addFunc(ve, run::gen_runarray57, IntArray2(), SYM_TIMES, formal(IntArray2(), SYM(a), false, false), formal(IntArray2(), SYM(b), false, false));
-#line 1350 "runarray.in"
- addFunc(ve, run::gen_runarray58, realArray2(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1355 "runarray.in"
- addFunc(ve, run::gen_runarray59, pairArray2(), SYM_TIMES, formal(pairArray2(), SYM(a), false, false), formal(pairArray2(), SYM(b), false, false));
-#line 1360 "runarray.in"
- addFunc(ve, run::gen_runarray60, primTriple(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primTriple(), SYM(v), false, false));
-#line 1365 "runarray.in"
- addFunc(ve, run::gen_runarray61, primPair(), SYM(project), formal(primTriple(), SYM(v), false, false), formal(realArray2(), SYM(t), false, false));
-#line 1390 "runarray.in"
- addFunc(ve, run::gen_runarray62, primReal(), SYM(dot), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1400 "runarray.in"
- addFunc(ve, run::gen_runarray63, primPair(), SYM(dot), formal(pairArray(), SYM(a), false, false), formal(pairArray(), SYM(b), false, false));
-#line 1410 "runarray.in"
- addFunc(ve, run::gen_runarray64, realArray(), SYM(tridiagonal), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(realArray(), SYM(c), false, false), formal(realArray(), SYM(f), false, false));
-#line 1514 "runarray.in"
- addFunc(ve, run::gen_runarray65, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1561 "runarray.in"
- addFunc(ve, run::gen_runarray66, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1643 "runarray.in"
- addFunc(ve, run::gen_runarray67, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
-#line 1655 "runarray.in"
- addFunc(ve, run::gen_runarray68, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1686 "runarray.in"
- addFunc(ve, run::gen_runarray69, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1721 "runarray.in"
- addFunc(ve, run::gen_runarray70, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 1732 "runarray.in"
- addFunc(ve, run::gen_runarray71, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 1747 "runarray.in"
- addFunc(ve, run::gen_runarray72, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 1762 "runarray.in"
- addFunc(ve, run::gen_runarray73, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 1784 "runarray.in"
- addFunc(ve, run::gen_runarray74, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1794 "runarray.in"
- addFunc(ve, run::gen_runarray75, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1804 "runarray.in"
- addFunc(ve, run::gen_runarray76, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1815 "runarray.in"
- addFunc(ve, run::gen_runarray77, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1826 "runarray.in"
- addFunc(ve, run::gen_runarray78, realArray(), SYM(_projection));
+#line 1050 "runarray.in"
+ addFunc(ve, run::gen_runarray48, realArray2(), SYM(identity), formal(primInt(), SYM(n), false, false));
+#line 1056 "runarray.in"
+ addFunc(ve, run::gen_runarray49, realArray2(), SYM(inverse), formal(realArray2(), SYM(a), false, false));
+#line 1148 "runarray.in"
+ addFunc(ve, run::gen_runarray50, realArray(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 1201 "runarray.in"
+ addFunc(ve, run::gen_runarray51, realArray2(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 1266 "runarray.in"
+ addFunc(ve, run::gen_runarray52, primReal(), SYM(determinant), formal(realArray2(), SYM(a), false, false));
+#line 1283 "runarray.in"
+ addFunc(ve, run::gen_runarray53, realArray(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
+#line 1302 "runarray.in"
+ addFunc(ve, run::gen_runarray54, realArray(), SYM_TIMES, formal(realArray(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
+#line 1331 "runarray.in"
+ addFunc(ve, run::gen_runarray55, IntArray2(), SYM_TIMES, formal(IntArray2(), SYM(a), false, false), formal(IntArray2(), SYM(b), false, false));
+#line 1336 "runarray.in"
+ addFunc(ve, run::gen_runarray56, realArray2(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
+#line 1341 "runarray.in"
+ addFunc(ve, run::gen_runarray57, pairArray2(), SYM_TIMES, formal(pairArray2(), SYM(a), false, false), formal(pairArray2(), SYM(b), false, false));
+#line 1346 "runarray.in"
+ addFunc(ve, run::gen_runarray58, primTriple(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primTriple(), SYM(v), false, false));
+#line 1351 "runarray.in"
+ addFunc(ve, run::gen_runarray59, primPair(), SYM(project), formal(primTriple(), SYM(v), false, false), formal(realArray2(), SYM(t), false, false));
+#line 1376 "runarray.in"
+ addFunc(ve, run::gen_runarray60, primReal(), SYM(dot), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
+#line 1386 "runarray.in"
+ addFunc(ve, run::gen_runarray61, primPair(), SYM(dot), formal(pairArray(), SYM(a), false, false), formal(pairArray(), SYM(b), false, false));
+#line 1396 "runarray.in"
+ addFunc(ve, run::gen_runarray62, realArray(), SYM(tridiagonal), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(realArray(), SYM(c), false, false), formal(realArray(), SYM(f), false, false));
+#line 1500 "runarray.in"
+ addFunc(ve, run::gen_runarray63, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x), false, false), formal(primBoolean(), SYM(verbose), true, false));
+#line 1547 "runarray.in"
+ addFunc(ve, run::gen_runarray64, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
+#line 1629 "runarray.in"
+ addFunc(ve, run::gen_runarray65, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
+#line 1641 "runarray.in"
+ addFunc(ve, run::gen_runarray66, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
+#line 1672 "runarray.in"
+ addFunc(ve, run::gen_runarray67, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
+#line 1707 "runarray.in"
+ addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
+#line 1718 "runarray.in"
+ addFunc(ve, run::gen_runarray69, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
+#line 1733 "runarray.in"
+ addFunc(ve, run::gen_runarray70, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
+#line 1748 "runarray.in"
+ addFunc(ve, run::gen_runarray71, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
+#line 1770 "runarray.in"
+ addFunc(ve, run::gen_runarray72, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
+#line 1780 "runarray.in"
+ addFunc(ve, run::gen_runarray73, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
+#line 1790 "runarray.in"
+ addFunc(ve, run::gen_runarray74, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
+#line 1801 "runarray.in"
+ addFunc(ve, run::gen_runarray75, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
+#line 1812 "runarray.in"
+ addFunc(ve, run::gen_runarray76, realArray(), SYM(_projection));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runarray.h b/Build/source/utils/asymptote/runarray.h
index 1ac5833e747..aeaad2aa63b 100644
--- a/Build/source/utils/asymptote/runarray.h
+++ b/Build/source/utils/asymptote/runarray.h
@@ -7,9 +7,7 @@ void emptyArray(vm::stack *);
void newDeepArray(vm::stack *);
void newInitializedArray(vm::stack *);
void newAppendedArray(vm::stack *);
-void copyArray0(vm::stack *);
-void copyArray1(vm::stack *);
-void copyArray2(vm::stack *);
+void copyArray(vm::stack *);
void arrayRead(vm::stack *);
void arraySliceRead(vm::stack *);
void arraySliceReadToEnd(vm::stack *);
diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in
index 1c113c9bb53..e05810b8f27 100644
--- a/Build/source/utils/asymptote/runarray.in
+++ b/Build/source/utils/asymptote/runarray.in
@@ -420,6 +420,7 @@ Int LUdecompose(double *a, size_t n, size_t* index, bool warn=true)
}
namespace run {
+
void dividebyzero(size_t i)
{
ostringstream buf;
@@ -436,12 +437,6 @@ void integeroverflow(size_t i)
error(buf);
}
-void checkSize(Int n, Int depth)
-{
- if(n < 0) error("cannot create a negative length array");
- if(depth < 0) error("cannot copy to a negative depth");
-}
-
}
// Autogenerated routines:
@@ -507,24 +502,15 @@ array* :newAppendedArray(array* tail, Int n)
}
// Produce an array of n deep copies of value.
-array* :copyArray0(Int n, item value, Int depth=Int_MAX)
-{
- checkSize(n,depth);
- return new array((size_t) n, value, (size_t) 0);
-}
-
-array* :copyArray1(Int n, item value, Int depth=Int_MAX)
+// typeDepth is the true depth of the array determined at compile-time when the
+// operations for the array type are added. This typeDepth argument is
+// automatically pushed on the stack and is not visible to the user.
+array* :copyArray(Int n, item value, Int depth=Int_MAX, Int typeDepth)
{
- checkSize(n,depth);
- if(depth > 1) depth=1;
- return new array((size_t) n, value, (size_t) depth);
-}
-
-array* :copyArray2(Int n, item value, Int depth=Int_MAX)
-{
- checkSize(n,depth);
- if(depth > 2) depth=2;
- return new array((size_t) n, value, (size_t) depth);
+ if(n < 0) error("cannot create a negative length array");
+ if(depth < 0) error("cannot copy to a negative depth");
+ if(depth > typeDepth) depth=typeDepth;
+ return new array((size_t) n, value, depth);
}
// Read an element from an array. Checks for initialization & bounds.
diff --git a/Build/source/utils/asymptote/runfile.cc b/Build/source/utils/asymptote/runfile.cc
index efd0dd51e8b..776a131647c 100644
--- a/Build/source/utils/asymptote/runfile.cc
+++ b/Build/source/utils/asymptote/runfile.cc
@@ -65,6 +65,10 @@ function *realRealFunction();
#include "triple.h"
#include "array.h"
+#ifdef __CYGWIN__
+extern "C" int mkstemp(char *c);
+#endif
+
using namespace camp;
using namespace settings;
using namespace vm;
@@ -80,55 +84,55 @@ string commentchar="#";
#endif
namespace run {
-#line 24 "runfile.in"
+#line 28 "runfile.in"
// bool ==(file *a, file *b);
void gen_runfile0(stack *Stack)
{
file * b=vm::pop<file *>(Stack);
file * a=vm::pop<file *>(Stack);
-#line 25 "runfile.in"
+#line 29 "runfile.in"
{Stack->push<bool>(a == b); return;}
}
-#line 29 "runfile.in"
+#line 33 "runfile.in"
// bool !=(file *a, file *b);
void gen_runfile1(stack *Stack)
{
file * b=vm::pop<file *>(Stack);
file * a=vm::pop<file *>(Stack);
-#line 30 "runfile.in"
+#line 34 "runfile.in"
{Stack->push<bool>(a != b); return;}
}
-#line 34 "runfile.in"
+#line 38 "runfile.in"
void nullFile(stack *Stack)
{
-#line 35 "runfile.in"
+#line 39 "runfile.in"
{Stack->push<file*>(&camp::nullfile); return;}
}
-#line 39 "runfile.in"
+#line 43 "runfile.in"
// file* input(string name, bool check=true, string comment=commentchar);
void gen_runfile3(stack *Stack)
{
string comment=vm::pop<string>(Stack,commentchar);
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 40 "runfile.in"
+#line 44 "runfile.in"
char c=comment.empty() ? (char) 0 : comment[0];
file *f=new ifile(name,c,check);
f->open();
{Stack->push<file*>(f); return;}
}
-#line 47 "runfile.in"
+#line 51 "runfile.in"
// file* output(string name, bool update=false, string comment=commentchar);
void gen_runfile4(stack *Stack)
{
string comment=vm::pop<string>(Stack,commentchar);
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 48 "runfile.in"
+#line 52 "runfile.in"
file *f;
if(update) {
char c=comment.empty() ? (char) 0 : comment[0];
@@ -139,13 +143,13 @@ void gen_runfile4(stack *Stack)
{Stack->push<file*>(f); return;}
}
-#line 59 "runfile.in"
+#line 63 "runfile.in"
// file* xinput(string name, bool check=true);
void gen_runfile5(stack *Stack)
{
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 60 "runfile.in"
+#line 64 "runfile.in"
#ifdef HAVE_RPC_RPC_H
file *f=new ixfile(name,check);
f->open();
@@ -158,13 +162,13 @@ void gen_runfile5(stack *Stack)
#endif
}
-#line 73 "runfile.in"
+#line 77 "runfile.in"
// file* xoutput(string name, bool update=false);
void gen_runfile6(stack *Stack)
{
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 74 "runfile.in"
+#line 78 "runfile.in"
#ifdef HAVE_RPC_RPC_H
file *f;
if(update)
@@ -181,25 +185,25 @@ void gen_runfile6(stack *Stack)
#endif
}
-#line 91 "runfile.in"
+#line 95 "runfile.in"
// file* binput(string name, bool check=true);
void gen_runfile7(stack *Stack)
{
bool check=vm::pop<bool>(Stack,true);
string name=vm::pop<string>(Stack);
-#line 92 "runfile.in"
+#line 96 "runfile.in"
file *f=new ibfile(name,check);
f->open();
{Stack->push<file*>(f); return;}
}
-#line 98 "runfile.in"
+#line 102 "runfile.in"
// file* boutput(string name, bool update=false);
void gen_runfile8(stack *Stack)
{
bool update=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack);
-#line 99 "runfile.in"
+#line 103 "runfile.in"
file *f;
if(update) f=new iobfile(name);
else f=new obfile(name);
@@ -208,77 +212,77 @@ void gen_runfile8(stack *Stack)
{Stack->push<file*>(f); return;}
}
-#line 108 "runfile.in"
+#line 112 "runfile.in"
// bool eof(file *f);
void gen_runfile9(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 109 "runfile.in"
+#line 113 "runfile.in"
{Stack->push<bool>(f->eof()); return;}
}
-#line 113 "runfile.in"
+#line 117 "runfile.in"
// bool eol(file *f);
void gen_runfile10(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 114 "runfile.in"
+#line 118 "runfile.in"
{Stack->push<bool>(f->eol()); return;}
}
-#line 118 "runfile.in"
+#line 122 "runfile.in"
// bool error(file *f);
void gen_runfile11(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 119 "runfile.in"
+#line 123 "runfile.in"
{Stack->push<bool>(f->error()); return;}
}
-#line 123 "runfile.in"
+#line 127 "runfile.in"
// void clear(file *f);
void gen_runfile12(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 124 "runfile.in"
+#line 128 "runfile.in"
f->clear();
}
-#line 128 "runfile.in"
+#line 132 "runfile.in"
// void close(file *f);
void gen_runfile13(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 129 "runfile.in"
+#line 133 "runfile.in"
f->close();
}
-#line 133 "runfile.in"
+#line 137 "runfile.in"
// Int precision(file *f=NULL, Int digits=0);
void gen_runfile14(stack *Stack)
{
Int digits=vm::pop<Int>(Stack,0);
file * f=vm::pop<file *>(Stack,NULL);
-#line 134 "runfile.in"
+#line 138 "runfile.in"
if(f == 0) f=&camp::Stdout;
{Stack->push<Int>(f->precision(digits)); return;}
}
-#line 139 "runfile.in"
+#line 143 "runfile.in"
// void flush(file *f);
void gen_runfile15(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 140 "runfile.in"
+#line 144 "runfile.in"
f->flush();
}
-#line 144 "runfile.in"
+#line 148 "runfile.in"
// string getc(file *f);
void gen_runfile16(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 145 "runfile.in"
+#line 149 "runfile.in"
char c=0;
if(f->isOpen()) f->read(c);
static char str[1];
@@ -286,76 +290,76 @@ void gen_runfile16(stack *Stack)
{Stack->push<string>(string(str)); return;}
}
-#line 153 "runfile.in"
+#line 157 "runfile.in"
// Int tell(file *f);
void gen_runfile17(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 154 "runfile.in"
+#line 158 "runfile.in"
{Stack->push<Int>(f->tell()); return;}
}
-#line 158 "runfile.in"
+#line 162 "runfile.in"
// void seek(file *f, Int pos);
void gen_runfile18(stack *Stack)
{
Int pos=vm::pop<Int>(Stack);
file * f=vm::pop<file *>(Stack);
-#line 159 "runfile.in"
+#line 163 "runfile.in"
f->seek(pos,pos >= 0);
}
-#line 163 "runfile.in"
+#line 167 "runfile.in"
// void seekeof(file *f);
void gen_runfile19(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 164 "runfile.in"
+#line 168 "runfile.in"
f->seek(0,false);
}
-#line 168 "runfile.in"
+#line 172 "runfile.in"
void namePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 169 "runfile.in"
+#line 173 "runfile.in"
{Stack->push<string>(f.filename()); return;}
}
-#line 173 "runfile.in"
+#line 177 "runfile.in"
void modePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 174 "runfile.in"
+#line 178 "runfile.in"
{Stack->push<string>(f.FileMode()); return;}
}
// Set file dimensions
-#line 179 "runfile.in"
+#line 183 "runfile.in"
void dimensionSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
Int nz=vm::pop<Int>(Stack,-1);
Int ny=vm::pop<Int>(Stack,-1);
Int nx=vm::pop<Int>(Stack,-1);
-#line 180 "runfile.in"
+#line 184 "runfile.in"
f->dimension(nx,ny,nz);
{Stack->push<file*>(f); return;}
}
-#line 185 "runfile.in"
+#line 189 "runfile.in"
void dimensionSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 186 "runfile.in"
+#line 190 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(dimensionSetHelper),f)); return;}
}
-#line 190 "runfile.in"
+#line 194 "runfile.in"
void dimensionPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 191 "runfile.in"
+#line 195 "runfile.in"
array *a=new array(3);
(*a)[0]=f.Nx();
(*a)[1]=f.Ny();
@@ -364,174 +368,174 @@ void dimensionPart(stack *Stack)
}
// Set file f to read arrays in line-at-a-time mode
-#line 200 "runfile.in"
+#line 204 "runfile.in"
void lineSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 201 "runfile.in"
+#line 205 "runfile.in"
f->LineMode(b);
{Stack->push<file*>(f); return;}
}
-#line 206 "runfile.in"
+#line 210 "runfile.in"
void lineSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 207 "runfile.in"
+#line 211 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(lineSetHelper),f)); return;}
}
-#line 211 "runfile.in"
+#line 215 "runfile.in"
void linePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 212 "runfile.in"
+#line 216 "runfile.in"
{Stack->push<bool>(f.LineMode()); return;}
}
// Set file to read comma-separated values
-#line 217 "runfile.in"
+#line 221 "runfile.in"
void csvSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 218 "runfile.in"
+#line 222 "runfile.in"
f->CSVMode(b);
{Stack->push<file*>(f); return;}
}
-#line 223 "runfile.in"
+#line 227 "runfile.in"
void csvSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 224 "runfile.in"
+#line 228 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(csvSetHelper),f)); return;}
}
-#line 228 "runfile.in"
+#line 232 "runfile.in"
void csvPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 229 "runfile.in"
+#line 233 "runfile.in"
{Stack->push<bool>(f.CSVMode()); return;}
}
// Set file to read whitespace-separated values
-#line 234 "runfile.in"
+#line 238 "runfile.in"
void wordSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 235 "runfile.in"
+#line 239 "runfile.in"
f->WordMode(b);
{Stack->push<file*>(f); return;}
}
-#line 240 "runfile.in"
+#line 244 "runfile.in"
void wordSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 241 "runfile.in"
+#line 245 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(wordSetHelper),f)); return;}
}
-#line 245 "runfile.in"
+#line 249 "runfile.in"
void wordPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 246 "runfile.in"
+#line 250 "runfile.in"
{Stack->push<bool>(f.WordMode()); return;}
}
// Set file to read/write single precision real XDR values.
-#line 251 "runfile.in"
+#line 255 "runfile.in"
void singlerealSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 252 "runfile.in"
+#line 256 "runfile.in"
f->SingleReal(b);
{Stack->push<file*>(f); return;}
}
-#line 257 "runfile.in"
+#line 261 "runfile.in"
void singlerealSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 258 "runfile.in"
+#line 262 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(singlerealSetHelper),f)); return;}
}
-#line 262 "runfile.in"
+#line 266 "runfile.in"
void singlerealPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 263 "runfile.in"
+#line 267 "runfile.in"
{Stack->push<bool>(f.SingleReal()); return;}
}
// Set file to read/write single precision int XDR values.
-#line 268 "runfile.in"
+#line 272 "runfile.in"
void singleintSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 269 "runfile.in"
+#line 273 "runfile.in"
f->SingleInt(b);
{Stack->push<file*>(f); return;}
}
-#line 274 "runfile.in"
+#line 278 "runfile.in"
void singleintSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 275 "runfile.in"
+#line 279 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(singleintSetHelper),f)); return;}
}
-#line 279 "runfile.in"
+#line 283 "runfile.in"
void singleintPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 280 "runfile.in"
+#line 284 "runfile.in"
{Stack->push<bool>(f.SingleInt()); return;}
}
// Set file to read/write signed int XDR values.
-#line 285 "runfile.in"
+#line 289 "runfile.in"
void signedintSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 286 "runfile.in"
+#line 290 "runfile.in"
f->SignedInt(b);
{Stack->push<file*>(f); return;}
}
-#line 291 "runfile.in"
+#line 295 "runfile.in"
void signedintSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 292 "runfile.in"
+#line 296 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(signedintSetHelper),f)); return;}
}
-#line 296 "runfile.in"
+#line 300 "runfile.in"
void signedintPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 297 "runfile.in"
+#line 301 "runfile.in"
{Stack->push<bool>(f.SignedInt()); return;}
}
// Set file to read an arrayi (i int sizes followed by an i-dimensional array)
-#line 302 "runfile.in"
+#line 306 "runfile.in"
void readSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 303 "runfile.in"
+#line 307 "runfile.in"
switch(i) {
case 1:
f->dimension(-2);
@@ -552,21 +556,21 @@ void readSetHelper(stack *Stack)
{Stack->push<file*>(f); return;}
}
-#line 324 "runfile.in"
+#line 328 "runfile.in"
void readSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 325 "runfile.in"
+#line 329 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(readSetHelper),f)); return;}
}
// Delete file named s.
-#line 330 "runfile.in"
+#line 334 "runfile.in"
// Int delete(string s);
void gen_runfile45(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 331 "runfile.in"
+#line 335 "runfile.in"
s=outpath(s);
Int rc=unlink(s.c_str());
if(rc == 0 && verbose > 0)
@@ -575,13 +579,13 @@ void gen_runfile45(stack *Stack)
}
// Rename file "from" to file "to".
-#line 340 "runfile.in"
+#line 344 "runfile.in"
// Int rename(string from, string to);
void gen_runfile46(stack *Stack)
{
string to=vm::pop<string>(Stack);
string from=vm::pop<string>(Stack);
-#line 341 "runfile.in"
+#line 345 "runfile.in"
from=outpath(from);
to=outpath(to);
Int rc=rename(from.c_str(),to.c_str());
@@ -590,106 +594,125 @@ void gen_runfile46(stack *Stack)
{Stack->push<Int>(rc); return;}
}
+// Create a unique temporary file name.
+#line 355 "runfile.in"
+// string mktemp(string s);
+void gen_runfile47(stack *Stack)
+{
+ string s=vm::pop<string>(Stack);
+#line 356 "runfile.in"
+ char *S=Strdup(s+"XXXXXX");
+ int fd=mkstemp(S);
+ if(fd < 0) {
+ ostringstream buf;
+ buf << "Could not create unique temporary filename based on " << s;
+ error(buf);
+ }
+ {Stack->push<string>(S); return;}
+}
+
} // namespace run
namespace trans {
void gen_runfile_venv(venv &ve)
{
-#line 24 "runfile.in"
+#line 28 "runfile.in"
addFunc(ve, run::gen_runfile0, primBoolean(), SYM_EQ, formal(primFile(), SYM(a), false, false), formal(primFile(), SYM(b), false, false));
-#line 29 "runfile.in"
+#line 33 "runfile.in"
addFunc(ve, run::gen_runfile1, primBoolean(), SYM_NEQ, formal(primFile(), SYM(a), false, false), formal(primFile(), SYM(b), false, false));
-#line 34 "runfile.in"
+#line 38 "runfile.in"
REGISTER_BLTIN(run::nullFile,"nullFile");
-#line 39 "runfile.in"
+#line 43 "runfile.in"
addFunc(ve, run::gen_runfile3, primFile(), SYM(input), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(check), true, false), formal(primString() , SYM(comment), true, false));
-#line 47 "runfile.in"
+#line 51 "runfile.in"
addFunc(ve, run::gen_runfile4, primFile(), SYM(output), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(update), true, false), formal(primString() , SYM(comment), true, false));
-#line 59 "runfile.in"
+#line 63 "runfile.in"
addFunc(ve, run::gen_runfile5, primFile(), SYM(xinput), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(check), true, false));
-#line 73 "runfile.in"
+#line 77 "runfile.in"
addFunc(ve, run::gen_runfile6, primFile(), SYM(xoutput), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(update), true, false));
-#line 91 "runfile.in"
+#line 95 "runfile.in"
addFunc(ve, run::gen_runfile7, primFile(), SYM(binput), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(check), true, false));
-#line 98 "runfile.in"
+#line 102 "runfile.in"
addFunc(ve, run::gen_runfile8, primFile(), SYM(boutput), formal(primString() , SYM(name), false, false), formal(primBoolean(), SYM(update), true, false));
-#line 108 "runfile.in"
+#line 112 "runfile.in"
addFunc(ve, run::gen_runfile9, primBoolean(), SYM(eof), formal(primFile(), SYM(f), false, false));
-#line 113 "runfile.in"
+#line 117 "runfile.in"
addFunc(ve, run::gen_runfile10, primBoolean(), SYM(eol), formal(primFile(), SYM(f), false, false));
-#line 118 "runfile.in"
+#line 122 "runfile.in"
addFunc(ve, run::gen_runfile11, primBoolean(), SYM(error), formal(primFile(), SYM(f), false, false));
-#line 123 "runfile.in"
+#line 127 "runfile.in"
addFunc(ve, run::gen_runfile12, primVoid(), SYM(clear), formal(primFile(), SYM(f), false, false));
-#line 128 "runfile.in"
+#line 132 "runfile.in"
addFunc(ve, run::gen_runfile13, primVoid(), SYM(close), formal(primFile(), SYM(f), false, false));
-#line 133 "runfile.in"
+#line 137 "runfile.in"
addFunc(ve, run::gen_runfile14, primInt(), SYM(precision), formal(primFile(), SYM(f), true, false), formal(primInt(), SYM(digits), true, false));
-#line 139 "runfile.in"
+#line 143 "runfile.in"
addFunc(ve, run::gen_runfile15, primVoid(), SYM(flush), formal(primFile(), SYM(f), false, false));
-#line 144 "runfile.in"
+#line 148 "runfile.in"
addFunc(ve, run::gen_runfile16, primString() , SYM(getc), formal(primFile(), SYM(f), false, false));
-#line 153 "runfile.in"
+#line 157 "runfile.in"
addFunc(ve, run::gen_runfile17, primInt(), SYM(tell), formal(primFile(), SYM(f), false, false));
-#line 158 "runfile.in"
+#line 162 "runfile.in"
addFunc(ve, run::gen_runfile18, primVoid(), SYM(seek), formal(primFile(), SYM(f), false, false), formal(primInt(), SYM(pos), false, false));
-#line 163 "runfile.in"
+#line 167 "runfile.in"
addFunc(ve, run::gen_runfile19, primVoid(), SYM(seekeof), formal(primFile(), SYM(f), false, false));
-#line 168 "runfile.in"
+#line 172 "runfile.in"
REGISTER_BLTIN(run::namePart,"namePart");
-#line 173 "runfile.in"
+#line 177 "runfile.in"
REGISTER_BLTIN(run::modePart,"modePart");
-#line 178 "runfile.in"
+#line 182 "runfile.in"
REGISTER_BLTIN(run::dimensionSetHelper,"dimensionSetHelper");
-#line 185 "runfile.in"
+#line 189 "runfile.in"
REGISTER_BLTIN(run::dimensionSet,"dimensionSet");
-#line 190 "runfile.in"
+#line 194 "runfile.in"
REGISTER_BLTIN(run::dimensionPart,"dimensionPart");
-#line 199 "runfile.in"
+#line 203 "runfile.in"
REGISTER_BLTIN(run::lineSetHelper,"lineSetHelper");
-#line 206 "runfile.in"
+#line 210 "runfile.in"
REGISTER_BLTIN(run::lineSet,"lineSet");
-#line 211 "runfile.in"
+#line 215 "runfile.in"
REGISTER_BLTIN(run::linePart,"linePart");
-#line 216 "runfile.in"
+#line 220 "runfile.in"
REGISTER_BLTIN(run::csvSetHelper,"csvSetHelper");
-#line 223 "runfile.in"
+#line 227 "runfile.in"
REGISTER_BLTIN(run::csvSet,"csvSet");
-#line 228 "runfile.in"
+#line 232 "runfile.in"
REGISTER_BLTIN(run::csvPart,"csvPart");
-#line 233 "runfile.in"
+#line 237 "runfile.in"
REGISTER_BLTIN(run::wordSetHelper,"wordSetHelper");
-#line 240 "runfile.in"
+#line 244 "runfile.in"
REGISTER_BLTIN(run::wordSet,"wordSet");
-#line 245 "runfile.in"
+#line 249 "runfile.in"
REGISTER_BLTIN(run::wordPart,"wordPart");
-#line 250 "runfile.in"
+#line 254 "runfile.in"
REGISTER_BLTIN(run::singlerealSetHelper,"singlerealSetHelper");
-#line 257 "runfile.in"
+#line 261 "runfile.in"
REGISTER_BLTIN(run::singlerealSet,"singlerealSet");
-#line 262 "runfile.in"
+#line 266 "runfile.in"
REGISTER_BLTIN(run::singlerealPart,"singlerealPart");
-#line 267 "runfile.in"
+#line 271 "runfile.in"
REGISTER_BLTIN(run::singleintSetHelper,"singleintSetHelper");
-#line 274 "runfile.in"
+#line 278 "runfile.in"
REGISTER_BLTIN(run::singleintSet,"singleintSet");
-#line 279 "runfile.in"
+#line 283 "runfile.in"
REGISTER_BLTIN(run::singleintPart,"singleintPart");
-#line 284 "runfile.in"
+#line 288 "runfile.in"
REGISTER_BLTIN(run::signedintSetHelper,"signedintSetHelper");
-#line 291 "runfile.in"
+#line 295 "runfile.in"
REGISTER_BLTIN(run::signedintSet,"signedintSet");
-#line 296 "runfile.in"
+#line 300 "runfile.in"
REGISTER_BLTIN(run::signedintPart,"signedintPart");
-#line 301 "runfile.in"
+#line 305 "runfile.in"
REGISTER_BLTIN(run::readSetHelper,"readSetHelper");
-#line 324 "runfile.in"
+#line 328 "runfile.in"
REGISTER_BLTIN(run::readSet,"readSet");
-#line 329 "runfile.in"
+#line 333 "runfile.in"
addFunc(ve, run::gen_runfile45, primInt(), SYM(delete), formal(primString() , SYM(s), false, false));
-#line 339 "runfile.in"
+#line 343 "runfile.in"
addFunc(ve, run::gen_runfile46, primInt(), SYM(rename), formal(primString() , SYM(from), false, false), formal(primString() , SYM(to), false, false));
+#line 354 "runfile.in"
+ addFunc(ve, run::gen_runfile47, primString() , SYM(mktemp), formal(primString() , SYM(s), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runfile.in b/Build/source/utils/asymptote/runfile.in
index 872eb6fae4f..bde9407ff64 100644
--- a/Build/source/utils/asymptote/runfile.in
+++ b/Build/source/utils/asymptote/runfile.in
@@ -12,6 +12,10 @@ file* => primFile()
#include "triple.h"
#include "array.h"
+#ifdef __CYGWIN__
+extern "C" int mkstemp(char *c);
+#endif
+
using namespace camp;
using namespace settings;
using namespace vm;
@@ -346,3 +350,16 @@ Int rename(string from, string to)
cout << "Renamed " << from << " to " << to << endl;
return rc;
}
+
+// Create a unique temporary file name.
+string mktemp(string s)
+{
+ char *S=Strdup(s+"XXXXXX");
+ int fd=mkstemp(S);
+ if(fd < 0) {
+ ostringstream buf;
+ buf << "Could not create unique temporary filename based on " << s;
+ error(buf);
+ }
+ return S;
+}
diff --git a/Build/source/utils/asymptote/runlabel.cc b/Build/source/utils/asymptote/runlabel.cc
index fce34183946..be5d7b45856 100644
--- a/Build/source/utils/asymptote/runlabel.cc
+++ b/Build/source/utils/asymptote/runlabel.cc
@@ -338,7 +338,7 @@ void gen_runlabel3(stack *Stack)
"} bind def");
tex.verbatimline("/V {"+ASY1+"Ry neg Rx 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def}");
}
- tex.verbatimline(read<string>(s,i)+"%");
+ tex.verbatimline(read<string>(s,i)+"\\ %");
}
tex.epilogue(true);
diff --git a/Build/source/utils/asymptote/runlabel.in b/Build/source/utils/asymptote/runlabel.in
index 0202383e852..9f573eec787 100644
--- a/Build/source/utils/asymptote/runlabel.in
+++ b/Build/source/utils/asymptote/runlabel.in
@@ -265,7 +265,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
"} bind def");
tex.verbatimline("/V {"+ASY1+"Ry neg Rx 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def}");
}
- tex.verbatimline(read<string>(s,i)+"%");
+ tex.verbatimline(read<string>(s,i)+"\\ %");
}
tex.epilogue(true);
diff --git a/Build/source/utils/asymptote/runpath.cc b/Build/source/utils/asymptote/runpath.cc
index 7c69fde4fb8..87b10b02d8a 100644
--- a/Build/source/utils/asymptote/runpath.cc
+++ b/Build/source/utils/asymptote/runpath.cc
@@ -59,7 +59,7 @@ function *realRealFunction();
#define CURRENTPEN processData().currentpen
-#line 16 "runpath.in"
+#line 17 "runpath.in"
#include "path.h"
#include "arrayop.h"
#include "predicates.h"
@@ -93,94 +93,94 @@ Int windingnumber(array *p, camp::pair z)
#endif
namespace run {
-#line 43 "runpath.in"
+#line 44 "runpath.in"
void nullPath(stack *Stack)
{
-#line 44 "runpath.in"
+#line 45 "runpath.in"
{Stack->push<path>(nullpath); return;}
}
-#line 48 "runpath.in"
+#line 49 "runpath.in"
// bool ==(path a, path b);
void gen_runpath1(stack *Stack)
{
path b=vm::pop<path>(Stack);
path a=vm::pop<path>(Stack);
-#line 49 "runpath.in"
+#line 50 "runpath.in"
{Stack->push<bool>(a == b); return;}
}
-#line 53 "runpath.in"
+#line 54 "runpath.in"
// bool !=(path a, path b);
void gen_runpath2(stack *Stack)
{
path b=vm::pop<path>(Stack);
path a=vm::pop<path>(Stack);
-#line 54 "runpath.in"
+#line 55 "runpath.in"
{Stack->push<bool>(!(a == b)); return;}
}
-#line 58 "runpath.in"
+#line 59 "runpath.in"
// pair point(path p, Int t);
void gen_runpath3(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 59 "runpath.in"
+#line 60 "runpath.in"
{Stack->push<pair>(p.point((Int) t)); return;}
}
-#line 63 "runpath.in"
+#line 64 "runpath.in"
// pair point(path p, real t);
void gen_runpath4(stack *Stack)
{
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 64 "runpath.in"
+#line 65 "runpath.in"
{Stack->push<pair>(p.point(t)); return;}
}
-#line 68 "runpath.in"
+#line 69 "runpath.in"
// pair precontrol(path p, Int t);
void gen_runpath5(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 69 "runpath.in"
+#line 70 "runpath.in"
{Stack->push<pair>(p.precontrol((Int) t)); return;}
}
-#line 73 "runpath.in"
+#line 74 "runpath.in"
// pair precontrol(path p, real t);
void gen_runpath6(stack *Stack)
{
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 74 "runpath.in"
+#line 75 "runpath.in"
{Stack->push<pair>(p.precontrol(t)); return;}
}
-#line 78 "runpath.in"
+#line 79 "runpath.in"
// pair postcontrol(path p, Int t);
void gen_runpath7(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 79 "runpath.in"
+#line 80 "runpath.in"
{Stack->push<pair>(p.postcontrol((Int) t)); return;}
}
-#line 83 "runpath.in"
+#line 84 "runpath.in"
// pair postcontrol(path p, real t);
void gen_runpath8(stack *Stack)
{
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 84 "runpath.in"
+#line 85 "runpath.in"
{Stack->push<pair>(p.postcontrol(t)); return;}
}
-#line 88 "runpath.in"
+#line 89 "runpath.in"
// pair dir(path p, Int t, Int sign=0, bool normalize=true);
void gen_runpath9(stack *Stack)
{
@@ -188,49 +188,49 @@ void gen_runpath9(stack *Stack)
Int sign=vm::pop<Int>(Stack,0);
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 89 "runpath.in"
+#line 90 "runpath.in"
{Stack->push<pair>(p.dir(t,sign,normalize)); return;}
}
-#line 93 "runpath.in"
+#line 94 "runpath.in"
// pair dir(path p, real t, bool normalize=true);
void gen_runpath10(stack *Stack)
{
bool normalize=vm::pop<bool>(Stack,true);
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 94 "runpath.in"
+#line 95 "runpath.in"
{Stack->push<pair>(p.dir(t,normalize)); return;}
}
-#line 98 "runpath.in"
+#line 99 "runpath.in"
// pair accel(path p, Int t, Int sign=0);
void gen_runpath11(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,0);
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 99 "runpath.in"
+#line 100 "runpath.in"
{Stack->push<pair>(p.accel(t,sign)); return;}
}
-#line 103 "runpath.in"
+#line 104 "runpath.in"
// pair accel(path p, real t);
void gen_runpath12(stack *Stack)
{
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 104 "runpath.in"
+#line 105 "runpath.in"
{Stack->push<pair>(p.accel(t)); return;}
}
-#line 108 "runpath.in"
+#line 109 "runpath.in"
// real radius(path p, real t);
void gen_runpath13(stack *Stack)
{
real t=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 109 "runpath.in"
+#line 110 "runpath.in"
pair v=p.dir(t,false);
pair a=p.accel(t);
real d=dot(a,v);
@@ -241,38 +241,38 @@ void gen_runpath13(stack *Stack)
{Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;}
}
-#line 120 "runpath.in"
+#line 121 "runpath.in"
// path reverse(path p);
void gen_runpath14(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 121 "runpath.in"
+#line 122 "runpath.in"
{Stack->push<path>(p.reverse()); return;}
}
-#line 125 "runpath.in"
+#line 126 "runpath.in"
// path subpath(path p, Int a, Int b);
void gen_runpath15(stack *Stack)
{
Int b=vm::pop<Int>(Stack);
Int a=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 126 "runpath.in"
+#line 127 "runpath.in"
{Stack->push<path>(p.subpath((Int) a, (Int) b)); return;}
}
-#line 130 "runpath.in"
+#line 131 "runpath.in"
// path subpath(path p, real a, real b);
void gen_runpath16(stack *Stack)
{
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 131 "runpath.in"
+#line 132 "runpath.in"
{Stack->push<path>(p.subpath(a,b)); return;}
}
-#line 135 "runpath.in"
+#line 136 "runpath.in"
// path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, Int m);
void gen_runpath17(stack *Stack)
{
@@ -285,93 +285,93 @@ void gen_runpath17(stack *Stack)
pair z2=vm::pop<pair>(Stack);
pair z1=vm::pop<pair>(Stack);
pair z0=vm::pop<pair>(Stack);
-#line 137 "runpath.in"
+#line 138 "runpath.in"
{Stack->push<path>(nurb(z0,z1,z2,z3,w0,w1,w2,w3,m)); return;}
}
-#line 141 "runpath.in"
+#line 142 "runpath.in"
// Int length(path p);
void gen_runpath18(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 142 "runpath.in"
+#line 143 "runpath.in"
{Stack->push<Int>(p.length()); return;}
}
-#line 146 "runpath.in"
+#line 147 "runpath.in"
// bool cyclic(path p);
void gen_runpath19(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 147 "runpath.in"
+#line 148 "runpath.in"
{Stack->push<bool>(p.cyclic()); return;}
}
-#line 151 "runpath.in"
+#line 152 "runpath.in"
// bool straight(path p, Int t);
void gen_runpath20(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path p=vm::pop<path>(Stack);
-#line 152 "runpath.in"
+#line 153 "runpath.in"
{Stack->push<bool>(p.straight(t)); return;}
}
-#line 156 "runpath.in"
+#line 157 "runpath.in"
// path unstraighten(path p);
void gen_runpath21(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 157 "runpath.in"
+#line 158 "runpath.in"
{Stack->push<path>(p.unstraighten()); return;}
}
-#line 161 "runpath.in"
+#line 162 "runpath.in"
// bool piecewisestraight(path p);
void gen_runpath22(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 162 "runpath.in"
+#line 163 "runpath.in"
{Stack->push<bool>(p.piecewisestraight()); return;}
}
-#line 166 "runpath.in"
+#line 167 "runpath.in"
// real arclength(path p);
void gen_runpath23(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 167 "runpath.in"
+#line 168 "runpath.in"
{Stack->push<real>(p.arclength()); return;}
}
-#line 171 "runpath.in"
+#line 172 "runpath.in"
// real arctime(path p, real dval);
void gen_runpath24(stack *Stack)
{
real dval=vm::pop<real>(Stack);
path p=vm::pop<path>(Stack);
-#line 172 "runpath.in"
+#line 173 "runpath.in"
{Stack->push<real>(p.arctime(dval)); return;}
}
-#line 176 "runpath.in"
+#line 177 "runpath.in"
// real dirtime(path p, pair z);
void gen_runpath25(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
path p=vm::pop<path>(Stack);
-#line 177 "runpath.in"
+#line 178 "runpath.in"
{Stack->push<real>(p.directiontime(z)); return;}
}
-#line 181 "runpath.in"
+#line 182 "runpath.in"
// realarray* intersect(path p, path q, real fuzz=-1);
void gen_runpath26(stack *Stack)
{
real fuzz=vm::pop<real>(Stack,-1);
path q=vm::pop<path>(Stack);
path p=vm::pop<path>(Stack);
-#line 182 "runpath.in"
+#line 183 "runpath.in"
bool exact=fuzz <= 0.0;
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
@@ -387,14 +387,14 @@ void gen_runpath26(stack *Stack)
{Stack->push<realarray*>(new array(0)); return;}
}
-#line 198 "runpath.in"
+#line 199 "runpath.in"
// realarray2* intersections(path p, path q, real fuzz=-1);
void gen_runpath27(stack *Stack)
{
real fuzz=vm::pop<real>(Stack,-1);
path q=vm::pop<path>(Stack);
path p=vm::pop<path>(Stack);
-#line 199 "runpath.in"
+#line 200 "runpath.in"
bool exact=fuzz <= 0.0;
if(fuzz < 0.0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
@@ -424,7 +424,7 @@ void gen_runpath27(stack *Stack)
{Stack->push<realarray2*>(V); return;}
}
-#line 229 "runpath.in"
+#line 230 "runpath.in"
// realarray* intersections(path p, explicit pair a, explicit pair b, real fuzz=-1);
void gen_runpath28(stack *Stack)
{
@@ -432,7 +432,7 @@ void gen_runpath28(stack *Stack)
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
path p=vm::pop<path>(Stack);
-#line 230 "runpath.in"
+#line 231 "runpath.in"
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
::max(length(a),length(b)));
@@ -448,7 +448,7 @@ void gen_runpath28(stack *Stack)
// Return the intersection point of the extensions of the line segments
// PQ and pq.
-#line 246 "runpath.in"
+#line 247 "runpath.in"
// pair extension(pair P, pair Q, pair p, pair q);
void gen_runpath29(stack *Stack)
{
@@ -456,7 +456,7 @@ void gen_runpath29(stack *Stack)
pair p=vm::pop<pair>(Stack);
pair Q=vm::pop<pair>(Stack);
pair P=vm::pop<pair>(Stack);
-#line 247 "runpath.in"
+#line 248 "runpath.in"
pair ac=P-Q;
pair bd=q-p;
real det=ac.getx()*bd.gety()-ac.gety()*bd.getx();
@@ -464,49 +464,179 @@ void gen_runpath29(stack *Stack)
{Stack->push<pair>(P+((p.getx()-P.getx())*bd.gety()-(p.gety()-P.gety())*bd.getx())*ac/det); return;}
}
-#line 255 "runpath.in"
+#line 256 "runpath.in"
// Int size(path p);
void gen_runpath30(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 256 "runpath.in"
+#line 257 "runpath.in"
{Stack->push<Int>(p.size()); return;}
}
-#line 260 "runpath.in"
+#line 261 "runpath.in"
// path &(path p, path q);
void gen_runpath31(stack *Stack)
{
path q=vm::pop<path>(Stack);
path p=vm::pop<path>(Stack);
-#line 261 "runpath.in"
+#line 262 "runpath.in"
{Stack->push<path>(camp::concat(p,q)); return;}
}
-#line 265 "runpath.in"
+#line 266 "runpath.in"
// pair min(path p);
void gen_runpath32(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 266 "runpath.in"
+#line 267 "runpath.in"
{Stack->push<pair>(p.min()); return;}
}
-#line 270 "runpath.in"
+#line 271 "runpath.in"
// pair max(path p);
void gen_runpath33(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 271 "runpath.in"
+#line 272 "runpath.in"
{Stack->push<pair>(p.max()); return;}
}
-#line 275 "runpath.in"
-// realarray* mintimes(path p);
+#line 276 "runpath.in"
+// pair min(patharray *a);
void gen_runpath34(stack *Stack)
{
+ patharray * a=vm::pop<patharray *>(Stack);
+#line 277 "runpath.in"
+ if (!a) {
+ error("min called on null path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+ if (a->empty()) {
+ error("min called on empty path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+
+ path *g = a->read<path *>(0);
+ pair z = g->min();
+ double minx = z.getx(), miny = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path *g = a->read<path *>(i);
+ pair z = g->min();
+ double x = z.getx(), y = z.gety();
+ if (x < minx)
+ minx = x;
+ if (y < miny)
+ miny = y;
+ }
+
+ {Stack->push<pair>(pair(minx, miny)); return;}
+}
+
+#line 304 "runpath.in"
+// pair max(patharray *a);
+void gen_runpath35(stack *Stack)
+{
+ patharray * a=vm::pop<patharray *>(Stack);
+#line 305 "runpath.in"
+ if (!a) {
+ error("max called on null path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+ if (a->empty()) {
+ error("max called on empty path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+
+ path *g = a->read<path *>(0);
+ pair z = g->max();
+ double maxx = z.getx(), maxy = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path *g = a->read<path *>(i);
+ pair z = g->max();
+ double x = z.getx(), y = z.gety();
+ if (x > maxx)
+ maxx = x;
+ if (y > maxy)
+ maxy = y;
+ }
+
+ {Stack->push<pair>(pair(maxx, maxy)); return;}
+}
+
+#line 332 "runpath.in"
+// pair minAfterTransform(transform t, patharray *a);
+void gen_runpath36(stack *Stack)
+{
+ patharray * a=vm::pop<patharray *>(Stack);
+ transform t=vm::pop<transform>(Stack);
+#line 333 "runpath.in"
+ if (!a) {
+ error("minAfterTransform called on null path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+ if (a->empty()) {
+ error("minAfterTransform called on empty path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+
+ path g = a->read<path *>(0)->transformed(t);
+ pair z = g.min();
+ double minx = z.getx(), miny = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path g = a->read<path *>(i)->transformed(t);
+ pair z = g.min();
+ double x = z.getx(), y = z.gety();
+ if (x < minx)
+ minx = x;
+ if (y < miny)
+ miny = y;
+ }
+
+ {Stack->push<pair>(pair(minx, miny)); return;}
+}
+
+#line 360 "runpath.in"
+// pair maxAfterTransform(transform t, patharray *a);
+void gen_runpath37(stack *Stack)
+{
+ patharray * a=vm::pop<patharray *>(Stack);
+ transform t=vm::pop<transform>(Stack);
+#line 361 "runpath.in"
+ if (!a) {
+ error("maxAfterTransform called on null path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+ if (a->empty()) {
+ error("maxAfterTransform called on empty path array");
+ {Stack->push<pair>(pair(0,0)); return;}
+ }
+
+ path g = a->read<path *>(0)->transformed(t);
+ pair z = g.max();
+ double maxx = z.getx(), maxy = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path g = a->read<path *>(i)->transformed(t);
+ pair z = g.max();
+ double x = z.getx(), y = z.gety();
+ if (x > maxx)
+ maxx = x;
+ if (y > maxy)
+ maxy = y;
+ }
+
+ {Stack->push<pair>(pair(maxx, maxy)); return;}
+}
+
+#line 388 "runpath.in"
+// realarray* mintimes(path p);
+void gen_runpath38(stack *Stack)
+{
path p=vm::pop<path>(Stack);
-#line 276 "runpath.in"
+#line 389 "runpath.in"
array *V=new array(2);
pair z=p.mintimes();
(*V)[0]=z.getx();
@@ -514,12 +644,12 @@ void gen_runpath34(stack *Stack)
{Stack->push<realarray*>(V); return;}
}
-#line 284 "runpath.in"
+#line 397 "runpath.in"
// realarray* maxtimes(path p);
-void gen_runpath35(stack *Stack)
+void gen_runpath39(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 285 "runpath.in"
+#line 398 "runpath.in"
array *V=new array(2);
pair z=p.maxtimes();
(*V)[0]=z.getx();
@@ -527,74 +657,74 @@ void gen_runpath35(stack *Stack)
{Stack->push<realarray*>(V); return;}
}
-#line 293 "runpath.in"
+#line 406 "runpath.in"
// real relativedistance(real theta, real phi, real t, bool atleast);
-void gen_runpath36(stack *Stack)
+void gen_runpath40(stack *Stack)
{
bool atleast=vm::pop<bool>(Stack);
real t=vm::pop<real>(Stack);
real phi=vm::pop<real>(Stack);
real theta=vm::pop<real>(Stack);
-#line 294 "runpath.in"
+#line 407 "runpath.in"
{Stack->push<real>(camp::velocity(theta,phi,tension(t,atleast))); return;}
}
-#line 298 "runpath.in"
+#line 411 "runpath.in"
// Int windingnumber(patharray *p, pair z);
-void gen_runpath37(stack *Stack)
+void gen_runpath41(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
patharray * p=vm::pop<patharray *>(Stack);
-#line 299 "runpath.in"
+#line 412 "runpath.in"
{Stack->push<Int>(windingnumber(p,z)); return;}
}
-#line 303 "runpath.in"
+#line 416 "runpath.in"
// bool inside(explicit patharray *g, pair z, pen fillrule=CURRENTPEN);
-void gen_runpath38(stack *Stack)
+void gen_runpath42(stack *Stack)
{
pen fillrule=vm::pop<pen>(Stack,CURRENTPEN);
pair z=vm::pop<pair>(Stack);
patharray * g=vm::pop<patharray *>(Stack);
-#line 304 "runpath.in"
+#line 417 "runpath.in"
{Stack->push<bool>(fillrule.inside(windingnumber(g,z))); return;}
}
-#line 308 "runpath.in"
+#line 421 "runpath.in"
// bool inside(path g, pair z, pen fillrule=CURRENTPEN);
-void gen_runpath39(stack *Stack)
+void gen_runpath43(stack *Stack)
{
pen fillrule=vm::pop<pen>(Stack,CURRENTPEN);
pair z=vm::pop<pair>(Stack);
path g=vm::pop<path>(Stack);
-#line 309 "runpath.in"
+#line 422 "runpath.in"
{Stack->push<bool>(fillrule.inside(g.windingnumber(z))); return;}
}
// Determine the side of a--b that c lies on
// (negative=left, zero=on line, positive=right).
-#line 315 "runpath.in"
+#line 428 "runpath.in"
// real side(pair a, pair b, pair c);
-void gen_runpath40(stack *Stack)
+void gen_runpath44(stack *Stack)
{
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 316 "runpath.in"
+#line 429 "runpath.in"
{Stack->push<real>(orient2d(a,b,c)); return;}
}
// Determine the side of the counterclockwise circle through a,b,c that d
// lies on (negative=inside, 0=on circle, positive=right).
-#line 322 "runpath.in"
+#line 435 "runpath.in"
// real incircle(pair a, pair b, pair c, pair d);
-void gen_runpath41(stack *Stack)
+void gen_runpath45(stack *Stack)
{
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 323 "runpath.in"
+#line 436 "runpath.in"
{Stack->push<real>(incircle(a.getx(),a.gety(),b.getx(),b.gety(),c.getx(),c.gety(),
d.getx(),d.gety())); return;}
}
@@ -605,90 +735,98 @@ namespace trans {
void gen_runpath_venv(venv &ve)
{
-#line 43 "runpath.in"
+#line 44 "runpath.in"
REGISTER_BLTIN(run::nullPath,"nullPath");
-#line 48 "runpath.in"
+#line 49 "runpath.in"
addFunc(ve, run::gen_runpath1, primBoolean(), SYM_EQ, formal(primPath(), SYM(a), false, false), formal(primPath(), SYM(b), false, false));
-#line 53 "runpath.in"
+#line 54 "runpath.in"
addFunc(ve, run::gen_runpath2, primBoolean(), SYM_NEQ, formal(primPath(), SYM(a), false, false), formal(primPath(), SYM(b), false, false));
-#line 58 "runpath.in"
+#line 59 "runpath.in"
addFunc(ve, run::gen_runpath3, primPair(), SYM(point), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 63 "runpath.in"
+#line 64 "runpath.in"
addFunc(ve, run::gen_runpath4, primPair(), SYM(point), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 68 "runpath.in"
+#line 69 "runpath.in"
addFunc(ve, run::gen_runpath5, primPair(), SYM(precontrol), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 73 "runpath.in"
+#line 74 "runpath.in"
addFunc(ve, run::gen_runpath6, primPair(), SYM(precontrol), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 78 "runpath.in"
+#line 79 "runpath.in"
addFunc(ve, run::gen_runpath7, primPair(), SYM(postcontrol), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 83 "runpath.in"
+#line 84 "runpath.in"
addFunc(ve, run::gen_runpath8, primPair(), SYM(postcontrol), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 88 "runpath.in"
+#line 89 "runpath.in"
addFunc(ve, run::gen_runpath9, primPair(), SYM(dir), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false), formal(primInt(), SYM(sign), true, false), formal(primBoolean(), SYM(normalize), true, false));
-#line 93 "runpath.in"
+#line 94 "runpath.in"
addFunc(ve, run::gen_runpath10, primPair(), SYM(dir), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false), formal(primBoolean(), SYM(normalize), true, false));
-#line 98 "runpath.in"
+#line 99 "runpath.in"
addFunc(ve, run::gen_runpath11, primPair(), SYM(accel), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false), formal(primInt(), SYM(sign), true, false));
-#line 103 "runpath.in"
+#line 104 "runpath.in"
addFunc(ve, run::gen_runpath12, primPair(), SYM(accel), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 108 "runpath.in"
+#line 109 "runpath.in"
addFunc(ve, run::gen_runpath13, primReal(), SYM(radius), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 120 "runpath.in"
+#line 121 "runpath.in"
addFunc(ve, run::gen_runpath14, primPath(), SYM(reverse), formal(primPath(), SYM(p), false, false));
-#line 125 "runpath.in"
+#line 126 "runpath.in"
addFunc(ve, run::gen_runpath15, primPath(), SYM(subpath), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(a), false, false), formal(primInt(), SYM(b), false, false));
-#line 130 "runpath.in"
+#line 131 "runpath.in"
addFunc(ve, run::gen_runpath16, primPath(), SYM(subpath), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false));
-#line 135 "runpath.in"
+#line 136 "runpath.in"
addFunc(ve, run::gen_runpath17, primPath(), SYM(nurb), formal(primPair(), SYM(z0), false, false), formal(primPair(), SYM(z1), false, false), formal(primPair(), SYM(z2), false, false), formal(primPair(), SYM(z3), false, false), formal(primReal(), SYM(w0), false, false), formal(primReal(), SYM(w1), false, false), formal(primReal(), SYM(w2), false, false), formal(primReal(), SYM(w3), false, false), formal(primInt(), SYM(m), false, false));
-#line 141 "runpath.in"
+#line 142 "runpath.in"
addFunc(ve, run::gen_runpath18, primInt(), SYM(length), formal(primPath(), SYM(p), false, false));
-#line 146 "runpath.in"
+#line 147 "runpath.in"
addFunc(ve, run::gen_runpath19, primBoolean(), SYM(cyclic), formal(primPath(), SYM(p), false, false));
-#line 151 "runpath.in"
+#line 152 "runpath.in"
addFunc(ve, run::gen_runpath20, primBoolean(), SYM(straight), formal(primPath(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 156 "runpath.in"
+#line 157 "runpath.in"
addFunc(ve, run::gen_runpath21, primPath(), SYM(unstraighten), formal(primPath(), SYM(p), false, false));
-#line 161 "runpath.in"
+#line 162 "runpath.in"
addFunc(ve, run::gen_runpath22, primBoolean(), SYM(piecewisestraight), formal(primPath(), SYM(p), false, false));
-#line 166 "runpath.in"
+#line 167 "runpath.in"
addFunc(ve, run::gen_runpath23, primReal(), SYM(arclength), formal(primPath(), SYM(p), false, false));
-#line 171 "runpath.in"
+#line 172 "runpath.in"
addFunc(ve, run::gen_runpath24, primReal(), SYM(arctime), formal(primPath(), SYM(p), false, false), formal(primReal(), SYM(dval), false, false));
-#line 176 "runpath.in"
+#line 177 "runpath.in"
addFunc(ve, run::gen_runpath25, primReal(), SYM(dirtime), formal(primPath(), SYM(p), false, false), formal(primPair(), SYM(z), false, false));
-#line 181 "runpath.in"
+#line 182 "runpath.in"
addFunc(ve, run::gen_runpath26, realArray(), SYM(intersect), formal(primPath(), SYM(p), false, false), formal(primPath(), SYM(q), false, false), formal(primReal(), SYM(fuzz), true, false));
-#line 198 "runpath.in"
+#line 199 "runpath.in"
addFunc(ve, run::gen_runpath27, realArray2(), SYM(intersections), formal(primPath(), SYM(p), false, false), formal(primPath(), SYM(q), false, false), formal(primReal(), SYM(fuzz), true, false));
-#line 229 "runpath.in"
+#line 230 "runpath.in"
addFunc(ve, run::gen_runpath28, realArray(), SYM(intersections), formal(primPath(), SYM(p), false, false), formal(primPair(), SYM(a), false, true), formal(primPair(), SYM(b), false, true), formal(primReal(), SYM(fuzz), true, false));
-#line 244 "runpath.in"
+#line 245 "runpath.in"
addFunc(ve, run::gen_runpath29, primPair(), SYM(extension), formal(primPair(), SYM(p), false, false), formal(primPair(), SYM(q), false, false), formal(primPair(), SYM(p), false, false), formal(primPair(), SYM(q), false, false));
-#line 255 "runpath.in"
+#line 256 "runpath.in"
addFunc(ve, run::gen_runpath30, primInt(), SYM(size), formal(primPath(), SYM(p), false, false));
-#line 260 "runpath.in"
+#line 261 "runpath.in"
addFunc(ve, run::gen_runpath31, primPath(), SYM_AMPERSAND, formal(primPath(), SYM(p), false, false), formal(primPath(), SYM(q), false, false));
-#line 265 "runpath.in"
+#line 266 "runpath.in"
addFunc(ve, run::gen_runpath32, primPair(), SYM(min), formal(primPath(), SYM(p), false, false));
-#line 270 "runpath.in"
+#line 271 "runpath.in"
addFunc(ve, run::gen_runpath33, primPair(), SYM(max), formal(primPath(), SYM(p), false, false));
-#line 275 "runpath.in"
- addFunc(ve, run::gen_runpath34, realArray(), SYM(mintimes), formal(primPath(), SYM(p), false, false));
-#line 284 "runpath.in"
- addFunc(ve, run::gen_runpath35, realArray(), SYM(maxtimes), formal(primPath(), SYM(p), false, false));
-#line 293 "runpath.in"
- addFunc(ve, run::gen_runpath36, primReal(), SYM(relativedistance), formal(primReal(), SYM(theta), false, false), formal(primReal(), SYM(phi), false, false), formal(primReal(), SYM(t), false, false), formal(primBoolean(), SYM(atleast), false, false));
-#line 298 "runpath.in"
- addFunc(ve, run::gen_runpath37, primInt(), SYM(windingnumber), formal(pathArray() , SYM(p), false, false), formal(primPair(), SYM(z), false, false));
-#line 303 "runpath.in"
- addFunc(ve, run::gen_runpath38, primBoolean(), SYM(inside), formal(pathArray() , SYM(g), false, true), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
-#line 308 "runpath.in"
- addFunc(ve, run::gen_runpath39, primBoolean(), SYM(inside), formal(primPath(), SYM(g), false, false), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
-#line 313 "runpath.in"
- addFunc(ve, run::gen_runpath40, primReal(), SYM(side), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false));
-#line 320 "runpath.in"
- addFunc(ve, run::gen_runpath41, primReal(), SYM(incircle), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
+#line 276 "runpath.in"
+ addFunc(ve, run::gen_runpath34, primPair(), SYM(min), formal(pathArray() , SYM(a), false, false));
+#line 304 "runpath.in"
+ addFunc(ve, run::gen_runpath35, primPair(), SYM(max), formal(pathArray() , SYM(a), false, false));
+#line 332 "runpath.in"
+ addFunc(ve, run::gen_runpath36, primPair(), SYM(minAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray() , SYM(a), false, false));
+#line 360 "runpath.in"
+ addFunc(ve, run::gen_runpath37, primPair(), SYM(maxAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray() , SYM(a), false, false));
+#line 388 "runpath.in"
+ addFunc(ve, run::gen_runpath38, realArray(), SYM(mintimes), formal(primPath(), SYM(p), false, false));
+#line 397 "runpath.in"
+ addFunc(ve, run::gen_runpath39, realArray(), SYM(maxtimes), formal(primPath(), SYM(p), false, false));
+#line 406 "runpath.in"
+ addFunc(ve, run::gen_runpath40, primReal(), SYM(relativedistance), formal(primReal(), SYM(theta), false, false), formal(primReal(), SYM(phi), false, false), formal(primReal(), SYM(t), false, false), formal(primBoolean(), SYM(atleast), false, false));
+#line 411 "runpath.in"
+ addFunc(ve, run::gen_runpath41, primInt(), SYM(windingnumber), formal(pathArray() , SYM(p), false, false), formal(primPair(), SYM(z), false, false));
+#line 416 "runpath.in"
+ addFunc(ve, run::gen_runpath42, primBoolean(), SYM(inside), formal(pathArray() , SYM(g), false, true), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
+#line 421 "runpath.in"
+ addFunc(ve, run::gen_runpath43, primBoolean(), SYM(inside), formal(primPath(), SYM(g), false, false), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
+#line 426 "runpath.in"
+ addFunc(ve, run::gen_runpath44, primReal(), SYM(side), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false));
+#line 433 "runpath.in"
+ addFunc(ve, run::gen_runpath45, primReal(), SYM(incircle), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runpath.in b/Build/source/utils/asymptote/runpath.in
index a9445d4104c..042dcdca97d 100644
--- a/Build/source/utils/asymptote/runpath.in
+++ b/Build/source/utils/asymptote/runpath.in
@@ -8,6 +8,7 @@
pen => primPen()
pair => primPair()
path => primPath()
+transform => primTransform()
realarray* => realArray()
realarray2* => realArray2()
patharray* => pathArray()
@@ -272,6 +273,118 @@ pair max(path p)
return p.max();
}
+pair min(patharray *a)
+{
+ if (!a) {
+ error("min called on null path array");
+ return pair(0,0);
+ }
+ if (a->empty()) {
+ error("min called on empty path array");
+ return pair(0,0);
+ }
+
+ path *g = a->read<path *>(0);
+ pair z = g->min();
+ double minx = z.getx(), miny = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path *g = a->read<path *>(i);
+ pair z = g->min();
+ double x = z.getx(), y = z.gety();
+ if (x < minx)
+ minx = x;
+ if (y < miny)
+ miny = y;
+ }
+
+ return pair(minx, miny);
+}
+
+pair max(patharray *a)
+{
+ if (!a) {
+ error("max called on null path array");
+ return pair(0,0);
+ }
+ if (a->empty()) {
+ error("max called on empty path array");
+ return pair(0,0);
+ }
+
+ path *g = a->read<path *>(0);
+ pair z = g->max();
+ double maxx = z.getx(), maxy = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path *g = a->read<path *>(i);
+ pair z = g->max();
+ double x = z.getx(), y = z.gety();
+ if (x > maxx)
+ maxx = x;
+ if (y > maxy)
+ maxy = y;
+ }
+
+ return pair(maxx, maxy);
+}
+
+pair minAfterTransform(transform t, patharray *a)
+{
+ if (!a) {
+ error("minAfterTransform called on null path array");
+ return pair(0,0);
+ }
+ if (a->empty()) {
+ error("minAfterTransform called on empty path array");
+ return pair(0,0);
+ }
+
+ path g = a->read<path *>(0)->transformed(t);
+ pair z = g.min();
+ double minx = z.getx(), miny = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path g = a->read<path *>(i)->transformed(t);
+ pair z = g.min();
+ double x = z.getx(), y = z.gety();
+ if (x < minx)
+ minx = x;
+ if (y < miny)
+ miny = y;
+ }
+
+ return pair(minx, miny);
+}
+
+pair maxAfterTransform(transform t, patharray *a)
+{
+ if (!a) {
+ error("maxAfterTransform called on null path array");
+ return pair(0,0);
+ }
+ if (a->empty()) {
+ error("maxAfterTransform called on empty path array");
+ return pair(0,0);
+ }
+
+ path g = a->read<path *>(0)->transformed(t);
+ pair z = g.max();
+ double maxx = z.getx(), maxy = z.gety();
+
+ for (size_t i = 1; i < a->size(); ++i) {
+ path g = a->read<path *>(i)->transformed(t);
+ pair z = g.max();
+ double x = z.getx(), y = z.gety();
+ if (x > maxx)
+ maxx = x;
+ if (y > maxy)
+ maxy = y;
+ }
+
+ return pair(maxx, maxy);
+}
+
realarray *mintimes(path p)
{
array *V=new array(2);
diff --git a/Build/source/utils/asymptote/runpicture.cc b/Build/source/utils/asymptote/runpicture.cc
index e9500a7be72..8607eac935e 100644
--- a/Build/source/utils/asymptote/runpicture.cc
+++ b/Build/source/utils/asymptote/runpicture.cc
@@ -59,7 +59,7 @@ function *realRealFunction();
#define CURRENTPEN processData().currentpen
-#line 27 "runpicture.in"
+#line 28 "runpicture.in"
#include "picture.h"
#include "drawelement.h"
#include "path.h"
@@ -95,6 +95,7 @@ typedef array penarray;
typedef array penarray2;
typedef callable callableTransform;
+typedef callable callablePen;
using types::IntArray;
using types::realArray;
@@ -112,6 +113,11 @@ function *transformFunction()
return new function(primTransform());
}
+function *penFunction()
+{
+ return new function(primPen(),primInt(),primInt());
+}
+
// Ignore unclosed begingroups but not spurious endgroups.
const char *nobegin="endgroup without matching begingroup";
@@ -133,71 +139,71 @@ triple Zero;
#endif
namespace run {
-#line 94 "runpicture.in"
+#line 101 "runpicture.in"
void newPicture(stack *Stack)
{
-#line 95 "runpicture.in"
+#line 102 "runpicture.in"
{Stack->push<picture*>(new picture()); return;}
}
-#line 99 "runpicture.in"
+#line 106 "runpicture.in"
// bool empty(picture *f);
void gen_runpicture1(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 100 "runpicture.in"
+#line 107 "runpicture.in"
{Stack->push<bool>(f->null()); return;}
}
-#line 104 "runpicture.in"
+#line 111 "runpicture.in"
// void erase(picture *f);
void gen_runpicture2(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 105 "runpicture.in"
+#line 112 "runpicture.in"
f->nodes.clear();
}
-#line 109 "runpicture.in"
+#line 116 "runpicture.in"
// pair min(picture *f);
void gen_runpicture3(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 110 "runpicture.in"
+#line 117 "runpicture.in"
{Stack->push<pair>(f->bounds().Min()); return;}
}
-#line 114 "runpicture.in"
+#line 121 "runpicture.in"
// pair max(picture *f);
void gen_runpicture4(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 115 "runpicture.in"
+#line 122 "runpicture.in"
{Stack->push<pair>(f->bounds().Max()); return;}
}
-#line 119 "runpicture.in"
+#line 126 "runpicture.in"
// pair size(picture *f);
void gen_runpicture5(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 120 "runpicture.in"
+#line 127 "runpicture.in"
bbox b=f->bounds();
{Stack->push<pair>(b.Max()-b.Min()); return;}
}
-#line 125 "runpicture.in"
+#line 132 "runpicture.in"
// void _draw(picture *f, path g, pen p);
void gen_runpicture6(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
path g=vm::pop<path>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 126 "runpicture.in"
+#line 133 "runpicture.in"
f->append(new drawPath(g,p));
}
-#line 130 "runpicture.in"
+#line 137 "runpicture.in"
// void fill(picture *f, patharray *g, pen p=CURRENTPEN, bool copy=true);
void gen_runpicture7(stack *Stack)
{
@@ -205,12 +211,12 @@ void gen_runpicture7(stack *Stack)
pen p=vm::pop<pen>(Stack,CURRENTPEN);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 131 "runpicture.in"
+#line 138 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawFill(*copyarray(g),false,p));
}
-#line 136 "runpicture.in"
+#line 143 "runpicture.in"
// void latticeshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity, bool copy=true);
void gen_runpicture8(stack *Stack)
{
@@ -221,13 +227,13 @@ void gen_runpicture8(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 139 "runpicture.in"
+#line 146 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawLatticeShade(*copyarray(g),stroke,fillrule,*copyarray(p),
t));
}
-#line 145 "runpicture.in"
+#line 152 "runpicture.in"
// void axialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, pen penb, pair b, bool copy=true);
void gen_runpicture9(stack *Stack)
{
@@ -239,12 +245,12 @@ void gen_runpicture9(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 147 "runpicture.in"
+#line 154 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawAxialShade(*copyarray(g),stroke,pena,a,penb,b));
}
-#line 152 "runpicture.in"
+#line 159 "runpicture.in"
// void radialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, real ra, pen penb, pair b, real rb, bool copy=true);
void gen_runpicture10(stack *Stack)
{
@@ -258,12 +264,12 @@ void gen_runpicture10(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 154 "runpicture.in"
+#line 161 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawRadialShade(*copyarray(g),stroke,pena,a,ra,penb,b,rb));
}
-#line 159 "runpicture.in"
+#line 166 "runpicture.in"
// void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, pairarray *z, Intarray *edges, bool copy=true);
void gen_runpicture11(stack *Stack)
{
@@ -275,7 +281,7 @@ void gen_runpicture11(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 162 "runpicture.in"
+#line 169 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
checkArrays(p,z);
checkArrays(z,edges);
@@ -283,7 +289,7 @@ void gen_runpicture11(stack *Stack)
*copyarray(z),*copyarray(edges)));
}
-#line 170 "runpicture.in"
+#line 177 "runpicture.in"
// void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, Intarray *edges, bool copy=true);
void gen_runpicture12(stack *Stack)
{
@@ -294,7 +300,7 @@ void gen_runpicture12(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 173 "runpicture.in"
+#line 180 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
size_t n=checkArrays(p,edges);
size_t m=checkArray(g);
@@ -315,7 +321,7 @@ void gen_runpicture12(stack *Stack)
*z,*copyarray(edges)));
}
-#line 194 "runpicture.in"
+#line 201 "runpicture.in"
// void tensorshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, patharray *b=NULL, pairarray2 *z=emptyarray, bool copy=true);
void gen_runpicture13(stack *Stack)
{
@@ -327,7 +333,7 @@ void gen_runpicture13(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 197 "runpicture.in"
+#line 204 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
array *(*copyarray2)(array *a)=copy ? copyArray2: nop;
if(b == NULL) b=g;
@@ -339,7 +345,7 @@ void gen_runpicture13(stack *Stack)
*copyarray(b),*copyarray2(z)));
}
-#line 209 "runpicture.in"
+#line 216 "runpicture.in"
// void functionshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, string shader=emptystring, bool copy=true);
void gen_runpicture14(stack *Stack)
{
@@ -349,14 +355,14 @@ void gen_runpicture14(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 212 "runpicture.in"
+#line 219 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawFunctionShade(*copyarray(g),stroke,fillrule,shader));
}
// Clip a picture to a superpath using the given fill rule.
// Subsequent additions to the picture will not be affected by the clipping.
-#line 219 "runpicture.in"
+#line 226 "runpicture.in"
// void clip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true);
void gen_runpicture15(stack *Stack)
{
@@ -365,13 +371,13 @@ void gen_runpicture15(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 221 "runpicture.in"
+#line 228 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
drawClipBegin *begin=new drawClipBegin(*copyarray(g),stroke,fillrule,true);
f->enclose(begin,new drawClipEnd(true,begin));
}
-#line 227 "runpicture.in"
+#line 234 "runpicture.in"
// void beginclip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true);
void gen_runpicture16(stack *Stack)
{
@@ -380,57 +386,57 @@ void gen_runpicture16(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 229 "runpicture.in"
+#line 236 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
f->append(new drawClipBegin(*copyarray(g),stroke,fillrule,false));
}
-#line 234 "runpicture.in"
+#line 241 "runpicture.in"
// void endclip(picture *f);
void gen_runpicture17(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 235 "runpicture.in"
+#line 242 "runpicture.in"
f->append(new drawClipEnd(false));
}
-#line 239 "runpicture.in"
+#line 246 "runpicture.in"
// void gsave(picture *f);
void gen_runpicture18(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 240 "runpicture.in"
+#line 247 "runpicture.in"
f->append(new drawGsave());
}
-#line 244 "runpicture.in"
+#line 251 "runpicture.in"
// void grestore(picture *f);
void gen_runpicture19(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 245 "runpicture.in"
+#line 252 "runpicture.in"
f->append(new drawGrestore());
}
-#line 249 "runpicture.in"
+#line 256 "runpicture.in"
// void begingroup(picture *f);
void gen_runpicture20(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 250 "runpicture.in"
+#line 257 "runpicture.in"
f->append(new drawBegin());
}
-#line 254 "runpicture.in"
+#line 261 "runpicture.in"
// void endgroup(picture *f);
void gen_runpicture21(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 255 "runpicture.in"
+#line 262 "runpicture.in"
f->append(new drawEnd());
}
-#line 259 "runpicture.in"
+#line 266 "runpicture.in"
// void _begingroup3(picture *f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, Int interaction);
void gen_runpicture22(stack *Stack)
{
@@ -444,62 +450,62 @@ void gen_runpicture22(stack *Stack)
real compression=vm::pop<real>(Stack);
string name=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 262 "runpicture.in"
+#line 269 "runpicture.in"
f->append(new drawBegin3(name,compression,granularity,
closed,tessellate,dobreak,nobreak,
center,(Interaction) intcast(interaction)));
}
-#line 268 "runpicture.in"
+#line 275 "runpicture.in"
// void endgroup3(picture *f);
void gen_runpicture23(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 269 "runpicture.in"
+#line 276 "runpicture.in"
f->append(new drawEnd3());
}
-#line 273 "runpicture.in"
+#line 280 "runpicture.in"
// void add(picture *dest, picture *src);
void gen_runpicture24(stack *Stack)
{
picture * src=vm::pop<picture *>(Stack);
picture * dest=vm::pop<picture *>(Stack);
-#line 274 "runpicture.in"
+#line 281 "runpicture.in"
dest->add(*src);
}
-#line 278 "runpicture.in"
+#line 285 "runpicture.in"
// void prepend(picture *dest, picture *src);
void gen_runpicture25(stack *Stack)
{
picture * src=vm::pop<picture *>(Stack);
picture * dest=vm::pop<picture *>(Stack);
-#line 279 "runpicture.in"
+#line 286 "runpicture.in"
dest->prepend(*src);
}
-#line 283 "runpicture.in"
+#line 290 "runpicture.in"
// void postscript(picture *f, string s);
void gen_runpicture26(stack *Stack)
{
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 284 "runpicture.in"
+#line 291 "runpicture.in"
f->append(new drawVerbatim(PostScript,s));
}
-#line 288 "runpicture.in"
+#line 295 "runpicture.in"
// void tex(picture *f, string s);
void gen_runpicture27(stack *Stack)
{
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 289 "runpicture.in"
+#line 296 "runpicture.in"
f->append(new drawVerbatim(TeX,s));
}
-#line 293 "runpicture.in"
+#line 300 "runpicture.in"
// void postscript(picture *f, string s, pair min, pair max);
void gen_runpicture28(stack *Stack)
{
@@ -507,11 +513,11 @@ void gen_runpicture28(stack *Stack)
pair min=vm::pop<pair>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 294 "runpicture.in"
+#line 301 "runpicture.in"
f->append(new drawVerbatim(PostScript,s,min,max));
}
-#line 298 "runpicture.in"
+#line 305 "runpicture.in"
// void tex(picture *f, string s, pair min, pair max);
void gen_runpicture29(stack *Stack)
{
@@ -519,33 +525,33 @@ void gen_runpicture29(stack *Stack)
pair min=vm::pop<pair>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 299 "runpicture.in"
+#line 306 "runpicture.in"
f->append(new drawVerbatim(TeX,s,min,max));
}
-#line 303 "runpicture.in"
+#line 310 "runpicture.in"
// void texpreamble(string s);
void gen_runpicture30(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 304 "runpicture.in"
+#line 311 "runpicture.in"
string t=s+"\n";
processDataStruct &pd=processData();
pd.TeXpipepreamble.push_back(t);
pd.TeXpreamble.push_back(t);
}
-#line 311 "runpicture.in"
+#line 318 "runpicture.in"
// void deletepreamble();
void gen_runpicture31(stack *)
{
-#line 312 "runpicture.in"
+#line 319 "runpicture.in"
if(getSetting<bool>("inlinetex")) {
unlink(buildname(outname(),"pre").c_str());
}
}
-#line 318 "runpicture.in"
+#line 325 "runpicture.in"
// void _labelpath(picture *f, string s, string size, path g, string justify, pair offset, pen p);
void gen_runpicture32(stack *Stack)
{
@@ -556,40 +562,40 @@ void gen_runpicture32(stack *Stack)
string size=vm::pop<string>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 320 "runpicture.in"
+#line 327 "runpicture.in"
f->append(new drawLabelPath(s,size,g,justify,offset,p));
}
-#line 324 "runpicture.in"
+#line 331 "runpicture.in"
// void texreset();
void gen_runpicture33(stack *)
{
-#line 325 "runpicture.in"
+#line 332 "runpicture.in"
processDataStruct &pd=processData();
pd.TeXpipepreamble.clear();
pd.TeXpreamble.clear();
pd.tex.pipeclose();
}
-#line 332 "runpicture.in"
+#line 339 "runpicture.in"
// void layer(picture *f);
void gen_runpicture34(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 333 "runpicture.in"
+#line 340 "runpicture.in"
f->append(new drawLayer());
}
-#line 337 "runpicture.in"
+#line 344 "runpicture.in"
// void newpage(picture *f);
void gen_runpicture35(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 338 "runpicture.in"
+#line 345 "runpicture.in"
f->append(new drawNewPage());
}
-#line 342 "runpicture.in"
+#line 349 "runpicture.in"
// void _image(picture *f, realarray2 *data, pair initial, pair final, penarray *palette=NULL, transform t=identity, bool copy=true, bool antialias=false);
void gen_runpicture36(stack *Stack)
{
@@ -601,14 +607,14 @@ void gen_runpicture36(stack *Stack)
pair initial=vm::pop<pair>(Stack);
realarray2 * data=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 345 "runpicture.in"
+#line 352 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray: nop;
array *(*copyarray2)(array *a)=copy ? copyArray2: nop;
- f->append(new drawImage(*copyarray2(data),*copyarray(palette),
- t*matrix(initial,final),antialias));
+ f->append(new drawPaletteImage(*copyarray2(data),*copyarray(palette),
+ t*matrix(initial,final),antialias));
}
-#line 352 "runpicture.in"
+#line 359 "runpicture.in"
// void _image(picture *f, penarray2 *data, pair initial, pair final, transform t=identity, bool copy=true, bool antialias=false);
void gen_runpicture37(stack *Stack)
{
@@ -619,38 +625,56 @@ void gen_runpicture37(stack *Stack)
pair initial=vm::pop<pair>(Stack);
penarray2 * data=vm::pop<penarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 354 "runpicture.in"
+#line 361 "runpicture.in"
array *(*copyarray2)(array *a)=copy ? copyArray2: nop;
- f->append(new drawImage(*copyarray2(data),t*matrix(initial,final),antialias));
+ f->append(new drawNoPaletteImage(*copyarray2(data),t*matrix(initial,final),
+ antialias));
}
-#line 359 "runpicture.in"
-// string nativeformat();
+#line 367 "runpicture.in"
+// void _image(picture *f, callablePen *F, Int width, Int height, pair initial, pair final, transform t=identity, bool antialias=false);
void gen_runpicture38(stack *Stack)
{
-#line 360 "runpicture.in"
+ bool antialias=vm::pop<bool>(Stack,false);
+ transform t=vm::pop<transform>(Stack,identity);
+ pair final=vm::pop<pair>(Stack);
+ pair initial=vm::pop<pair>(Stack);
+ Int height=vm::pop<Int>(Stack);
+ Int width=vm::pop<Int>(Stack);
+ callablePen * F=vm::pop<callablePen *>(Stack);
+ picture * f=vm::pop<picture *>(Stack);
+#line 369 "runpicture.in"
+ f->append(new drawFunctionImage(Stack,F,width,height,
+ t*matrix(initial,final),antialias));
+}
+
+#line 374 "runpicture.in"
+// string nativeformat();
+void gen_runpicture39(stack *Stack)
+{
+#line 375 "runpicture.in"
{Stack->push<string>(nativeformat()); return;}
}
-#line 364 "runpicture.in"
+#line 379 "runpicture.in"
// bool latex();
-void gen_runpicture39(stack *Stack)
+void gen_runpicture40(stack *Stack)
{
-#line 365 "runpicture.in"
+#line 380 "runpicture.in"
{Stack->push<bool>(latex(getSetting<string>("tex"))); return;}
}
-#line 369 "runpicture.in"
+#line 384 "runpicture.in"
// bool pdf();
-void gen_runpicture40(stack *Stack)
+void gen_runpicture41(stack *Stack)
{
-#line 370 "runpicture.in"
+#line 385 "runpicture.in"
{Stack->push<bool>(pdf(getSetting<string>("tex"))); return;}
}
-#line 374 "runpicture.in"
+#line 389 "runpicture.in"
// void shipout(string prefix=emptystring, picture *f, picture *preamble=NULL, string format=emptystring, bool wait=false, bool view=true, callableTransform *xform);
-void gen_runpicture41(stack *Stack)
+void gen_runpicture42(stack *Stack)
{
callableTransform * xform=vm::pop<callableTransform *>(Stack);
bool view=vm::pop<bool>(Stack,true);
@@ -659,15 +683,21 @@ void gen_runpicture41(stack *Stack)
picture * preamble=vm::pop<picture *>(Stack,NULL);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack,emptystring);
-#line 377 "runpicture.in"
+#line 392 "runpicture.in"
if(prefix.empty()) prefix=outname();
picture *result=new picture;
unsigned level=0;
picture::nodelist::iterator p;
+
+ // If null is given as an xform, just use the identity transformation.
+ bool xformIsNull = xform == nullfunc::instance();
+
for(p = f->nodes.begin(); p != f->nodes.end(); ++p) {
- xform->call(Stack);
- transform t=pop<transform>(Stack);
+ if (!xformIsNull)
+ xform->call(Stack);
+ transform t=xformIsNull ? camp::identity : pop<transform>(Stack);
+
static transform Zero=transform(0.0,0.0,0.0,0.0,0.0,0.0);
bool Delete=(t == Zero);
picture *group=new picture;
@@ -702,9 +732,9 @@ void gen_runpicture41(stack *Stack)
result->shipout(preamble,prefix,format,0.0,wait,view);
}
-#line 420 "runpicture.in"
+#line 441 "runpicture.in"
// void shipout3(string prefix, picture *f, string format=emptystring, real width, real height, real angle, real zoom, triple m, triple M, pair shift, realarray2 *t, realarray *background, triplearray *lights, realarray2 *diffuse, realarray2 *ambient, realarray2 *specular, bool viewportlighting, bool view=true);
-void gen_runpicture42(stack *Stack)
+void gen_runpicture43(stack *Stack)
{
bool view=vm::pop<bool>(Stack,true);
bool viewportlighting=vm::pop<bool>(Stack);
@@ -724,7 +754,7 @@ void gen_runpicture42(stack *Stack)
string format=vm::pop<string>(Stack,emptystring);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack);
-#line 426 "runpicture.in"
+#line 447 "runpicture.in"
size_t n=checkArrays(lights,diffuse);
checkEqual(n,checkArray(ambient));
checkEqual(n,checkArray(specular));
@@ -746,27 +776,27 @@ void gen_runpicture42(stack *Stack)
delete[] T;
}
-#line 448 "runpicture.in"
+#line 469 "runpicture.in"
// void shipout3(string prefix, picture *f, Intarray *index, triplearray *center);
-void gen_runpicture43(stack *Stack)
+void gen_runpicture44(stack *Stack)
{
triplearray * center=vm::pop<triplearray *>(Stack);
Intarray * index=vm::pop<Intarray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack);
-#line 449 "runpicture.in"
+#line 470 "runpicture.in"
f->shipout3(prefix,index,center);
}
-#line 453 "runpicture.in"
+#line 474 "runpicture.in"
// void deconstruct(picture *f, picture *preamble=NULL, real magnification=1, callableTransform *xform);
-void gen_runpicture44(stack *Stack)
+void gen_runpicture45(stack *Stack)
{
callableTransform * xform=vm::pop<callableTransform *>(Stack);
real magnification=vm::pop<real>(Stack,1);
picture * preamble=vm::pop<picture *>(Stack,NULL);
picture * f=vm::pop<picture *>(Stack);
-#line 455 "runpicture.in"
+#line 476 "runpicture.in"
unsigned level=0;
unsigned n=0;
@@ -891,24 +921,24 @@ void gen_runpicture44(stack *Stack)
// Three-dimensional picture and surface operations
// Bezier curve
-#line 580 "runpicture.in"
+#line 601 "runpicture.in"
// void _draw(picture *f, path3 g, triple center=Zero, pen p, Int interaction=0);
-void gen_runpicture45(stack *Stack)
+void gen_runpicture46(stack *Stack)
{
Int interaction=vm::pop<Int>(Stack,0);
pen p=vm::pop<pen>(Stack);
triple center=vm::pop<triple>(Stack,Zero);
path3 g=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 581 "runpicture.in"
+#line 602 "runpicture.in"
if(g.size() > 0)
f->append(new drawPath3(g,center,p,(Interaction) intcast(interaction)));
}
// Bezier patch
-#line 587 "runpicture.in"
+#line 608 "runpicture.in"
// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, triple normal, penarray *colors, bool lighton, Int interaction, bool prc=true);
-void gen_runpicture46(stack *Stack)
+void gen_runpicture47(stack *Stack)
{
bool prc=vm::pop<bool>(Stack,true);
Int interaction=vm::pop<Int>(Stack);
@@ -923,30 +953,30 @@ void gen_runpicture46(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 591 "runpicture.in"
+#line 612 "runpicture.in"
f->append(new drawSurface(*P,center,straight,*p,opacity,shininess,
PRCshininess,normal,*colors,lighton,
(Interaction) intcast(interaction),prc));
}
// General NURBS curve
-#line 598 "runpicture.in"
+#line 619 "runpicture.in"
// void draw(picture *f, triplearray *P, realarray *knot, realarray *weights=emptyarray, pen p);
-void gen_runpicture47(stack *Stack)
+void gen_runpicture48(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
realarray * weights=vm::pop<realarray *>(Stack,emptyarray);
realarray * knot=vm::pop<realarray *>(Stack);
triplearray * P=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 600 "runpicture.in"
+#line 621 "runpicture.in"
f->append(new drawNurbsPath3(*P,knot,weights,p));
}
// General NURBS surface
-#line 605 "runpicture.in"
+#line 626 "runpicture.in"
// void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, real opacity, real shininess, real PRCshininess, penarray *colors, bool lighton);
-void gen_runpicture48(stack *Stack)
+void gen_runpicture49(stack *Stack)
{
bool lighton=vm::pop<bool>(Stack);
penarray * colors=vm::pop<penarray *>(Stack);
@@ -959,15 +989,15 @@ void gen_runpicture48(stack *Stack)
realarray * uknot=vm::pop<realarray *>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 608 "runpicture.in"
+#line 629 "runpicture.in"
f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess,
PRCshininess,*colors,lighton));
}
// PRC unit sphere
-#line 614 "runpicture.in"
+#line 635 "runpicture.in"
// void drawPRCsphere(picture *f, realarray2 *t, bool half=false, penarray *p, real opacity, real shininess, Int type);
-void gen_runpicture49(stack *Stack)
+void gen_runpicture50(stack *Stack)
{
Int type=vm::pop<Int>(Stack);
real shininess=vm::pop<real>(Stack);
@@ -976,42 +1006,42 @@ void gen_runpicture49(stack *Stack)
bool half=vm::pop<bool>(Stack,false);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 616 "runpicture.in"
+#line 637 "runpicture.in"
f->append(new drawSphere(*t,half,*p,opacity,shininess,intcast(type)));
}
// PRC unit cylinder
-#line 621 "runpicture.in"
+#line 642 "runpicture.in"
// void drawPRCcylinder(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
-void gen_runpicture50(stack *Stack)
+void gen_runpicture51(stack *Stack)
{
real shininess=vm::pop<real>(Stack);
real opacity=vm::pop<real>(Stack);
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 623 "runpicture.in"
+#line 644 "runpicture.in"
f->append(new drawCylinder(*t,*p,opacity,shininess));
}
// PRC unit disk
-#line 628 "runpicture.in"
+#line 649 "runpicture.in"
// void drawPRCdisk(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
-void gen_runpicture51(stack *Stack)
+void gen_runpicture52(stack *Stack)
{
real shininess=vm::pop<real>(Stack);
real opacity=vm::pop<real>(Stack);
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 630 "runpicture.in"
+#line 651 "runpicture.in"
f->append(new drawDisk(*t,*p,opacity,shininess));
}
// General PRC tube
-#line 635 "runpicture.in"
+#line 656 "runpicture.in"
// void drawPRCtube(picture *f, path3 center, path3 g, penarray *p, real opacity, real shininess);
-void gen_runpicture52(stack *Stack)
+void gen_runpicture53(stack *Stack)
{
real shininess=vm::pop<real>(Stack);
real opacity=vm::pop<real>(Stack);
@@ -1019,62 +1049,75 @@ void gen_runpicture52(stack *Stack)
path3 g=vm::pop<path3>(Stack);
path3 center=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 637 "runpicture.in"
+#line 658 "runpicture.in"
f->append(new drawTube(center,g,*p,opacity,shininess));
}
-#line 641 "runpicture.in"
+// Draw pixel
+#line 663 "runpicture.in"
+// void drawpixel(picture *f, triple v, pen p, real width=1.0);
+void gen_runpicture54(stack *Stack)
+{
+ real width=vm::pop<real>(Stack,1.0);
+ pen p=vm::pop<pen>(Stack);
+ triple v=vm::pop<triple>(Stack);
+ picture * f=vm::pop<picture *>(Stack);
+#line 664 "runpicture.in"
+ f->append(new drawPixel(v,p,width));
+}
+
+#line 668 "runpicture.in"
// triple min3(picture *f);
-void gen_runpicture53(stack *Stack)
+void gen_runpicture55(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 642 "runpicture.in"
+#line 669 "runpicture.in"
{Stack->push<triple>(f->bounds3().Min()); return;}
}
-#line 646 "runpicture.in"
+#line 673 "runpicture.in"
// triple max3(picture *f);
-void gen_runpicture54(stack *Stack)
+void gen_runpicture56(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 647 "runpicture.in"
+#line 674 "runpicture.in"
{Stack->push<triple>(f->bounds3().Max()); return;}
}
-#line 651 "runpicture.in"
+#line 678 "runpicture.in"
// triple size3(picture *f);
-void gen_runpicture55(stack *Stack)
+void gen_runpicture57(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 652 "runpicture.in"
+#line 679 "runpicture.in"
bbox3 b=f->bounds3();
{Stack->push<triple>(b.Max()-b.Min()); return;}
}
-#line 657 "runpicture.in"
+#line 684 "runpicture.in"
// pair minratio(picture *f);
-void gen_runpicture56(stack *Stack)
+void gen_runpicture58(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 658 "runpicture.in"
+#line 685 "runpicture.in"
{Stack->push<pair>(f->ratio(::min)); return;}
}
-#line 662 "runpicture.in"
+#line 689 "runpicture.in"
// pair maxratio(picture *f);
-void gen_runpicture57(stack *Stack)
+void gen_runpicture59(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 663 "runpicture.in"
+#line 690 "runpicture.in"
{Stack->push<pair>(f->ratio(::max)); return;}
}
-#line 667 "runpicture.in"
+#line 694 "runpicture.in"
// bool is3D(picture *f);
-void gen_runpicture58(stack *Stack)
+void gen_runpicture60(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 668 "runpicture.in"
+#line 695 "runpicture.in"
{Stack->push<bool>(f->have3D()); return;}
}
@@ -1084,124 +1127,128 @@ namespace trans {
void gen_runpicture_venv(venv &ve)
{
-#line 94 "runpicture.in"
+#line 101 "runpicture.in"
REGISTER_BLTIN(run::newPicture,"newPicture");
-#line 99 "runpicture.in"
+#line 106 "runpicture.in"
addFunc(ve, run::gen_runpicture1, primBoolean(), SYM(empty), formal(primPicture(), SYM(f), false, false));
-#line 104 "runpicture.in"
+#line 111 "runpicture.in"
addFunc(ve, run::gen_runpicture2, primVoid(), SYM(erase), formal(primPicture(), SYM(f), false, false));
-#line 109 "runpicture.in"
+#line 116 "runpicture.in"
addFunc(ve, run::gen_runpicture3, primPair(), SYM(min), formal(primPicture(), SYM(f), false, false));
-#line 114 "runpicture.in"
+#line 121 "runpicture.in"
addFunc(ve, run::gen_runpicture4, primPair(), SYM(max), formal(primPicture(), SYM(f), false, false));
-#line 119 "runpicture.in"
+#line 126 "runpicture.in"
addFunc(ve, run::gen_runpicture5, primPair(), SYM(size), formal(primPicture(), SYM(f), false, false));
-#line 125 "runpicture.in"
+#line 132 "runpicture.in"
addFunc(ve, run::gen_runpicture6, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), false, false));
-#line 130 "runpicture.in"
+#line 137 "runpicture.in"
addFunc(ve, run::gen_runpicture7, primVoid(), SYM(fill), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primPen(), SYM(p), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 136 "runpicture.in"
+#line 143 "runpicture.in"
addFunc(ve, run::gen_runpicture8, primVoid(), SYM(latticeshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2() , SYM(p), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 145 "runpicture.in"
- addFunc(ve, run::gen_runpicture9, primVoid(), SYM(axialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primBoolean(), SYM(copy), true, false));
#line 152 "runpicture.in"
- addFunc(ve, run::gen_runpicture10, primVoid(), SYM(radialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primReal(), SYM(ra), false, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primReal(), SYM(rb), false, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture9, primVoid(), SYM(axialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primBoolean(), SYM(copy), true, false));
#line 159 "runpicture.in"
+ addFunc(ve, run::gen_runpicture10, primVoid(), SYM(radialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primReal(), SYM(ra), false, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primReal(), SYM(rb), false, false), formal(primBoolean(), SYM(copy), true, false));
+#line 166 "runpicture.in"
addFunc(ve, run::gen_runpicture11, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray() , SYM(p), false, false), formal(pairArray(), SYM(z), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
-#line 170 "runpicture.in"
+#line 177 "runpicture.in"
addFunc(ve, run::gen_runpicture12, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray() , SYM(p), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
-#line 194 "runpicture.in"
+#line 201 "runpicture.in"
addFunc(ve, run::gen_runpicture13, primVoid(), SYM(tensorshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2() , SYM(p), false, false), formal(pathArray() , SYM(b), true, false), formal(pairArray2(), SYM(z), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 209 "runpicture.in"
+#line 216 "runpicture.in"
addFunc(ve, run::gen_runpicture14, primVoid(), SYM(functionshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primString() , SYM(shader), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 217 "runpicture.in"
+#line 224 "runpicture.in"
addFunc(ve, run::gen_runpicture15, primVoid(), SYM(clip), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 227 "runpicture.in"
- addFunc(ve, run::gen_runpicture16, primVoid(), SYM(beginclip), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
#line 234 "runpicture.in"
+ addFunc(ve, run::gen_runpicture16, primVoid(), SYM(beginclip), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
+#line 241 "runpicture.in"
addFunc(ve, run::gen_runpicture17, primVoid(), SYM(endclip), formal(primPicture(), SYM(f), false, false));
-#line 239 "runpicture.in"
+#line 246 "runpicture.in"
addFunc(ve, run::gen_runpicture18, primVoid(), SYM(gsave), formal(primPicture(), SYM(f), false, false));
-#line 244 "runpicture.in"
+#line 251 "runpicture.in"
addFunc(ve, run::gen_runpicture19, primVoid(), SYM(grestore), formal(primPicture(), SYM(f), false, false));
-#line 249 "runpicture.in"
+#line 256 "runpicture.in"
addFunc(ve, run::gen_runpicture20, primVoid(), SYM(begingroup), formal(primPicture(), SYM(f), false, false));
-#line 254 "runpicture.in"
+#line 261 "runpicture.in"
addFunc(ve, run::gen_runpicture21, primVoid(), SYM(endgroup), formal(primPicture(), SYM(f), false, false));
-#line 259 "runpicture.in"
+#line 266 "runpicture.in"
addFunc(ve, run::gen_runpicture22, primVoid(), SYM(_begingroup3), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(name), false, false), formal(primReal(), SYM(compression), false, false), formal(primReal(), SYM(granularity), false, false), formal(primBoolean(), SYM(closed), false, false), formal(primBoolean(), SYM(tessellate), false, false), formal(primBoolean(), SYM(dobreak), false, false), formal(primBoolean(), SYM(nobreak), false, false), formal(primTriple(), SYM(center), false, false), formal(primInt(), SYM(interaction), false, false));
-#line 268 "runpicture.in"
+#line 275 "runpicture.in"
addFunc(ve, run::gen_runpicture23, primVoid(), SYM(endgroup3), formal(primPicture(), SYM(f), false, false));
-#line 273 "runpicture.in"
+#line 280 "runpicture.in"
addFunc(ve, run::gen_runpicture24, primVoid(), SYM(add), formal(primPicture(), SYM(dest), false, false), formal(primPicture(), SYM(src), false, false));
-#line 278 "runpicture.in"
+#line 285 "runpicture.in"
addFunc(ve, run::gen_runpicture25, primVoid(), SYM(prepend), formal(primPicture(), SYM(dest), false, false), formal(primPicture(), SYM(src), false, false));
-#line 283 "runpicture.in"
+#line 290 "runpicture.in"
addFunc(ve, run::gen_runpicture26, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false));
-#line 288 "runpicture.in"
+#line 295 "runpicture.in"
addFunc(ve, run::gen_runpicture27, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false));
-#line 293 "runpicture.in"
+#line 300 "runpicture.in"
addFunc(ve, run::gen_runpicture28, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
-#line 298 "runpicture.in"
+#line 305 "runpicture.in"
addFunc(ve, run::gen_runpicture29, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
-#line 303 "runpicture.in"
+#line 310 "runpicture.in"
addFunc(ve, run::gen_runpicture30, primVoid(), SYM(texpreamble), formal(primString() , SYM(s), false, false));
-#line 311 "runpicture.in"
- addFunc(ve, run::gen_runpicture31, primVoid(), SYM(deletepreamble));
#line 318 "runpicture.in"
+ addFunc(ve, run::gen_runpicture31, primVoid(), SYM(deletepreamble));
+#line 325 "runpicture.in"
addFunc(ve, run::gen_runpicture32, primVoid(), SYM(_labelpath), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primString() , SYM(size), false, false), formal(primPath(), SYM(g), false, false), formal(primString() , SYM(justify), false, false), formal(primPair(), SYM(offset), false, false), formal(primPen(), SYM(p), false, false));
-#line 324 "runpicture.in"
+#line 331 "runpicture.in"
addFunc(ve, run::gen_runpicture33, primVoid(), SYM(texreset));
-#line 332 "runpicture.in"
+#line 339 "runpicture.in"
addFunc(ve, run::gen_runpicture34, primVoid(), SYM(layer), formal(primPicture(), SYM(f), false, false));
-#line 337 "runpicture.in"
+#line 344 "runpicture.in"
addFunc(ve, run::gen_runpicture35, primVoid(), SYM(newpage), formal(primPicture(), SYM(f), false, false));
-#line 342 "runpicture.in"
+#line 349 "runpicture.in"
addFunc(ve, run::gen_runpicture36, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(penArray() , SYM(palette), true, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
-#line 352 "runpicture.in"
- addFunc(ve, run::gen_runpicture37, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penArray2() , SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
#line 359 "runpicture.in"
- addFunc(ve, run::gen_runpicture38, primString() , SYM(nativeformat));
-#line 364 "runpicture.in"
- addFunc(ve, run::gen_runpicture39, primBoolean(), SYM(latex));
-#line 369 "runpicture.in"
- addFunc(ve, run::gen_runpicture40, primBoolean(), SYM(pdf));
+ addFunc(ve, run::gen_runpicture37, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penArray2() , SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
+#line 367 "runpicture.in"
+ addFunc(ve, run::gen_runpicture38, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penFunction(), SYM(f), false, false), formal(primInt(), SYM(width), false, false), formal(primInt(), SYM(height), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(antialias), true, false));
#line 374 "runpicture.in"
- addFunc(ve, run::gen_runpicture41, primVoid(), SYM(shipout), formal(primString() , SYM(prefix), true, false), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primString() , SYM(format), true, false), formal(primBoolean(), SYM(wait), true, false), formal(primBoolean(), SYM(view), true, false), formal(transformFunction(), SYM(xform), false, false));
-#line 420 "runpicture.in"
- addFunc(ve, run::gen_runpicture42, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(format), true, false), formal(primReal(), SYM(width), false, false), formal(primReal(), SYM(height), false, false), formal(primReal(), SYM(angle), false, false), formal(primReal(), SYM(zoom), false, false), formal(primTriple(), SYM(m), false, false), formal(primTriple(), SYM(m), false, false), formal(primPair(), SYM(shift), false, false), formal(realArray2(), SYM(t), false, false), formal(realArray(), SYM(background), false, false), formal(tripleArray(), SYM(lights), false, false), formal(realArray2(), SYM(diffuse), false, false), formal(realArray2(), SYM(ambient), false, false), formal(realArray2(), SYM(specular), false, false), formal(primBoolean(), SYM(viewportlighting), false, false), formal(primBoolean(), SYM(view), true, false));
-#line 448 "runpicture.in"
- addFunc(ve, run::gen_runpicture43, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(IntArray(), SYM(index), false, false), formal(tripleArray(), SYM(center), false, false));
-#line 453 "runpicture.in"
- addFunc(ve, run::gen_runpicture44, primVoid(), SYM(deconstruct), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primReal(), SYM(magnification), true, false), formal(transformFunction(), SYM(xform), false, false));
-#line 576 "runpicture.in"
- addFunc(ve, run::gen_runpicture45, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(g), false, false), formal(primTriple(), SYM(center), true, false), formal(primPen(), SYM(p), false, false), formal(primInt(), SYM(interaction), true, false));
-#line 586 "runpicture.in"
- addFunc(ve, run::gen_runpicture46, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(primTriple(), SYM(normal), false, false), formal(penArray() , SYM(colors), false, false), formal(primBoolean(), SYM(lighton), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(prc), true, false));
+ addFunc(ve, run::gen_runpicture39, primString() , SYM(nativeformat));
+#line 379 "runpicture.in"
+ addFunc(ve, run::gen_runpicture40, primBoolean(), SYM(latex));
+#line 384 "runpicture.in"
+ addFunc(ve, run::gen_runpicture41, primBoolean(), SYM(pdf));
+#line 389 "runpicture.in"
+ addFunc(ve, run::gen_runpicture42, primVoid(), SYM(shipout), formal(primString() , SYM(prefix), true, false), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primString() , SYM(format), true, false), formal(primBoolean(), SYM(wait), true, false), formal(primBoolean(), SYM(view), true, false), formal(transformFunction(), SYM(xform), false, false));
+#line 441 "runpicture.in"
+ addFunc(ve, run::gen_runpicture43, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(format), true, false), formal(primReal(), SYM(width), false, false), formal(primReal(), SYM(height), false, false), formal(primReal(), SYM(angle), false, false), formal(primReal(), SYM(zoom), false, false), formal(primTriple(), SYM(m), false, false), formal(primTriple(), SYM(m), false, false), formal(primPair(), SYM(shift), false, false), formal(realArray2(), SYM(t), false, false), formal(realArray(), SYM(background), false, false), formal(tripleArray(), SYM(lights), false, false), formal(realArray2(), SYM(diffuse), false, false), formal(realArray2(), SYM(ambient), false, false), formal(realArray2(), SYM(specular), false, false), formal(primBoolean(), SYM(viewportlighting), false, false), formal(primBoolean(), SYM(view), true, false));
+#line 469 "runpicture.in"
+ addFunc(ve, run::gen_runpicture44, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(IntArray(), SYM(index), false, false), formal(tripleArray(), SYM(center), false, false));
+#line 474 "runpicture.in"
+ addFunc(ve, run::gen_runpicture45, primVoid(), SYM(deconstruct), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primReal(), SYM(magnification), true, false), formal(transformFunction(), SYM(xform), false, false));
#line 597 "runpicture.in"
- addFunc(ve, run::gen_runpicture47, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(p), false, false), formal(realArray(), SYM(knot), false, false), formal(realArray(), SYM(weights), true, false), formal(primPen(), SYM(p), false, false));
-#line 604 "runpicture.in"
- addFunc(ve, run::gen_runpicture48, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(colors), false, false), formal(primBoolean(), SYM(lighton), false, false));
-#line 613 "runpicture.in"
- addFunc(ve, run::gen_runpicture49, primVoid(), SYM(drawPRCsphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primInt(), SYM(type), false, false));
-#line 620 "runpicture.in"
- addFunc(ve, run::gen_runpicture50, primVoid(), SYM(drawPRCcylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 627 "runpicture.in"
- addFunc(ve, run::gen_runpicture51, primVoid(), SYM(drawPRCdisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
+ addFunc(ve, run::gen_runpicture46, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(g), false, false), formal(primTriple(), SYM(center), true, false), formal(primPen(), SYM(p), false, false), formal(primInt(), SYM(interaction), true, false));
+#line 607 "runpicture.in"
+ addFunc(ve, run::gen_runpicture47, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(primTriple(), SYM(normal), false, false), formal(penArray() , SYM(colors), false, false), formal(primBoolean(), SYM(lighton), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(prc), true, false));
+#line 618 "runpicture.in"
+ addFunc(ve, run::gen_runpicture48, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(p), false, false), formal(realArray(), SYM(knot), false, false), formal(realArray(), SYM(weights), true, false), formal(primPen(), SYM(p), false, false));
+#line 625 "runpicture.in"
+ addFunc(ve, run::gen_runpicture49, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(colors), false, false), formal(primBoolean(), SYM(lighton), false, false));
#line 634 "runpicture.in"
- addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawPRCtube), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(center), false, false), formal(primPath3(), SYM(g), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
+ addFunc(ve, run::gen_runpicture50, primVoid(), SYM(drawPRCsphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primInt(), SYM(type), false, false));
#line 641 "runpicture.in"
- addFunc(ve, run::gen_runpicture53, primTriple(), SYM(min3), formal(primPicture(), SYM(f), false, false));
-#line 646 "runpicture.in"
- addFunc(ve, run::gen_runpicture54, primTriple(), SYM(max3), formal(primPicture(), SYM(f), false, false));
-#line 651 "runpicture.in"
- addFunc(ve, run::gen_runpicture55, primTriple(), SYM(size3), formal(primPicture(), SYM(f), false, false));
-#line 657 "runpicture.in"
- addFunc(ve, run::gen_runpicture56, primPair(), SYM(minratio), formal(primPicture(), SYM(f), false, false));
+ addFunc(ve, run::gen_runpicture51, primVoid(), SYM(drawPRCcylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
+#line 648 "runpicture.in"
+ addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawPRCdisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
+#line 655 "runpicture.in"
+ addFunc(ve, run::gen_runpicture53, primVoid(), SYM(drawPRCtube), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(center), false, false), formal(primPath3(), SYM(g), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
#line 662 "runpicture.in"
- addFunc(ve, run::gen_runpicture57, primPair(), SYM(maxratio), formal(primPicture(), SYM(f), false, false));
-#line 667 "runpicture.in"
- addFunc(ve, run::gen_runpicture58, primBoolean(), SYM(is3D), formal(primPicture(), SYM(f), false, false));
+ addFunc(ve, run::gen_runpicture54, primVoid(), SYM(drawpixel), formal(primPicture(), SYM(f), false, false), formal(primTriple(), SYM(v), false, false), formal(primPen(), SYM(p), false, false), formal(primReal(), SYM(width), true, false));
+#line 668 "runpicture.in"
+ addFunc(ve, run::gen_runpicture55, primTriple(), SYM(min3), formal(primPicture(), SYM(f), false, false));
+#line 673 "runpicture.in"
+ addFunc(ve, run::gen_runpicture56, primTriple(), SYM(max3), formal(primPicture(), SYM(f), false, false));
+#line 678 "runpicture.in"
+ addFunc(ve, run::gen_runpicture57, primTriple(), SYM(size3), formal(primPicture(), SYM(f), false, false));
+#line 684 "runpicture.in"
+ addFunc(ve, run::gen_runpicture58, primPair(), SYM(minratio), formal(primPicture(), SYM(f), false, false));
+#line 689 "runpicture.in"
+ addFunc(ve, run::gen_runpicture59, primPair(), SYM(maxratio), formal(primPicture(), SYM(f), false, false));
+#line 694 "runpicture.in"
+ addFunc(ve, run::gen_runpicture60, primBoolean(), SYM(is3D), formal(primPicture(), SYM(f), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in
index 700695dd9e6..1624baf04d8 100644
--- a/Build/source/utils/asymptote/runpicture.in
+++ b/Build/source/utils/asymptote/runpicture.in
@@ -23,6 +23,7 @@ triplearray* => tripleArray()
triplearray2* => tripleArray2()
transform => primTransform()
callableTransform* => transformFunction()
+callablePen* => penFunction()
#include "picture.h"
#include "drawelement.h"
@@ -59,6 +60,7 @@ typedef array penarray;
typedef array penarray2;
typedef callable callableTransform;
+typedef callable callablePen;
using types::IntArray;
using types::realArray;
@@ -76,6 +78,11 @@ function *transformFunction()
return new function(primTransform());
}
+function *penFunction()
+{
+ return new function(primPen(),primInt(),primInt());
+}
+
// Ignore unclosed begingroups but not spurious endgroups.
const char *nobegin="endgroup without matching begingroup";
@@ -345,15 +352,23 @@ void _image(picture *f, realarray2 *data, pair initial, pair final,
{
array *(*copyarray)(array *a)=copy ? copyArray: nop;
array *(*copyarray2)(array *a)=copy ? copyArray2: nop;
- f->append(new drawImage(*copyarray2(data),*copyarray(palette),
- t*matrix(initial,final),antialias));
+ f->append(new drawPaletteImage(*copyarray2(data),*copyarray(palette),
+ t*matrix(initial,final),antialias));
}
void _image(picture *f, penarray2 *data, pair initial, pair final,
transform t=identity, bool copy=true, bool antialias=false)
{
array *(*copyarray2)(array *a)=copy ? copyArray2: nop;
- f->append(new drawImage(*copyarray2(data),t*matrix(initial,final),antialias));
+ f->append(new drawNoPaletteImage(*copyarray2(data),t*matrix(initial,final),
+ antialias));
+}
+
+void _image(picture *f, callablePen *F, Int width, Int height,
+ pair initial, pair final, transform t=identity, bool antialias=false)
+{
+ f->append(new drawFunctionImage(Stack,F,width,height,
+ t*matrix(initial,final),antialias));
}
string nativeformat()
@@ -380,9 +395,15 @@ void shipout(string prefix=emptystring, picture *f, picture *preamble=NULL,
picture *result=new picture;
unsigned level=0;
picture::nodelist::iterator p;
+
+ // If null is given as an xform, just use the identity transformation.
+ bool xformIsNull = xform == nullfunc::instance();
+
for(p = f->nodes.begin(); p != f->nodes.end(); ++p) {
- xform->call(Stack);
- transform t=pop<transform>(Stack);
+ if (!xformIsNull)
+ xform->call(Stack);
+ transform t=xformIsNull ? camp::identity : pop<transform>(Stack);
+
static transform Zero=transform(0.0,0.0,0.0,0.0,0.0,0.0);
bool Delete=(t == Zero);
picture *group=new picture;
@@ -638,6 +659,12 @@ void drawPRCtube(picture *f, path3 center, path3 g, penarray *p, real opacity,
f->append(new drawTube(center,g,*p,opacity,shininess));
}
+// Draw pixel
+void drawpixel(picture *f, triple v, pen p, real width=1.0)
+{
+ f->append(new drawPixel(v,p,width));
+}
+
triple min3(picture *f)
{
return f->bounds3().Min();
diff --git a/Build/source/utils/asymptote/runstring.cc b/Build/source/utils/asymptote/runstring.cc
index 6cd52f658ea..d2240bc3fe7 100644
--- a/Build/source/utils/asymptote/runstring.cc
+++ b/Build/source/utils/asymptote/runstring.cc
@@ -99,7 +99,7 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
while(*ptr && strchr ("-+ #0'I", *ptr)) /* Move past flags. */
- *ptr++;
+ ptr++;
if(*ptr == '*')
ptr++;
@@ -107,15 +107,15 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
if(*ptr == '.') {
- *ptr++; /* Go past the period. */
+ ptr++; /* Go past the period. */
if(*ptr == '*') {
ptr++;
} else
while(isdigit(*ptr)) /* Handle explicit numeric value. */
- *ptr++;
+ ptr++;
}
while(*ptr && strchr ("hlL", *ptr))
- *ptr++;
+ ptr++;
if(*ptr == '%') ++ptr;
else if(*ptr != '\0') {
@@ -296,6 +296,9 @@ void gen_runstring10(stack *Stack)
while(*p) {
for(size_t i=0; i < size;) {
array *a=read<array*>(translate,i);
+ size_t size2=checkArray(a);
+ if(size2 != 2)
+ error("translation table entry must be an array of length 2");
string* from=read<string*>(a,0);
size_t len=from->length();
if(strncmp(p,from->c_str(),len) != 0) {i++; continue;}
@@ -309,13 +312,13 @@ void gen_runstring10(stack *Stack)
{Stack->push<string>(buf.str()); return;}
}
-#line 201 "runstring.in"
+#line 204 "runstring.in"
// string format(string *format, Int x);
void gen_runstring11(stack *Stack)
{
Int x=vm::pop<Int>(Stack);
string * format=vm::pop<string *>(Stack);
-#line 202 "runstring.in"
+#line 205 "runstring.in"
const char *f=format->c_str();
checkformat(f,true);
@@ -329,14 +332,14 @@ void gen_runstring11(stack *Stack)
{Stack->push<string>(s); return;}
}
-#line 216 "runstring.in"
+#line 219 "runstring.in"
// string format(string *format, real x, string locale=emptystring);
void gen_runstring12(stack *Stack)
{
string locale=vm::pop<string>(Stack,emptystring);
real x=vm::pop<real>(Stack);
string * format=vm::pop<string *>(Stack);
-#line 217 "runstring.in"
+#line 220 "runstring.in"
bool tex=getSetting<string>("tex") != "none";
bool texify=false;
ostringstream out;
@@ -460,12 +463,12 @@ void gen_runstring12(stack *Stack)
{Stack->push<string>(out.str()); return;}
}
-#line 341 "runstring.in"
+#line 344 "runstring.in"
// Int hex(string s);
void gen_runstring13(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 342 "runstring.in"
+#line 345 "runstring.in"
istringstream is(s);
is.setf(std::ios::hex,std::ios::basefield);
Int value;
@@ -475,36 +478,36 @@ void gen_runstring13(stack *Stack)
error(buf);
}
-#line 352 "runstring.in"
+#line 355 "runstring.in"
// string string(Int x);
void gen_runstring14(stack *Stack)
{
Int x=vm::pop<Int>(Stack);
-#line 353 "runstring.in"
+#line 356 "runstring.in"
ostringstream buf;
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 359 "runstring.in"
+#line 362 "runstring.in"
// string string(real x, Int digits=DBL_DIG);
void gen_runstring15(stack *Stack)
{
Int digits=vm::pop<Int>(Stack,DBL_DIG);
real x=vm::pop<real>(Stack);
-#line 360 "runstring.in"
+#line 363 "runstring.in"
ostringstream buf;
buf.precision(digits);
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 367 "runstring.in"
+#line 370 "runstring.in"
// string time(string format=defaulttimeformat);
void gen_runstring16(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
-#line 368 "runstring.in"
+#line 371 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=time(NULL);
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
@@ -514,13 +517,13 @@ void gen_runstring16(stack *Stack)
#endif
}
-#line 378 "runstring.in"
+#line 381 "runstring.in"
// string time(Int seconds, string format=defaulttimeformat);
void gen_runstring17(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
Int seconds=vm::pop<Int>(Stack);
-#line 379 "runstring.in"
+#line 382 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=seconds;
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
@@ -532,13 +535,13 @@ void gen_runstring17(stack *Stack)
#endif
}
-#line 391 "runstring.in"
+#line 394 "runstring.in"
// Int seconds(string t=emptystring, string format=emptystring);
void gen_runstring18(stack *Stack)
{
string format=vm::pop<string>(Stack,emptystring);
string t=vm::pop<string>(Stack,emptystring);
-#line 392 "runstring.in"
+#line 395 "runstring.in"
#if defined(HAVE_STRPTIME)
const time_t bintime=time(NULL);
tm tm=*localtime(&bintime);
@@ -577,21 +580,21 @@ void gen_runstring_venv(venv &ve)
addFunc(ve, run::gen_runstring9, primString() , SYM(upcase), formal(primString() , SYM(s), false, false));
#line 174 "runstring.in"
addFunc(ve, run::gen_runstring10, primString() , SYM(replace), formal(primString(), SYM(s), false, false), formal(stringArray2(), SYM(translate), false, false));
-#line 201 "runstring.in"
+#line 204 "runstring.in"
addFunc(ve, run::gen_runstring11, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primInt(), SYM(x), false, false));
-#line 216 "runstring.in"
+#line 219 "runstring.in"
addFunc(ve, run::gen_runstring12, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primReal(), SYM(x), false, false), formal(primString() , SYM(locale), true, false));
-#line 341 "runstring.in"
+#line 344 "runstring.in"
addFunc(ve, run::gen_runstring13, primInt(), SYM(hex), formal(primString() , SYM(s), false, false));
-#line 352 "runstring.in"
+#line 355 "runstring.in"
addFunc(ve, run::gen_runstring14, primString() , SYM(string), formal(primInt(), SYM(x), false, false));
-#line 359 "runstring.in"
+#line 362 "runstring.in"
addFunc(ve, run::gen_runstring15, primString() , SYM(string), formal(primReal(), SYM(x), false, false), formal(primInt(), SYM(digits), true, false));
-#line 367 "runstring.in"
+#line 370 "runstring.in"
addFunc(ve, run::gen_runstring16, primString() , SYM(time), formal(primString() , SYM(format), true, false));
-#line 378 "runstring.in"
+#line 381 "runstring.in"
addFunc(ve, run::gen_runstring17, primString() , SYM(time), formal(primInt(), SYM(seconds), false, false), formal(primString() , SYM(format), true, false));
-#line 391 "runstring.in"
+#line 394 "runstring.in"
addFunc(ve, run::gen_runstring18, primInt(), SYM(seconds), formal(primString() , SYM(t), true, false), formal(primString() , SYM(format), true, false));
}
diff --git a/Build/source/utils/asymptote/runstring.in b/Build/source/utils/asymptote/runstring.in
index 2d2c375a605..e0018ded82c 100644
--- a/Build/source/utils/asymptote/runstring.in
+++ b/Build/source/utils/asymptote/runstring.in
@@ -46,7 +46,7 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
while(*ptr && strchr ("-+ #0'I", *ptr)) /* Move past flags. */
- *ptr++;
+ ptr++;
if(*ptr == '*')
ptr++;
@@ -54,15 +54,15 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
if(*ptr == '.') {
- *ptr++; /* Go past the period. */
+ ptr++; /* Go past the period. */
if(*ptr == '*') {
ptr++;
} else
while(isdigit(*ptr)) /* Handle explicit numeric value. */
- *ptr++;
+ ptr++;
}
while(*ptr && strchr ("hlL", *ptr))
- *ptr++;
+ ptr++;
if(*ptr == '%') ++ptr;
else if(*ptr != '\0') {
@@ -185,6 +185,9 @@ string replace(string *S, stringarray2 *translate)
while(*p) {
for(size_t i=0; i < size;) {
array *a=read<array*>(translate,i);
+ size_t size2=checkArray(a);
+ if(size2 != 2)
+ error("translation table entry must be an array of length 2");
string* from=read<string*>(a,0);
size_t len=from->length();
if(strncmp(p,from->c_str(),len) != 0) {i++; continue;}
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index ca26418e691..774e3851a07 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -352,7 +352,7 @@ struct option : public gc {
cerr << endl;
cerr << std::left << std::setw(WIDTH) << "";
}
- cerr << desc;
+ cerr << " " << desc;
if(cmdlineonly) cerr << "; command-line only";
if(Default != "")
cerr << " [" << Default << "]";
diff --git a/Build/source/utils/asymptote/stack.cc b/Build/source/utils/asymptote/stack.cc
index b1651d2c424..31eab91106e 100644
--- a/Build/source/utils/asymptote/stack.cc
+++ b/Build/source/utils/asymptote/stack.cc
@@ -5,6 +5,7 @@
* The general stack machine used to run compiled camp code.
*****/
+#include <fstream>
#include <sstream>
#include "stack.h"
@@ -14,6 +15,8 @@
#include "util.h"
#include "runtime.h"
+#include "profiler.h"
+
#ifdef DEBUG_STACK
#include <iostream>
@@ -35,22 +38,96 @@ position curPos = nullPos;
const program::label nulllabel;
}
+inline stack::vars_t make_frame(lambda *l, stack::vars_t closure)
+{
+#ifdef SIMPLE_FRAME
+ stack::vars_t vars = new item[l->framesize];
+ vars[l->parentIndex] = closure;
+#else
#ifdef DEBUG_FRAME
-inline stack::vars_t stack::make_frame(string name,
- size_t size, vars_t closure)
+ assert(!l->name.empty());
+ stack::vars_t vars = new frame(l->name, l->parentIndex, l->framesize);
+#else
+ stack::vars_t vars = new frame(l->framesize);
+#endif
+
+ // The closure is stored after the parameters.
+ (*vars)[l->parentIndex] = closure;
+#endif
+
+ return vars;
+}
+
+inline stack::vars_t make_pushframe(size_t size, stack::vars_t closure)
{
- vars_t vars = new frame(name, 1+size);
+ assert(size >= 1);
+#if SIMPLE_FRAME
+ stack::vars_t vars = new item[size];
+ vars[0] = closure;
+#else
+#ifdef DEBUG_FRAME
+ stack::vars_t vars = new frame("<pushed frame>", 0, size);
+#else
+ stack::vars_t vars = new frame(size);
+#endif
(*vars)[0] = closure;
+#endif
+
return vars;
}
+
+stack::vars_t make_dummyframe(string name)
+{
+#if SIMPLE_FRAME
+ stack::vars_t vars = new item[1];
#else
-inline stack::vars_t stack::make_frame(size_t size, vars_t closure)
+#ifdef DEBUG_FRAME
+ stack::vars_t vars = new frame("<dummy frame for "+name+">", 0, 1);
+#else
+ stack::vars_t vars = new frame(1);
+#endif
+#endif
+
+ return vars;
+}
+
+inline stack::vars_t make_globalframe(size_t size)
{
- vars_t vars = new frame(1+size);
- (*vars)[0] = closure;
+ assert(size > 0);
+#if SIMPLE_FRAME
+ // The global frame is an indirect frame. It holds one item, which is the
+ // link to another frame.
+ stack::vars_t direct = new item[1];
+ stack::vars_t indirect = new item[size];
+ direct[0] = indirect;
+ return direct;
+#else
+#ifdef DEBUG_FRAME
+ stack::vars_t vars = new frame("<pushed frame>", 0, size);
+#else
+ stack::vars_t vars = new frame(size);
+#endif
return vars;
+#endif
+
}
+
+inline void resize_frame(frame *f, size_t oldsize, size_t newsize)
+{
+ //assert("Need to fix this" == 0);
+ assert(newsize > oldsize);
+#if SIMPLE_FRAME
+ frame *old_indirect = get<frame *>(f[0]);
+ frame *new_indirect = new item[newsize];
+ std::copy(old_indirect, old_indirect+oldsize, new_indirect);
+ f[0] = new_indirect;
+#else
+ f->extend(newsize);
#endif
+}
+
+
+
void run(lambda *l)
{
@@ -60,16 +137,58 @@ void run(lambda *l)
s.run(&f);
}
-void stack::marshall(size_t args, vars_t vars)
+// Move arguments from stack to frame.
+void stack::marshall(size_t args, stack::vars_t vars)
{
for (size_t i = args; i > 0; --i)
- (*vars)[i] = pop();
+#if SIMPLE_FRAME
+ vars[i-1] = pop();
+#else
+ (*vars)[i-1] = pop();
+#endif
+}
+
+#ifdef PROFILE
+
+#ifndef DEBUG_FRAME
+#warning "profiler needs DEBUG_FRAME for function names"
+#endif
+#ifndef DEBUG_BLTIN
+#warning "profiler needs DEBUG_BLTIN for builtin function names"
+#endif
+
+profiler prof;
+
+void dumpProfile() {
+ std::ofstream out("asyprof");
+ if (!out.fail())
+ prof.dump(out);
+}
+#endif
+
+void assessClosure(lambda *body) {
+ // If we have already determined if it needs closure, just return.
+ if (body->closureReq != lambda::MAYBE_NEEDS_CLOSURE)
+ return;
+
+ for (program::label l = body->code->begin(); l != body->code->end(); ++l)
+ if (l->op == inst::pushclosure ||
+ l->op == inst::pushframe) {
+ body->closureReq = lambda::NEEDS_CLOSURE;
+ return;
+ }
+
+ body->closureReq = lambda::DOESNT_NEED_CLOSURE;
}
void stack::run(func *f)
{
lambda *body = f->body;
+#ifdef PROFILE
+ prof.beginFunction(body);
+#endif
+
#ifdef DEBUG_STACK
#ifdef DEBUG_FRAME
cout << "running lambda " + body->name + ": \n";
@@ -79,17 +198,12 @@ void stack::run(func *f)
print(cout, body->code);
cout << endl;
#endif
-
- /* make new activation record */
-#ifdef DEBUG_FRAME
- assert(!body->name.empty());
- vars_t vars = make_frame(body->name, body->params, f->closure);
-#else
- vars_t vars = make_frame(body->params, f->closure);
-#endif
- marshall(body->params, vars);
- run(body->code, vars);
+ runWithOrWithoutClosure(body, 0, f->closure);
+
+#ifdef PROFILE
+ prof.endFunction(body);
+#endif
}
void stack::breakpoint(absyntax::runnable *r)
@@ -145,25 +259,90 @@ void stack::debug()
break;
}
}
-
-void stack::run(program *code, vars_t vars)
+
+void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
{
+ // The size of the frame (when running without closure).
+ size_t frameSize = l->parentIndex;
+
+#ifdef SIMPLE_FRAME
+ // Link to the variables, be they in a closure or on the stack.
+ frame *varlink;
+
+# define SET_VARLINK assert(vars); varlink = vars;
+# define VAR(n) ( (varlink)[(n) + frameStart] )
+# define FRAMEVAR(frame,n) (frame[(n)])
+#else
+ // Link to the variables, be they in a closure or on the stack.
+ mem::vector<item> *varlink;
+
+# define SET_VARLINK assert(vars); varlink = &vars->vars
+# define VAR(n) ( (*varlink)[(n) + frameStart] )
+# define FRAMEVAR(frame,n) ((*frame)[(n)])
+#endif
+
+ size_t frameStart = 0;
+
+ // Set up the closure, if necessary.
+ if (vars == 0)
+ {
+#ifndef SIMPLE_FRAME
+ assessClosure(l);
+ if (l->closureReq == lambda::NEEDS_CLOSURE)
+#endif
+ {
+ /* make new activation record */
+ vars = vm::make_frame(l, parent);
+ assert(vars);
+ }
+#ifndef SIMPLE_FRAME
+ else
+ {
+ assert(l->closureReq == lambda::DOESNT_NEED_CLOSURE);
+
+ // Use the stack to store variables.
+ varlink = &theStack;
+
+ // Record where the parameters start on the stack.
+ frameStart = theStack.size() - frameSize;
+
+ // Add the parent's closure to the frame.
+ push(parent);
+ ++frameSize;
+
+ size_t newFrameSize = (size_t)l->framesize;
+
+ if (newFrameSize > frameSize) {
+ theStack.resize(frameStart + newFrameSize);
+ frameSize = newFrameSize;
+ }
+ }
+#endif
+ }
+
+ if (vars) {
+ marshall(l->parentIndex, vars);
+
+ SET_VARLINK;
+ }
+
/* start the new function */
- program::label ip = code->begin();
+ program::label ip = l->code->begin();
try {
for (;;) {
const inst &i = *ip;
curPos = i.pos;
-#if 0
- //printInst(cout, ip, code->begin());
- cout << i.pos << "\n";
+#ifdef PROFILE
+ prof.recordInstruction();
#endif
+
#ifdef DEBUG_STACK
- cerr << curPos << "\n";
- printInst(cerr, ip, code->begin());
- cerr << "\n";
+ printInst(cout, ip, l->code->begin());
+ cout << " (";
+ i.pos.printTerse(cout);
+ cout << ")\n";
#endif
if(settings::verbose > 4) em.trace(curPos);
@@ -174,42 +353,72 @@ void stack::run(program *code, vars_t vars)
switch (i.op)
{
- case inst::pop:
- pop();
- break;
-
- case inst::intpush:
- case inst::constpush:
- push(i.ref);
- break;
-
case inst::varpush:
- push((*vars)[get<Int>(i)]);
+ push(VAR(get<Int>(i)));
break;
case inst::varsave:
- (*vars)[get<Int>(i)] = top();
+ VAR(get<Int>(i)) = top();
break;
#ifdef COMBO
case inst::varpop:
- (*vars)[get<Int>(i)] = pop();
+ VAR(get<Int>(i)) = pop();
break;
+#endif
+
+ case inst::ret: {
+ if (vars == 0)
+ // Delete the frame from the stack.
+ // TODO: Optimize for common cases.
+ theStack.erase(theStack.begin() + frameStart,
+ theStack.begin() + frameStart + frameSize);
+ return;
+ }
+
+ case inst::pushframe:
+ {
+ assert(vars);
+ Int size = get<Int>(i);
+ vars=make_pushframe(size, vars);
+
+ SET_VARLINK;
- case inst::fieldpop: {
- vars_t frame = pop<vars_t>();
- if (!frame)
- error("dereference of null pointer");
- (*frame)[get<Int>(i)] = pop();
break;
}
-#endif
+
+ case inst::popframe:
+ {
+ assert(vars);
+ vars=get<frame *>(VAR(0));
+
+ SET_VARLINK;
+
+ break;
+ }
+
+ case inst::pushclosure:
+ assert(vars);
+ push(vars);
+ break;
+
+ case inst::nop:
+ break;
+
+ case inst::pop:
+ pop();
+ break;
+
+ case inst::intpush:
+ case inst::constpush:
+ push(i.ref);
+ break;
case inst::fieldpush: {
vars_t frame = pop<vars_t>();
if (!frame)
error("dereference of null pointer");
- push((*frame)[get<Int>(i)]);
+ push(FRAMEVAR(frame, get<Int>(i)));
break;
}
@@ -217,13 +426,31 @@ void stack::run(program *code, vars_t vars)
vars_t frame = pop<vars_t>();
if (!frame)
error("dereference of null pointer");
- (*frame)[get<Int>(i)] = top();
+ FRAMEVAR(frame, get<Int>(i)) = top();
break;
}
+
+#if COMBO
+ case inst::fieldpop: {
+#error NOT REIMPLEMENTED
+ vars_t frame = pop<vars_t>();
+ if (!frame)
+ error("dereference of null pointer");
+ FRAMEVAR(get<Int>(i)) = pop();
+ break;
+ }
+#endif
+
case inst::builtin: {
bltin func = get<bltin>(i);
+#ifdef PROFILE
+ prof.beginFunction(func);
+#endif
func(this);
+#ifdef PROFILE
+ prof.endFunction(func);
+#endif
break;
}
@@ -239,6 +466,10 @@ void stack::run(program *code, vars_t vars)
if (!pop<bool>()) { ip = get<program::label>(i); continue; }
break;
+ case inst::jump_if_not_default:
+ if (!isdefault(pop())) { ip = get<program::label>(i); continue; }
+ break;
+
#ifdef COMBO
case inst::gejmp: {
Int y = pop<Int>();
@@ -247,8 +478,30 @@ void stack::run(program *code, vars_t vars)
{ ip = get<program::label>(i); continue; }
break;
}
+
+#if 0
+ case inst::jump_if_func_eq: {
+ callable * b=pop<callable *>();
+ callable * a=pop<callable *>();
+ if (a->compare(b))
+ { ip = get<program::label>(i); continue; }
+ break;
+ }
+
+ case inst::jump_if_func_neq: {
+ callable * b=pop<callable *>();
+ callable * a=pop<callable *>();
+ if (!a->compare(b))
+ { ip = get<program::label>(i); continue; }
+ break;
+ }
+#endif
#endif
+ case inst::push_default:
+ push(Default);
+ break;
+
case inst::popcall: {
/* get the function reference off of the stack */
callable* f = pop<callable*>();
@@ -256,10 +509,6 @@ void stack::run(program *code, vars_t vars)
break;
}
- case inst::pushclosure:
- push(vars);
- break;
-
case inst::makefunc: {
func *f = new func;
f->closure = pop<vars_t>();
@@ -269,29 +518,6 @@ void stack::run(program *code, vars_t vars)
break;
}
- case inst::ret: {
- return;
- }
-
- case inst::alloc: {
- vars->extend(get<Int>(i));
- break;
- }
-
- case inst::pushframe: {
-#ifdef DEBUG_FRAME
- vars=make_frame("<pushed frame>", 0, vars);
-#else
- vars=make_frame(0, vars);
-#endif
- break;
- }
-
- case inst::popframe: {
- vars=get<frame *>((*vars)[0]);
- break;
- }
-
default:
error("Internal VM error: Bad stack operand");
}
@@ -307,6 +533,10 @@ void stack::run(program *code, vars_t vars)
} catch (bad_item_value&) {
error("Trying to use uninitialized value.");
}
+
+#undef SET_VARLINK
+#undef VAR
+#undef FRAMEVAR
}
void stack::load(string index) {
@@ -356,24 +586,39 @@ void draw(ostream& out, frame* v)
out << "vars:" << endl;
while (!!v) {
- out << " " << v->getName() << ":";
+ item link=(*v)[v->getParentIndex()];
- frame *parent=0;
- item link=(*v)[0];
- try {
- parent = get<frame *>(link);
- out << (parent ? " link" : " ----");
- } catch (bad_item_value&) {
- out << " " << (*v)[0];
- }
+ out << " " << v->getName() << ": ";
- for (size_t i = 1; i < MAX_ITEMS && i < v->size(); i++) {
- out << " | " << i << ": " << (*v)[i];
+ for (size_t i = 0; i < MAX_ITEMS && i < v->size(); i++) {
+ if (i > 0)
+ out << " | ";
+ out << i << ": ";
+
+ if (i == v->getParentIndex()) {
+ try {
+ frame *parent = get<frame *>(link);
+ out << (parent ? "link" : "----");
+ } catch (bad_item_value&) {
+ out << "non-link " << (*v)[0];
+ }
+ } else {
+ out << (*v)[i];
+ }
}
+
if (v->size() > MAX_ITEMS)
out << "...";
out << "\n";
+
+ frame *parent;
+ try {
+ parent = get<frame *>(link);
+ } catch (bad_item_value&) {
+ parent = 0;
+ }
+
v = parent;
}
}
@@ -401,16 +646,17 @@ void error(const ostringstream& message)
error(message.str().c_str());
}
+const size_t STARTING_GLOBALS_SIZE = 1;
interactiveStack::interactiveStack()
-#ifdef DEBUG_FRAME
- : globals(new frame("globals", 0)) {}
-#else
- : globals(new frame(0)) {}
-#endif
-
+ : globals(make_globalframe(STARTING_GLOBALS_SIZE)),
+ globals_size(STARTING_GLOBALS_SIZE) {}
void interactiveStack::run(lambda *codelet) {
- stack::run(codelet->code, globals);
+ if (globals_size < codelet->framesize) {
+ resize_frame(globals, globals_size, codelet->framesize);
+ globals_size = codelet->framesize;
+ }
+ stack::runWithOrWithoutClosure(codelet, globals, 0);
}
} // namespace vm
diff --git a/Build/source/utils/asymptote/stack.h b/Build/source/utils/asymptote/stack.h
index bb42074800d..4cb2ef0b41e 100644
--- a/Build/source/utils/asymptote/stack.h
+++ b/Build/source/utils/asymptote/stack.h
@@ -56,17 +56,8 @@ private:
typedef mem::vector<item> stack_t;
stack_t theStack;
-#ifdef DEBUG_FRAME
- vars_t make_frame(string name, size_t, vars_t closure);
-#else
- vars_t make_frame(size_t, vars_t closure);
-#endif
-
void draw(ostream& out);
- // Move arguments from stack to frame.
- void marshall(size_t args, vars_t vars);
-
// The initializer functions for imports, indexed by name.
importInitMap *initMap;
@@ -84,6 +75,9 @@ private:
position lastPos, breakPos;
bool newline;
+ // Move arguments from stack to frame.
+ void marshall(size_t args, stack::vars_t vars);
+
public:
stack() : e(0), debugOp(0), lastPos(nullPos),
breakPos(nullPos), newline(false) {};
@@ -102,8 +96,9 @@ public:
return e;
}
- // Runs the instruction listed in code, with vars as frame of variables.
- void run(program *code, vars_t vars);
+ // Runs a lambda. If vars is non-null, it is used to store the variables of
+ // the lambda. Otherwise, the method allocates a closure only if needed.
+ void runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent);
// Executes a function on top of the stack.
void run(func *f);
@@ -158,6 +153,7 @@ inline T pop(stack* s, T defval)
class interactiveStack : public stack {
vars_t globals;
+ size_t globals_size;
public:
interactiveStack();
diff --git a/Build/source/utils/asymptote/stm.cc b/Build/source/utils/asymptote/stm.cc
index 43f56aea042..d4ffdaa4e81 100644
--- a/Build/source/utils/asymptote/stm.cc
+++ b/Build/source/utils/asymptote/stm.cc
@@ -181,8 +181,8 @@ void ifStm::prettyprint(ostream &out, Int indent)
void ifStm::trans(coenv &e)
{
- Int elseLabel = e.c.fwdLabel();
- Int end = e.c.fwdLabel();
+ label elseLabel = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
#ifdef TRANSJUMP
test->transConditionalJump(e, false, elseLabel);
@@ -209,9 +209,47 @@ void ifStm::trans(coenv &e)
void transLoopBody(coenv &e, stm *body) {
- e.c.encodePushFrame();
+ // The semantics of the language are defined so that any variable declared
+ // inside a loop are new variables for each iteration of the loop. For
+ // instance, the code
+ //
+ // int f();
+ // for (int i = 0; i < 10; ++i) {
+ // int j=10*i;
+ // if (i == 5)
+ // f = new int() { return j; }
+ // }
+ // write(f());
+ //
+ // will write 50. This is implemented by allocating a new frame for each
+ // iteration. However, this can have a big performance hit, so we first
+ // translate the code without the frame, check if it needed the closure, and
+ // rewrite the code if necessary.
+
+ label start = e.c.defNewLabel();
+
+ // Encode a no-op, in case we need to jump over the default implementation
+ // to a special case.
+ e.c.encode(inst::nop);
+
body->markTrans(e);
- e.c.encodePopFrame();
+
+ // Don't re-translate if there were errors.
+ if (em.errors())
+ return;
+
+ if (e.c.usesClosureSinceLabel(start)){
+ // Jump over the old section.
+ label end = e.c.defNewLabel();
+ e.c.encodePatch(start, end);
+
+ // Let coder know that break and continue need to pop the frame.
+ e.c.loopPushesFrame();
+
+ e.c.encodePushFrame();
+ body->markTrans(e);
+ e.c.encodePopFrame();
+ }
}
void whileStm::prettyprint(ostream &out, Int indent)
@@ -224,11 +262,9 @@ void whileStm::prettyprint(ostream &out, Int indent)
void whileStm::trans(coenv &e)
{
- Int end = e.c.fwdLabel();
- e.c.pushBreak(end);
-
- Int start = e.c.defLabel();
- e.c.pushContinue(start);
+ label end = e.c.fwdLabel();
+ label start = e.c.defNewLabel();
+ e.c.pushLoop(start, end);
#ifdef TRANSJUMP
test->transConditionalJump(e, false, end);
@@ -242,8 +278,7 @@ void whileStm::trans(coenv &e)
e.c.useLabel(inst::jmp,start);
e.c.defLabel(end);
- e.c.popBreak();
- e.c.popContinue();
+ e.c.popLoop();
}
@@ -257,12 +292,11 @@ void doStm::prettyprint(ostream &out, Int indent)
void doStm::trans(coenv &e)
{
- Int testLabel = e.c.fwdLabel();
- e.c.pushContinue(testLabel);
- Int end = e.c.fwdLabel();
- e.c.pushBreak(end);
+ label testLabel = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
+ e.c.pushLoop(testLabel, end);
- Int start = e.c.defLabel();
+ label start = e.c.defNewLabel();
transLoopBody(e,body);
@@ -277,8 +311,7 @@ void doStm::trans(coenv &e)
e.c.defLabel(end);
- e.c.popBreak();
- e.c.popContinue();
+ e.c.popLoop();
}
@@ -299,12 +332,11 @@ void forStm::trans(coenv &e)
if (init)
init->markTrans(e);
- Int ctarget = e.c.fwdLabel();
- e.c.pushContinue(ctarget);
- Int end = e.c.fwdLabel();
- e.c.pushBreak(end);
+ label ctarget = e.c.fwdLabel();
+ label end = e.c.fwdLabel();
+ e.c.pushLoop(ctarget, end);
- Int start = e.c.defLabel();
+ label start = e.c.defNewLabel();
if(test) {
#ifdef TRANSJUMP
test->transConditionalJump(e, false, end);
@@ -324,9 +356,9 @@ void forStm::trans(coenv &e)
e.c.defLabel(end);
+ e.c.popLoop();
+
e.e.endScope();
- e.c.popBreak();
- e.c.popContinue();
}
void extendedForStm::prettyprint(ostream &out, Int indent)
@@ -415,10 +447,6 @@ void breakStm::prettyprint(ostream &out, Int indent)
void breakStm::trans(coenv &e)
{
- // Loop bodies have their own frame to declare variables for each iteration.
- // Pop out of this frame when jumping out of the loop body.
- e.c.encode(inst::popframe);
-
if (!e.c.encodeBreak()) {
em.error(getPos());
em << "break statement outside of a loop";
@@ -433,10 +461,6 @@ void continueStm::prettyprint(ostream &out, Int indent)
void continueStm::trans(coenv &e)
{
- // Loop bodies have their own frame to declare variables for each iteration.
- // Pop out of this frame when jumping out of the loop body.
- e.c.encode(inst::popframe);
-
if (!e.c.encodeContinue()) {
em.error(getPos());
em << "continue statement outside of a loop";
diff --git a/Build/source/utils/asymptote/symbol.cc b/Build/source/utils/asymptote/symbol.cc
index b4e173b72be..16352cff896 100644
--- a/Build/source/utils/asymptote/symbol.cc
+++ b/Build/source/utils/asymptote/symbol.cc
@@ -332,7 +332,6 @@ ostream& operator<< (ostream& out, const symbol sym)
} // end namespace sym
-#ifdef PRESYM
/* Define all of operator symbols SYM_PLUS, etc. */
#define OPSYMBOL(str, name) \
sym::symbol name = sym::symbol::opTrans(str)
@@ -344,4 +343,3 @@ ostream& operator<< (ostream& out, const symbol sym)
sym::symbol PRETRANSLATED_SYMBOL_##name = sym::symbol::literalTrans(#name)
#include "allsymbols.h"
#undef ADDSYMBOL
-#endif
diff --git a/Build/source/utils/asymptote/tests/Makefile b/Build/source/utils/asymptote/tests/Makefile
index 3372c7a6268..afdae4e0472 100644
--- a/Build/source/utils/asymptote/tests/Makefile
+++ b/Build/source/utils/asymptote/tests/Makefile
@@ -1,7 +1,7 @@
.NOTPARALLEL:
TESTDIRS = string arith frames types imp array
-EXTRADIRS = gsl
+EXTRADIRS = gsl output
test: $(TESTDIRS)
diff --git a/Build/source/utils/asymptote/tests/array/fields.asy b/Build/source/utils/asymptote/tests/array/fields.asy
index 7845ef2de64..9b5926d3745 100644
--- a/Build/source/utils/asymptote/tests/array/fields.asy
+++ b/Build/source/utils/asymptote/tests/array/fields.asy
@@ -16,11 +16,13 @@ StartTest("fields");
z.cyclic=false;
}
}
+
{
int[] z = {2, 3, 5};
for (int k = -100; k <= 100; ++k)
assert(z.initialized(k) == (k >= 0 && k < 3));
}
+
{
int[] z;
for (int i=0; i<10; ++i) {
@@ -53,7 +55,7 @@ StartTest("fields");
{
int[] base={4,5,9,5,0,2,3};
int[] z;
- for (int i=0; i<99; ++i) {
+ for (int i=0; i<9; ++i) {
assert(z.length == i*base.length);
for (int j : z.keys)
assert(z[j] == base[j%base.length]);
diff --git a/Build/source/utils/asymptote/tests/frames/loop.asy b/Build/source/utils/asymptote/tests/frames/loop.asy
index ceb65a1ff56..a4714d1f8da 100644
--- a/Build/source/utils/asymptote/tests/frames/loop.asy
+++ b/Build/source/utils/asymptote/tests/frames/loop.asy
@@ -26,4 +26,171 @@ for (int i=0; i<10; ++i) {
}
assert(f()==70);
+{
+ int y = 3;
+ int z = 0;
+ for (int i = 0; i < 7; ++i)
+ {
+ ++z;
+ continue;
+ y = 4;
+ }
+ assert(y == 3);
+ assert(z == 7);
+}
+{
+ int y = 3;
+ int z = 0;
+ for (int i = 0; i < 7; ++i)
+ {
+ ++z;
+ break;
+ y = 4;
+ }
+ assert(y == 3);
+ assert(z == 1);
+}
+{
+ int y = 3;
+ int z = 0;
+ for (int i = 0; i < 7; ++i)
+ {
+ void g() {}
+ ++z;
+ continue;
+ y = 4;
+ }
+ assert(y == 3);
+ assert(z == 7);
+}
+{
+ int y = 3;
+ int z = 0;
+ for (int i = 0; i < 7; ++i)
+ {
+ void g() {}
+ ++z;
+ break;
+ y = 4;
+ }
+ assert(y == 3);
+ assert(z == 1);
+}
+
+// While loops
+{
+ int y = 7;
+ int z = 0;
+ while (z < 10) {
+ ++z;
+ continue;
+ ++y;
+ }
+ assert(z == 10);
+ assert(y == 7);
+}
+
+{
+ int y = 7;
+ int z = 0;
+ while (z < 10) {
+ void g() {}
+ ++z;
+ continue;
+ ++y;
+ }
+ assert(z == 10);
+ assert(y == 7);
+}
+
+{
+ int y = 7;
+ int z = 0;
+ while (z < 10) {
+ ++z;
+ break;
+ ++y;
+ }
+ assert(z == 1);
+ assert(y == 7);
+}
+
+{
+ int y = 7;
+ int z = 0;
+ while (z < 10) {
+ void g() {}
+ ++z;
+ break;
+ ++y;
+ }
+ assert(z == 1);
+ assert(y == 7);
+}
+
+
+{
+ int y = 7;
+ int z = 0;
+ while (z < 10) {
+ ++z;
+ continue;
+ ++y;
+ }
+ assert(z == 10);
+ assert(y == 7);
+}
+
+// Do loops
+{
+ int y = 7;
+ int z = 0;
+ do {
+ void g() {}
+ ++z;
+ continue;
+ ++y;
+ } while (z < 10);
+ assert(z == 10);
+ assert(y == 7);
+}
+
+{
+ int y = 7;
+ int z = 0;
+ do {
+ ++z;
+ break;
+ ++y;
+ } while (z < 10);
+ assert(z == 1);
+ assert(y == 7);
+}
+
+{
+ int y = 7;
+ int z = 0;
+ do {
+ void g() {}
+ ++z;
+ break;
+ ++y;
+ } while (z < 10);
+ assert(z == 1);
+ assert(y == 7);
+}
+
+{
+ int x = 456;
+ do { x = 123; } while (false);
+ assert(x == 123);
+}
+
+{
+ int x = 456;
+ do { void g() {} x = 123; } while (false);
+ assert(x == 123);
+}
+
+
EndTest();
diff --git a/Build/source/utils/asymptote/tests/output/Makefile b/Build/source/utils/asymptote/tests/output/Makefile
index 2462ea1cae5..938625ab038 100644
--- a/Build/source/utils/asymptote/tests/output/Makefile
+++ b/Build/source/utils/asymptote/tests/output/Makefile
@@ -17,7 +17,7 @@ $(TESTS:=.ref) $(TESTS:=.out): %:
@rm -rf $@
@mkdir $@
@cd $@; \
- $(ASY) -v -v -keep ../$(basename $@) \
+ $(ASY) -keep ../$(basename $@) \
>$(basename $@).stdout 2>$(basename $@).stderr; \
ls >$(basename $@).ls; \
rm -f *.dvi *.pdf *.gif *.jpg *.jpeg *.png
diff --git a/Build/source/utils/asymptote/tests/types/keyword.asy b/Build/source/utils/asymptote/tests/types/keyword.asy
new file mode 100644
index 00000000000..63ad01fecd5
--- /dev/null
+++ b/Build/source/utils/asymptote/tests/types/keyword.asy
@@ -0,0 +1,197 @@
+import TestLib;
+StartTest("keyword");
+{
+ int f(int keyword x) {
+ return 2*x;
+ }
+
+ assert(f(x=17) == 34);
+}
+
+{
+ int f(int keyword x = 10) {
+ return 2*x;
+ }
+
+ assert(f() == 20);
+}
+
+{
+ int f(int keyword x = 10, int keyword y = 20)
+ {
+ return 2x+y;
+ }
+
+ assert(f(x=1,y=2) == 4);
+ assert(f(y=1,x=2) == 5);
+ assert(f(x=1) == 22);
+ assert(f(y=7) == 27);
+ assert(f() == 40);
+}
+
+{
+ int f(int keyword x, int keyword y = 20)
+ {
+ return x+y;
+ }
+
+ assert(f(x=1,y=2) == 3);
+ assert(f(x=1) == 21);
+}
+
+{
+ int f(int keyword x = 10, int keyword y)
+ {
+ return x+y;
+ }
+
+ assert(f(x=1,y=2) == 3);
+ assert(f(y=2) == 12);
+}
+
+{
+ int f(int keyword x, int keyword y)
+ {
+ return x+y;
+ }
+
+ assert(f(x=1,y=2) == 3);
+}
+
+{
+ int f(int x, int keyword y)
+ {
+ return 2x+y;
+ }
+
+ assert(f(x=1,y=2) == 4);
+ assert(f(1,y=2) == 4);
+ assert(f(y=2,1) == 4);
+ assert(f(y=2,x=1) == 4);
+}
+
+{
+ int f(... int[] nums, int keyword r)
+ {
+ return r;
+ }
+
+ assert(f(r=3) == 3);
+ assert(f(1,r=3) == 3);
+ assert(f(1,2, r=3) == 3);
+ assert(f(1,2,4,5,6, r=3) == 3);
+ assert(f(r=3, 10, 20, 30) == 3);
+ assert(f(4, 5, r=3, 10, 20, 30) == 3);
+ assert(f(4, 5, r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ /*
+ assert(f(... new int[] {40,50,60}, r=3) == 3);
+ assert(f(... new int[] {40,50,60}, r=3) == 3);
+ */
+}
+
+{
+ int f(... int[] nums, int keyword r=77)
+ {
+ return r;
+ }
+
+ assert(f(r=3) == 3);
+ assert(f(1,r=3) == 3);
+ assert(f(1,2, r=3) == 3);
+ assert(f(1,2,4,5,6, r=3) == 3);
+ assert(f(r=3, 10, 20, 30) == 3);
+ assert(f(4, 5, r=3, 10, 20, 30) == 3);
+ assert(f(4, 5, r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ /*
+ assert(f(... new int[] {40,50,60}, r=3) == 3);
+ assert(f(... new int[] {40,50,60}, r=3) == 3);
+ */
+
+ assert(f() == 77);
+ assert(f(1) == 77);
+ assert(f(1,2) == 77);
+ assert(f(1,2,4,5,6) == 77);
+ assert(f(10, 20, 30) == 77);
+ assert(f(4, 5, 10, 20, 30) == 77);
+ assert(f(4, 5, 10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(... new int[] {40,50,60}) == 77);
+ assert(f(... new int[] {40,50,60}) == 77);
+}
+
+{
+ int f(int x ... int[] nums, int keyword r=77)
+ {
+ return r;
+ }
+
+ assert(f(345,r=3) == 3);
+ assert(f(345,1,r=3) == 3);
+ assert(f(345,1,2, r=3) == 3);
+ assert(f(345,1,2,4,5,6, r=3) == 3);
+ assert(f(345,r=3, 10, 20, 30) == 3);
+ assert(f(345,4, 5, r=3, 10, 20, 30) == 3);
+ assert(f(345,4, 5, r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(345,r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ assert(f(345,r=3, 10, 20, 30 ... new int[] {40,50,60}) == 3);
+ /*
+ assert(f(345 ... new int[] {40,50,60}, r=3) == 3);
+ assert(f(345 ... new int[] {40,50,60}, r=3) == 3);
+ assert("ADD LEFT TO RIGHT ORDER TESTING" == "Not yet");
+ */
+
+ assert(f(345) == 77);
+ assert(f(345,1) == 77);
+ assert(f(345,1,2) == 77);
+ assert(f(345,1,2,4,5,6) == 77);
+ assert(f(345,10, 20, 30) == 77);
+ assert(f(345,4, 5, 10, 20, 30) == 77);
+ assert(f(345,4, 5, 10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(345,10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(345,10, 20, 30 ... new int[] {40,50,60}) == 77);
+ assert(f(345 ... new int[] {40,50,60}) == 77);
+ assert(f(345 ... new int[] {40,50,60}) == 77);
+}
+
+{
+ int sqr(int x=7) { return x*x; }
+ int f(int keyword x) = sqr;
+ int g(int keyword x=666) = sqr;
+ assert(f(x=5) == 25);
+ assert(g(x=5) == 25);
+ assert(g() == 49);
+}
+{
+ int sqr(int n=7) { return n*n; }
+ int f(int keyword x) = sqr;
+ int g(int keyword x=666) = sqr;
+ assert(f(x=5) == 25);
+ assert(g(x=5) == 25);
+ assert(g() == 49);
+}
+{
+ int sqr(int keyword x=7) { return x*x; }
+ int f(int x) = sqr;
+ int g(int x=666) = sqr;
+ assert(f(x=5) == 25);
+ assert(g(x=5) == 25);
+ assert(f(5) == 25);
+ assert(g(5) == 25);
+ assert(g() == 49);
+}
+{
+ int sqr(int keyword n=7) { return n*n; }
+ int f(int x) = sqr;
+ int g(int x=666) = sqr;
+ assert(f(x=5) == 25);
+ assert(g(x=5) == 25);
+ assert(f(5) == 25);
+ assert(g(5) == 25);
+ assert(g() == 49);
+}
+EndTest();
diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc
index c1e22b9a7cf..9437ab389f3 100644
--- a/Build/source/utils/asymptote/texfile.cc
+++ b/Build/source/utils/asymptote/texfile.cc
@@ -44,7 +44,7 @@ texfile::~texfile()
void texfile::miniprologue()
{
- texpreamble(*out,processData().TeXpreamble,false,true);
+ texpreamble(*out,processData().TeXpreamble,false);
if(settings::latex(texengine)) {
*out << "\\pagestyle{empty}" << newl
<< "\\textheight=2048pt" << newl
@@ -62,11 +62,8 @@ void texfile::prologue()
{
if(inlinetex) {
string prename=buildname(settings::outname(),"pre");
- std::ifstream exists(prename.c_str());
- std::ofstream *outpreamble=
- new std::ofstream(prename.c_str(),std::ios::app);
- bool ASYdefines=!exists;
- texpreamble(*outpreamble,processData().TeXpreamble,ASYdefines,ASYdefines);
+ std::ofstream *outpreamble=new std::ofstream(prename.c_str());
+ texpreamble(*outpreamble,processData().TeXpreamble);
outpreamble->close();
}
@@ -149,15 +146,22 @@ void texfile::beginlayer(const string& psname, bool postscript)
<< "\\includegraphics";
bool pdf=settings::pdf(texengine);
string quote;
- if(stripDir(psname) != psname)
- quote="\"";
+ string name=stripExt(psname);
+ if(inlinetex) {
+ size_t pos=name.rfind("-");
+ if(pos < string::npos) name="\\ASYprefix\\jobname"+name.substr(pos);
+ } else {
+ name=pdf ? stripExt(psname) : psname;
+ if(stripDir(name) != name)
+ quote="\"";
+ }
- if(!pdf)
+ if(pdf) *out << "{" << quote << name << quote << ".pdf}%" << newl;
+ else {
*out << "[bb=" << box.left << " " << box.bottom << " "
- << box.right << " " << box.top << "]";
- if(pdf) *out << "{" << quote << stripExt(psname) << quote << ".pdf}%"
- << newl;
- else *out << "{" << quote << psname << quote << "}%" << newl;
+ << box.right << " " << box.top << "]"
+ << "{" << quote << name << quote << "}%" << newl;
+ }
*out << "}%" << newl;
}
if(!inlinetex)
diff --git a/Build/source/utils/asymptote/texfile.h b/Build/source/utils/asymptote/texfile.h
index a62cfde43bc..d1bc235f748 100644
--- a/Build/source/utils/asymptote/texfile.h
+++ b/Build/source/utils/asymptote/texfile.h
@@ -56,16 +56,16 @@ void latexfontencoding(T& out)
template<class T>
void texpreamble(T& out, mem::list<string>& preamble=processData().TeXpreamble,
- bool ASYalign=true, bool ASYbase=true)
+ bool ASYalign=true)
{
texuserpreamble(out,preamble);
string texengine=settings::getSetting<string>("tex");
- if(ASYbase)
- out << "\\newbox\\ASYbox" << newl
- << "\\newdimen\\ASYdimen" << newl
- << "\\long\\def\\ASYbase#1#2{\\leavevmode\\setbox\\ASYbox=\\hbox{#1}"
- << "\\ASYdimen=\\ht\\ASYbox%" << newl
- << "\\setbox\\ASYbox=\\hbox{#2}\\lower\\ASYdimen\\box\\ASYbox}" << newl;
+ out << "\\def\\ASYprefix{}" << newl
+ << "\\newbox\\ASYbox" << newl
+ << "\\newdimen\\ASYdimen" << newl
+ << "\\long\\def\\ASYbase#1#2{\\leavevmode\\setbox\\ASYbox=\\hbox{#1}"
+ << "\\ASYdimen=\\ht\\ASYbox%" << newl
+ << "\\setbox\\ASYbox=\\hbox{#2}\\lower\\ASYdimen\\box\\ASYbox}" << newl;
if(ASYalign)
out << "\\long\\def\\ASYaligned(#1,#2)(#3,#4)#5#6#7{\\leavevmode%" << newl
<< "\\setbox\\ASYbox=\\hbox{#7}%" << newl
diff --git a/Build/source/utils/asymptote/types.cc b/Build/source/utils/asymptote/types.cc
index 758ae0cac15..7e269afe312 100644
--- a/Build/source/utils/asymptote/types.cc
+++ b/Build/source/utils/asymptote/types.cc
@@ -19,6 +19,10 @@
#include "access.h"
#include "virtualfieldaccess.h"
+namespace run {
+void arrayDeleteHelper(vm::stack *Stack);
+}
+
// For pre-translated symbols.
#ifndef NOSYM
#include "types.symbols.h"
@@ -80,25 +84,25 @@ void ty::print(ostream& out) const
return &v; \
}
-#define SIGFIELD(Type, name, func) \
- if (id == name && \
- equivalent(sig, Type()->getSignature())) \
- { \
- static trans::virtualFieldAccess a(run::func); \
- static trans::varEntry v(Type(), &a, 0, position()); \
- return &v; \
+#define SIGFIELD(Type, name, func) \
+ if (id == name && \
+ equivalent(sig, Type()->getSignature())) \
+ { \
+ static trans::virtualFieldAccess a(run::func, 0, run::func##Helper); \
+ static trans::varEntry v(Type(), &a, 0, position()); \
+ return &v; \
}
-#define DSIGFIELD(name, sym, func) \
- if (id == sym && \
- equivalent(sig, name##Type()->getSignature())) \
- { \
- static trans::virtualFieldAccess a(run::func); \
- /* for some fields, v needs to be dynamic */ \
- /* e.g. when the function type depends on an array type. */ \
- trans::varEntry *v = \
- new trans::varEntry(name##Type(), &a, 0, position()); \
- return v; \
+#define DSIGFIELD(name, sym, func) \
+ if (id == sym && \
+ equivalent(sig, name##Type()->getSignature())) \
+ { \
+ static trans::virtualFieldAccess a(run::func, 0, run::func##Helper); \
+ /* for some fields, v needs to be dynamic */ \
+ /* e.g. when the function type depends on an array type. */ \
+ trans::varEntry *v = \
+ new trans::varEntry(name##Type(), &a, 0, position()); \
+ return v; \
}
#define FILEFIELD(GetType, SetType, name, sym) \
@@ -322,8 +326,21 @@ trans::varEntry *array::virtualField(symbol id, signature *sig)
#undef SIGFIELDLIST
+void printFormal(ostream& out, const formal& f, bool keywordOnly)
+{
+ if (f.Explicit)
+ out << "explicit ";
+ if (f.name)
+ f.t->printVar(out, keywordOnly ? "keyword "+(string)(f.name) : f.name);
+ else
+ f.t->print(out);
+ if (f.defval)
+ out << "=<default>";
+}
+
ostream& operator<< (ostream& out, const formal& f)
{
+#if 0
if (f.Explicit)
out << "explicit ";
if (f.name)
@@ -332,6 +349,8 @@ ostream& operator<< (ostream& out, const formal& f)
f.t->print(out);
if (f.defval)
out << "=<default>";
+#endif
+ printFormal(out, f, false);
return out;
}
@@ -365,13 +384,12 @@ ostream& operator<< (ostream& out, const signature& s)
out << "(";
- formal_vector::const_iterator f = s.formals.begin();
- if (f != s.formals.end()) {
- out << *f;
- ++f;
+ for (size_t i = 0; i < s.formals.size(); ++i)
+ {
+ if (i > 0)
+ out << ", ";
+ printFormal(out, s.getFormal(i), s.formalIsKeywordOnly(i));
}
- for (; f != s.formals.end(); ++f)
- out << ", " << *f;
if (s.rest.t) {
if (!s.formals.empty())
diff --git a/Build/source/utils/asymptote/types.h b/Build/source/utils/asymptote/types.h
index c4c560dbad5..72650f9c91a 100644
--- a/Build/source/utils/asymptote/types.h
+++ b/Build/source/utils/asymptote/types.h
@@ -81,7 +81,7 @@ public:
virtual ~ty();
virtual void print (ostream& out) const;
- virtual void printVar (ostream& out, symbol name) const {
+ virtual void printVar (ostream& out, string name) const {
print(out);
out << " " << name;
}
@@ -292,7 +292,7 @@ ty *primNull();
struct formal {
ty *t;
symbol name;
- absyntax::varinit *defval;
+ bool defval;
bool Explicit;
formal(ty *t,
@@ -300,7 +300,7 @@ struct formal {
bool optional=false,
bool Explicit=false)
: t(t), name(name),
- defval(optional ? absyntax::Default : 0), Explicit(Explicit) {}
+ defval(optional), Explicit(Explicit) {}
// string->symbol translation is costly if done too many times. This
// constructor has been disabled to make this cost more visible to the
@@ -327,6 +327,10 @@ typedef mem::vector<formal> formal_vector;
struct signature : public gc {
formal_vector formals;
+ // The number of keyword-only formals. These formals always come after the
+ // regular formals.
+ size_t numKeywordOnly;
+
// Formal for the rest parameter. If there is no rest parameter, then the
// type is null.
formal rest;
@@ -334,15 +338,16 @@ struct signature : public gc {
bool isOpen;
signature()
- : rest(0), isOpen(false)
+ : numKeywordOnly(0), rest(0), isOpen(false)
{}
static const struct OPEN_t {} OPEN;
- explicit signature(OPEN_t) : rest(0), isOpen(true) {}
+ explicit signature(OPEN_t) : numKeywordOnly(0), rest(0), isOpen(true) {}
signature(signature &sig)
- : formals(sig.formals), rest(sig.rest), isOpen(sig.isOpen)
+ : formals(sig.formals), numKeywordOnly(sig.numKeywordOnly),
+ rest(sig.rest), isOpen(sig.isOpen)
{}
virtual ~signature() {}
@@ -351,18 +356,27 @@ struct signature : public gc {
formals.push_back(f);
}
+ void addKeywordOnly(formal f) {
+ add(f);
+ ++numKeywordOnly;
+ }
+
void addRest(formal f) {
rest=f;
}
- bool hasRest() {
+ bool hasRest() const {
return rest.t;
}
- size_t getNumFormals() {
+ size_t getNumFormals() const {
return rest.t ? formals.size() + 1 : formals.size();
}
- formal& getFormal(size_t n) {
+ formal& getFormal(size_t n) {
+ assert(n < formals.size());
+ return formals[n];
+ }
+ const formal& getFormal(size_t n) const {
assert(n < formals.size());
return formals[n];
}
@@ -370,6 +384,15 @@ struct signature : public gc {
formal& getRest() {
return rest;
}
+ const formal& getRest() const {
+ return rest;
+ }
+
+ bool formalIsKeywordOnly(size_t n) const
+ {
+ assert(n < formals.size());
+ return n >= formals.size() - numKeywordOnly;
+ }
friend ostream& operator<< (ostream& out, const signature& s);
@@ -450,7 +473,7 @@ struct function : public ty {
void print(ostream& out) const
{ out << *result << sig; }
- void printVar (ostream& out, symbol name) const {
+ void printVar (ostream& out, string name) const {
result->printVar(out,name);
out << sig;
}
diff --git a/Build/source/utils/asymptote/virtualfieldaccess.cc b/Build/source/utils/asymptote/virtualfieldaccess.cc
index 810c71fa3f5..aed130f33a6 100644
--- a/Build/source/utils/asymptote/virtualfieldaccess.cc
+++ b/Build/source/utils/asymptote/virtualfieldaccess.cc
@@ -14,8 +14,12 @@ void virtualFieldAccess::encode(action act, position pos, coder &e)
{
switch(act) {
case CALL:
- this->encode(READ, pos, e);
- e.encode(inst::popcall);
+ if (caller) {
+ caller->encode(CALL, pos, e);
+ } else {
+ this->encode(READ, pos, e);
+ e.encode(inst::popcall);
+ }
return;
case READ:
assert(getter);
diff --git a/Build/source/utils/asymptote/virtualfieldaccess.h b/Build/source/utils/asymptote/virtualfieldaccess.h
index a47627df750..048e4e6b6a2 100644
--- a/Build/source/utils/asymptote/virtualfieldaccess.h
+++ b/Build/source/utils/asymptote/virtualfieldaccess.h
@@ -21,19 +21,32 @@ namespace trans {
// function, which pops a real number and then z off of the stack, sets the
// z.x to that new value, and puts the value back on the stack. In this case,
// pairs are immutable, but other virtual fields may not be.
+//
+// Some virtual fields are functions, such as a.push for an array a. In rare
+// cases, code such as
+// void f(int) = a.push;
+// requires an object representing a.push, and so a getter for the field must
+// be provided. Most of the time, however, these fields are just called.
+// As an optimization, a caller access can be provided. If this access is
+// given, then a call to the virtualFieldAccess just translates into a call to
+// caller.
class virtualFieldAccess : public access {
access *getter;
access *setter;
+ access *caller;
- // As an optimization, one could add a 'caller' field, to handle calls to
- // functions such as 'a.push(x)' where a is an array more efficiently.
public:
- virtualFieldAccess(access *getter, access *setter = 0)
+ virtualFieldAccess(access *getter,
+ access *setter = 0,
+ access *caller = 0)
: getter(getter), setter(setter) {}
- virtualFieldAccess(vm::bltin getter, vm::bltin setter = 0)
+ virtualFieldAccess(vm::bltin getter,
+ vm::bltin setter = 0,
+ vm::bltin caller = 0)
: getter(new bltinAccess(getter)),
- setter(setter ? new bltinAccess(setter) : 0) {}
+ setter(setter ? new bltinAccess(setter) : 0),
+ caller(caller ? new bltinAccess(caller) : 0) {}
void encode(action act, position pos, coder &e);
void encode(action act, position pos, coder &e, frame *);